123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739108740108741108742108743108744108745108746108747108748108749108750108751108752108753108754108755108756108757108758108759108760108761108762108763108764108765108766108767108768108769108770108771108772108773108774108775108776108777108778108779108780108781108782108783108784108785108786108787108788108789108790108791108792108793108794108795108796108797108798108799108800108801108802108803108804108805108806108807108808108809108810108811108812108813108814108815108816108817108818108819108820108821108822108823108824108825108826108827108828108829108830108831108832108833108834108835108836108837108838108839108840108841108842108843108844108845108846108847108848108849108850108851108852108853108854108855108856108857108858108859108860108861108862108863108864108865108866108867108868108869108870108871108872108873108874108875108876108877108878108879108880108881108882108883108884108885108886108887108888108889108890108891108892108893108894108895108896108897108898108899108900108901108902108903108904108905108906108907108908108909108910108911108912108913108914108915108916108917108918108919108920108921108922108923108924108925108926108927108928108929108930108931108932108933108934108935108936108937108938108939108940108941108942108943108944108945108946108947108948108949108950108951108952108953108954108955108956108957108958108959108960108961108962108963108964108965108966108967108968108969108970108971108972108973108974108975108976108977108978108979108980108981108982108983108984108985108986108987108988108989108990108991108992108993108994108995108996108997108998108999109000109001109002109003109004109005109006109007109008109009109010109011109012109013109014109015109016109017109018109019109020109021109022109023109024109025109026109027109028109029109030109031109032109033109034109035109036109037109038109039109040109041109042109043109044109045109046109047109048109049109050109051109052109053109054109055109056109057109058109059109060109061109062109063109064109065109066109067109068109069109070109071109072109073109074109075109076109077109078109079109080109081109082109083109084109085109086109087109088109089109090109091109092109093109094109095109096109097109098109099109100109101109102109103109104109105109106109107109108109109109110109111109112109113109114109115109116109117109118109119109120109121109122109123109124109125109126109127109128109129109130109131109132109133109134109135109136109137109138109139109140109141109142109143109144109145109146109147109148109149109150109151109152109153109154109155109156109157109158109159109160109161109162109163109164109165109166109167109168109169109170109171109172109173109174109175109176109177109178109179109180109181109182109183109184109185109186109187109188109189109190109191109192109193109194109195109196109197109198109199109200109201109202109203109204109205109206109207109208109209109210109211109212109213109214109215109216109217109218109219109220109221109222109223109224109225109226109227109228109229109230109231109232109233109234109235109236109237109238109239109240109241109242109243109244109245109246109247109248109249109250109251109252109253109254109255109256109257109258109259109260109261109262109263109264109265109266109267109268109269109270109271109272109273109274109275109276109277109278109279109280109281109282109283109284109285109286109287109288109289109290109291109292109293109294109295109296109297109298109299109300109301109302109303109304109305109306109307109308109309109310109311109312109313109314109315109316109317109318109319109320109321109322109323109324109325109326109327109328109329109330109331109332109333109334109335109336109337109338109339109340109341109342109343109344109345109346109347109348109349109350109351109352109353109354109355109356109357109358109359109360109361109362109363109364109365109366109367109368109369109370109371109372109373109374109375109376109377109378109379109380109381109382109383109384109385109386109387109388109389109390109391109392109393109394109395109396109397109398109399109400109401109402109403109404109405109406109407109408109409109410109411109412109413109414109415109416109417109418109419109420109421109422109423109424109425109426109427109428109429109430109431109432109433109434109435109436109437109438109439109440109441109442109443109444109445109446109447109448109449109450109451109452109453109454109455109456109457109458109459109460109461109462109463109464109465109466109467109468109469109470109471109472109473109474109475109476109477109478109479109480109481109482109483109484109485109486109487109488109489109490109491109492109493109494109495109496109497109498109499109500109501109502109503109504109505109506109507109508109509109510109511109512109513109514109515109516109517109518109519109520109521109522109523109524109525109526109527109528109529109530109531109532109533109534109535109536109537109538109539109540109541109542109543109544109545109546109547109548109549109550109551109552109553109554109555109556109557109558109559109560109561109562109563109564109565109566109567109568109569109570109571109572109573109574109575109576109577109578109579109580109581109582109583109584109585109586109587109588109589109590109591109592109593109594109595109596109597109598109599109600109601109602109603109604109605109606109607109608109609109610109611109612109613109614109615109616109617109618109619109620109621109622109623109624109625109626109627109628109629109630109631109632109633109634109635109636109637109638109639109640109641109642109643109644109645109646109647109648109649109650109651109652109653109654109655109656109657109658109659109660109661109662109663109664109665109666109667109668109669109670109671109672109673109674109675109676109677109678109679109680109681109682109683109684109685109686109687109688109689109690109691109692109693109694109695109696109697109698109699109700109701109702109703109704109705109706109707109708109709109710109711109712109713109714109715109716109717109718109719109720109721109722109723109724109725109726109727109728109729109730109731109732109733109734109735109736109737109738109739109740109741109742109743109744109745109746109747109748109749109750109751109752109753109754109755109756109757109758109759109760109761109762109763109764109765109766109767109768109769109770109771109772109773109774109775109776109777109778109779109780109781109782109783109784109785109786109787109788109789109790109791109792109793109794109795109796109797109798109799109800109801109802109803109804109805109806109807109808109809109810109811109812109813109814109815109816109817109818109819109820109821109822109823109824109825109826109827109828109829109830109831109832109833109834109835109836109837109838109839109840109841109842109843109844109845109846109847109848109849109850109851109852109853109854109855109856109857109858109859109860109861109862109863109864109865109866109867109868109869109870109871109872109873109874109875109876109877109878109879109880109881109882109883109884109885109886109887109888109889109890109891109892109893109894109895109896109897109898109899109900109901109902109903109904109905109906109907109908109909109910109911109912109913109914109915109916109917109918109919109920109921109922109923109924109925109926109927109928109929109930109931109932109933109934109935109936109937109938109939109940109941109942109943109944109945109946109947109948109949109950109951109952109953109954109955109956109957109958109959109960109961109962109963109964109965109966109967109968109969109970109971109972109973109974109975109976109977109978109979109980109981109982109983109984109985109986109987109988109989109990109991109992109993109994109995109996109997109998109999110000110001110002110003110004110005110006110007110008110009110010110011110012110013110014110015110016110017110018110019110020110021110022110023110024110025110026110027110028110029110030110031110032110033110034110035110036110037110038110039110040110041110042110043110044110045110046110047110048110049110050110051110052110053110054110055110056110057110058110059110060110061110062110063110064110065110066110067110068110069110070110071110072110073110074110075110076110077110078110079110080110081110082110083110084110085110086110087110088110089110090110091110092110093110094110095110096110097110098110099110100110101110102110103110104110105110106110107110108110109110110110111110112110113110114110115110116110117110118110119110120110121110122110123110124110125110126110127110128110129110130110131110132110133110134110135110136110137110138110139110140110141110142110143110144110145110146110147110148110149110150110151110152110153110154110155110156110157110158110159110160110161110162110163110164110165110166110167110168110169110170110171110172110173110174110175110176110177110178110179110180110181110182110183110184110185110186110187110188110189110190110191110192110193110194110195110196110197110198110199110200110201110202110203110204110205110206110207110208110209110210110211110212110213110214110215110216110217110218110219110220110221110222110223110224110225110226110227110228110229110230110231110232110233110234110235110236110237110238110239110240110241110242110243110244110245110246110247110248110249110250110251110252110253110254110255110256110257110258110259110260110261110262110263110264110265110266110267110268110269110270110271110272110273110274110275110276110277110278110279110280110281110282110283110284110285110286110287110288110289110290110291110292110293110294110295110296110297110298110299110300110301110302110303110304110305110306110307110308110309110310110311110312110313110314110315110316110317110318110319110320110321110322110323110324110325110326110327110328110329110330110331110332110333110334110335110336110337110338110339110340110341110342110343110344110345110346110347110348110349110350110351110352110353110354110355110356110357110358110359110360110361110362110363110364110365110366110367110368110369110370110371110372110373110374110375110376110377110378110379110380110381110382110383110384110385110386110387110388110389110390110391110392110393110394110395110396110397110398110399110400110401110402110403110404110405110406110407110408110409110410110411110412110413110414110415110416110417110418110419110420110421110422110423110424110425110426110427110428110429110430110431110432110433110434110435110436110437110438110439110440110441110442110443110444110445110446110447110448110449110450110451110452110453110454110455110456110457110458110459110460110461110462110463110464110465110466110467110468110469110470110471110472110473110474110475110476110477110478110479110480110481110482110483110484110485110486110487110488110489110490110491110492110493110494110495110496110497110498110499110500110501110502110503110504110505110506110507110508110509110510110511110512110513110514110515110516110517110518110519110520110521110522110523110524110525110526110527110528110529110530110531110532110533110534110535110536110537110538110539110540110541110542110543110544110545110546110547110548110549110550110551110552110553110554110555110556110557110558110559110560110561110562110563110564110565110566110567110568110569110570110571110572110573110574110575110576110577110578110579110580110581110582110583110584110585110586110587110588110589110590110591110592110593110594110595110596110597110598110599110600110601110602110603110604110605110606110607110608110609110610110611110612110613110614110615110616110617110618110619110620110621110622110623110624110625110626110627110628110629110630110631110632110633110634110635110636110637110638110639110640110641110642110643110644110645110646110647110648110649110650110651110652110653110654110655110656110657110658110659110660110661110662110663110664110665110666110667110668110669110670110671110672110673110674110675110676110677110678110679110680110681110682110683110684110685110686110687110688110689110690110691110692110693110694110695110696110697110698110699110700110701110702110703110704110705110706110707110708110709110710110711110712110713110714110715110716110717110718110719110720110721110722110723110724110725110726110727110728110729110730110731110732110733110734110735110736110737110738110739110740110741110742110743110744110745110746110747110748110749110750110751110752110753110754110755110756110757110758110759110760110761110762110763110764110765110766110767110768110769110770110771110772110773110774110775110776110777110778110779110780110781110782110783110784110785110786110787110788110789110790110791110792110793110794110795110796110797110798110799110800110801110802110803110804110805110806110807110808110809110810110811110812110813110814110815110816110817110818110819110820110821110822110823110824110825110826110827110828110829110830110831110832110833110834110835110836110837110838110839110840110841110842110843110844110845110846110847110848110849110850110851110852110853110854110855110856110857110858110859110860110861110862110863110864110865110866110867110868110869110870110871110872110873110874110875110876110877110878110879110880110881110882110883110884110885110886110887110888110889110890110891110892110893110894110895110896110897110898110899110900110901110902110903110904110905110906110907110908110909110910110911110912110913110914110915110916110917110918110919110920110921110922110923110924110925110926110927110928110929110930110931110932110933110934110935110936110937110938110939110940110941110942110943110944110945110946110947110948110949110950110951110952110953110954110955110956110957110958110959110960110961110962110963110964110965110966110967110968110969110970110971110972110973110974110975110976110977110978110979110980110981110982110983110984110985110986110987110988110989110990110991110992110993110994110995110996110997110998110999111000111001111002111003111004111005111006111007111008111009111010111011111012111013111014111015111016111017111018111019111020111021111022111023111024111025111026111027111028111029111030111031111032111033111034111035111036111037111038111039111040111041111042111043111044111045111046111047111048111049111050111051111052111053111054111055111056111057111058111059111060111061111062111063111064111065111066111067111068111069111070111071111072111073111074111075111076111077111078111079111080111081111082111083111084111085111086111087111088111089111090111091111092111093111094111095111096111097111098111099111100111101111102111103111104111105111106111107111108111109111110111111111112111113111114111115111116111117111118111119111120111121111122111123111124111125111126111127111128111129111130111131111132111133111134111135111136111137111138111139111140111141111142111143111144111145111146111147111148111149111150111151111152111153111154111155111156111157111158111159111160111161111162111163111164111165111166111167111168111169111170111171111172111173111174111175111176111177111178111179111180111181111182111183111184111185111186111187111188111189111190111191111192111193111194111195111196111197111198111199111200111201111202111203111204111205111206111207111208111209111210111211111212111213111214111215111216111217111218111219111220111221111222111223111224111225111226111227111228111229111230111231111232111233111234111235111236111237111238111239111240111241111242111243111244111245111246111247111248111249111250111251111252111253111254111255111256111257111258111259111260111261111262111263111264111265111266111267111268111269111270111271111272111273111274111275111276111277111278111279111280111281111282111283111284111285111286111287111288111289111290111291111292111293111294111295111296111297111298111299111300111301111302111303111304111305111306111307111308111309111310111311111312111313111314111315111316111317111318111319111320111321111322111323111324111325111326111327111328111329111330111331111332111333111334111335111336111337111338111339111340111341111342111343111344111345111346111347111348111349111350111351111352111353111354111355111356111357111358111359111360111361111362111363111364111365111366111367111368111369111370111371111372111373111374111375111376111377111378111379111380111381111382111383111384111385111386111387111388111389111390111391111392111393111394111395111396111397111398111399111400111401111402111403111404111405111406111407111408111409111410111411111412111413111414111415111416111417111418111419111420111421111422111423111424111425111426111427111428111429111430111431111432111433111434111435111436111437111438111439111440111441111442111443111444111445111446111447111448111449111450111451111452111453111454111455111456111457111458111459111460111461111462111463111464111465111466111467111468111469111470111471111472111473111474111475111476111477111478111479111480111481111482111483111484111485111486111487111488111489111490111491111492111493111494111495111496111497111498111499111500111501111502111503111504111505111506111507111508111509111510111511111512111513111514111515111516111517111518111519111520111521111522111523111524111525111526111527111528111529111530111531111532111533111534111535111536111537111538111539111540111541111542111543111544111545111546111547111548111549111550111551111552111553111554111555111556111557111558111559111560111561111562111563111564111565111566111567111568111569111570111571111572111573111574111575111576111577111578111579111580111581111582111583111584111585111586111587111588111589111590111591111592111593111594111595111596111597111598111599111600111601111602111603111604111605111606111607111608111609111610111611111612111613111614111615111616111617111618111619111620111621111622111623111624111625111626111627111628111629111630111631111632111633111634111635111636111637111638111639111640111641111642111643111644111645111646111647111648111649111650111651111652111653111654111655111656111657111658111659111660111661111662111663111664111665111666111667111668111669111670111671111672111673111674111675111676111677111678111679111680111681111682111683111684111685111686111687111688111689111690111691111692111693111694111695111696111697111698111699111700111701111702111703111704111705111706111707111708111709111710111711111712111713111714111715111716111717111718111719111720111721111722111723111724111725111726111727111728111729111730111731111732111733111734111735111736111737111738111739111740111741111742111743111744111745111746111747111748111749111750111751111752111753111754111755111756111757111758111759111760111761111762111763111764111765111766111767111768111769111770111771111772111773111774111775111776111777111778111779111780111781111782111783111784111785111786111787111788111789111790111791111792111793111794111795111796111797111798111799111800111801111802111803111804111805111806111807111808111809111810111811111812111813111814111815111816111817111818111819111820111821111822111823111824111825111826111827111828111829111830111831111832111833111834111835111836111837111838111839111840111841111842111843111844111845111846111847111848111849111850111851111852111853111854111855111856111857111858111859111860111861111862111863111864111865111866111867111868111869111870111871111872111873111874111875111876111877111878111879111880111881111882111883111884111885111886111887111888111889111890111891111892111893111894111895111896111897111898111899111900111901111902111903111904111905111906111907111908111909111910111911111912111913111914111915111916111917111918111919111920111921111922111923111924111925111926111927111928111929111930111931111932111933111934111935111936111937111938111939111940111941111942111943111944111945111946111947111948111949111950111951111952111953111954111955111956111957111958111959111960111961111962111963111964111965111966111967111968111969111970111971111972111973111974111975111976111977111978111979111980111981111982111983111984111985111986111987111988111989111990111991111992111993111994111995111996111997111998111999112000112001112002112003112004112005112006112007112008112009112010112011112012112013112014112015112016112017112018112019112020112021112022112023112024112025112026112027112028112029112030112031112032112033112034112035112036112037112038112039112040112041112042112043112044112045112046112047112048112049112050112051112052112053112054112055112056112057112058112059112060112061112062112063112064112065112066112067112068112069112070112071112072112073112074112075112076112077112078112079112080112081112082112083112084112085112086112087112088112089112090112091112092112093112094112095112096112097112098112099112100112101112102112103112104112105112106112107112108112109112110112111112112112113112114112115112116112117112118112119112120112121112122112123112124112125112126112127112128112129112130112131112132112133112134112135112136112137112138112139112140112141112142112143112144112145112146112147112148112149112150112151112152112153112154112155112156112157112158112159112160112161112162112163112164112165112166112167112168112169112170112171112172112173112174112175112176112177112178112179112180112181112182112183112184112185112186112187112188112189112190112191112192112193112194112195112196112197112198112199112200112201112202112203112204112205112206112207112208112209112210112211112212112213112214112215112216112217112218112219112220112221112222112223112224112225112226112227112228112229112230112231112232112233112234112235112236112237112238112239112240112241112242112243112244112245112246112247112248112249112250112251112252112253112254112255112256112257112258112259112260112261112262112263112264112265112266112267112268112269112270112271112272112273112274112275112276112277112278112279112280112281112282112283112284112285112286112287112288112289112290112291112292112293112294112295112296112297112298112299112300112301112302112303112304112305112306112307112308112309112310112311112312112313112314112315112316112317112318112319112320112321112322112323112324112325112326112327112328112329112330112331112332112333112334112335112336112337112338112339112340112341112342112343112344112345112346112347112348112349112350112351112352112353112354112355112356112357112358112359112360112361112362112363112364112365112366112367112368112369112370112371112372112373112374112375112376112377112378112379112380112381112382112383112384112385112386112387112388112389112390112391112392112393112394112395112396112397112398112399112400112401112402112403112404112405112406112407112408112409112410112411112412112413112414112415112416112417112418112419112420112421112422112423112424112425112426112427112428112429112430112431112432112433112434112435112436112437112438112439112440112441112442112443112444112445112446112447112448112449112450112451112452112453112454112455112456112457112458112459112460112461112462112463112464112465112466112467112468112469112470112471112472112473112474112475112476112477112478112479112480112481112482112483112484112485112486112487112488112489112490112491112492112493112494112495112496112497112498112499112500112501112502112503112504112505112506112507112508112509112510112511112512112513112514112515112516112517112518112519112520112521112522112523112524112525112526112527112528112529112530112531112532112533112534112535112536112537112538112539112540112541112542112543112544112545112546112547112548112549112550112551112552112553112554112555112556112557112558112559112560112561112562112563112564112565112566112567112568112569112570112571112572112573112574112575112576112577112578112579112580112581112582112583112584112585112586112587112588112589112590112591112592112593112594112595112596112597112598112599112600112601112602112603112604112605112606112607112608112609112610112611112612112613112614112615112616112617112618112619112620112621112622112623112624112625112626112627112628112629112630112631112632112633112634112635112636112637112638112639112640112641112642112643112644112645112646112647112648112649112650112651112652112653112654112655112656112657112658112659112660112661112662112663112664112665112666112667112668112669112670112671112672112673112674112675112676112677112678112679112680112681112682112683112684112685112686112687112688112689112690112691112692112693112694112695112696112697112698112699112700112701112702112703112704112705112706112707112708112709112710112711112712112713112714112715112716112717112718112719112720112721112722112723112724112725112726112727112728112729112730112731112732112733112734112735112736112737112738112739112740112741112742112743112744112745112746112747112748112749112750112751112752112753112754112755112756112757112758112759112760112761112762112763112764112765112766112767112768112769112770112771112772112773112774112775112776112777112778112779112780112781112782112783112784112785112786112787112788112789112790112791112792112793112794112795112796112797112798112799112800112801112802112803112804112805112806112807112808112809112810112811112812112813112814112815112816112817112818112819112820112821112822112823112824112825112826112827112828112829112830112831112832112833112834112835112836112837112838112839112840112841112842112843112844112845112846112847112848112849112850112851112852112853112854112855112856112857112858112859112860112861112862112863112864112865112866112867112868112869112870112871112872112873112874112875112876112877112878112879112880112881112882112883112884112885112886112887112888112889112890112891112892112893112894112895112896112897112898112899112900112901112902112903112904112905112906112907112908112909112910112911112912112913112914112915112916112917112918112919112920112921112922112923112924112925112926112927112928112929112930112931112932112933112934112935112936112937112938112939112940112941112942112943112944112945112946112947112948112949112950112951112952112953112954112955112956112957112958112959112960112961112962112963112964112965112966112967112968112969112970112971112972112973112974112975112976112977112978112979112980112981112982112983112984112985112986112987112988112989112990112991112992112993112994112995112996112997112998112999113000113001113002113003113004113005113006113007113008113009113010113011113012113013113014113015113016113017113018113019113020113021113022113023113024113025113026113027113028113029113030113031113032113033113034113035113036113037113038113039113040113041113042113043113044113045113046113047113048113049113050113051113052113053113054113055113056113057113058113059113060113061113062113063113064113065113066113067113068113069113070113071113072113073113074113075113076113077113078113079113080113081113082113083113084113085113086113087113088113089113090113091113092113093113094113095113096113097113098113099113100113101113102113103113104113105113106113107113108113109113110113111113112113113113114113115113116113117113118113119113120113121113122113123113124113125113126113127113128113129113130113131113132113133113134113135113136113137113138113139113140113141113142113143113144113145113146113147113148113149113150113151113152113153113154113155113156113157113158113159113160113161113162113163113164113165113166113167113168113169113170113171113172113173113174113175113176113177113178113179113180113181113182113183113184113185113186113187113188113189113190113191113192113193113194113195113196113197113198113199113200113201113202113203113204113205113206113207113208113209113210113211113212113213113214113215113216113217113218113219113220113221113222113223113224113225113226113227113228113229113230113231113232113233113234113235113236113237113238113239113240113241113242113243113244113245113246113247113248113249113250113251113252113253113254113255113256113257113258113259113260113261113262113263113264113265113266113267113268113269113270113271113272113273113274113275113276113277113278113279113280113281113282113283113284113285113286113287113288113289113290113291113292113293113294113295113296113297113298113299113300113301113302113303113304113305113306113307113308113309113310113311113312113313113314113315113316113317113318113319113320113321113322113323113324113325113326113327113328113329113330113331113332113333113334113335113336113337113338113339113340113341113342113343113344113345113346113347113348113349113350113351113352113353113354113355113356113357113358113359113360113361113362113363113364113365113366113367113368113369113370113371113372113373113374113375113376113377113378113379113380113381113382113383113384113385113386113387113388113389113390113391113392113393113394113395113396113397113398113399113400113401113402113403113404113405113406113407113408113409113410113411113412113413113414113415113416113417113418113419113420113421113422113423113424113425113426113427113428113429113430113431113432113433113434113435113436113437113438113439113440113441113442113443113444113445113446113447113448113449113450113451113452113453113454113455113456113457113458113459113460113461113462113463113464113465113466113467113468113469113470113471113472113473113474113475113476113477113478113479113480113481113482113483113484113485113486113487113488113489113490113491113492113493113494113495113496113497113498113499113500113501113502113503113504113505113506113507113508113509113510113511113512113513113514113515113516113517113518113519113520113521113522113523113524113525113526113527113528113529113530113531113532113533113534113535113536113537113538113539113540113541113542113543113544113545113546113547113548113549113550113551113552113553113554113555113556113557113558113559113560113561113562113563113564113565113566113567113568113569113570113571113572113573113574113575113576113577113578113579113580113581113582113583113584113585113586113587113588113589113590113591113592113593113594113595113596113597113598113599113600113601113602113603113604113605113606113607113608113609113610113611113612113613113614113615113616113617113618113619113620113621113622113623113624113625113626113627113628113629113630113631113632113633113634113635113636113637113638113639113640113641113642113643113644113645113646113647113648113649113650113651113652113653113654113655113656113657113658113659113660113661113662113663113664113665113666113667113668113669113670113671113672113673113674113675113676113677113678113679113680113681113682113683113684113685113686113687113688113689113690113691113692113693113694113695113696113697113698113699113700113701113702113703113704113705113706113707113708113709113710113711113712113713113714113715113716113717113718113719113720113721113722113723113724113725113726113727113728113729113730113731113732113733113734113735113736113737113738113739113740113741113742113743113744113745113746113747113748113749113750113751113752113753113754113755113756113757113758113759113760113761113762113763113764113765113766113767113768113769113770113771113772113773113774113775113776113777113778113779113780113781113782113783113784113785113786113787113788113789113790113791113792113793113794113795113796113797113798113799113800113801113802113803113804113805113806113807113808113809113810113811113812113813113814113815113816113817113818113819113820113821113822113823113824113825113826113827113828113829113830113831113832113833113834113835113836113837113838113839113840113841113842113843113844113845113846113847113848113849113850113851113852113853113854113855113856113857113858113859113860113861113862113863113864113865113866113867113868113869113870113871113872113873113874113875113876113877113878113879113880113881113882113883113884113885113886113887113888113889113890113891113892113893113894113895113896113897113898113899113900113901113902113903113904113905113906113907113908113909113910113911113912113913113914113915113916113917113918113919113920113921113922113923113924113925113926113927113928113929113930113931113932113933113934113935113936113937113938113939113940113941113942113943113944113945113946113947113948113949113950113951113952113953113954113955113956113957113958113959113960113961113962113963113964113965113966113967113968113969113970113971113972113973113974113975113976113977113978113979113980113981113982113983113984113985113986113987113988113989113990113991113992113993113994113995113996113997113998113999114000114001114002114003114004114005114006114007114008114009114010114011114012114013114014114015114016114017114018114019114020114021114022114023114024114025114026114027114028114029114030114031114032114033114034114035114036114037114038114039114040114041114042114043114044114045114046114047114048114049114050114051114052114053114054114055114056114057114058114059114060114061114062114063114064114065114066114067114068114069114070114071114072114073114074114075114076114077114078114079114080114081114082114083114084114085114086114087114088114089114090114091114092114093114094114095114096114097114098114099114100114101114102114103114104114105114106114107114108114109114110114111114112114113114114114115114116114117114118114119114120114121114122114123114124114125114126114127114128114129114130114131114132114133114134114135114136114137114138114139114140114141114142114143114144114145114146114147114148114149114150114151114152114153114154114155114156114157114158114159114160114161114162114163114164114165114166114167114168114169114170114171114172114173114174114175114176114177114178114179114180114181114182114183114184114185114186114187114188114189114190114191114192114193114194114195114196114197114198114199114200114201114202114203114204114205114206114207114208114209114210114211114212114213114214114215114216114217114218114219114220114221114222114223114224114225114226114227114228114229114230114231114232114233114234114235114236114237114238114239114240114241114242114243114244114245114246114247114248114249114250114251114252114253114254114255114256114257114258114259114260114261114262114263114264114265114266114267114268114269114270114271114272114273114274114275114276114277114278114279114280114281114282114283114284114285114286114287114288114289114290114291114292114293114294114295114296114297114298114299114300114301114302114303114304114305114306114307114308114309114310114311114312114313114314114315114316114317114318114319114320114321114322114323114324114325114326114327114328114329114330114331114332114333114334114335114336114337114338114339114340114341114342114343114344114345114346114347114348114349114350114351114352114353114354114355114356114357114358114359114360114361114362114363114364114365114366114367114368114369114370114371114372114373114374114375114376114377114378114379114380114381114382114383114384114385114386114387114388114389114390114391114392114393114394114395114396114397114398114399114400114401114402114403114404114405114406114407114408114409114410114411114412114413114414114415114416114417114418114419114420114421114422114423114424114425114426114427114428114429114430114431114432114433114434114435114436114437114438114439114440114441114442114443114444114445114446114447114448114449114450114451114452114453114454114455114456114457114458114459114460114461114462114463114464114465114466114467114468114469114470114471114472114473114474114475114476114477114478114479114480114481114482114483114484114485114486114487114488114489114490114491114492114493114494114495114496114497114498114499114500114501114502114503114504114505114506114507114508114509114510114511114512114513114514114515114516114517114518114519114520114521114522114523114524114525114526114527114528114529114530114531114532114533114534114535114536114537114538114539114540114541114542114543114544114545114546114547114548114549114550114551114552114553114554114555114556114557114558114559114560114561114562114563114564114565114566114567114568114569114570114571114572114573114574114575114576114577114578114579114580114581114582114583114584114585114586114587114588114589114590114591114592114593114594114595114596114597114598114599114600114601114602114603114604114605114606114607114608114609114610114611114612114613114614114615114616114617114618114619114620114621114622114623114624114625114626114627114628114629114630114631114632114633114634114635114636114637114638114639114640114641114642114643114644114645114646114647114648114649114650114651114652114653114654114655114656114657114658114659114660114661114662114663114664114665114666114667114668114669114670114671114672114673114674114675114676114677114678114679114680114681114682114683114684114685114686114687114688114689114690114691114692114693114694114695114696114697114698114699114700114701114702114703114704114705114706114707114708114709114710114711114712114713114714114715114716114717114718114719114720114721114722114723114724114725114726114727114728114729114730114731114732114733114734114735114736114737114738114739114740114741114742114743114744114745114746114747114748114749114750114751114752114753114754114755114756114757114758114759114760114761114762114763114764114765114766114767114768114769114770114771114772114773114774114775114776114777114778114779114780114781114782114783114784114785114786114787114788114789114790114791114792114793114794114795114796114797114798114799114800114801114802114803114804114805114806114807114808114809114810114811114812114813114814114815114816114817114818114819114820114821114822114823114824114825114826114827114828114829114830114831114832114833114834114835114836114837114838114839114840114841114842114843114844114845114846114847114848114849114850114851114852114853114854114855114856114857114858114859114860114861114862114863114864114865114866114867114868114869114870114871114872114873114874114875114876114877114878114879114880114881114882114883114884114885114886114887114888114889114890114891114892114893114894114895114896114897114898114899114900114901114902114903114904114905114906114907114908114909114910114911114912114913114914114915114916114917114918114919114920114921114922114923114924114925114926114927114928114929114930114931114932114933114934114935114936114937114938114939114940114941114942114943114944114945114946114947114948114949114950114951114952114953114954114955114956114957114958114959114960114961114962114963114964114965114966114967114968114969114970114971114972114973114974114975114976114977114978114979114980114981114982114983114984114985114986114987114988114989114990114991114992114993114994114995114996114997114998114999115000115001115002115003115004115005115006115007115008115009115010115011115012115013115014115015115016115017115018115019115020115021115022115023115024115025115026115027115028115029115030115031115032115033115034115035115036115037115038115039115040115041115042115043115044115045115046115047115048115049115050115051115052115053115054115055115056115057115058115059115060115061115062115063115064115065115066115067115068115069115070115071115072115073115074115075115076115077115078115079115080115081115082115083115084115085115086115087115088115089115090115091115092115093115094115095115096115097115098115099115100115101115102115103115104115105115106115107115108115109115110115111115112115113115114115115115116115117115118115119115120115121115122115123115124115125115126115127115128115129115130115131115132115133115134115135115136115137115138115139115140115141115142115143115144115145115146115147115148115149115150115151115152115153115154115155115156115157115158115159115160115161115162115163115164115165115166115167115168115169115170115171115172115173115174115175115176115177115178115179115180115181115182115183115184115185115186115187115188115189115190115191115192115193115194115195115196115197115198115199115200115201115202115203115204115205115206115207115208115209115210115211115212115213115214115215115216115217115218115219115220115221115222115223115224115225115226115227115228115229115230115231115232115233115234115235115236115237115238115239115240115241115242115243115244115245115246115247115248115249115250115251115252115253115254115255115256115257115258115259115260115261115262115263115264115265115266115267115268115269115270115271115272115273115274115275115276115277115278115279115280115281115282115283115284115285115286115287115288115289115290115291115292115293115294115295115296115297115298115299115300115301115302115303115304115305115306115307115308115309115310115311115312115313115314115315115316115317115318115319115320115321115322115323115324115325115326115327115328115329115330115331115332115333115334115335115336115337115338115339115340115341115342115343115344115345115346115347115348115349115350115351115352115353115354115355115356115357115358115359115360115361115362115363115364115365115366115367115368115369115370115371115372115373115374115375115376115377115378115379115380115381115382115383115384115385115386115387115388115389115390115391115392115393115394115395115396115397115398115399115400115401115402115403115404115405115406115407115408115409115410115411115412115413115414115415115416115417115418115419115420115421115422115423115424115425115426115427115428115429115430115431115432115433115434115435115436115437115438115439115440115441115442115443115444115445115446115447115448115449115450115451115452115453115454115455115456115457115458115459115460115461115462115463115464115465115466115467115468115469115470115471115472115473115474115475115476115477115478115479115480115481115482115483115484115485115486115487115488115489115490115491115492115493115494115495115496115497115498115499115500115501115502115503115504115505115506115507115508115509115510115511115512115513115514115515115516115517115518115519115520115521115522115523115524115525115526115527115528115529115530115531115532115533115534115535115536115537115538115539115540115541115542115543115544115545115546115547115548115549115550115551115552115553115554115555115556115557115558115559115560115561115562115563115564115565115566115567115568115569115570115571115572115573115574115575115576115577115578115579115580115581115582115583115584115585115586115587115588115589115590115591115592115593115594115595115596115597115598115599115600115601115602115603115604115605115606115607115608115609115610115611115612115613115614115615115616115617115618115619115620115621115622115623115624115625115626115627115628115629115630115631115632115633115634115635115636115637115638115639115640115641115642115643115644115645115646115647115648115649115650115651115652115653115654115655115656115657115658115659115660115661115662115663115664115665115666115667115668115669115670115671115672115673115674115675115676115677115678115679115680115681115682115683115684115685115686115687115688115689115690115691115692115693115694115695115696115697115698115699115700115701115702115703115704115705115706115707115708115709115710115711115712115713115714115715115716115717115718115719115720115721115722115723115724115725115726115727115728115729115730115731115732115733115734115735115736115737115738115739115740115741115742115743115744115745115746115747115748115749115750115751115752115753115754115755115756115757115758115759115760115761115762115763115764115765115766115767115768115769115770115771115772115773115774115775115776115777115778115779115780115781115782115783115784115785115786115787115788115789115790115791115792115793115794115795115796115797115798115799115800115801115802115803115804115805115806115807115808115809115810115811115812115813115814115815115816115817115818115819115820115821115822115823115824115825115826115827115828115829115830115831115832115833115834115835115836115837115838115839115840115841115842115843115844115845115846115847115848115849115850115851115852115853115854115855115856115857115858115859115860115861115862115863115864115865115866115867115868115869115870115871115872115873115874115875115876115877115878115879115880115881115882115883115884115885115886115887115888115889115890115891115892115893115894115895115896115897115898115899115900115901115902115903115904115905115906115907115908115909115910115911115912115913115914115915115916115917115918115919115920115921115922115923115924115925115926115927115928115929115930115931115932115933115934115935115936115937115938115939115940115941115942115943115944115945115946115947115948115949115950115951115952115953115954115955115956115957115958115959115960115961115962115963115964115965115966115967115968115969115970115971115972115973115974115975115976115977115978115979115980115981115982115983115984115985115986115987115988115989115990115991115992115993115994115995115996115997115998115999116000116001116002116003116004116005116006116007116008116009116010116011116012116013116014116015116016116017116018116019116020116021116022116023116024116025116026116027116028116029116030116031116032116033116034116035116036116037116038116039116040116041116042116043116044116045116046116047116048116049116050116051116052116053116054116055116056116057116058116059116060116061116062116063116064116065116066116067116068116069116070116071116072116073116074116075116076116077116078116079116080116081116082116083116084116085116086116087116088116089116090116091116092116093116094116095116096116097116098116099116100116101116102116103116104116105116106116107116108116109116110116111116112116113116114116115116116116117116118116119116120116121116122116123116124116125116126116127116128116129116130116131116132116133116134116135116136116137116138116139116140116141116142116143116144116145116146116147116148116149116150116151116152116153116154116155116156116157116158116159116160116161116162116163116164116165116166116167116168116169116170116171116172116173116174116175116176116177116178116179116180116181116182116183116184116185116186116187116188116189116190116191116192116193116194116195116196116197116198116199116200116201116202116203116204116205116206116207116208116209116210116211116212116213116214116215116216116217116218116219116220116221116222116223116224116225116226116227116228116229116230116231116232116233116234116235116236116237116238116239116240116241116242116243116244116245116246116247116248116249116250116251116252116253116254116255116256116257116258116259116260116261116262116263116264116265116266116267116268116269116270116271116272116273116274116275116276116277116278116279116280116281116282116283116284116285116286116287116288116289116290116291116292116293116294116295116296116297116298116299116300116301116302116303116304116305116306116307116308116309116310116311116312116313116314116315116316116317116318116319116320116321116322116323116324116325116326116327116328116329116330116331116332116333116334116335116336116337116338116339116340116341116342116343116344116345116346116347116348116349116350116351116352116353116354116355116356116357116358116359116360116361116362116363116364116365116366116367116368116369116370116371116372116373116374116375116376116377116378116379116380116381116382116383116384116385116386116387116388116389116390116391116392116393116394116395116396116397116398116399116400116401116402116403116404116405116406116407116408116409116410116411116412116413116414116415116416116417116418116419116420116421116422116423116424116425116426116427116428116429116430116431116432116433116434116435116436116437116438116439116440116441116442116443116444116445116446116447116448116449116450116451116452116453116454116455116456116457116458116459116460116461116462116463116464116465116466116467116468116469116470116471116472116473116474116475116476116477116478116479116480116481116482116483116484116485116486116487116488116489116490116491116492116493116494116495116496116497116498116499116500116501116502116503116504116505116506116507116508116509116510116511116512116513116514116515116516116517116518116519116520116521116522116523116524116525116526116527116528116529116530116531116532116533116534116535116536116537116538116539116540116541116542116543116544116545116546116547116548116549116550116551116552116553116554116555116556116557116558116559116560116561116562116563116564116565116566116567116568116569116570116571116572116573116574116575116576116577116578116579116580116581116582116583116584116585116586116587116588116589116590116591116592116593116594116595116596116597116598116599116600116601116602116603116604116605116606116607116608116609116610116611116612116613116614116615116616116617116618116619116620116621116622116623116624116625116626116627116628116629116630116631116632116633116634116635116636116637116638116639116640116641116642116643116644116645116646116647116648116649116650116651116652116653116654116655116656116657116658116659116660116661116662116663116664116665116666116667116668116669116670116671116672116673116674116675116676116677116678116679116680116681116682116683116684116685116686116687116688116689116690116691116692116693116694116695116696116697116698116699116700116701116702116703116704116705116706116707116708116709116710116711116712116713116714116715116716116717116718116719116720116721116722116723116724116725116726116727116728116729116730116731116732116733116734116735116736116737116738116739116740116741116742116743116744116745116746116747116748116749116750116751116752116753116754116755116756116757116758116759116760116761116762116763116764116765116766116767116768116769116770116771116772116773116774116775116776116777116778116779116780116781116782116783116784116785116786116787116788116789116790116791116792116793116794116795116796116797116798116799116800116801116802116803116804116805116806116807116808116809116810116811116812116813116814116815116816116817116818116819116820116821116822 |
- diff -Nur uClibc-0.9.33.2/docs/man/arc4random.3 uClibc/docs/man/arc4random.3
- --- uClibc-0.9.33.2/docs/man/arc4random.3 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/docs/man/arc4random.3 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,110 @@
- +.\" $OpenBSD: arc4random.3,v 1.19 2005/07/17 08:50:55 jaredy Exp $
- +.\"
- +.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
- +.\" All rights reserved.
- +.\"
- +.\" Redistribution and use in source and binary forms, with or without
- +.\" modification, are permitted provided that the following conditions
- +.\" are met:
- +.\" 1. Redistributions of source code must retain the above copyright
- +.\" notice, this list of conditions and the following disclaimer.
- +.\" 2. Redistributions in binary form must reproduce the above copyright
- +.\" notice, this list of conditions and the following disclaimer in the
- +.\" documentation and/or other materials provided with the distribution.
- +.\" 3. All advertising materials mentioning features or use of this software
- +.\" must display the following acknowledgement:
- +.\" This product includes software developed by Niels Provos.
- +.\" 4. The name of the author may not be used to endorse or promote products
- +.\" derived from this software without specific prior written permission.
- +.\"
- +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- +.\"
- +.\" Manual page, using -mandoc macros
- +.\"
- +.Dd April 15, 1997
- +.Dt ARC4RANDOM 3
- +.Os
- +.Sh NAME
- +.Nm arc4random ,
- +.Nm arc4random_stir ,
- +.Nm arc4random_addrandom
- +.Nd arc4 random number generator
- +.Sh SYNOPSIS
- +.Fd #include <stdlib.h>
- +.Ft uint32_t
- +.Fn arc4random "void"
- +.Ft void
- +.Fn arc4random_stir "void"
- +.Ft void
- +.Fn arc4random_addrandom "u_char *dat" "int datlen"
- +.Sh DESCRIPTION
- +The
- +.Fn arc4random
- +function provides a high quality 32-bit pseudo-random
- +number very quickly.
- +.Fn arc4random
- +seeds itself on a regular basis from the kernel strong random number
- +subsystem described in
- +.Xr random 4 .
- +On each call, an ARC4 generator is used to generate a new result.
- +The
- +.Fn arc4random
- +function uses the ARC4 cipher key stream generator,
- +which uses 8*8 8-bit S-Boxes.
- +The S-Boxes can be in about (2**1700) states.
- +.Pp
- +.Fn arc4random
- +fits into a middle ground not covered by other subsystems such as
- +the strong, slow, and resource expensive random
- +devices described in
- +.Xr random 4
- +versus the fast but poor quality interfaces described in
- +.Xr rand 3 ,
- +.Xr random 3 ,
- +and
- +.Xr drand48 3 .
- +.Pp
- +The
- +.Fn arc4random_stir
- +function reads data from a pseudo-random device, usually
- +.Pa /dev/urandom,
- +and uses it to permute the S-Boxes via
- +.Fn arc4random_addrandom .
- +.Pp
- +There is no need to call
- +.Fn arc4random_stir
- +before using
- +.Fn arc4random ,
- +since
- +.Fn arc4random
- +automatically initializes itself.
- +.Sh SEE ALSO
- +.Xr rand 3 ,
- +.Xr rand48 3 ,
- +.Xr random 3
- +.Sh HISTORY
- +An algorithm called
- +.Pa RC4
- +was designed by RSA Data Security, Inc.
- +It was considered a trade secret.
- +Because it was a trade secret, it obviously could not be patented.
- +A clone of this was posted anonymously to USENET and confirmed to
- +be equivalent by several sources who had access to the original cipher.
- +Because of the trade secret situation, RSA Data Security, Inc. can do
- +nothing about the release of the ARC4 algorithm.
- +Since
- +.Pa RC4
- +used to be a trade secret, the cipher is now referred to as
- +.Pa ARC4 .
- +.Pp
- +These functions first appeared in
- +.Ox 2.1 .
- diff -Nur uClibc-0.9.33.2/docs/PORTING uClibc/docs/PORTING
- --- uClibc-0.9.33.2/docs/PORTING 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/docs/PORTING 2014-02-03 12:32:56.000000000 +0100
- @@ -130,9 +130,6 @@
- ====================
- === Misc Cruft ===
- ====================
- -- utils/readelf.c - not really needed generally speaking, but might as well
- - add your arch to the giant EM_* list (describe_elf_hdr)
- -
- - MAINTAINERS - presumably you're going to submit this code back to mainline
- and since you're the only one who cares about this arch (right now), you
- should add yourself to the toplevel MAINTAINERS file. do it.
- diff -Nur uClibc-0.9.33.2/extra/config/check.sh uClibc/extra/config/check.sh
- --- uClibc-0.9.33.2/extra/config/check.sh 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/check.sh 2014-02-03 12:32:56.000000000 +0100
- @@ -1,6 +1,6 @@
- #!/bin/sh
- # Needed for systems without gettext
- -$* -xc -o /dev/null - > /dev/null 2>&1 << EOF
- +$* -x c -o /dev/null - > /dev/null 2>&1 << EOF
- #include <libintl.h>
- int main()
- {
- diff -Nur uClibc-0.9.33.2/extra/config/conf.c uClibc/extra/config/conf.c
- --- uClibc-0.9.33.2/extra/config/conf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/conf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,42 +10,48 @@
- #include <string.h>
- #include <time.h>
- #include <unistd.h>
- +#include <getopt.h>
- #include <sys/stat.h>
- #include <sys/time.h>
- +#include <errno.h>
-
- -#define LKC_DIRECT_LINK
- #include "lkc.h"
-
- static void conf(struct menu *menu);
- static void check_conf(struct menu *menu);
- +static void xfgets(char *str, int size, FILE *in);
-
- -enum {
- - ask_all,
- - ask_new,
- - ask_silent,
- - set_default,
- - set_yes,
- - set_mod,
- - set_no,
- - set_random
- -} input_mode = ask_all;
- -char *defconfig_file;
- +enum input_mode {
- + oldaskconfig,
- + silentoldconfig,
- + oldconfig,
- + allnoconfig,
- + allyesconfig,
- + allmodconfig,
- + alldefconfig,
- + randconfig,
- + defconfig,
- + savedefconfig,
- + listnewconfig,
- + olddefconfig,
- +} input_mode = oldaskconfig;
-
- static int indent = 1;
- +static int tty_stdio;
- static int valid_stdin = 1;
- static int sync_kconfig;
- static int conf_cnt;
- static char line[128];
- static struct menu *rootEntry;
-
- -static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
- -
- -static const char *get_help(struct menu *menu)
- +static void print_help(struct menu *menu)
- {
- - if (menu_has_help(menu))
- - return _(menu_get_help(menu));
- - else
- - return nohelp_text;
- + struct gstr help = str_new();
- +
- + menu_get_ext_help(menu, &help);
- +
- + printf("\n%s\n", str_get(&help));
- + str_free(&help);
- }
-
- static void strip(char *str)
- @@ -93,16 +99,19 @@
- }
-
- switch (input_mode) {
- - case ask_new:
- - case ask_silent:
- + case oldconfig:
- + case silentoldconfig:
- if (sym_has_value(sym)) {
- printf("%s\n", def);
- return 0;
- }
- check_stdin();
- - case ask_all:
- + /* fall through */
- + case oldaskconfig:
- fflush(stdout);
- - fgets(line, 128, stdin);
- + xfgets(line, 128, stdin);
- + if (!tty_stdio)
- + printf("\n");
- return 1;
- default:
- break;
- @@ -121,7 +130,7 @@
- return 1;
- }
-
- -int conf_string(struct menu *menu)
- +static int conf_string(struct menu *menu)
- {
- struct symbol *sym = menu->sym;
- const char *def;
- @@ -140,10 +149,11 @@
- case '?':
- /* print help */
- if (line[1] == '\n') {
- - printf("\n%s\n", get_help(menu));
- + print_help(menu);
- def = NULL;
- break;
- }
- + /* fall through */
- default:
- line[strlen(line)-1] = 0;
- def = line;
- @@ -156,14 +166,12 @@
- static int conf_sym(struct menu *menu)
- {
- struct symbol *sym = menu->sym;
- - int type;
- tristate oldval, newval;
-
- while (1) {
- printf("%*s%s ", indent - 1, "", _(menu->prompt->text));
- if (sym->name)
- printf("(%s) ", sym->name);
- - type = sym_get_type(sym);
- putchar('[');
- oldval = sym_get_tristate_value(sym);
- switch (oldval) {
- @@ -220,7 +228,7 @@
- if (sym_set_tristate_value(sym, newval))
- return 0;
- help:
- - printf("\n%s\n", get_help(menu));
- + print_help(menu);
- }
- }
-
- @@ -228,11 +236,9 @@
- {
- struct symbol *sym, *def_sym;
- struct menu *child;
- - int type;
- bool is_new;
-
- sym = menu->sym;
- - type = sym_get_type(sym);
- is_new = !sym_has_value(sym);
- if (sym_is_changable(sym)) {
- conf_sym(menu);
- @@ -294,20 +300,21 @@
- printf("?");
- printf("]: ");
- switch (input_mode) {
- - case ask_new:
- - case ask_silent:
- + case oldconfig:
- + case silentoldconfig:
- if (!is_new) {
- cnt = def;
- printf("%d\n", cnt);
- break;
- }
- check_stdin();
- - case ask_all:
- + /* fall through */
- + case oldaskconfig:
- fflush(stdout);
- - fgets(line, 128, stdin);
- + xfgets(line, 128, stdin);
- strip(line);
- if (line[0] == '?') {
- - printf("\n%s\n", get_help(menu));
- + print_help(menu);
- continue;
- }
- if (!line[0])
- @@ -330,8 +337,8 @@
- }
- if (!child)
- continue;
- - if (line[strlen(line) - 1] == '?') {
- - printf("\n%s\n", get_help(child));
- + if (line[0] && line[strlen(line) - 1] == '?') {
- + print_help(child);
- continue;
- }
- sym_set_choice_value(sym, child->sym);
- @@ -360,10 +367,14 @@
-
- switch (prop->type) {
- case P_MENU:
- - if (input_mode == ask_silent && rootEntry != menu) {
- + if ((input_mode == silentoldconfig ||
- + input_mode == listnewconfig ||
- + input_mode == olddefconfig) &&
- + rootEntry != menu) {
- check_conf(menu);
- return;
- }
- + /* fall through */
- case P_COMMENT:
- prompt = menu_get_prompt(menu);
- if (prompt)
- @@ -418,10 +429,16 @@
- if (sym && !sym_has_value(sym)) {
- if (sym_is_changable(sym) ||
- (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
- - if (!conf_cnt++)
- - printf(_("*\n* Restart config...\n*\n"));
- - rootEntry = menu_get_parent_menu(menu);
- - conf(rootEntry);
- + if (input_mode == listnewconfig) {
- + if (sym->name && !sym_is_choice_value(sym)) {
- + printf("%s%s\n", CONFIG_, sym->name);
- + }
- + } else if (input_mode != olddefconfig) {
- + if (!conf_cnt++)
- + printf(_("*\n* Restart config...\n*\n"));
- + rootEntry = menu_get_parent_menu(menu);
- + conf(rootEntry);
- + }
- }
- }
-
- @@ -429,90 +446,170 @@
- check_conf(child);
- }
-
- +#if 00 // || !defined __UCLIBC__ || \
- + (defined UCLIBC_HAS_GETOPT_LONG || defined UCLIBC_HAS_GNU_GETOPT)
- +static struct option long_opts[] = {
- + {"oldaskconfig", no_argument, NULL, oldaskconfig},
- + {"oldconfig", no_argument, NULL, oldconfig},
- + {"silentoldconfig", no_argument, NULL, silentoldconfig},
- + {"defconfig", optional_argument, NULL, defconfig},
- + {"savedefconfig", required_argument, NULL, savedefconfig},
- + {"allnoconfig", no_argument, NULL, allnoconfig},
- + {"allyesconfig", no_argument, NULL, allyesconfig},
- + {"allmodconfig", no_argument, NULL, allmodconfig},
- + {"alldefconfig", no_argument, NULL, alldefconfig},
- + {"randconfig", no_argument, NULL, randconfig},
- + {"listnewconfig", no_argument, NULL, listnewconfig},
- + {"olddefconfig", no_argument, NULL, olddefconfig},
- + /*
- + * oldnoconfig is an alias of olddefconfig, because people already
- + * are dependent on its behavior(sets new symbols to their default
- + * value but not 'n') with the counter-intuitive name.
- + */
- + {"oldnoconfig", no_argument, NULL, olddefconfig},
- + {NULL, 0, NULL, 0}
- +};
- +
- +static void conf_usage(const char *progname)
- +{
- +
- + printf("Usage: %s [option] <kconfig-file>\n", progname);
- + printf("[option] is _one_ of the following:\n");
- + printf(" --listnewconfig List new options\n");
- + printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
- + printf(" --oldconfig Update a configuration using a provided .config as base\n");
- + printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n");
- + printf(" --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n");
- + printf(" --oldnoconfig An alias of olddefconfig\n");
- + printf(" --defconfig <file> New config with default defined in <file>\n");
- + printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n");
- + printf(" --allnoconfig New config where all options are answered with no\n");
- + printf(" --allyesconfig New config where all options are answered with yes\n");
- + printf(" --allmodconfig New config where all options are answered with mod\n");
- + printf(" --alldefconfig New config with all symbols set to default\n");
- + printf(" --randconfig New config with random answer to all options\n");
- +}
- +#else
- +static void conf_usage(const char *progname)
- +{
- +
- + printf("Usage: %s [option] <kconfig-file>\n", progname);
- + printf("[option] is _one_ of the following:\n");
- + printf(" -a, --oldaskconfig Start a new configuration using a line-oriented program\n");
- + printf(" -s, --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n");
- + printf(" -o, --oldconfig Update a configuration using a provided .config as base\n");
- + printf(" -n, --allnoconfig New config where all options are answered with no\n");
- + printf(" -y, --allyesconfig New config where all options are answered with yes\n");
- + printf(" -m, --allmodconfig New config where all options are answered with mod\n");
- + printf(" -A, --alldefconfig New config with all symbols set to default\n");
- + printf(" -r, --randconfig New config with random answer to all options\n");
- + printf(" -D, --defconfig <file> New config with default defined in <file>\n");
- + printf(" -S, --savedefconfig <file> Save the minimal current configuration to <file>\n");
- + printf(" -l, --listnewconfig List new options\n");
- + printf(" -d, --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n");
- + printf(" --oldnoconfig An alias of olddefconfig\n");
- +
- +}
- +#endif
- +
- int main(int ac, char **av)
- {
- + const char *progname = av[0];
- int opt;
- - const char *name;
- - const char *configname = conf_get_configname();
- + const char *name, *defconfig_file = NULL /* gcc uninit */;
- struct stat tmpstat;
-
- setlocale(LC_ALL, "");
- bindtextdomain(PACKAGE, LOCALEDIR);
- textdomain(PACKAGE);
-
- - while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) {
- + tty_stdio = isatty(0) && isatty(1) && isatty(2);
- +
- +#if 00// !defined __UCLIBC__ || \
- + (defined UCLIBC_HAS_GETOPT_LONG || defined UCLIBC_HAS_GNU_GETOPT)
- + while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1)
- +#else
- + char *gch = "asonymArDSld";
- + while ((opt = getopt(ac, av, "asonymArD:S:ldh")) != -1)
- +#endif
- + {
- + char *x = memchr(gch, opt, strlen(gch));
- + if (x == NULL)
- + opt = '?';
- + else
- + opt = x - gch;
- + input_mode = (enum input_mode)opt;
- switch (opt) {
- - case 'o':
- - input_mode = ask_silent;
- - break;
- - case 's':
- - input_mode = ask_silent;
- + case silentoldconfig:
- sync_kconfig = 1;
- break;
- - case 'd':
- - input_mode = set_default;
- - break;
- - case 'D':
- - input_mode = set_default;
- + case defconfig:
- + case savedefconfig:
- defconfig_file = optarg;
- break;
- - case 'n':
- - input_mode = set_no;
- - break;
- - case 'm':
- - input_mode = set_mod;
- - break;
- - case 'y':
- - input_mode = set_yes;
- - break;
- - case 'r':
- + case randconfig:
- {
- struct timeval now;
- unsigned int seed;
- + char *seed_env;
-
- /*
- * Use microseconds derived seed,
- * compensate for systems where it may be zero
- */
- gettimeofday(&now, NULL);
- -
- seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1));
- - srand(seed);
-
- - input_mode = set_random;
- + seed_env = getenv("KCONFIG_SEED");
- + if( seed_env && *seed_env ) {
- + char *endp;
- + int tmp = (int)strtol(seed_env, &endp, 0);
- + if (*endp == '\0') {
- + seed = tmp;
- + }
- + }
- + fprintf( stderr, "KCONFIG_SEED=0x%X\n", seed );
- + srand(seed);
- break;
- }
- - case 'h':
- - printf(_("See README for usage info\n"));
- - exit(0);
- + case oldaskconfig:
- + case oldconfig:
- + case allnoconfig:
- + case allyesconfig:
- + case allmodconfig:
- + case alldefconfig:
- + case listnewconfig:
- + case olddefconfig:
- break;
- - default:
- - fprintf(stderr, _("See README for usage info\n"));
- + case '?':
- + conf_usage(progname);
- exit(1);
- + break;
- }
- }
- if (ac == optind) {
- printf(_("%s: Kconfig file missing\n"), av[0]);
- + conf_usage(progname);
- exit(1);
- }
- name = av[optind];
- conf_parse(name);
- //zconfdump(stdout);
- if (sync_kconfig) {
- - if (stat(configname, &tmpstat)) {
- + name = conf_get_configname();
- + if (stat(name, &tmpstat)) {
- fprintf(stderr, _("***\n"
- - "*** You have not yet configured!\n"
- - "*** (missing .config file)\n"
- + "*** Configuration file \"%s\" not found!\n"
- "***\n"
- "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
- "*** \"make menuconfig\" or \"make xconfig\").\n"
- - "***\n"));
- + "***\n"), name);
- exit(1);
- }
- }
-
- switch (input_mode) {
- - case set_default:
- + case defconfig:
- if (!defconfig_file)
- defconfig_file = conf_get_default_confname();
- if (conf_read(defconfig_file)) {
- @@ -522,31 +619,46 @@
- exit(1);
- }
- break;
- - case ask_silent:
- - case ask_all:
- - case ask_new:
- + case savedefconfig:
- + case silentoldconfig:
- + case oldaskconfig:
- + case oldconfig:
- + case listnewconfig:
- + case olddefconfig:
- conf_read(NULL);
- break;
- - case set_no:
- - case set_mod:
- - case set_yes:
- - case set_random:
- + case allnoconfig:
- + case allyesconfig:
- + case allmodconfig:
- + case alldefconfig:
- + case randconfig:
- name = getenv("KCONFIG_ALLCONFIG");
- - if (name && !stat(name, &tmpstat)) {
- - conf_read_simple(name, S_DEF_USER);
- + if (!name)
- + break;
- + if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) {
- + if (conf_read_simple(name, S_DEF_USER)) {
- + fprintf(stderr,
- + _("*** Can't read seed configuration \"%s\"!\n"),
- + name);
- + exit(1);
- + }
- break;
- }
- switch (input_mode) {
- - case set_no: name = "allno.config"; break;
- - case set_mod: name = "allmod.config"; break;
- - case set_yes: name = "allyes.config"; break;
- - case set_random: name = "allrandom.config"; break;
- + case allnoconfig: name = "allno.config"; break;
- + case allyesconfig: name = "allyes.config"; break;
- + case allmodconfig: name = "allmod.config"; break;
- + case alldefconfig: name = "alldef.config"; break;
- + case randconfig: name = "allrandom.config"; break;
- default: break;
- }
- - if (!stat(name, &tmpstat))
- - conf_read_simple(name, S_DEF_USER);
- - else if (!stat("all.config", &tmpstat))
- - conf_read_simple("all.config", S_DEF_USER);
- + if (conf_read_simple(name, S_DEF_USER) &&
- + conf_read_simple("all.config", S_DEF_USER)) {
- + fprintf(stderr,
- + _("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"),
- + name);
- + exit(1);
- + }
- break;
- default:
- break;
- @@ -557,41 +669,51 @@
- name = getenv("KCONFIG_NOSILENTUPDATE");
- if (name && *name) {
- fprintf(stderr,
- - _("\n*** configuration requires explicit update.\n\n"));
- + _("\n*** The configuration requires explicit update.\n\n"));
- return 1;
- }
- }
- - valid_stdin = isatty(0) && isatty(1) && isatty(2);
- + valid_stdin = tty_stdio;
- }
-
- switch (input_mode) {
- - case set_no:
- + case allnoconfig:
- conf_set_all_new_symbols(def_no);
- break;
- - case set_yes:
- + case allyesconfig:
- conf_set_all_new_symbols(def_yes);
- break;
- - case set_mod:
- + case allmodconfig:
- conf_set_all_new_symbols(def_mod);
- break;
- - case set_random:
- - conf_set_all_new_symbols(def_random);
- + case alldefconfig:
- + conf_set_all_new_symbols(def_default);
- + break;
- + case randconfig:
- + /* Really nothing to do in this loop */
- + while (conf_set_all_new_symbols(def_random)) ;
- break;
- - case set_default:
- + case defconfig:
- conf_set_all_new_symbols(def_default);
- break;
- - case ask_new:
- - case ask_all:
- + case savedefconfig:
- + break;
- + case oldaskconfig:
- rootEntry = &rootmenu;
- conf(&rootmenu);
- - input_mode = ask_silent;
- + input_mode = silentoldconfig;
- /* fall through */
- - case ask_silent:
- + case oldconfig:
- + case listnewconfig:
- + case olddefconfig:
- + case silentoldconfig:
- /* Update until a loop caused no more changes */
- do {
- conf_cnt = 0;
- check_conf(&rootmenu);
- - } while (conf_cnt);
- + } while (conf_cnt &&
- + (input_mode != listnewconfig &&
- + input_mode != olddefconfig));
- break;
- }
-
- @@ -607,7 +729,13 @@
- fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
- return 1;
- }
- - } else {
- + } else if (input_mode == savedefconfig) {
- + if (conf_write_defconfig(defconfig_file)) {
- + fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"),
- + defconfig_file);
- + return 1;
- + }
- + } else if (input_mode != listnewconfig) {
- if (conf_write(NULL)) {
- fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
- exit(1);
- @@ -615,3 +743,12 @@
- }
- return 0;
- }
- +
- +/*
- + * Helper function to facilitate fgets() by Jean Sacren.
- + */
- +void xfgets(char *str, int size, FILE *in)
- +{
- + if (fgets(str, size, in) == NULL)
- + fprintf(stderr, "\nError in reading or end of file.\n");
- +}
- diff -Nur uClibc-0.9.33.2/extra/config/confdata.c uClibc/extra/config/confdata.c
- --- uClibc-0.9.33.2/extra/config/confdata.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/confdata.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,24 +5,27 @@
-
- #include <sys/stat.h>
- #include <ctype.h>
- +#include <errno.h>
- #include <fcntl.h>
- +#include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <time.h>
- #include <unistd.h>
- -#include <libgen.h>
-
- -#define LKC_DIRECT_LINK
- #include "lkc.h"
-
- static void conf_warning(const char *fmt, ...)
- __attribute__ ((format (printf, 1, 2)));
-
- +static void conf_message(const char *fmt, ...)
- + __attribute__ ((format (printf, 1, 2)));
- +
- static const char *conf_filename;
- static int conf_lineno, conf_warnings, conf_unsaved;
-
- -const char conf_defname[] = "extra/Configs/defconfigs/$ARCH";
- +const char conf_defname[] = "arch/$ARCH/defconfig";
-
- static void conf_warning(const char *fmt, ...)
- {
- @@ -35,6 +38,29 @@
- conf_warnings++;
- }
-
- +static void conf_default_message_callback(const char *fmt, va_list ap)
- +{
- + printf("#\n# ");
- + vprintf(fmt, ap);
- + printf("\n#\n");
- +}
- +
- +static void (*conf_message_callback) (const char *fmt, va_list ap) =
- + conf_default_message_callback;
- +void conf_set_message_callback(void (*fn) (const char *fmt, va_list ap))
- +{
- + conf_message_callback = fn;
- +}
- +
- +static void conf_message(const char *fmt, ...)
- +{
- + va_list ap;
- +
- + va_start(ap, fmt);
- + if (conf_message_callback)
- + conf_message_callback(fmt, ap);
- +}
- +
- const char *conf_get_configname(void)
- {
- char *name = getenv("KCONFIG_CONFIG");
- @@ -42,6 +68,13 @@
- return name ? name : ".config";
- }
-
- +const char *conf_get_autoconfig_name(void)
- +{
- + char *name = getenv("KCONFIG_AUTOCONFIG");
- +
- + return name ? name : "include/config/auto.conf";
- +}
- +
- static char *conf_expand_value(const char *in)
- {
- struct symbol *sym;
- @@ -95,6 +128,7 @@
- sym->flags |= def_flags;
- break;
- }
- + /* fall through */
- case S_BOOLEAN:
- if (p[0] == 'y') {
- sym->def[def].tri = yes;
- @@ -107,7 +141,7 @@
- break;
- }
- conf_warning("symbol value '%s' invalid for %s", p, sym->name);
- - break;
- + return 1;
- case S_OTHER:
- if (*p != '"') {
- for (p2 = p; *p2 && !isspace(*p2); p2++)
- @@ -115,6 +149,7 @@
- sym->type = S_STRING;
- goto done;
- }
- + /* fall through */
- case S_STRING:
- if (*p++ != '"')
- break;
- @@ -129,6 +164,7 @@
- conf_warning("invalid string found");
- return 1;
- }
- + /* fall through */
- case S_INT:
- case S_HEX:
- done:
- @@ -146,10 +182,66 @@
- return 0;
- }
-
- +#define LINE_GROWTH 16
- +static int add_byte(int c, char **lineptr, size_t slen, size_t *n)
- +{
- + char *nline;
- + size_t new_size = slen + 1;
- + if (new_size > *n) {
- + new_size += LINE_GROWTH - 1;
- + new_size *= 2;
- + nline = realloc(*lineptr, new_size);
- + if (!nline)
- + return -1;
- +
- + *lineptr = nline;
- + *n = new_size;
- + }
- +
- + (*lineptr)[slen] = c;
- +
- + return 0;
- +}
- +
- +static ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream)
- +{
- + char *line = *lineptr;
- + size_t slen = 0;
- +
- + for (;;) {
- + int c = getc(stream);
- +
- + switch (c) {
- + case '\n':
- + if (add_byte(c, &line, slen, n) < 0)
- + goto e_out;
- + slen++;
- + /* fall through */
- + case EOF:
- + if (add_byte('\0', &line, slen, n) < 0)
- + goto e_out;
- + *lineptr = line;
- + if (slen == 0)
- + return -1;
- + return slen;
- + default:
- + if (add_byte(c, &line, slen, n) < 0)
- + goto e_out;
- + slen++;
- + }
- + }
- +
- +e_out:
- + line[slen-1] = '\0';
- + *lineptr = line;
- + return -1;
- +}
- +
- int conf_read_simple(const char *name, int def)
- {
- FILE *in = NULL;
- - char line[1024];
- + char *line = NULL;
- + size_t line_asize = 0;
- char *p, *p2;
- struct symbol *sym;
- int i, def_flags;
- @@ -164,8 +256,11 @@
- if (in)
- goto load;
- sym_add_change_count(1);
- - if (!sym_defconfig_list)
- + if (!sym_defconfig_list) {
- + if (modules_sym)
- + sym_calc_value(modules_sym);
- return 1;
- + }
-
- for_all_defaults(sym_defconfig_list, prop) {
- if (expr_calc_value(prop->visible.expr) == no ||
- @@ -174,9 +269,8 @@
- name = conf_expand_value(prop->expr->left.sym->name);
- in = zconf_fopen(name);
- if (in) {
- - printf(_("#\n"
- - "# using defaults found in %s\n"
- - "#\n"), name);
- + conf_message(_("using defaults found in %s"),
- + name);
- goto load;
- }
- }
- @@ -202,33 +296,33 @@
- case S_STRING:
- if (sym->def[def].val)
- free(sym->def[def].val);
- + /* fall through */
- default:
- sym->def[def].val = NULL;
- sym->def[def].tri = no;
- }
- }
-
- - while (fgets(line, sizeof(line), in)) {
- + while (compat_getline(&line, &line_asize, in) != -1) {
- conf_lineno++;
- sym = NULL;
- - switch (line[0]) {
- - case '#':
- - if (line[1] != ' ')
- + if (line[0] == '#') {
- + if (memcmp(line + 2, CONFIG_, strlen(CONFIG_)))
- continue;
- - p = strchr(line + 2, ' ');
- + p = strchr(line + 2 + strlen(CONFIG_), ' ');
- if (!p)
- continue;
- *p++ = 0;
- if (strncmp(p, "is not set", 10))
- continue;
- if (def == S_DEF_USER) {
- - sym = sym_find(line + 2);
- + sym = sym_find(line + 2 + strlen(CONFIG_));
- if (!sym) {
- sym_add_change_count(1);
- - break;
- + goto setsym;
- }
- } else {
- - sym = sym_lookup(line + 2, 0);
- + sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
- if (sym->type == S_UNKNOWN)
- sym->type = S_BOOLEAN;
- }
- @@ -244,13 +338,10 @@
- default:
- ;
- }
- - break;
- - 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':
- - p = strchr(line, '=');
- - if (!p) {
- - conf_warning("unexpected data '%s'", line);
- + } else if (memcmp(line, CONFIG_, strlen(CONFIG_)) == 0) {
- + p = strchr(line + strlen(CONFIG_), '=');
- + if (!p)
- continue;
- - }
- *p++ = 0;
- p2 = strchr(p, '\n');
- if (p2) {
- @@ -259,13 +350,13 @@
- *p2 = 0;
- }
- if (def == S_DEF_USER) {
- - sym = sym_find(line);
- + sym = sym_find(line + strlen(CONFIG_));
- if (!sym) {
- sym_add_change_count(1);
- - break;
- + goto setsym;
- }
- } else {
- - sym = sym_lookup(line, 0);
- + sym = sym_lookup(line + strlen(CONFIG_), 0);
- if (sym->type == S_UNKNOWN)
- sym->type = S_OTHER;
- }
- @@ -274,14 +365,12 @@
- }
- if (conf_set_sym_val(sym, def, def_flags, p))
- continue;
- - break;
- - case '\r':
- - case '\n':
- - break;
- - default:
- - conf_warning("unexpected data");
- + } else {
- + if (line[0] != '\r' && line[0] != '\n')
- + conf_warning("unexpected data");
- continue;
- }
- +setsym:
- if (sym && sym_is_choice_value(sym)) {
- struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
- switch (sym->def[def].tri) {
- @@ -302,6 +391,7 @@
- cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri);
- }
- }
- + free(line);
- fclose(in);
-
- if (modules_sym)
- @@ -311,10 +401,8 @@
-
- int conf_read(const char *name)
- {
- - struct symbol *sym, *choice_sym;
- - struct property *prop;
- - struct expr *e;
- - int i, flags;
- + struct symbol *sym;
- + int i;
-
- sym_set_change_count(0);
-
- @@ -324,7 +412,7 @@
- for_all_symbols(i, sym) {
- sym_calc_value(sym);
- if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO))
- - goto sym_ok;
- + continue;
- if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) {
- /* check that calculated value agrees with saved value */
- switch (sym->type) {
- @@ -333,29 +421,18 @@
- if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym))
- break;
- if (!sym_is_choice(sym))
- - goto sym_ok;
- + continue;
- + /* fall through */
- default:
- if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
- - goto sym_ok;
- + continue;
- break;
- }
- } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE))
- /* no previous value and not saved */
- - goto sym_ok;
- + continue;
- conf_unsaved++;
- /* maybe print value in verbose mode... */
- - sym_ok:
- - if (!sym_is_choice(sym))
- - continue;
- - /* The choice symbol only has a set value (and thus is not new)
- - * if all its visible childs have values.
- - */
- - prop = sym_get_choice_prop(sym);
- - flags = sym->flags;
- - expr_list_for_each_sym(prop->expr, e, choice_sym)
- - if (choice_sym->visible != no)
- - flags &= choice_sym->flags;
- - sym->flags &= flags | ~SYMBOL_DEF_USER;
- }
-
- for_all_symbols(i, sym) {
- @@ -388,43 +465,300 @@
- return 0;
- }
-
- +/*
- + * Kconfig configuration printer
- + *
- + * This printer is used when generating the resulting configuration after
- + * kconfig invocation and `defconfig' files. Unset symbol might be omitted by
- + * passing a non-NULL argument to the printer.
- + *
- + */
- +static void
- +kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
- +{
- +
- + switch (sym->type) {
- + case S_BOOLEAN:
- + case S_TRISTATE:
- + if (*value == 'n') {
- + bool skip_unset = (arg != NULL);
- +
- + if (!skip_unset)
- + fprintf(fp, "# %s%s is not set\n",
- + CONFIG_, sym->name);
- + return;
- + }
- + break;
- + default:
- + break;
- + }
- +
- + fprintf(fp, "%s%s=%s\n", CONFIG_, sym->name, value);
- +}
- +
- +static void
- +kconfig_print_comment(FILE *fp, const char *value, void *arg)
- +{
- + const char *p = value;
- + size_t l;
- +
- + for (;;) {
- + l = strcspn(p, "\n");
- + fprintf(fp, "#");
- + if (l) {
- + fprintf(fp, " ");
- + xfwrite(p, l, 1, fp);
- + p += l;
- + }
- + fprintf(fp, "\n");
- + if (*p++ == '\0')
- + break;
- + }
- +}
- +
- +static struct conf_printer kconfig_printer_cb =
- +{
- + .print_symbol = kconfig_print_symbol,
- + .print_comment = kconfig_print_comment,
- +};
- +
- +/*
- + * Header printer
- + *
- + * This printer is used when generating the `include/generated/autoconf.h' file.
- + */
- +static void
- +header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
- +{
- +
- + switch (sym->type) {
- + case S_BOOLEAN:
- + case S_TRISTATE: {
- + const char *suffix = "";
- +
- + switch (*value) {
- + case 'n':
- + break;
- + case 'm':
- + suffix = "_MODULE";
- + /* fall through */
- + default:
- + fprintf(fp, "#define %s%s%s 1\n",
- + CONFIG_, sym->name, suffix);
- + }
- + break;
- + }
- + case S_HEX: {
- + const char *prefix = "";
- +
- + if (value[0] != '0' || (value[1] != 'x' && value[1] != 'X'))
- + prefix = "0x";
- + fprintf(fp, "#define %s%s %s%s\n",
- + CONFIG_, sym->name, prefix, value);
- + break;
- + }
- + case S_STRING:
- + case S_INT:
- + fprintf(fp, "#define %s%s %s\n",
- + CONFIG_, sym->name, value);
- + break;
- + default:
- + break;
- + }
- +
- +}
- +
- +static void
- +header_print_comment(FILE *fp, const char *value, void *arg)
- +{
- + const char *p = value;
- + size_t l;
- +
- + fprintf(fp, "/*\n");
- + for (;;) {
- + l = strcspn(p, "\n");
- + fprintf(fp, " *");
- + if (l) {
- + fprintf(fp, " ");
- + xfwrite(p, l, 1, fp);
- + p += l;
- + }
- + fprintf(fp, "\n");
- + if (*p++ == '\0')
- + break;
- + }
- + fprintf(fp, " */\n");
- +}
- +
- +static struct conf_printer header_printer_cb =
- +{
- + .print_symbol = header_print_symbol,
- + .print_comment = header_print_comment,
- +};
- +
- +/*
- + * Tristate printer
- + *
- + * This printer is used when generating the `include/config/tristate.conf' file.
- + */
- +static void
- +tristate_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
- +{
- +
- + if (sym->type == S_TRISTATE && *value != 'n')
- + fprintf(fp, "%s%s=%c\n", CONFIG_, sym->name, (char)toupper(*value));
- +}
- +
- +static struct conf_printer tristate_printer_cb =
- +{
- + .print_symbol = tristate_print_symbol,
- + .print_comment = kconfig_print_comment,
- +};
- +
- +static void conf_write_symbol(FILE *fp, struct symbol *sym,
- + struct conf_printer *printer, void *printer_arg)
- +{
- + const char *str;
- +
- + switch (sym->type) {
- + case S_OTHER:
- + case S_UNKNOWN:
- + break;
- + case S_STRING:
- + str = sym_get_string_value(sym);
- + str = sym_escape_string_value(str);
- + printer->print_symbol(fp, sym, str, printer_arg);
- + free((void *)str);
- + break;
- + default:
- + str = sym_get_string_value(sym);
- + printer->print_symbol(fp, sym, str, printer_arg);
- + }
- +}
- +
- +static void
- +conf_write_heading(FILE *fp, struct conf_printer *printer, void *printer_arg)
- +{
- + char buf[256];
- +
- + snprintf(buf, sizeof(buf),
- + "\n"
- + "Automatically generated file; DO NOT EDIT.\n"
- + "%s\n",
- + rootmenu.prompt->text);
- +
- + printer->print_comment(fp, buf, printer_arg);
- +}
- +
- +/*
- + * Write out a minimal config.
- + * All values that has default values are skipped as this is redundant.
- + */
- +int conf_write_defconfig(const char *filename)
- +{
- + struct symbol *sym;
- + struct menu *menu;
- + FILE *out;
- +
- + out = fopen(filename, "w");
- + if (!out)
- + return 1;
- +
- + sym_clear_all_valid();
- +
- + /* Traverse all menus to find all relevant symbols */
- + menu = rootmenu.list;
- +
- + while (menu != NULL)
- + {
- + sym = menu->sym;
- + if (sym == NULL) {
- + if (!menu_is_visible(menu))
- + goto next_menu;
- + } else if (!sym_is_choice(sym)) {
- + sym_calc_value(sym);
- + if (!(sym->flags & SYMBOL_WRITE))
- + goto next_menu;
- + sym->flags &= ~SYMBOL_WRITE;
- + /* If we cannot change the symbol - skip */
- + if (!sym_is_changable(sym))
- + goto next_menu;
- + /* If symbol equals to default value - skip */
- + if (strcmp(sym_get_string_value(sym), sym_get_string_default(sym)) == 0)
- + goto next_menu;
- +
- + /*
- + * If symbol is a choice value and equals to the
- + * default for a choice - skip.
- + * But only if value is bool and equal to "y" and
- + * choice is not "optional".
- + * (If choice is "optional" then all values can be "n")
- + */
- + if (sym_is_choice_value(sym)) {
- + struct symbol *cs;
- + struct symbol *ds;
- +
- + cs = prop_get_symbol(sym_get_choice_prop(sym));
- + ds = sym_choice_default(cs);
- + if (!sym_is_optional(cs) && sym == ds) {
- + if ((sym->type == S_BOOLEAN) &&
- + sym_get_tristate_value(sym) == yes)
- + goto next_menu;
- + }
- + }
- + conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
- + }
- +next_menu:
- + if (menu->list != NULL) {
- + menu = menu->list;
- + }
- + else if (menu->next != NULL) {
- + menu = menu->next;
- + } else {
- + while ((menu = menu->parent)) {
- + if (menu->next != NULL) {
- + menu = menu->next;
- + break;
- + }
- + }
- + }
- + }
- + fclose(out);
- + return 0;
- +}
- +
- int conf_write(const char *name)
- {
- FILE *out;
- struct symbol *sym;
- struct menu *menu;
- const char *basename;
- - char dirname[128], tmpname[128], newname[128];
- - int type, l;
- const char *str;
- - time_t now;
- - int use_timestamp = 1;
- - char *env;
- + char tmpname[PATH_MAX+1], newname[PATH_MAX+1];
- + char *env, *dirname = NULL;
-
- - dirname[0] = 0;
- - if (name == NULL)
- - name = conf_get_configname();
- if (name && name[0]) {
- struct stat st;
- char *slash;
-
- if (!stat(name, &st) && S_ISDIR(st.st_mode)) {
- - strcpy(dirname, name);
- + dirname = strndup(name, strlen(name) + 1);
- strcat(dirname, "/");
- basename = conf_get_configname();
- } else if ((slash = strrchr(name, '/'))) {
- int size = slash - name + 1;
- - memcpy(dirname, name, size);
- - dirname[size] = 0;
- + dirname = strndup(name, size);
- if (slash[1])
- basename = slash + 1;
- else
- basename = conf_get_configname();
- } else
- basename = name;
- - } else
- - basename = conf_get_configname();
- -
- + } else {
- + dirname = strdup(conf_get_configname());
- + basename = strdup(base_name(dirname));
- + dirname = dir_name(dirname);
- + }
- sprintf(newname, "%s%s", dirname, basename);
- env = getenv("KCONFIG_OVERWRITECONFIG");
- if (!env || !*env) {
- @@ -434,24 +768,11 @@
- *tmpname = 0;
- out = fopen(newname, "w");
- }
- + free(dirname);
- if (!out)
- return 1;
-
- - sym = sym_lookup("VERSION", 0);
- - sym_calc_value(sym);
- - time(&now);
- - env = getenv("KCONFIG_NOTIMESTAMP");
- - if (env && *env)
- - use_timestamp = 0;
- -
- - fprintf(out, _("#\n"
- - "# Automatically generated make config: don't edit\n"
- - "# Version: %s\n"
- - "%s%s"
- - "#\n"),
- - sym_get_string_value(sym),
- - use_timestamp ? "# " : "",
- - use_timestamp ? ctime(&now) : "");
- + conf_write_heading(out, &kconfig_printer_cb, NULL);
-
- if (!conf_get_changed())
- sym_clear_all_valid();
- @@ -472,56 +793,11 @@
- if (!(sym->flags & SYMBOL_WRITE))
- goto next;
- sym->flags &= ~SYMBOL_WRITE;
- - type = sym->type;
- - if (type == S_TRISTATE) {
- - sym_calc_value(modules_sym);
- - if (modules_sym->curr.tri == no)
- - type = S_BOOLEAN;
- - }
- - switch (type) {
- - case S_BOOLEAN:
- - case S_TRISTATE:
- - switch (sym_get_tristate_value(sym)) {
- - case no:
- - fprintf(out, "# %s is not set\n", sym->name);
- - break;
- - case mod:
- - fprintf(out, "%s=m\n", sym->name);
- - break;
- - case yes:
- - fprintf(out, "%s=y\n", sym->name);
- - break;
- - }
- - break;
- - case S_STRING:
- - str = sym_get_string_value(sym);
- - fprintf(out, "%s=\"", sym->name);
- - while (1) {
- - l = strcspn(str, "\"\\");
- - if (l) {
- - fwrite(str, l, 1, out);
- - str += l;
- - }
- - if (!*str)
- - break;
- - fprintf(out, "\\%c", *str++);
- - }
- - fputs("\"\n", out);
- - break;
- - case S_HEX:
- - str = sym_get_string_value(sym);
- - if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
- - fprintf(out, "%s=%s\n", sym->name, str);
- - break;
- - }
- - case S_INT:
- - str = sym_get_string_value(sym);
- - fprintf(out, "%s=%s\n", sym->name, str);
- - break;
- - }
- +
- + conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
- }
-
- - next:
- +next:
- if (menu->list) {
- menu = menu->list;
- continue;
- @@ -538,38 +814,39 @@
- fclose(out);
-
- if (*tmpname) {
- - strcat(dirname, basename);
- + dirname = strndup(basename, strlen(basename) + 4);
- strcat(dirname, ".old");
- rename(newname, dirname);
- + free(dirname);
- if (rename(tmpname, newname))
- return 1;
- }
-
- - printf(_("#\n"
- - "# configuration written to %s\n"
- - "#\n"), newname);
- + conf_message(_("configuration written to %s"), newname);
-
- sym_set_change_count(0);
-
- return 0;
- }
-
- -int conf_split_config(void)
- +static int conf_split_config(void)
- {
- - char *name, path[128], opwd[512];
- + const char *name;
- + char path[PATH_MAX+1], opwd[PATH_MAX+1];
- char *s, *d, c;
- struct symbol *sym;
- struct stat sb;
- int res, i, fd;
-
- - name = getenv("KCONFIG_AUTOCONFIG");
- - if (!name)
- - name = "include/config/auto.conf";
- - conf_read_simple(name, S_DEF_AUTO);
- -
- if (getcwd(opwd, sizeof(opwd)) == NULL)
- return 1;
- - if (chdir(dirname(strdup(name))))
- + name = conf_get_autoconfig_name();
- + conf_read_simple(name, S_DEF_AUTO);
- +
- + strcpy(path, name);
- + dir_name(path);
- +
- + if (chdir(path))
- return 1;
-
- res = 0;
- @@ -671,126 +948,85 @@
-
- int conf_write_autoconf(void)
- {
- - char opwd[512];
- struct symbol *sym;
- - const char *str;
- - char *name;
- - FILE *out, *out_h;
- - time_t now;
- - int i, l;
- + const char *name;
- + char cfg_fname[PATH_MAX+1], tristate_fname[PATH_MAX+1],
- + cfgh_fname[PATH_MAX+1];
- + char *dirname;
- + FILE *out, *tristate, *out_h;
- + int i;
-
- - if (getcwd(opwd, sizeof(opwd)) == NULL)
- - return 1;
- - if (chdir(dirname(strdup(conf_get_configname()))))
- - return 1;
- sym_clear_all_valid();
-
- - file_write_dep("include/config/auto.conf.cmd");
- + sprintf(cfg_fname, "%s.cmd", conf_get_autoconfig_name());
- + file_write_dep(cfg_fname);
-
- if (conf_split_config())
- return 1;
-
- - out = fopen(".tmpconfig", "w");
- + dirname = dir_name(strdup(conf_get_configname()));
- + sprintf(cfg_fname, "%s.tmpconfig", dirname);
- + sprintf(tristate_fname, "%s.tmpconfig_tristate", dirname);
- + sprintf(cfgh_fname, "%s.tmpconfig.h", dirname);
- + free(dirname);
- +
- + out = fopen(cfg_fname, "w");
- if (!out)
- return 1;
-
- - out_h = fopen(".tmpconfig.h", "w");
- + tristate = fopen(tristate_fname, "w");
- + if (!tristate) {
- + fclose(out);
- + return 1;
- + }
- +
- + out_h = fopen(cfgh_fname, "w");
- if (!out_h) {
- fclose(out);
- + fclose(tristate);
- return 1;
- }
-
- - sym = sym_lookup("VERSION", 0);
- - sym_calc_value(sym);
- - time(&now);
- - fprintf(out, "#\n"
- - "# Automatically generated make config: don't edit\n"
- - "# Version: %s\n"
- - "# %s"
- - "#\n",
- - sym_get_string_value(sym), ctime(&now));
- - fprintf(out_h, "/*\n"
- - " * Automatically generated C config: don't edit\n"
- - " * Version: %s\n"
- - " * %s"
- - " */\n"
- - "#define AUTOCONF_INCLUDED\n",
- - sym_get_string_value(sym), ctime(&now));
- + conf_write_heading(out, &kconfig_printer_cb, NULL);
- +
- + conf_write_heading(tristate, &tristate_printer_cb, NULL);
- +
- + conf_write_heading(out_h, &header_printer_cb, NULL);
-
- for_all_symbols(i, sym) {
- sym_calc_value(sym);
- if (!(sym->flags & SYMBOL_WRITE) || !sym->name)
- continue;
- - switch (sym->type) {
- - case S_BOOLEAN:
- - case S_TRISTATE:
- - switch (sym_get_tristate_value(sym)) {
- - case no:
- - break;
- - case mod:
- - fprintf(out, "CONFIG_%s=m\n", sym->name);
- - fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name);
- - break;
- - case yes:
- - fprintf(out, "%s=y\n", sym->name);
- - fprintf(out_h, "#define %s 1\n", sym->name);
- - break;
- - }
- - break;
- - case S_STRING:
- - str = sym_get_string_value(sym);
- - fprintf(out, "%s=\"", sym->name);
- - fprintf(out_h, "#define %s \"", sym->name);
- - while (1) {
- - l = strcspn(str, "\"\\");
- - if (l) {
- - fwrite(str, l, 1, out);
- - fwrite(str, l, 1, out_h);
- - str += l;
- - }
- - if (!*str)
- - break;
- - fprintf(out, "\\%c", *str);
- - fprintf(out_h, "\\%c", *str);
- - str++;
- - }
- - fputs("\"\n", out);
- - fputs("\"\n", out_h);
- - break;
- - case S_HEX:
- - str = sym_get_string_value(sym);
- - if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
- - fprintf(out, "%s=%s\n", sym->name, str);
- - fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
- - break;
- - }
- - case S_INT:
- - str = sym_get_string_value(sym);
- - fprintf(out, "%s=%s\n", sym->name, str);
- - fprintf(out_h, "#define %s %s\n", sym->name, str);
- - break;
- - default:
- - break;
- - }
- +
- + /* write symbol to auto.conf, tristate and header files */
- + conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1);
- +
- + conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1);
- +
- + conf_write_symbol(out_h, sym, &header_printer_cb, NULL);
- }
- fclose(out);
- + fclose(tristate);
- fclose(out_h);
-
- name = getenv("KCONFIG_AUTOHEADER");
- if (!name)
- - name = "include/config/autoconf.h";
- - if (rename(".tmpconfig.h", name))
- + name = "include/generated/autoconf.h";
- + if (rename(cfgh_fname, name))
- return 1;
- - name = getenv("KCONFIG_AUTOCONFIG");
- + name = getenv("KCONFIG_TRISTATE");
- if (!name)
- - name = "include/config/auto.conf";
- + name = "include/config/tristate.conf";
- + if (rename(tristate_fname, name))
- + return 1;
- + name = conf_get_autoconfig_name();
- /*
- * This must be the last step, kbuild has a dependency on auto.conf
- * and this marks the successful completion of the previous steps.
- */
- - if (rename(".tmpconfig", name))
- + if (rename(cfg_fname, name))
- return 1;
- - chdir(opwd);
- +
- return 0;
- }
-
- @@ -821,20 +1057,131 @@
- conf_changed_callback = fn;
- }
-
- +static bool randomize_choice_values(struct symbol *csym)
- +{
- + struct property *prop;
- + struct symbol *sym;
- + struct expr *e;
- + int cnt, def;
-
- -void conf_set_all_new_symbols(enum conf_def_mode mode)
- + /*
- + * If choice is mod then we may have more items selected
- + * and if no then no-one.
- + * In both cases stop.
- + */
- + if (csym->curr.tri != yes)
- + return false;
- +
- + prop = sym_get_choice_prop(csym);
- +
- + /* count entries in choice block */
- + cnt = 0;
- + expr_list_for_each_sym(prop->expr, e, sym)
- + cnt++;
- +
- + /*
- + * find a random value and set it to yes,
- + * set the rest to no so we have only one set
- + */
- + def = (rand() % cnt);
- +
- + cnt = 0;
- + expr_list_for_each_sym(prop->expr, e, sym) {
- + if (def == cnt++) {
- + sym->def[S_DEF_USER].tri = yes;
- + csym->def[S_DEF_USER].val = sym;
- + }
- + else {
- + sym->def[S_DEF_USER].tri = no;
- + }
- + sym->flags |= SYMBOL_DEF_USER;
- + /* clear VALID to get value calculated */
- + sym->flags &= ~SYMBOL_VALID;
- + }
- + csym->flags |= SYMBOL_DEF_USER;
- + /* clear VALID to get value calculated */
- + csym->flags &= ~(SYMBOL_VALID);
- +
- + return true;
- +}
- +
- +void set_all_choice_values(struct symbol *csym)
- {
- - struct symbol *sym, *csym;
- struct property *prop;
- + struct symbol *sym;
- struct expr *e;
- - int i, cnt, def;
- +
- + prop = sym_get_choice_prop(csym);
- +
- + /*
- + * Set all non-assinged choice values to no
- + */
- + expr_list_for_each_sym(prop->expr, e, sym) {
- + if (!sym_has_value(sym))
- + sym->def[S_DEF_USER].tri = no;
- + }
- + csym->flags |= SYMBOL_DEF_USER;
- + /* clear VALID to get value calculated */
- + csym->flags &= ~(SYMBOL_VALID | SYMBOL_NEED_SET_CHOICE_VALUES);
- +}
- +
- +bool conf_set_all_new_symbols(enum conf_def_mode mode)
- +{
- + struct symbol *sym, *csym;
- + int i, cnt, pby, pty, ptm; /* pby: probability of boolean = y
- + * pty: probability of tristate = y
- + * ptm: probability of tristate = m
- + */
- +
- + pby = 50; pty = ptm = 33; /* can't go as the default in switch-case
- + * below, otherwise gcc whines about
- + * -Wmaybe-uninitialized */
- + if (mode == def_random) {
- + int n, p[3];
- + char *env = getenv("KCONFIG_PROBABILITY");
- + n = 0;
- + while( env && *env ) {
- + char *endp;
- + int tmp = strtol( env, &endp, 10 );
- + if( tmp >= 0 && tmp <= 100 ) {
- + p[n++] = tmp;
- + } else {
- + errno = ERANGE;
- + perror( "KCONFIG_PROBABILITY" );
- + exit( 1 );
- + }
- + env = (*endp == ':') ? endp+1 : endp;
- + if( n >=3 ) {
- + break;
- + }
- + }
- + switch( n ) {
- + case 1:
- + pby = p[0]; ptm = pby/2; pty = pby-ptm;
- + break;
- + case 2:
- + pty = p[0]; ptm = p[1]; pby = pty + ptm;
- + break;
- + case 3:
- + pby = p[0]; pty = p[1]; ptm = p[2];
- + break;
- + }
- +
- + if( pty+ptm > 100 ) {
- + errno = ERANGE;
- + perror( "KCONFIG_PROBABILITY" );
- + exit( 1 );
- + }
- + }
- + bool has_changed = false;
-
- for_all_symbols(i, sym) {
- - if (sym_has_value(sym))
- + if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID))
- continue;
- switch (sym_get_type(sym)) {
- case S_BOOLEAN:
- case S_TRISTATE:
- + has_changed = true;
- switch (mode) {
- case def_yes:
- sym->def[S_DEF_USER].tri = yes;
- @@ -846,7 +1193,15 @@
- sym->def[S_DEF_USER].tri = no;
- break;
- case def_random:
- - sym->def[S_DEF_USER].tri = (tristate)(rand() % 3);
- + sym->def[S_DEF_USER].tri = no;
- + cnt = rand() % 100;
- + if (sym->type == S_TRISTATE) {
- + if (cnt < pty)
- + sym->def[S_DEF_USER].tri = yes;
- + else if (cnt < (pty+ptm))
- + sym->def[S_DEF_USER].tri = mod;
- + } else if (cnt < pby)
- + sym->def[S_DEF_USER].tri = yes;
- break;
- default:
- continue;
- @@ -862,51 +1217,35 @@
-
- sym_clear_all_valid();
-
- - if (mode != def_random)
- - return;
- /*
- * We have different type of choice blocks.
- - * If curr.tri equal to mod then we can select several
- + * If curr.tri equals to mod then we can select several
- * choice symbols in one block.
- * In this case we do nothing.
- - * If curr.tri equal yes then only one symbol can be
- + * If curr.tri equals yes then only one symbol can be
- * selected in a choice block and we set it to yes,
- * and the rest to no.
- */
- + if (mode != def_random) {
- + for_all_symbols(i, csym) {
- + if ((sym_is_choice(csym) && !sym_has_value(csym)) ||
- + sym_is_choice_value(csym))
- + csym->flags |= SYMBOL_NEED_SET_CHOICE_VALUES;
- + }
- + }
- +
- for_all_symbols(i, csym) {
- if (sym_has_value(csym) || !sym_is_choice(csym))
- continue;
-
- sym_calc_value(csym);
- -
- - if (csym->curr.tri != yes)
- - continue;
- -
- - prop = sym_get_choice_prop(csym);
- -
- - /* count entries in choice block */
- - cnt = 0;
- - expr_list_for_each_sym(prop->expr, e, sym)
- - cnt++;
- -
- - /*
- - * find a random value and set it to yes,
- - * set the rest to no so we have only one set
- - */
- - def = (rand() % cnt);
- -
- - cnt = 0;
- - expr_list_for_each_sym(prop->expr, e, sym) {
- - if (def == cnt++) {
- - sym->def[S_DEF_USER].tri = yes;
- - csym->def[S_DEF_USER].val = sym;
- - }
- - else {
- - sym->def[S_DEF_USER].tri = no;
- - }
- + if (mode == def_random)
- + has_changed = randomize_choice_values(csym);
- + else {
- + set_all_choice_values(csym);
- + has_changed = true;
- }
- - csym->flags |= SYMBOL_DEF_USER;
- - /* clear VALID to get value calculated */
- - csym->flags &= ~(SYMBOL_VALID);
- }
- +
- + return has_changed;
- }
- diff -Nur uClibc-0.9.33.2/extra/config/expr.c uClibc/extra/config/expr.c
- --- uClibc-0.9.33.2/extra/config/expr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/expr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,15 +7,13 @@
- #include <stdlib.h>
- #include <string.h>
-
- -#define LKC_DIRECT_LINK
- #include "lkc.h"
-
- #define DEBUG_EXPR 0
-
- struct expr *expr_alloc_symbol(struct symbol *sym)
- {
- - struct expr *e = malloc(sizeof(*e));
- - memset(e, 0, sizeof(*e));
- + struct expr *e = xcalloc(1, sizeof(*e));
- e->type = E_SYMBOL;
- e->left.sym = sym;
- return e;
- @@ -23,8 +21,7 @@
-
- struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)
- {
- - struct expr *e = malloc(sizeof(*e));
- - memset(e, 0, sizeof(*e));
- + struct expr *e = xcalloc(1, sizeof(*e));
- e->type = type;
- e->left.expr = ce;
- return e;
- @@ -32,8 +29,7 @@
-
- struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2)
- {
- - struct expr *e = malloc(sizeof(*e));
- - memset(e, 0, sizeof(*e));
- + struct expr *e = xcalloc(1, sizeof(*e));
- e->type = type;
- e->left.expr = e1;
- e->right.expr = e2;
- @@ -42,8 +38,7 @@
-
- struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2)
- {
- - struct expr *e = malloc(sizeof(*e));
- - memset(e, 0, sizeof(*e));
- + struct expr *e = xcalloc(1, sizeof(*e));
- e->type = type;
- e->left.sym = s1;
- e->right.sym = s2;
- @@ -64,14 +59,14 @@
- return e2 ? expr_alloc_two(E_OR, e1, e2) : e1;
- }
-
- -struct expr *expr_copy(struct expr *org)
- +struct expr *expr_copy(const struct expr *org)
- {
- struct expr *e;
-
- if (!org)
- return NULL;
-
- - e = malloc(sizeof(*org));
- + e = xmalloc(sizeof(*org));
- memcpy(e, org, sizeof(*org));
- switch (org->type) {
- case E_SYMBOL:
- @@ -348,7 +343,7 @@
- /*
- * e1 || e2 -> ?
- */
- -struct expr *expr_join_or(struct expr *e1, struct expr *e2)
- +static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
- {
- struct expr *tmp;
- struct symbol *sym1, *sym2;
- @@ -412,7 +407,7 @@
- return NULL;
- }
-
- -struct expr *expr_join_and(struct expr *e1, struct expr *e2)
- +static struct expr *expr_join_and(struct expr *e1, struct expr *e2)
- {
- struct expr *tmp;
- struct symbol *sym1, *sym2;
- @@ -1013,6 +1008,48 @@
- #endif
- }
-
- +static inline struct expr *
- +expr_get_leftmost_symbol(const struct expr *e)
- +{
- +
- + if (e == NULL)
- + return NULL;
- +
- + while (e->type != E_SYMBOL)
- + e = e->left.expr;
- +
- + return expr_copy(e);
- +}
- +
- +/*
- + * Given expression `e1' and `e2', returns the leaf of the longest
- + * sub-expression of `e1' not containing 'e2.
- + */
- +struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2)
- +{
- + struct expr *ret;
- +
- + switch (e1->type) {
- + case E_OR:
- + return expr_alloc_and(
- + expr_simplify_unmet_dep(e1->left.expr, e2),
- + expr_simplify_unmet_dep(e1->right.expr, e2));
- + case E_AND: {
- + struct expr *e;
- + e = expr_alloc_and(expr_copy(e1), expr_copy(e2));
- + e = expr_eliminate_dups(e);
- + ret = (!expr_eq(e, e1)) ? e1 : NULL;
- + expr_free(e);
- + break;
- + }
- + default:
- + ret = e1;
- + break;
- + }
- +
- + return expr_get_leftmost_symbol(ret);
- +}
- +
- void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken)
- {
- if (!e) {
- @@ -1087,7 +1124,7 @@
-
- static void expr_print_file_helper(void *data, struct symbol *sym, const char *str)
- {
- - fwrite(str, strlen(str), 1, data);
- + xfwrite(str, strlen(str), 1, data);
- }
-
- void expr_fprint(struct expr *e, FILE *out)
- @@ -1097,7 +1134,32 @@
-
- static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str)
- {
- - str_append((struct gstr*)data, str);
- + struct gstr *gs = (struct gstr*)data;
- + const char *sym_str = NULL;
- +
- + if (sym)
- + sym_str = sym_get_string_value(sym);
- +
- + if (gs->max_width) {
- + unsigned extra_length = strlen(str);
- + const char *last_cr = strrchr(gs->s, '\n');
- + unsigned last_line_length;
- +
- + if (sym_str)
- + extra_length += 4 + strlen(sym_str);
- +
- + if (!last_cr)
- + last_cr = gs->s;
- +
- + last_line_length = strlen(gs->s) - (last_cr - gs->s);
- +
- + if ((last_line_length + extra_length) > gs->max_width)
- + str_append(gs, "\\\n");
- + }
- +
- + str_append(gs, str);
- + if (sym && sym->type != S_UNKNOWN)
- + str_printf(gs, " [=%s]", sym_str);
- }
-
- void expr_gstr_print(struct expr *e, struct gstr *gs)
- diff -Nur uClibc-0.9.33.2/extra/config/expr.h uClibc/extra/config/expr.h
- --- uClibc-0.9.33.2/extra/config/expr.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/expr.h 2014-02-03 12:32:56.000000000 +0100
- @@ -10,7 +10,9 @@
- extern "C" {
- #endif
-
- +#include <assert.h>
- #include <stdio.h>
- +#include "list.h"
- #ifndef __cplusplus
- #include <stdbool.h>
- #endif
- @@ -18,14 +20,10 @@
- struct file {
- struct file *next;
- struct file *parent;
- - char *name;
- + const char *name;
- int lineno;
- - int flags;
- };
-
- -#define FILE_BUSY 0x0001
- -#define FILE_SCANNED 0x0002
- -
- typedef enum tristate {
- no, mod, yes
- } tristate;
- @@ -83,10 +81,11 @@
- tristate visible;
- int flags;
- struct property *prop;
- + struct expr_value dir_dep;
- struct expr_value rev_dep;
- };
-
- -#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)
- +#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)
-
- #define SYMBOL_CONST 0x0001 /* symbol is const */
- #define SYMBOL_CHECK 0x0008 /* used during dependency checking */
- @@ -107,9 +106,11 @@
- #define SYMBOL_DEF3 0x40000 /* symbol.def[S_DEF_3] is valid */
- #define SYMBOL_DEF4 0x80000 /* symbol.def[S_DEF_4] is valid */
-
- +/* choice values need to be set before calculating this symbol value */
- +#define SYMBOL_NEED_SET_CHOICE_VALUES 0x100000
- +
- #define SYMBOL_MAXLENGTH 256
- -#define SYMBOL_HASHSIZE 257
- -#define SYMBOL_HASHMASK 0xff
- +#define SYMBOL_HASHSIZE 9973
-
- /* A property represent the config options that can be associated
- * with a config "symbol".
- @@ -132,6 +133,7 @@
- P_SELECT, /* select BAR */
- P_RANGE, /* range 7..100 (for a symbol) */
- P_ENV, /* value from environment variable */
- + P_SYMBOL, /* where a symbol is defined */
- };
-
- struct property {
- @@ -163,6 +165,7 @@
- struct menu *list;
- struct symbol *sym;
- struct property *prompt;
- + struct expr *visibility;
- struct expr *dep;
- unsigned int flags;
- char *help;
- @@ -174,7 +177,14 @@
- #define MENU_CHANGED 0x0001
- #define MENU_ROOT 0x0002
-
- -#ifndef SWIG
- +struct jump_key {
- + struct list_head entries;
- + size_t offset;
- + struct menu *target;
- + int index;
- +};
- +
- +#define JUMP_NB 9
-
- extern struct file *file_list;
- extern struct file *current_file;
- @@ -190,7 +200,7 @@
- struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2);
- struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
- struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);
- -struct expr *expr_copy(struct expr *org);
- +struct expr *expr_copy(const struct expr *org);
- void expr_free(struct expr *e);
- int expr_eq(struct expr *e1, struct expr *e2);
- void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
- @@ -205,6 +215,7 @@
- struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
- void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
- struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym);
- +struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2);
-
- void expr_fprint(struct expr *e, FILE *out);
- struct gstr; /* forward */
- @@ -219,7 +230,6 @@
- {
- return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no);
- }
- -#endif
-
- #ifdef __cplusplus
- }
- diff -Nur uClibc-0.9.33.2/extra/config/gconf.c uClibc/extra/config/gconf.c
- --- uClibc-0.9.33.2/extra/config/gconf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/gconf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,7 @@
- # include <config.h>
- #endif
-
- +#include <stdlib.h>
- #include "lkc.h"
- #include "images.c"
-
- @@ -22,7 +23,6 @@
- #include <string.h>
- #include <unistd.h>
- #include <time.h>
- -#include <stdlib.h>
-
- //#define DEBUG
-
- @@ -30,13 +30,16 @@
- SINGLE_VIEW, SPLIT_VIEW, FULL_VIEW
- };
-
- +enum {
- + OPT_NORMAL, OPT_ALL, OPT_PROMPT
- +};
- +
- static gint view_mode = FULL_VIEW;
- static gboolean show_name = TRUE;
- static gboolean show_range = TRUE;
- static gboolean show_value = TRUE;
- -static gboolean show_all = FALSE;
- -static gboolean show_debug = FALSE;
- static gboolean resizeable = FALSE;
- +static int opt_mode = OPT_NORMAL;
-
- GtkWidget *main_wnd = NULL;
- GtkWidget *tree1_w = NULL; // left frame
- @@ -76,36 +79,7 @@
-
- /* Helping/Debugging Functions */
-
- -
- -const char *dbg_print_stype(int val)
- -{
- - static char buf[256];
- -
- - bzero(buf, 256);
- -
- - if (val == S_UNKNOWN)
- - strcpy(buf, "unknown");
- - if (val == S_BOOLEAN)
- - strcpy(buf, "boolean");
- - if (val == S_TRISTATE)
- - strcpy(buf, "tristate");
- - if (val == S_INT)
- - strcpy(buf, "int");
- - if (val == S_HEX)
- - strcpy(buf, "hex");
- - if (val == S_STRING)
- - strcpy(buf, "string");
- - if (val == S_OTHER)
- - strcpy(buf, "other");
- -
- -#ifdef DEBUG
- - printf("%s", buf);
- -#endif
- -
- - return buf;
- -}
- -
- -const char *dbg_print_flags(int val)
- +const char *dbg_sym_flags(int val)
- {
- static char buf[256];
-
- @@ -131,40 +105,10 @@
- strcat(buf, "auto/");
-
- buf[strlen(buf) - 1] = '\0';
- -#ifdef DEBUG
- - printf("%s", buf);
- -#endif
-
- return buf;
- }
-
- -const char *dbg_print_ptype(int val)
- -{
- - static char buf[256];
- -
- - bzero(buf, 256);
- -
- - if (val == P_UNKNOWN)
- - strcpy(buf, "unknown");
- - if (val == P_PROMPT)
- - strcpy(buf, "prompt");
- - if (val == P_COMMENT)
- - strcpy(buf, "comment");
- - if (val == P_MENU)
- - strcpy(buf, "menu");
- - if (val == P_DEFAULT)
- - strcpy(buf, "default");
- - if (val == P_CHOICE)
- - strcpy(buf, "choice");
- -
- -#ifdef DEBUG
- - printf("%s", buf);
- -#endif
- -
- - return buf;
- -}
- -
- -
- void replace_button_icon(GladeXML * xml, GdkDrawable * window,
- GtkStyle * style, gchar * btn_name, gchar ** xpm)
- {
- @@ -189,7 +133,6 @@
- GladeXML *xml;
- GtkWidget *widget;
- GtkTextBuffer *txtbuf;
- - char title[256];
- GtkStyle *style;
-
- xml = glade_xml_new(glade_file, "window1", NULL);
- @@ -266,9 +209,7 @@
- /*"style", PANGO_STYLE_OBLIQUE, */
- NULL);
-
- - sprintf(title, _("uClibc v%s Configuration"),
- - getenv("VERSION"));
- - gtk_window_set_title(GTK_WINDOW(main_wnd), title);
- + gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text);
-
- gtk_widget_show(main_wnd);
- }
- @@ -312,7 +253,7 @@
-
- gtk_tree_view_set_model(view, model1);
- gtk_tree_view_set_headers_visible(view, TRUE);
- - gtk_tree_view_set_rules_hint(view, FALSE);
- + gtk_tree_view_set_rules_hint(view, TRUE);
-
- column = gtk_tree_view_column_new();
- gtk_tree_view_append_column(view, column);
- @@ -344,8 +285,6 @@
- static void renderer_edited(GtkCellRendererText * cell,
- const gchar * path_string,
- const gchar * new_text, gpointer user_data);
- -static void renderer_toggled(GtkCellRendererToggle * cellrenderertoggle,
- - gchar * arg1, gpointer user_data);
-
- void init_right_tree(void)
- {
- @@ -357,7 +296,7 @@
-
- gtk_tree_view_set_model(view, model2);
- gtk_tree_view_set_headers_visible(view, TRUE);
- - gtk_tree_view_set_rules_hint(view, FALSE);
- + gtk_tree_view_set_rules_hint(view, TRUE);
-
- column = gtk_tree_view_column_new();
- gtk_tree_view_append_column(view, column);
- @@ -379,8 +318,6 @@
- "inconsistent", COL_BTNINC,
- "visible", COL_BTNVIS,
- "radio", COL_BTNRAD, NULL);
- - /*g_signal_connect(G_OBJECT(renderer), "toggled",
- - G_CALLBACK(renderer_toggled), NULL); */
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
- renderer, FALSE);
- @@ -456,19 +393,9 @@
- GtkTextBuffer *buffer;
- GtkTextIter start, end;
- const char *prompt = _(menu_get_prompt(menu));
- - gchar *name;
- - const char *help;
- -
- - help = menu_get_help(menu);
- -
- - /* Gettextize if the help text not empty */
- - if ((help != 0) && (help[0] != 0))
- - help = _(help);
- + struct gstr help = str_new();
-
- - if (menu->sym && menu->sym->name)
- - name = g_strdup_printf(menu->sym->name);
- - else
- - name = g_strdup("");
- + menu_get_ext_help(menu, &help);
-
- buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
- gtk_text_buffer_get_bounds(buffer, &start, &end);
- @@ -478,14 +405,11 @@
- gtk_text_buffer_get_end_iter(buffer, &end);
- gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1,
- NULL);
- - gtk_text_buffer_insert_at_cursor(buffer, " ", 1);
- - gtk_text_buffer_get_end_iter(buffer, &end);
- - gtk_text_buffer_insert_with_tags(buffer, &end, name, -1, tag1,
- - NULL);
- gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2);
- gtk_text_buffer_get_end_iter(buffer, &end);
- - gtk_text_buffer_insert_with_tags(buffer, &end, help, -1, tag2,
- + gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2,
- NULL);
- + str_free(&help);
- }
-
-
- @@ -710,20 +634,29 @@
-
-
- void
- -on_show_all_options1_activate(GtkMenuItem * menuitem, gpointer user_data)
- +on_set_option_mode1_activate(GtkMenuItem *menuitem, gpointer user_data)
- {
- - show_all = GTK_CHECK_MENU_ITEM(menuitem)->active;
- + opt_mode = OPT_NORMAL;
- + gtk_tree_store_clear(tree2);
- + display_tree(&rootmenu); /* instead of update_tree to speed-up */
- +}
-
- +
- +void
- +on_set_option_mode2_activate(GtkMenuItem *menuitem, gpointer user_data)
- +{
- + opt_mode = OPT_ALL;
- gtk_tree_store_clear(tree2);
- - display_tree(&rootmenu); // instead of update_tree to speed-up
- + display_tree(&rootmenu); /* instead of update_tree to speed-up */
- }
-
-
- void
- -on_show_debug_info1_activate(GtkMenuItem * menuitem, gpointer user_data)
- +on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data)
- {
- - show_debug = GTK_CHECK_MENU_ITEM(menuitem)->active;
- - update_tree(&rootmenu, NULL);
- + opt_mode = OPT_PROMPT;
- + gtk_tree_store_clear(tree2);
- + display_tree(&rootmenu); /* instead of update_tree to speed-up */
- }
-
-
- @@ -732,7 +665,6 @@
- GtkWidget *dialog;
- const gchar *intro_text = _(
- "Welcome to gkc, the GTK+ graphical configuration tool\n"
- - "for uClibc.\n"
- "For each option, a blank box indicates the feature is disabled, a\n"
- "check indicates it is enabled, and a dot indicates that it is to\n"
- "be compiled as a module. Clicking on the box will cycle through the three states.\n"
- @@ -751,7 +683,7 @@
- dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_INFO,
- - GTK_BUTTONS_CLOSE, intro_text);
- + GTK_BUTTONS_CLOSE, "%s", intro_text);
- g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
- G_CALLBACK(gtk_widget_destroy),
- GTK_OBJECT(dialog));
- @@ -769,7 +701,7 @@
- dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_INFO,
- - GTK_BUTTONS_CLOSE, about_text);
- + GTK_BUTTONS_CLOSE, "%s", about_text);
- g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
- G_CALLBACK(gtk_widget_destroy),
- GTK_OBJECT(dialog));
- @@ -788,7 +720,7 @@
- dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_INFO,
- - GTK_BUTTONS_CLOSE, license_text);
- + GTK_BUTTONS_CLOSE, "%s", license_text);
- g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
- G_CALLBACK(gtk_widget_destroy),
- GTK_OBJECT(dialog));
- @@ -820,7 +752,6 @@
- void on_single_clicked(GtkButton * button, gpointer user_data)
- {
- view_mode = SINGLE_VIEW;
- - gtk_paned_set_position(GTK_PANED(hpaned), 0);
- gtk_widget_hide(tree1_w);
- current = &rootmenu;
- display_tree_part();
- @@ -846,7 +777,6 @@
- void on_full_clicked(GtkButton * button, gpointer user_data)
- {
- view_mode = FULL_VIEW;
- - gtk_paned_set_position(GTK_PANED(hpaned), 0);
- gtk_widget_hide(tree1_w);
- if (tree2)
- gtk_tree_store_clear(tree2);
- @@ -900,7 +830,7 @@
- static void change_sym_value(struct menu *menu, gint col)
- {
- struct symbol *sym = menu->sym;
- - tristate oldval, newval;
- + tristate newval;
-
- if (!sym)
- return;
- @@ -917,7 +847,6 @@
- switch (sym_get_type(sym)) {
- case S_BOOLEAN:
- case S_TRISTATE:
- - oldval = sym_get_tristate_value(sym);
- if (!sym_tristate_within_range(sym, newval))
- newval = yes;
- sym_set_tristate_value(sym, newval);
- @@ -954,35 +883,6 @@
- display_tree_part(); //fixme: keep exp/coll
- }
-
- -static void renderer_toggled(GtkCellRendererToggle * cell,
- - gchar * path_string, gpointer user_data)
- -{
- - GtkTreePath *path, *sel_path = NULL;
- - GtkTreeIter iter, sel_iter;
- - GtkTreeSelection *sel;
- - struct menu *menu;
- -
- - path = gtk_tree_path_new_from_string(path_string);
- - if (!gtk_tree_model_get_iter(model2, &iter, path))
- - return;
- -
- - sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree2_w));
- - if (gtk_tree_selection_get_selected(sel, NULL, &sel_iter))
- - sel_path = gtk_tree_model_get_path(model2, &sel_iter);
- - if (!sel_path)
- - goto out1;
- - if (gtk_tree_path_compare(path, sel_path))
- - goto out2;
- -
- - gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
- - toggle_sym_value(menu);
- -
- - out2:
- - gtk_tree_path_free(sel_path);
- - out1:
- - gtk_tree_path_free(path);
- -}
- -
- static gint column2index(GtkTreeViewColumn * column)
- {
- gint i;
- @@ -1174,9 +1074,12 @@
-
- row[COL_OPTION] =
- g_strdup_printf("%s %s", _(menu_get_prompt(menu)),
- - sym && sym_has_value(sym) ? "(NEW)" : "");
- + sym && !sym_has_value(sym) ? "(NEW)" : "");
-
- - if (show_all && !menu_is_visible(menu))
- + if (opt_mode == OPT_ALL && !menu_is_visible(menu))
- + row[COL_COLOR] = g_strdup("DarkGray");
- + else if (opt_mode == OPT_PROMPT &&
- + menu_has_prompt(menu) && !menu_is_visible(menu))
- row[COL_COLOR] = g_strdup("DarkGray");
- else
- row[COL_COLOR] = g_strdup("Black");
- @@ -1235,6 +1138,7 @@
- row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
- if (sym_is_choice(sym))
- break;
- + /* fall through */
- case S_TRISTATE:
- val = sym_get_tristate_value(sym);
- switch (val) {
- @@ -1373,7 +1277,6 @@
- gboolean valid;
- GtkTreeIter *sibling;
- struct symbol *sym;
- - struct property *prop;
- struct menu *menu1, *menu2;
-
- if (src == &rootmenu)
- @@ -1382,7 +1285,6 @@
- valid = gtk_tree_model_iter_children(model2, child2, dst);
- for (child1 = src->list; child1; child1 = child1->next) {
-
- - prop = child1->prompt;
- sym = child1->sym;
-
- reparse:
- @@ -1399,16 +1301,20 @@
- menu2 ? menu_get_prompt(menu2) : "nil");
- #endif
-
- - if (!menu_is_visible(child1) && !show_all) { // remove node
- + if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) ||
- + (opt_mode == OPT_PROMPT && !menu_has_prompt(child1)) ||
- + (opt_mode == OPT_ALL && !menu_get_prompt(child1))) {
- +
- + /* remove node */
- if (gtktree_iter_find_node(dst, menu1) != NULL) {
- memcpy(&tmp, child2, sizeof(GtkTreeIter));
- valid = gtk_tree_model_iter_next(model2,
- child2);
- gtk_tree_store_remove(tree2, &tmp);
- if (!valid)
- - return; // next parent
- + return; /* next parent */
- else
- - goto reparse; // next child
- + goto reparse; /* next child */
- } else
- continue;
- }
- @@ -1477,17 +1383,19 @@
- && (tree == tree2))
- continue;
-
- - if (menu_is_visible(child) || show_all)
- + if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) ||
- + (opt_mode == OPT_PROMPT && menu_has_prompt(child)) ||
- + (opt_mode == OPT_ALL && menu_get_prompt(child)))
- place_node(child, fill_row(child));
- #ifdef DEBUG
- printf("%*c%s: ", indent, ' ', menu_get_prompt(child));
- printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : "");
- - dbg_print_ptype(ptype);
- + printf("%s", prop_get_type_name(ptype));
- printf(" | ");
- if (sym) {
- - dbg_print_stype(sym->type);
- + printf("%s", sym_type_name(sym->type));
- printf(" | ");
- - dbg_print_flags(sym->flags);
- + printf("%s", dbg_sym_flags(sym->flags));
- printf("\n");
- } else
- printf("\n");
- @@ -1499,6 +1407,12 @@
- if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))
- || (view_mode == FULL_VIEW)
- || (view_mode == SPLIT_VIEW))*/
- +
- + /* Change paned position if the view is not in 'split mode' */
- + if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) {
- + gtk_paned_set_position(GTK_PANED(hpaned), 0);
- + }
- +
- if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT))
- || (view_mode == FULL_VIEW)
- || (view_mode == SPLIT_VIEW)) {
- @@ -1557,10 +1471,6 @@
- char *env;
- gchar *glade_file;
-
- -#ifndef LKC_DIRECT_LINK
- - kconfig_load();
- -#endif
- -
- bindtextdomain(PACKAGE, LOCALEDIR);
- bind_textdomain_codeset(PACKAGE, "UTF-8");
- textdomain(PACKAGE);
- @@ -1582,12 +1492,6 @@
- else
- glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL);
-
- - /* Load the interface and connect signals */
- - init_main_window(glade_file);
- - init_tree_model();
- - init_left_tree();
- - init_right_tree();
- -
- /* Conf stuffs */
- if (ac > 1 && av[1][0] == '-') {
- switch (av[1][1]) {
- @@ -1607,6 +1511,12 @@
- fixup_rootmenu(&rootmenu);
- conf_read(NULL);
-
- + /* Load the interface and connect signals */
- + init_main_window(glade_file);
- + init_tree_model();
- + init_left_tree();
- + init_right_tree();
- +
- switch (view_mode) {
- case SINGLE_VIEW:
- display_tree_part();
- diff -Nur uClibc-0.9.33.2/extra/config/gconf.glade uClibc/extra/config/gconf.glade
- --- uClibc-0.9.33.2/extra/config/gconf.glade 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/gconf.glade 2014-02-03 12:32:56.000000000 +0100
- @@ -1,11 +1,10 @@
- <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
- -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
- <glade-interface>
-
- <widget class="GtkWindow" id="window1">
- <property name="visible">True</property>
- - <property name="title" translatable="yes">Gtk uClibc Configurator</property>
- + <property name="title" translatable="yes">Gtk uCLibc Configurator</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- @@ -190,26 +189,40 @@
- </child>
-
- <child>
- - <widget class="GtkCheckMenuItem" id="show_all_options1">
- + <widget class="GtkRadioMenuItem" id="set_option_mode1">
- + <property name="visible">True</property>
- + <property name="tooltip" translatable="yes">Show normal options</property>
- + <property name="label" translatable="yes">Show normal options</property>
- + <property name="use_underline">True</property>
- + <property name="active">True</property>
- + <signal name="activate" handler="on_set_option_mode1_activate"/>
- + </widget>
- + </child>
- +
- + <child>
- + <widget class="GtkRadioMenuItem" id="set_option_mode2">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Show all options</property>
- <property name="label" translatable="yes">Show all _options</property>
- <property name="use_underline">True</property>
- <property name="active">False</property>
- - <signal name="activate" handler="on_show_all_options1_activate"/>
- + <property name="group">set_option_mode1</property>
- + <signal name="activate" handler="on_set_option_mode2_activate"/>
- </widget>
- </child>
-
- <child>
- - <widget class="GtkCheckMenuItem" id="show_debug_info1">
- + <widget class="GtkRadioMenuItem" id="set_option_mode3">
- <property name="visible">True</property>
- - <property name="tooltip" translatable="yes">Show masked options</property>
- - <property name="label" translatable="yes">Show _debug info</property>
- + <property name="tooltip" translatable="yes">Show all options with prompts</property>
- + <property name="label" translatable="yes">Show all prompt options</property>
- <property name="use_underline">True</property>
- <property name="active">False</property>
- - <signal name="activate" handler="on_show_debug_info1_activate"/>
- + <property name="group">set_option_mode1</property>
- + <signal name="activate" handler="on_set_option_mode3_activate"/>
- </widget>
- </child>
- +
- </widget>
- </child>
- </widget>
- @@ -547,7 +560,7 @@
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- - <property name="enable_search">True</property>
- + <property name="enable_search">False</property>
- <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/>
- <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/>
- <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/>
- @@ -582,7 +595,7 @@
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- - <property name="enable_search">True</property>
- + <property name="enable_search">False</property>
- <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/>
- <signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/>
- <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/>
- diff -Nur uClibc-0.9.33.2/extra/config/.gitignore uClibc/extra/config/.gitignore
- --- uClibc-0.9.33.2/extra/config/.gitignore 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/.gitignore 2014-02-03 12:32:56.000000000 +0100
- @@ -2,18 +2,21 @@
- # Generated files
- #
- config*
- -lex.*.c
- +*.lex.c
- *.tab.c
- *.tab.h
- zconf.hash.c
- *.moc
- -lkc_defs.h
- +gconf.glade.h
- +*.pot
- +*.mo
-
- #
- # configuration programs
- #
- conf
- mconf
- +nconf
- qconf
- gconf
- kxgettext
- diff -Nur uClibc-0.9.33.2/extra/config/kconfig-language.txt uClibc/extra/config/kconfig-language.txt
- --- uClibc-0.9.33.2/extra/config/kconfig-language.txt 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/kconfig-language.txt 2014-02-03 12:32:56.000000000 +0100
- @@ -112,7 +112,13 @@
- (no prompts anywhere) and for symbols with no dependencies.
- That will limit the usefulness but on the other hand avoid
- the illegal configurations all over.
- - kconfig should one day warn about such things.
- +
- +- limiting menu display: "visible if" <expr>
- + This attribute is only applicable to menu blocks, if the condition is
- + false, the menu block is not displayed to the user (the symbols
- + contained there can still be selected by other symbols, though). It is
- + similar to a conditional "prompt" attribute for individual menu
- + entries. Default value of "visible" is true.
-
- - numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
- This allows to limit the range of possible input values for int
- @@ -181,7 +187,7 @@
- (7) Returns the result of max(/expr/, /expr/).
-
- An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2
- -respectively for calculations). A menu entry becomes visible when it's
- +respectively for calculations). A menu entry becomes visible when its
- expression evaluates to 'm' or 'y'.
-
- There are two types of symbols: constant and non-constant symbols.
- @@ -268,7 +274,7 @@
-
- choices:
-
- - "choice"
- + "choice" [symbol]
- <choice options>
- <choice block>
- "endchoice"
- @@ -282,6 +288,10 @@
- can be compiled as modules.
- A choice accepts another option "optional", which allows to set the
- choice to 'n' and no entry needs to be selected.
- +If no [symbol] is associated with a choice, then you can not have multiple
- +definitions of that choice. If a [symbol] is associated to the choice,
- +then you may define the same choice (ie. with the same entries) in another
- +place.
-
- comment:
-
- @@ -300,7 +310,8 @@
- "endmenu"
-
- This defines a menu block, see "Menu structure" above for more
- -information. The only possible options are dependencies.
- +information. The only possible options are dependencies and "visible"
- +attributes.
-
- if:
-
- @@ -322,7 +333,8 @@
- "mainmenu" <prompt>
-
- This sets the config program's title bar if the config program chooses
- -to use it.
- +to use it. It should be placed at the top of the configuration, before any
- +other statement.
-
-
- Kconfig hints
- @@ -376,4 +388,3 @@
- depends on BAR && m
-
- limits FOO to module (=m) or disabled (=n).
- -
- diff -Nur uClibc-0.9.33.2/extra/config/kconfig_load.c uClibc/extra/config/kconfig_load.c
- --- uClibc-0.9.33.2/extra/config/kconfig_load.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/kconfig_load.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,35 +0,0 @@
- -#include <dlfcn.h>
- -#include <stdio.h>
- -#include <stdlib.h>
- -
- -#include "lkc.h"
- -
- -#define P(name,type,arg) type (*name ## _p) arg
- -#include "lkc_proto.h"
- -#undef P
- -
- -void kconfig_load(void)
- -{
- - void *handle;
- - char *error;
- -
- - handle = dlopen("./libkconfig.so", RTLD_LAZY);
- - if (!handle) {
- - handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY);
- - if (!handle) {
- - fprintf(stderr, "%s\n", dlerror());
- - exit(1);
- - }
- - }
- -
- -#define P(name,type,arg) \
- -{ \
- - name ## _p = dlsym(handle, #name); \
- - if ((error = dlerror())) { \
- - fprintf(stderr, "%s\n", error); \
- - exit(1); \
- - } \
- -}
- -#include "lkc_proto.h"
- -#undef P
- -}
- Binary files uClibc-0.9.33.2/extra/config/kconfig-to-uclibc.patch.gz and uClibc/extra/config/kconfig-to-uclibc.patch.gz differ
- Binary files uClibc-0.9.33.2/extra/config/kconfig-to-uclibc.tar.gz and uClibc/extra/config/kconfig-to-uclibc.tar.gz differ
- diff -Nur uClibc-0.9.33.2/extra/config/kxgettext.c uClibc/extra/config/kxgettext.c
- --- uClibc-0.9.33.2/extra/config/kxgettext.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/kxgettext.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,7 +7,6 @@
- #include <stdlib.h>
- #include <string.h>
-
- -#define LKC_DIRECT_LINK
- #include "lkc.h"
-
- static char *escape(const char* text, char *bf, int len)
- @@ -43,6 +42,10 @@
- ++text;
- goto next;
- }
- + else if (*text == '\\') {
- + *bfp++ = '\\';
- + len--;
- + }
- *bfp++ = *text++;
- next:
- --len;
- @@ -59,11 +62,11 @@
-
- struct file_line {
- struct file_line *next;
- - char* file;
- - int lineno;
- + const char *file;
- + int lineno;
- };
-
- -static struct file_line *file_line__new(char *file, int lineno)
- +static struct file_line *file_line__new(const char *file, int lineno)
- {
- struct file_line *self = malloc(sizeof(*self));
-
- @@ -86,7 +89,8 @@
-
- static struct message *message__list;
-
- -static struct message *message__new(const char *msg, char *option, char *file, int lineno)
- +static struct message *message__new(const char *msg, char *option,
- + const char *file, int lineno)
- {
- struct message *self = malloc(sizeof(*self));
-
- @@ -126,7 +130,8 @@
- return m;
- }
-
- -static int message__add_file_line(struct message *self, char *file, int lineno)
- +static int message__add_file_line(struct message *self, const char *file,
- + int lineno)
- {
- int rc = -1;
- struct file_line *fl = file_line__new(file, lineno);
- @@ -141,7 +146,8 @@
- return rc;
- }
-
- -static int message__add(const char *msg, char *option, char *file, int lineno)
- +static int message__add(const char *msg, char *option, const char *file,
- + int lineno)
- {
- int rc = 0;
- char bf[16384];
- @@ -162,7 +168,7 @@
- return rc;
- }
-
- -void menu_build_message_list(struct menu *menu)
- +static void menu_build_message_list(struct menu *menu)
- {
- struct menu *child;
-
- @@ -207,7 +213,7 @@
- "msgstr \"\"\n", self->msg);
- }
-
- -void menu__xgettext(void)
- +static void menu__xgettext(void)
- {
- struct message *m = message__list;
-
- diff -Nur uClibc-0.9.33.2/extra/config/lex.zconf.c_shipped uClibc/extra/config/lex.zconf.c_shipped
- --- uClibc-0.9.33.2/extra/config/lex.zconf.c_shipped 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lex.zconf.c_shipped 1970-01-01 01:00:00.000000000 +0100
- @@ -1,2416 +0,0 @@
- -
- -#line 3 "scripts/kconfig/lex.zconf.c"
- -
- -#define YY_INT_ALIGNED short int
- -
- -/* A lexical scanner generated by flex */
- -
- -#define yy_create_buffer zconf_create_buffer
- -#define yy_delete_buffer zconf_delete_buffer
- -#define yy_flex_debug zconf_flex_debug
- -#define yy_init_buffer zconf_init_buffer
- -#define yy_flush_buffer zconf_flush_buffer
- -#define yy_load_buffer_state zconf_load_buffer_state
- -#define yy_switch_to_buffer zconf_switch_to_buffer
- -#define yyin zconfin
- -#define yyleng zconfleng
- -#define yylex zconflex
- -#define yylineno zconflineno
- -#define yyout zconfout
- -#define yyrestart zconfrestart
- -#define yytext zconftext
- -#define yywrap zconfwrap
- -#define yyalloc zconfalloc
- -#define yyrealloc zconfrealloc
- -#define yyfree zconffree
- -
- -#define FLEX_SCANNER
- -#define YY_FLEX_MAJOR_VERSION 2
- -#define YY_FLEX_MINOR_VERSION 5
- -#define YY_FLEX_SUBMINOR_VERSION 35
- -#if YY_FLEX_SUBMINOR_VERSION > 0
- -#define FLEX_BETA
- -#endif
- -
- -/* First, we deal with platform-specific or compiler-specific issues. */
- -
- -/* begin standard C headers. */
- -#include <stdio.h>
- -#include <string.h>
- -#include <errno.h>
- -#include <stdlib.h>
- -
- -/* end standard C headers. */
- -
- -/* flex integer type definitions */
- -
- -#ifndef FLEXINT_H
- -#define FLEXINT_H
- -
- -/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
- -
- -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- -
- -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- - * if you want the limit (max/min) macros for int types.
- - */
- -#ifndef __STDC_LIMIT_MACROS
- -#define __STDC_LIMIT_MACROS 1
- -#endif
- -
- -#include <inttypes.h>
- -typedef int8_t flex_int8_t;
- -typedef uint8_t flex_uint8_t;
- -typedef int16_t flex_int16_t;
- -typedef uint16_t flex_uint16_t;
- -typedef int32_t flex_int32_t;
- -typedef uint32_t flex_uint32_t;
- -#else
- -typedef signed char flex_int8_t;
- -typedef short int flex_int16_t;
- -typedef int flex_int32_t;
- -typedef unsigned char flex_uint8_t;
- -typedef unsigned short int flex_uint16_t;
- -typedef unsigned int flex_uint32_t;
- -
- -/* Limits of integral types. */
- -#ifndef INT8_MIN
- -#define INT8_MIN (-128)
- -#endif
- -#ifndef INT16_MIN
- -#define INT16_MIN (-32767-1)
- -#endif
- -#ifndef INT32_MIN
- -#define INT32_MIN (-2147483647-1)
- -#endif
- -#ifndef INT8_MAX
- -#define INT8_MAX (127)
- -#endif
- -#ifndef INT16_MAX
- -#define INT16_MAX (32767)
- -#endif
- -#ifndef INT32_MAX
- -#define INT32_MAX (2147483647)
- -#endif
- -#ifndef UINT8_MAX
- -#define UINT8_MAX (255U)
- -#endif
- -#ifndef UINT16_MAX
- -#define UINT16_MAX (65535U)
- -#endif
- -#ifndef UINT32_MAX
- -#define UINT32_MAX (4294967295U)
- -#endif
- -
- -#endif /* ! C99 */
- -
- -#endif /* ! FLEXINT_H */
- -
- -#ifdef __cplusplus
- -
- -/* The "const" storage-class-modifier is valid. */
- -#define YY_USE_CONST
- -
- -#else /* ! __cplusplus */
- -
- -/* C99 requires __STDC__ to be defined as 1. */
- -#if defined (__STDC__)
- -
- -#define YY_USE_CONST
- -
- -#endif /* defined (__STDC__) */
- -#endif /* ! __cplusplus */
- -
- -#ifdef YY_USE_CONST
- -#define yyconst const
- -#else
- -#define yyconst
- -#endif
- -
- -/* Returned upon end-of-file. */
- -#define YY_NULL 0
- -
- -/* Promotes a possibly negative, possibly signed char to an unsigned
- - * integer for use as an array index. If the signed char is negative,
- - * we want to instead treat it as an 8-bit unsigned char, hence the
- - * double cast.
- - */
- -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
- -
- -/* Enter a start condition. This macro really ought to take a parameter,
- - * but we do it the disgusting crufty way forced on us by the ()-less
- - * definition of BEGIN.
- - */
- -#define BEGIN (yy_start) = 1 + 2 *
- -
- -/* Translate the current start state into a value that can be later handed
- - * to BEGIN to return to the state. The YYSTATE alias is for lex
- - * compatibility.
- - */
- -#define YY_START (((yy_start) - 1) / 2)
- -#define YYSTATE YY_START
- -
- -/* Action number for EOF rule of a given start state. */
- -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
- -
- -/* Special action meaning "start processing a new file". */
- -#define YY_NEW_FILE zconfrestart(zconfin )
- -
- -#define YY_END_OF_BUFFER_CHAR 0
- -
- -/* Size of default input buffer. */
- -#ifndef YY_BUF_SIZE
- -#define YY_BUF_SIZE 16384
- -#endif
- -
- -/* The state buf must be large enough to hold one state per character in the main buffer.
- - */
- -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
- -
- -#ifndef YY_TYPEDEF_YY_BUFFER_STATE
- -#define YY_TYPEDEF_YY_BUFFER_STATE
- -typedef struct yy_buffer_state *YY_BUFFER_STATE;
- -#endif
- -
- -extern int zconfleng;
- -
- -extern FILE *zconfin, *zconfout;
- -
- -#define EOB_ACT_CONTINUE_SCAN 0
- -#define EOB_ACT_END_OF_FILE 1
- -#define EOB_ACT_LAST_MATCH 2
- -
- - #define YY_LESS_LINENO(n)
- -
- -/* Return all but the first "n" matched characters back to the input stream. */
- -#define yyless(n) \
- - do \
- - { \
- - /* Undo effects of setting up zconftext. */ \
- - int yyless_macro_arg = (n); \
- - YY_LESS_LINENO(yyless_macro_arg);\
- - *yy_cp = (yy_hold_char); \
- - YY_RESTORE_YY_MORE_OFFSET \
- - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- - YY_DO_BEFORE_ACTION; /* set up zconftext again */ \
- - } \
- - while ( 0 )
- -
- -#define unput(c) yyunput( c, (yytext_ptr) )
- -
- -#ifndef YY_TYPEDEF_YY_SIZE_T
- -#define YY_TYPEDEF_YY_SIZE_T
- -typedef size_t yy_size_t;
- -#endif
- -
- -#ifndef YY_STRUCT_YY_BUFFER_STATE
- -#define YY_STRUCT_YY_BUFFER_STATE
- -struct yy_buffer_state
- - {
- - FILE *yy_input_file;
- -
- - char *yy_ch_buf; /* input buffer */
- - char *yy_buf_pos; /* current position in input buffer */
- -
- - /* Size of input buffer in bytes, not including room for EOB
- - * characters.
- - */
- - yy_size_t yy_buf_size;
- -
- - /* Number of characters read into yy_ch_buf, not including EOB
- - * characters.
- - */
- - int yy_n_chars;
- -
- - /* Whether we "own" the buffer - i.e., we know we created it,
- - * and can realloc() it to grow it, and should free() it to
- - * delete it.
- - */
- - int yy_is_our_buffer;
- -
- - /* Whether this is an "interactive" input source; if so, and
- - * if we're using stdio for input, then we want to use getc()
- - * instead of fread(), to make sure we stop fetching input after
- - * each newline.
- - */
- - int yy_is_interactive;
- -
- - /* Whether we're considered to be at the beginning of a line.
- - * If so, '^' rules will be active on the next match, otherwise
- - * not.
- - */
- - int yy_at_bol;
- -
- - int yy_bs_lineno; /**< The line count. */
- - int yy_bs_column; /**< The column count. */
- -
- - /* Whether to try to fill the input buffer when we reach the
- - * end of it.
- - */
- - int yy_fill_buffer;
- -
- - int yy_buffer_status;
- -
- -#define YY_BUFFER_NEW 0
- -#define YY_BUFFER_NORMAL 1
- - /* When an EOF's been seen but there's still some text to process
- - * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- - * shouldn't try reading from the input source any more. We might
- - * still have a bunch of tokens to match, though, because of
- - * possible backing-up.
- - *
- - * When we actually see the EOF, we change the status to "new"
- - * (via zconfrestart()), so that the user can continue scanning by
- - * just pointing zconfin at a new input file.
- - */
- -#define YY_BUFFER_EOF_PENDING 2
- -
- - };
- -#endif /* !YY_STRUCT_YY_BUFFER_STATE */
- -
- -/* Stack of input buffers. */
- -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
- -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
- -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
- -
- -/* We provide macros for accessing buffer states in case in the
- - * future we want to put the buffer states in a more general
- - * "scanner state".
- - *
- - * Returns the top of the stack, or NULL.
- - */
- -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
- - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
- - : NULL)
- -
- -/* Same as previous macro, but useful when we know that the buffer stack is not
- - * NULL or when we need an lvalue. For internal use only.
- - */
- -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
- -
- -/* yy_hold_char holds the character lost when zconftext is formed. */
- -static char yy_hold_char;
- -static int yy_n_chars; /* number of characters read into yy_ch_buf */
- -int zconfleng;
- -
- -/* Points to current character in buffer. */
- -static char *yy_c_buf_p = (char *) 0;
- -static int yy_init = 0; /* whether we need to initialize */
- -static int yy_start = 0; /* start state number */
- -
- -/* Flag which is used to allow zconfwrap()'s to do buffer switches
- - * instead of setting up a fresh zconfin. A bit of a hack ...
- - */
- -static int yy_did_buffer_switch_on_eof;
- -
- -void zconfrestart (FILE *input_file );
- -void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer );
- -YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size );
- -void zconf_delete_buffer (YY_BUFFER_STATE b );
- -void zconf_flush_buffer (YY_BUFFER_STATE b );
- -void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer );
- -void zconfpop_buffer_state (void );
- -
- -static void zconfensure_buffer_stack (void );
- -static void zconf_load_buffer_state (void );
- -static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file );
- -
- -#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER )
- -
- -YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size );
- -YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str );
- -YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len );
- -
- -void *zconfalloc (yy_size_t );
- -void *zconfrealloc (void *,yy_size_t );
- -void zconffree (void * );
- -
- -#define yy_new_buffer zconf_create_buffer
- -
- -#define yy_set_interactive(is_interactive) \
- - { \
- - if ( ! YY_CURRENT_BUFFER ){ \
- - zconfensure_buffer_stack (); \
- - YY_CURRENT_BUFFER_LVALUE = \
- - zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
- - } \
- - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
- - }
- -
- -#define yy_set_bol(at_bol) \
- - { \
- - if ( ! YY_CURRENT_BUFFER ){\
- - zconfensure_buffer_stack (); \
- - YY_CURRENT_BUFFER_LVALUE = \
- - zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
- - } \
- - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
- - }
- -
- -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
- -
- -/* Begin user sect3 */
- -
- -#define zconfwrap(n) 1
- -#define YY_SKIP_YYWRAP
- -
- -typedef unsigned char YY_CHAR;
- -
- -FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0;
- -
- -typedef int yy_state_type;
- -
- -extern int zconflineno;
- -
- -int zconflineno = 1;
- -
- -extern char *zconftext;
- -#define yytext_ptr zconftext
- -static yyconst flex_int16_t yy_nxt[][17] =
- - {
- - {
- - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- - 0, 0, 0, 0, 0, 0, 0
- - },
- -
- - {
- - 11, 12, 13, 14, 12, 12, 15, 12, 12, 12,
- - 12, 12, 12, 12, 12, 12, 12
- - },
- -
- - {
- - 11, 12, 13, 14, 12, 12, 15, 12, 12, 12,
- - 12, 12, 12, 12, 12, 12, 12
- - },
- -
- - {
- - 11, 16, 16, 17, 16, 16, 16, 16, 16, 16,
- - 16, 16, 16, 18, 16, 16, 16
- - },
- -
- - {
- - 11, 16, 16, 17, 16, 16, 16, 16, 16, 16,
- - 16, 16, 16, 18, 16, 16, 16
- -
- - },
- -
- - {
- - 11, 19, 20, 21, 19, 19, 19, 19, 19, 19,
- - 19, 19, 19, 19, 19, 19, 19
- - },
- -
- - {
- - 11, 19, 20, 21, 19, 19, 19, 19, 19, 19,
- - 19, 19, 19, 19, 19, 19, 19
- - },
- -
- - {
- - 11, 22, 22, 23, 22, 24, 22, 22, 24, 22,
- - 22, 22, 22, 22, 22, 25, 22
- - },
- -
- - {
- - 11, 22, 22, 23, 22, 24, 22, 22, 24, 22,
- - 22, 22, 22, 22, 22, 25, 22
- - },
- -
- - {
- - 11, 26, 26, 27, 28, 29, 30, 31, 29, 32,
- - 33, 34, 35, 35, 36, 37, 38
- -
- - },
- -
- - {
- - 11, 26, 26, 27, 28, 29, 30, 31, 29, 32,
- - 33, 34, 35, 35, 36, 37, 38
- - },
- -
- - {
- - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
- - -11, -11, -11, -11, -11, -11, -11
- - },
- -
- - {
- - 11, -12, -12, -12, -12, -12, -12, -12, -12, -12,
- - -12, -12, -12, -12, -12, -12, -12
- - },
- -
- - {
- - 11, -13, 39, 40, -13, -13, 41, -13, -13, -13,
- - -13, -13, -13, -13, -13, -13, -13
- - },
- -
- - {
- - 11, -14, -14, -14, -14, -14, -14, -14, -14, -14,
- - -14, -14, -14, -14, -14, -14, -14
- -
- - },
- -
- - {
- - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
- - 42, 42, 42, 42, 42, 42, 42
- - },
- -
- - {
- - 11, -16, -16, -16, -16, -16, -16, -16, -16, -16,
- - -16, -16, -16, -16, -16, -16, -16
- - },
- -
- - {
- - 11, -17, -17, -17, -17, -17, -17, -17, -17, -17,
- - -17, -17, -17, -17, -17, -17, -17
- - },
- -
- - {
- - 11, -18, -18, -18, -18, -18, -18, -18, -18, -18,
- - -18, -18, -18, 44, -18, -18, -18
- - },
- -
- - {
- - 11, 45, 45, -19, 45, 45, 45, 45, 45, 45,
- - 45, 45, 45, 45, 45, 45, 45
- -
- - },
- -
- - {
- - 11, -20, 46, 47, -20, -20, -20, -20, -20, -20,
- - -20, -20, -20, -20, -20, -20, -20
- - },
- -
- - {
- - 11, 48, -21, -21, 48, 48, 48, 48, 48, 48,
- - 48, 48, 48, 48, 48, 48, 48
- - },
- -
- - {
- - 11, 49, 49, 50, 49, -22, 49, 49, -22, 49,
- - 49, 49, 49, 49, 49, -22, 49
- - },
- -
- - {
- - 11, -23, -23, -23, -23, -23, -23, -23, -23, -23,
- - -23, -23, -23, -23, -23, -23, -23
- - },
- -
- - {
- - 11, -24, -24, -24, -24, -24, -24, -24, -24, -24,
- - -24, -24, -24, -24, -24, -24, -24
- -
- - },
- -
- - {
- - 11, 51, 51, 52, 51, 51, 51, 51, 51, 51,
- - 51, 51, 51, 51, 51, 51, 51
- - },
- -
- - {
- - 11, -26, -26, -26, -26, -26, -26, -26, -26, -26,
- - -26, -26, -26, -26, -26, -26, -26
- - },
- -
- - {
- - 11, -27, -27, -27, -27, -27, -27, -27, -27, -27,
- - -27, -27, -27, -27, -27, -27, -27
- - },
- -
- - {
- - 11, -28, -28, -28, -28, -28, -28, -28, -28, -28,
- - -28, -28, -28, -28, 53, -28, -28
- - },
- -
- - {
- - 11, -29, -29, -29, -29, -29, -29, -29, -29, -29,
- - -29, -29, -29, -29, -29, -29, -29
- -
- - },
- -
- - {
- - 11, 54, 54, -30, 54, 54, 54, 54, 54, 54,
- - 54, 54, 54, 54, 54, 54, 54
- - },
- -
- - {
- - 11, -31, -31, -31, -31, -31, -31, 55, -31, -31,
- - -31, -31, -31, -31, -31, -31, -31
- - },
- -
- - {
- - 11, -32, -32, -32, -32, -32, -32, -32, -32, -32,
- - -32, -32, -32, -32, -32, -32, -32
- - },
- -
- - {
- - 11, -33, -33, -33, -33, -33, -33, -33, -33, -33,
- - -33, -33, -33, -33, -33, -33, -33
- - },
- -
- - {
- - 11, -34, -34, -34, -34, -34, -34, -34, -34, -34,
- - -34, 56, 57, 57, -34, -34, -34
- -
- - },
- -
- - {
- - 11, -35, -35, -35, -35, -35, -35, -35, -35, -35,
- - -35, 57, 57, 57, -35, -35, -35
- - },
- -
- - {
- - 11, -36, -36, -36, -36, -36, -36, -36, -36, -36,
- - -36, -36, -36, -36, -36, -36, -36
- - },
- -
- - {
- - 11, -37, -37, 58, -37, -37, -37, -37, -37, -37,
- - -37, -37, -37, -37, -37, -37, -37
- - },
- -
- - {
- - 11, -38, -38, -38, -38, -38, -38, -38, -38, -38,
- - -38, -38, -38, -38, -38, -38, 59
- - },
- -
- - {
- - 11, -39, 39, 40, -39, -39, 41, -39, -39, -39,
- - -39, -39, -39, -39, -39, -39, -39
- -
- - },
- -
- - {
- - 11, -40, -40, -40, -40, -40, -40, -40, -40, -40,
- - -40, -40, -40, -40, -40, -40, -40
- - },
- -
- - {
- - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
- - 42, 42, 42, 42, 42, 42, 42
- - },
- -
- - {
- - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
- - 42, 42, 42, 42, 42, 42, 42
- - },
- -
- - {
- - 11, -43, -43, -43, -43, -43, -43, -43, -43, -43,
- - -43, -43, -43, -43, -43, -43, -43
- - },
- -
- - {
- - 11, -44, -44, -44, -44, -44, -44, -44, -44, -44,
- - -44, -44, -44, 44, -44, -44, -44
- -
- - },
- -
- - {
- - 11, 45, 45, -45, 45, 45, 45, 45, 45, 45,
- - 45, 45, 45, 45, 45, 45, 45
- - },
- -
- - {
- - 11, -46, 46, 47, -46, -46, -46, -46, -46, -46,
- - -46, -46, -46, -46, -46, -46, -46
- - },
- -
- - {
- - 11, 48, -47, -47, 48, 48, 48, 48, 48, 48,
- - 48, 48, 48, 48, 48, 48, 48
- - },
- -
- - {
- - 11, -48, -48, -48, -48, -48, -48, -48, -48, -48,
- - -48, -48, -48, -48, -48, -48, -48
- - },
- -
- - {
- - 11, 49, 49, 50, 49, -49, 49, 49, -49, 49,
- - 49, 49, 49, 49, 49, -49, 49
- -
- - },
- -
- - {
- - 11, -50, -50, -50, -50, -50, -50, -50, -50, -50,
- - -50, -50, -50, -50, -50, -50, -50
- - },
- -
- - {
- - 11, -51, -51, 52, -51, -51, -51, -51, -51, -51,
- - -51, -51, -51, -51, -51, -51, -51
- - },
- -
- - {
- - 11, -52, -52, -52, -52, -52, -52, -52, -52, -52,
- - -52, -52, -52, -52, -52, -52, -52
- - },
- -
- - {
- - 11, -53, -53, -53, -53, -53, -53, -53, -53, -53,
- - -53, -53, -53, -53, -53, -53, -53
- - },
- -
- - {
- - 11, 54, 54, -54, 54, 54, 54, 54, 54, 54,
- - 54, 54, 54, 54, 54, 54, 54
- -
- - },
- -
- - {
- - 11, -55, -55, -55, -55, -55, -55, -55, -55, -55,
- - -55, -55, -55, -55, -55, -55, -55
- - },
- -
- - {
- - 11, -56, -56, -56, -56, -56, -56, -56, -56, -56,
- - -56, 60, 57, 57, -56, -56, -56
- - },
- -
- - {
- - 11, -57, -57, -57, -57, -57, -57, -57, -57, -57,
- - -57, 57, 57, 57, -57, -57, -57
- - },
- -
- - {
- - 11, -58, -58, -58, -58, -58, -58, -58, -58, -58,
- - -58, -58, -58, -58, -58, -58, -58
- - },
- -
- - {
- - 11, -59, -59, -59, -59, -59, -59, -59, -59, -59,
- - -59, -59, -59, -59, -59, -59, -59
- -
- - },
- -
- - {
- - 11, -60, -60, -60, -60, -60, -60, -60, -60, -60,
- - -60, 57, 57, 57, -60, -60, -60
- - },
- -
- - } ;
- -
- -static yy_state_type yy_get_previous_state (void );
- -static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
- -static int yy_get_next_buffer (void );
- -static void yy_fatal_error (yyconst char msg[] );
- -
- -/* Done after the current pattern has been matched and before the
- - * corresponding action - sets up zconftext.
- - */
- -#define YY_DO_BEFORE_ACTION \
- - (yytext_ptr) = yy_bp; \
- - zconfleng = (size_t) (yy_cp - yy_bp); \
- - (yy_hold_char) = *yy_cp; \
- - *yy_cp = '\0'; \
- - (yy_c_buf_p) = yy_cp;
- -
- -#define YY_NUM_RULES 33
- -#define YY_END_OF_BUFFER 34
- -/* This struct is not used in this scanner,
- - but its presence is necessary. */
- -struct yy_trans_info
- - {
- - flex_int32_t yy_verify;
- - flex_int32_t yy_nxt;
- - };
- -static yyconst flex_int16_t yy_accept[61] =
- - { 0,
- - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- - 34, 5, 4, 2, 3, 7, 8, 6, 32, 29,
- - 31, 24, 28, 27, 26, 22, 17, 13, 16, 20,
- - 22, 11, 12, 19, 19, 14, 22, 22, 4, 2,
- - 3, 3, 1, 6, 32, 29, 31, 30, 24, 23,
- - 26, 25, 15, 20, 9, 19, 19, 21, 10, 18
- - } ;
- -
- -static yyconst flex_int32_t yy_ec[256] =
- - { 0,
- - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 2, 4, 5, 6, 1, 1, 7, 8, 9,
- - 10, 1, 1, 1, 11, 12, 12, 13, 13, 13,
- - 13, 13, 13, 13, 13, 13, 13, 1, 1, 1,
- - 14, 1, 1, 1, 13, 13, 13, 13, 13, 13,
- - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- - 1, 15, 1, 1, 13, 1, 13, 13, 13, 13,
- -
- - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- - 13, 13, 1, 16, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- -
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1
- - } ;
- -
- -extern int zconf_flex_debug;
- -int zconf_flex_debug = 0;
- -
- -/* The intent behind this definition is that it'll catch
- - * any uses of REJECT which flex missed.
- - */
- -#define REJECT reject_used_but_not_detected
- -#define yymore() yymore_used_but_not_detected
- -#define YY_MORE_ADJ 0
- -#define YY_RESTORE_YY_MORE_OFFSET
- -char *zconftext;
- -#define YY_NO_INPUT 1
- -
- -/*
- - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
- - * Released under the terms of the GNU GPL v2.0.
- - */
- -
- -#include <limits.h>
- -#include <stdio.h>
- -#include <stdlib.h>
- -#include <string.h>
- -#include <unistd.h>
- -
- -#define LKC_DIRECT_LINK
- -#include "lkc.h"
- -
- -#define START_STRSIZE 16
- -
- -static struct {
- - struct file *file;
- - int lineno;
- -} current_pos;
- -
- -static char *text;
- -static int text_size, text_asize;
- -
- -struct buffer {
- - struct buffer *parent;
- - YY_BUFFER_STATE state;
- -};
- -
- -struct buffer *current_buf;
- -
- -static int last_ts, first_ts;
- -
- -static void zconf_endhelp(void);
- -static void zconf_endfile(void);
- -
- -void new_string(void)
- -{
- - text = malloc(START_STRSIZE);
- - text_asize = START_STRSIZE;
- - text_size = 0;
- - *text = 0;
- -}
- -
- -void append_string(const char *str, int size)
- -{
- - int new_size = text_size + size + 1;
- - if (new_size > text_asize) {
- - new_size += START_STRSIZE - 1;
- - new_size &= -START_STRSIZE;
- - text = realloc(text, new_size);
- - text_asize = new_size;
- - }
- - memcpy(text + text_size, str, size);
- - text_size += size;
- - text[text_size] = 0;
- -}
- -
- -void alloc_string(const char *str, int size)
- -{
- - text = malloc(size + 1);
- - memcpy(text, str, size);
- - text[size] = 0;
- -}
- -
- -#define INITIAL 0
- -#define COMMAND 1
- -#define HELP 2
- -#define STRING 3
- -#define PARAM 4
- -
- -#ifndef YY_NO_UNISTD_H
- -/* Special case for "unistd.h", since it is non-ANSI. We include it way
- - * down here because we want the user's section 1 to have been scanned first.
- - * The user has a chance to override it with an option.
- - */
- -#include <unistd.h>
- -#endif
- -
- -#ifndef YY_EXTRA_TYPE
- -#define YY_EXTRA_TYPE void *
- -#endif
- -
- -static int yy_init_globals (void );
- -
- -/* Accessor methods to globals.
- - These are made visible to non-reentrant scanners for convenience. */
- -
- -int zconflex_destroy (void );
- -
- -int zconfget_debug (void );
- -
- -void zconfset_debug (int debug_flag );
- -
- -YY_EXTRA_TYPE zconfget_extra (void );
- -
- -void zconfset_extra (YY_EXTRA_TYPE user_defined );
- -
- -FILE *zconfget_in (void );
- -
- -void zconfset_in (FILE * in_str );
- -
- -FILE *zconfget_out (void );
- -
- -void zconfset_out (FILE * out_str );
- -
- -int zconfget_leng (void );
- -
- -char *zconfget_text (void );
- -
- -int zconfget_lineno (void );
- -
- -void zconfset_lineno (int line_number );
- -
- -/* Macros after this point can all be overridden by user definitions in
- - * section 1.
- - */
- -
- -#ifndef YY_SKIP_YYWRAP
- -#ifdef __cplusplus
- -extern "C" int zconfwrap (void );
- -#else
- -extern int zconfwrap (void );
- -#endif
- -#endif
- -
- - static void yyunput (int c,char *buf_ptr );
- -
- -#ifndef yytext_ptr
- -static void yy_flex_strncpy (char *,yyconst char *,int );
- -#endif
- -
- -#ifdef YY_NEED_STRLEN
- -static int yy_flex_strlen (yyconst char * );
- -#endif
- -
- -#ifndef YY_NO_INPUT
- -
- -#ifdef __cplusplus
- -static int yyinput (void );
- -#else
- -static int input (void );
- -#endif
- -
- -#endif
- -
- -/* Amount of stuff to slurp up with each read. */
- -#ifndef YY_READ_BUF_SIZE
- -#define YY_READ_BUF_SIZE 8192
- -#endif
- -
- -/* Copy whatever the last rule matched to the standard output. */
- -#ifndef ECHO
- -/* This used to be an fputs(), but since the string might contain NUL's,
- - * we now use fwrite().
- - */
- -#define ECHO fwrite( zconftext, zconfleng, 1, zconfout )
- -#endif
- -
- -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- - * is returned in "result".
- - */
- -#ifndef YY_INPUT
- -#define YY_INPUT(buf,result,max_size) \
- - errno=0; \
- - while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \
- - { \
- - if( errno != EINTR) \
- - { \
- - YY_FATAL_ERROR( "input in flex scanner failed" ); \
- - break; \
- - } \
- - errno=0; \
- - clearerr(zconfin); \
- - }\
- -\
- -
- -#endif
- -
- -/* No semi-colon after return; correct usage is to write "yyterminate();" -
- - * we don't want an extra ';' after the "return" because that will cause
- - * some compilers to complain about unreachable statements.
- - */
- -#ifndef yyterminate
- -#define yyterminate() return YY_NULL
- -#endif
- -
- -/* Number of entries by which start-condition stack grows. */
- -#ifndef YY_START_STACK_INCR
- -#define YY_START_STACK_INCR 25
- -#endif
- -
- -/* Report a fatal error. */
- -#ifndef YY_FATAL_ERROR
- -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
- -#endif
- -
- -/* end tables serialization structures and prototypes */
- -
- -/* Default declaration of generated scanner - a define so the user can
- - * easily add parameters.
- - */
- -#ifndef YY_DECL
- -#define YY_DECL_IS_OURS 1
- -
- -extern int zconflex (void);
- -
- -#define YY_DECL int zconflex (void)
- -#endif /* !YY_DECL */
- -
- -/* Code executed at the beginning of each rule, after zconftext and zconfleng
- - * have been set up.
- - */
- -#ifndef YY_USER_ACTION
- -#define YY_USER_ACTION
- -#endif
- -
- -/* Code executed at the end of each rule. */
- -#ifndef YY_BREAK
- -#define YY_BREAK break;
- -#endif
- -
- -#define YY_RULE_SETUP \
- - YY_USER_ACTION
- -
- -/** The main scanner function which does all the work.
- - */
- -YY_DECL
- -{
- - register yy_state_type yy_current_state;
- - register char *yy_cp, *yy_bp;
- - register int yy_act;
- -
- - int str = 0;
- - int ts, i;
- -
- - if ( !(yy_init) )
- - {
- - (yy_init) = 1;
- -
- -#ifdef YY_USER_INIT
- - YY_USER_INIT;
- -#endif
- -
- - if ( ! (yy_start) )
- - (yy_start) = 1; /* first start state */
- -
- - if ( ! zconfin )
- - zconfin = stdin;
- -
- - if ( ! zconfout )
- - zconfout = stdout;
- -
- - if ( ! YY_CURRENT_BUFFER ) {
- - zconfensure_buffer_stack ();
- - YY_CURRENT_BUFFER_LVALUE =
- - zconf_create_buffer(zconfin,YY_BUF_SIZE );
- - }
- -
- - zconf_load_buffer_state( );
- - }
- -
- - while ( 1 ) /* loops until end-of-file is reached */
- - {
- - yy_cp = (yy_c_buf_p);
- -
- - /* Support of zconftext. */
- - *yy_cp = (yy_hold_char);
- -
- - /* yy_bp points to the position in yy_ch_buf of the start of
- - * the current run.
- - */
- - yy_bp = yy_cp;
- -
- - yy_current_state = (yy_start);
- -yy_match:
- - while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 )
- - ++yy_cp;
- -
- - yy_current_state = -yy_current_state;
- -
- -yy_find_action:
- - yy_act = yy_accept[yy_current_state];
- -
- - YY_DO_BEFORE_ACTION;
- -
- -do_action: /* This label is used only to access EOF actions. */
- -
- - switch ( yy_act )
- - { /* beginning of action switch */
- -case 1:
- -/* rule 1 can match eol */
- -case 2:
- -/* rule 2 can match eol */
- -YY_RULE_SETUP
- -{
- - current_file->lineno++;
- - return T_EOL;
- -}
- - YY_BREAK
- -case 3:
- -YY_RULE_SETUP
- -
- - YY_BREAK
- -case 4:
- -YY_RULE_SETUP
- -{
- - BEGIN(COMMAND);
- -}
- - YY_BREAK
- -case 5:
- -YY_RULE_SETUP
- -{
- - unput(zconftext[0]);
- - BEGIN(COMMAND);
- -}
- - YY_BREAK
- -
- -case 6:
- -YY_RULE_SETUP
- -{
- - struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
- - BEGIN(PARAM);
- - current_pos.file = current_file;
- - current_pos.lineno = current_file->lineno;
- - if (id && id->flags & TF_COMMAND) {
- - zconflval.id = id;
- - return id->token;
- - }
- - alloc_string(zconftext, zconfleng);
- - zconflval.string = text;
- - return T_WORD;
- - }
- - YY_BREAK
- -case 7:
- -YY_RULE_SETUP
- -
- - YY_BREAK
- -case 8:
- -/* rule 8 can match eol */
- -YY_RULE_SETUP
- -{
- - BEGIN(INITIAL);
- - current_file->lineno++;
- - return T_EOL;
- - }
- - YY_BREAK
- -
- -case 9:
- -YY_RULE_SETUP
- -return T_AND;
- - YY_BREAK
- -case 10:
- -YY_RULE_SETUP
- -return T_OR;
- - YY_BREAK
- -case 11:
- -YY_RULE_SETUP
- -return T_OPEN_PAREN;
- - YY_BREAK
- -case 12:
- -YY_RULE_SETUP
- -return T_CLOSE_PAREN;
- - YY_BREAK
- -case 13:
- -YY_RULE_SETUP
- -return T_NOT;
- - YY_BREAK
- -case 14:
- -YY_RULE_SETUP
- -return T_EQUAL;
- - YY_BREAK
- -case 15:
- -YY_RULE_SETUP
- -return T_UNEQUAL;
- - YY_BREAK
- -case 16:
- -YY_RULE_SETUP
- -{
- - str = zconftext[0];
- - new_string();
- - BEGIN(STRING);
- - }
- - YY_BREAK
- -case 17:
- -/* rule 17 can match eol */
- -YY_RULE_SETUP
- -BEGIN(INITIAL); current_file->lineno++; return T_EOL;
- - YY_BREAK
- -case 18:
- -YY_RULE_SETUP
- -/* ignore */
- - YY_BREAK
- -case 19:
- -YY_RULE_SETUP
- -{
- - struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
- - if (id && id->flags & TF_PARAM) {
- - zconflval.id = id;
- - return id->token;
- - }
- - alloc_string(zconftext, zconfleng);
- - zconflval.string = text;
- - return T_WORD;
- - }
- - YY_BREAK
- -case 20:
- -YY_RULE_SETUP
- -/* comment */
- - YY_BREAK
- -case 21:
- -/* rule 21 can match eol */
- -YY_RULE_SETUP
- -current_file->lineno++;
- - YY_BREAK
- -case 22:
- -YY_RULE_SETUP
- -
- - YY_BREAK
- -case YY_STATE_EOF(PARAM):
- -{
- - BEGIN(INITIAL);
- - }
- - YY_BREAK
- -
- -case 23:
- -/* rule 23 can match eol */
- -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
- -(yy_c_buf_p) = yy_cp -= 1;
- -YY_DO_BEFORE_ACTION; /* set up zconftext again */
- -YY_RULE_SETUP
- -{
- - append_string(zconftext, zconfleng);
- - zconflval.string = text;
- - return T_WORD_QUOTE;
- - }
- - YY_BREAK
- -case 24:
- -YY_RULE_SETUP
- -{
- - append_string(zconftext, zconfleng);
- - }
- - YY_BREAK
- -case 25:
- -/* rule 25 can match eol */
- -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
- -(yy_c_buf_p) = yy_cp -= 1;
- -YY_DO_BEFORE_ACTION; /* set up zconftext again */
- -YY_RULE_SETUP
- -{
- - append_string(zconftext + 1, zconfleng - 1);
- - zconflval.string = text;
- - return T_WORD_QUOTE;
- - }
- - YY_BREAK
- -case 26:
- -YY_RULE_SETUP
- -{
- - append_string(zconftext + 1, zconfleng - 1);
- - }
- - YY_BREAK
- -case 27:
- -YY_RULE_SETUP
- -{
- - if (str == zconftext[0]) {
- - BEGIN(PARAM);
- - zconflval.string = text;
- - return T_WORD_QUOTE;
- - } else
- - append_string(zconftext, 1);
- - }
- - YY_BREAK
- -case 28:
- -/* rule 28 can match eol */
- -YY_RULE_SETUP
- -{
- - printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno());
- - current_file->lineno++;
- - BEGIN(INITIAL);
- - return T_EOL;
- - }
- - YY_BREAK
- -case YY_STATE_EOF(STRING):
- -{
- - BEGIN(INITIAL);
- - }
- - YY_BREAK
- -
- -case 29:
- -YY_RULE_SETUP
- -{
- - ts = 0;
- - for (i = 0; i < zconfleng; i++) {
- - if (zconftext[i] == '\t')
- - ts = (ts & ~7) + 8;
- - else
- - ts++;
- - }
- - last_ts = ts;
- - if (first_ts) {
- - if (ts < first_ts) {
- - zconf_endhelp();
- - return T_HELPTEXT;
- - }
- - ts -= first_ts;
- - while (ts > 8) {
- - append_string(" ", 8);
- - ts -= 8;
- - }
- - append_string(" ", ts);
- - }
- - }
- - YY_BREAK
- -case 30:
- -/* rule 30 can match eol */
- -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
- -(yy_c_buf_p) = yy_cp -= 1;
- -YY_DO_BEFORE_ACTION; /* set up zconftext again */
- -YY_RULE_SETUP
- -{
- - current_file->lineno++;
- - zconf_endhelp();
- - return T_HELPTEXT;
- - }
- - YY_BREAK
- -case 31:
- -/* rule 31 can match eol */
- -YY_RULE_SETUP
- -{
- - current_file->lineno++;
- - append_string("\n", 1);
- - }
- - YY_BREAK
- -case 32:
- -YY_RULE_SETUP
- -{
- - while (zconfleng) {
- - if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t'))
- - break;
- - zconfleng--;
- - }
- - append_string(zconftext, zconfleng);
- - if (!first_ts)
- - first_ts = last_ts;
- - }
- - YY_BREAK
- -case YY_STATE_EOF(HELP):
- -{
- - zconf_endhelp();
- - return T_HELPTEXT;
- - }
- - YY_BREAK
- -
- -case YY_STATE_EOF(INITIAL):
- -case YY_STATE_EOF(COMMAND):
- -{
- - if (current_file) {
- - zconf_endfile();
- - return T_EOL;
- - }
- - fclose(zconfin);
- - yyterminate();
- -}
- - YY_BREAK
- -case 33:
- -YY_RULE_SETUP
- -YY_FATAL_ERROR( "flex scanner jammed" );
- - YY_BREAK
- -
- - case YY_END_OF_BUFFER:
- - {
- - /* Amount of text matched not including the EOB char. */
- - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
- -
- - /* Undo the effects of YY_DO_BEFORE_ACTION. */
- - *yy_cp = (yy_hold_char);
- - YY_RESTORE_YY_MORE_OFFSET
- -
- - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
- - {
- - /* We're scanning a new file or input source. It's
- - * possible that this happened because the user
- - * just pointed zconfin at a new source and called
- - * zconflex(). If so, then we have to assure
- - * consistency between YY_CURRENT_BUFFER and our
- - * globals. Here is the right place to do so, because
- - * this is the first action (other than possibly a
- - * back-up) that will match for the new input source.
- - */
- - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- - YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin;
- - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
- - }
- -
- - /* Note that here we test for yy_c_buf_p "<=" to the position
- - * of the first EOB in the buffer, since yy_c_buf_p will
- - * already have been incremented past the NUL character
- - * (since all states make transitions on EOB to the
- - * end-of-buffer state). Contrast this with the test
- - * in input().
- - */
- - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- - { /* This was really a NUL. */
- - yy_state_type yy_next_state;
- -
- - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
- -
- - yy_current_state = yy_get_previous_state( );
- -
- - /* Okay, we're now positioned to make the NUL
- - * transition. We couldn't have
- - * yy_get_previous_state() go ahead and do it
- - * for us because it doesn't know how to deal
- - * with the possibility of jamming (and we don't
- - * want to build jamming into it because then it
- - * will run more slowly).
- - */
- -
- - yy_next_state = yy_try_NUL_trans( yy_current_state );
- -
- - yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- -
- - if ( yy_next_state )
- - {
- - /* Consume the NUL. */
- - yy_cp = ++(yy_c_buf_p);
- - yy_current_state = yy_next_state;
- - goto yy_match;
- - }
- -
- - else
- - {
- - yy_cp = (yy_c_buf_p);
- - goto yy_find_action;
- - }
- - }
- -
- - else switch ( yy_get_next_buffer( ) )
- - {
- - case EOB_ACT_END_OF_FILE:
- - {
- - (yy_did_buffer_switch_on_eof) = 0;
- -
- - if ( zconfwrap( ) )
- - {
- - /* Note: because we've taken care in
- - * yy_get_next_buffer() to have set up
- - * zconftext, we can now set up
- - * yy_c_buf_p so that if some total
- - * hoser (like flex itself) wants to
- - * call the scanner after we return the
- - * YY_NULL, it'll still work - another
- - * YY_NULL will get returned.
- - */
- - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
- -
- - yy_act = YY_STATE_EOF(YY_START);
- - goto do_action;
- - }
- -
- - else
- - {
- - if ( ! (yy_did_buffer_switch_on_eof) )
- - YY_NEW_FILE;
- - }
- - break;
- - }
- -
- - case EOB_ACT_CONTINUE_SCAN:
- - (yy_c_buf_p) =
- - (yytext_ptr) + yy_amount_of_matched_text;
- -
- - yy_current_state = yy_get_previous_state( );
- -
- - yy_cp = (yy_c_buf_p);
- - yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- - goto yy_match;
- -
- - case EOB_ACT_LAST_MATCH:
- - (yy_c_buf_p) =
- - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
- -
- - yy_current_state = yy_get_previous_state( );
- -
- - yy_cp = (yy_c_buf_p);
- - yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- - goto yy_find_action;
- - }
- - break;
- - }
- -
- - default:
- - YY_FATAL_ERROR(
- - "fatal flex scanner internal error--no action found" );
- - } /* end of action switch */
- - } /* end of scanning one token */
- -} /* end of zconflex */
- -
- -/* yy_get_next_buffer - try to read in a new buffer
- - *
- - * Returns a code representing an action:
- - * EOB_ACT_LAST_MATCH -
- - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- - * EOB_ACT_END_OF_FILE - end of file
- - */
- -static int yy_get_next_buffer (void)
- -{
- - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- - register char *source = (yytext_ptr);
- - register int number_to_move, i;
- - int ret_val;
- -
- - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
- - YY_FATAL_ERROR(
- - "fatal flex scanner internal error--end of buffer missed" );
- -
- - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
- - { /* Don't try to fill the buffer, so this is an EOF. */
- - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
- - {
- - /* We matched a single character, the EOB, so
- - * treat this as a final EOF.
- - */
- - return EOB_ACT_END_OF_FILE;
- - }
- -
- - else
- - {
- - /* We matched some text prior to the EOB, first
- - * process it.
- - */
- - return EOB_ACT_LAST_MATCH;
- - }
- - }
- -
- - /* Try to read more data. */
- -
- - /* First move last chars to start of buffer. */
- - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
- -
- - for ( i = 0; i < number_to_move; ++i )
- - *(dest++) = *(source++);
- -
- - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- - /* don't do the read, it's not guaranteed to return an EOF,
- - * just force an EOF
- - */
- - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
- -
- - else
- - {
- - int num_to_read =
- - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
- -
- - while ( num_to_read <= 0 )
- - { /* Not enough room in the buffer - grow it. */
- -
- - /* just a shorter name for the current buffer */
- - YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
- -
- - int yy_c_buf_p_offset =
- - (int) ((yy_c_buf_p) - b->yy_ch_buf);
- -
- - if ( b->yy_is_our_buffer )
- - {
- - int new_size = b->yy_buf_size * 2;
- -
- - if ( new_size <= 0 )
- - b->yy_buf_size += b->yy_buf_size / 8;
- - else
- - b->yy_buf_size *= 2;
- -
- - b->yy_ch_buf = (char *)
- - /* Include room in for 2 EOB chars. */
- - zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
- - }
- - else
- - /* Can't grow it, we don't own it. */
- - b->yy_ch_buf = 0;
- -
- - if ( ! b->yy_ch_buf )
- - YY_FATAL_ERROR(
- - "fatal error - scanner input buffer overflow" );
- -
- - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
- -
- - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
- - number_to_move - 1;
- -
- - }
- -
- - if ( num_to_read > YY_READ_BUF_SIZE )
- - num_to_read = YY_READ_BUF_SIZE;
- -
- - /* Read in more data. */
- - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- - (yy_n_chars), (size_t) num_to_read );
- -
- - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- - }
- -
- - if ( (yy_n_chars) == 0 )
- - {
- - if ( number_to_move == YY_MORE_ADJ )
- - {
- - ret_val = EOB_ACT_END_OF_FILE;
- - zconfrestart(zconfin );
- - }
- -
- - else
- - {
- - ret_val = EOB_ACT_LAST_MATCH;
- - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
- - YY_BUFFER_EOF_PENDING;
- - }
- - }
- -
- - else
- - ret_val = EOB_ACT_CONTINUE_SCAN;
- -
- - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
- - /* Extend the array by 50%, plus the number we really need. */
- - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
- - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
- - }
- -
- - (yy_n_chars) += number_to_move;
- - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
- - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
- -
- - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
- -
- - return ret_val;
- -}
- -
- -/* yy_get_previous_state - get the state just before the EOB char was reached */
- -
- - static yy_state_type yy_get_previous_state (void)
- -{
- - register yy_state_type yy_current_state;
- - register char *yy_cp;
- -
- - yy_current_state = (yy_start);
- -
- - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
- - {
- - yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)];
- - }
- -
- - return yy_current_state;
- -}
- -
- -/* yy_try_NUL_trans - try to make a transition on the NUL character
- - *
- - * synopsis
- - * next_state = yy_try_NUL_trans( current_state );
- - */
- - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
- -{
- - register int yy_is_jam;
- -
- - yy_current_state = yy_nxt[yy_current_state][1];
- - yy_is_jam = (yy_current_state <= 0);
- -
- - return yy_is_jam ? 0 : yy_current_state;
- -}
- -
- - static void yyunput (int c, register char * yy_bp )
- -{
- - register char *yy_cp;
- -
- - yy_cp = (yy_c_buf_p);
- -
- - /* undo effects of setting up zconftext */
- - *yy_cp = (yy_hold_char);
- -
- - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- - { /* need to shift things up to make room */
- - /* +2 for EOB chars. */
- - register int number_to_move = (yy_n_chars) + 2;
- - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- - register char *source =
- - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
- -
- - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- - *--dest = *--source;
- -
- - yy_cp += (int) (dest - source);
- - yy_bp += (int) (dest - source);
- - YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
- -
- - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- - YY_FATAL_ERROR( "flex scanner push-back overflow" );
- - }
- -
- - *--yy_cp = (char) c;
- -
- - (yytext_ptr) = yy_bp;
- - (yy_hold_char) = *yy_cp;
- - (yy_c_buf_p) = yy_cp;
- -}
- -
- -#ifndef YY_NO_INPUT
- -#ifdef __cplusplus
- - static int yyinput (void)
- -#else
- - static int input (void)
- -#endif
- -
- -{
- - int c;
- -
- - *(yy_c_buf_p) = (yy_hold_char);
- -
- - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
- - {
- - /* yy_c_buf_p now points to the character we want to return.
- - * If this occurs *before* the EOB characters, then it's a
- - * valid NUL; if not, then we've hit the end of the buffer.
- - */
- - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- - /* This was really a NUL. */
- - *(yy_c_buf_p) = '\0';
- -
- - else
- - { /* need more input */
- - int offset = (yy_c_buf_p) - (yytext_ptr);
- - ++(yy_c_buf_p);
- -
- - switch ( yy_get_next_buffer( ) )
- - {
- - case EOB_ACT_LAST_MATCH:
- - /* This happens because yy_g_n_b()
- - * sees that we've accumulated a
- - * token and flags that we need to
- - * try matching the token before
- - * proceeding. But for input(),
- - * there's no matching to consider.
- - * So convert the EOB_ACT_LAST_MATCH
- - * to EOB_ACT_END_OF_FILE.
- - */
- -
- - /* Reset buffer status. */
- - zconfrestart(zconfin );
- -
- - /*FALLTHROUGH*/
- -
- - case EOB_ACT_END_OF_FILE:
- - {
- - if ( zconfwrap( ) )
- - return EOF;
- -
- - if ( ! (yy_did_buffer_switch_on_eof) )
- - YY_NEW_FILE;
- -#ifdef __cplusplus
- - return yyinput();
- -#else
- - return input();
- -#endif
- - }
- -
- - case EOB_ACT_CONTINUE_SCAN:
- - (yy_c_buf_p) = (yytext_ptr) + offset;
- - break;
- - }
- - }
- - }
- -
- - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- - *(yy_c_buf_p) = '\0'; /* preserve zconftext */
- - (yy_hold_char) = *++(yy_c_buf_p);
- -
- - return c;
- -}
- -#endif /* ifndef YY_NO_INPUT */
- -
- -/** Immediately switch to a different input stream.
- - * @param input_file A readable stream.
- - *
- - * @note This function does not reset the start condition to @c INITIAL .
- - */
- - void zconfrestart (FILE * input_file )
- -{
- -
- - if ( ! YY_CURRENT_BUFFER ){
- - zconfensure_buffer_stack ();
- - YY_CURRENT_BUFFER_LVALUE =
- - zconf_create_buffer(zconfin,YY_BUF_SIZE );
- - }
- -
- - zconf_init_buffer(YY_CURRENT_BUFFER,input_file );
- - zconf_load_buffer_state( );
- -}
- -
- -/** Switch to a different input buffer.
- - * @param new_buffer The new input buffer.
- - *
- - */
- - void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer )
- -{
- -
- - /* TODO. We should be able to replace this entire function body
- - * with
- - * zconfpop_buffer_state();
- - * zconfpush_buffer_state(new_buffer);
- - */
- - zconfensure_buffer_stack ();
- - if ( YY_CURRENT_BUFFER == new_buffer )
- - return;
- -
- - if ( YY_CURRENT_BUFFER )
- - {
- - /* Flush out information for old buffer. */
- - *(yy_c_buf_p) = (yy_hold_char);
- - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- - }
- -
- - YY_CURRENT_BUFFER_LVALUE = new_buffer;
- - zconf_load_buffer_state( );
- -
- - /* We don't actually know whether we did this switch during
- - * EOF (zconfwrap()) processing, but the only time this flag
- - * is looked at is after zconfwrap() is called, so it's safe
- - * to go ahead and always set it.
- - */
- - (yy_did_buffer_switch_on_eof) = 1;
- -}
- -
- -static void zconf_load_buffer_state (void)
- -{
- - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- - zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
- - (yy_hold_char) = *(yy_c_buf_p);
- -}
- -
- -/** Allocate and initialize an input buffer state.
- - * @param file A readable stream.
- - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- - *
- - * @return the allocated buffer state.
- - */
- - YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size )
- -{
- - YY_BUFFER_STATE b;
- -
- - b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
- - if ( ! b )
- - YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
- -
- - b->yy_buf_size = size;
- -
- - /* yy_ch_buf has to be 2 characters longer than the size given because
- - * we need to put in 2 end-of-buffer characters.
- - */
- - b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 );
- - if ( ! b->yy_ch_buf )
- - YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
- -
- - b->yy_is_our_buffer = 1;
- -
- - zconf_init_buffer(b,file );
- -
- - return b;
- -}
- -
- -/** Destroy the buffer.
- - * @param b a buffer created with zconf_create_buffer()
- - *
- - */
- - void zconf_delete_buffer (YY_BUFFER_STATE b )
- -{
- -
- - if ( ! b )
- - return;
- -
- - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
- -
- - if ( b->yy_is_our_buffer )
- - zconffree((void *) b->yy_ch_buf );
- -
- - zconffree((void *) b );
- -}
- -
- -/* Initializes or reinitializes a buffer.
- - * This function is sometimes called more than once on the same buffer,
- - * such as during a zconfrestart() or at EOF.
- - */
- - static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file )
- -
- -{
- - int oerrno = errno;
- -
- - zconf_flush_buffer(b );
- -
- - b->yy_input_file = file;
- - b->yy_fill_buffer = 1;
- -
- - /* If b is the current buffer, then zconf_init_buffer was _probably_
- - * called from zconfrestart() or through yy_get_next_buffer.
- - * In that case, we don't want to reset the lineno or column.
- - */
- - if (b != YY_CURRENT_BUFFER){
- - b->yy_bs_lineno = 1;
- - b->yy_bs_column = 0;
- - }
- -
- - b->yy_is_interactive = 0;
- -
- - errno = oerrno;
- -}
- -
- -/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- - *
- - */
- - void zconf_flush_buffer (YY_BUFFER_STATE b )
- -{
- - if ( ! b )
- - return;
- -
- - b->yy_n_chars = 0;
- -
- - /* We always need two end-of-buffer characters. The first causes
- - * a transition to the end-of-buffer state. The second causes
- - * a jam in that state.
- - */
- - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
- -
- - b->yy_buf_pos = &b->yy_ch_buf[0];
- -
- - b->yy_at_bol = 1;
- - b->yy_buffer_status = YY_BUFFER_NEW;
- -
- - if ( b == YY_CURRENT_BUFFER )
- - zconf_load_buffer_state( );
- -}
- -
- -/** Pushes the new state onto the stack. The new state becomes
- - * the current state. This function will allocate the stack
- - * if necessary.
- - * @param new_buffer The new state.
- - *
- - */
- -void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
- -{
- - if (new_buffer == NULL)
- - return;
- -
- - zconfensure_buffer_stack();
- -
- - /* This block is copied from zconf_switch_to_buffer. */
- - if ( YY_CURRENT_BUFFER )
- - {
- - /* Flush out information for old buffer. */
- - *(yy_c_buf_p) = (yy_hold_char);
- - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- - }
- -
- - /* Only push if top exists. Otherwise, replace top. */
- - if (YY_CURRENT_BUFFER)
- - (yy_buffer_stack_top)++;
- - YY_CURRENT_BUFFER_LVALUE = new_buffer;
- -
- - /* copied from zconf_switch_to_buffer. */
- - zconf_load_buffer_state( );
- - (yy_did_buffer_switch_on_eof) = 1;
- -}
- -
- -/** Removes and deletes the top of the stack, if present.
- - * The next element becomes the new top.
- - *
- - */
- -void zconfpop_buffer_state (void)
- -{
- - if (!YY_CURRENT_BUFFER)
- - return;
- -
- - zconf_delete_buffer(YY_CURRENT_BUFFER );
- - YY_CURRENT_BUFFER_LVALUE = NULL;
- - if ((yy_buffer_stack_top) > 0)
- - --(yy_buffer_stack_top);
- -
- - if (YY_CURRENT_BUFFER) {
- - zconf_load_buffer_state( );
- - (yy_did_buffer_switch_on_eof) = 1;
- - }
- -}
- -
- -/* Allocates the stack if it does not exist.
- - * Guarantees space for at least one push.
- - */
- -static void zconfensure_buffer_stack (void)
- -{
- - int num_to_alloc;
- -
- - if (!(yy_buffer_stack)) {
- -
- - /* First allocation is just for 2 elements, since we don't know if this
- - * scanner will even need a stack. We use 2 instead of 1 to avoid an
- - * immediate realloc on the next call.
- - */
- - num_to_alloc = 1;
- - (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc
- - (num_to_alloc * sizeof(struct yy_buffer_state*)
- - );
- - if ( ! (yy_buffer_stack) )
- - YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
- -
- - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
- -
- - (yy_buffer_stack_max) = num_to_alloc;
- - (yy_buffer_stack_top) = 0;
- - return;
- - }
- -
- - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
- -
- - /* Increase the buffer to prepare for a possible push. */
- - int grow_size = 8 /* arbitrary grow size */;
- -
- - num_to_alloc = (yy_buffer_stack_max) + grow_size;
- - (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc
- - ((yy_buffer_stack),
- - num_to_alloc * sizeof(struct yy_buffer_state*)
- - );
- - if ( ! (yy_buffer_stack) )
- - YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
- -
- - /* zero only the new slots.*/
- - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
- - (yy_buffer_stack_max) = num_to_alloc;
- - }
- -}
- -
- -/** Setup the input buffer state to scan directly from a user-specified character buffer.
- - * @param base the character buffer
- - * @param size the size in bytes of the character buffer
- - *
- - * @return the newly allocated buffer state object.
- - */
- -YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
- -{
- - YY_BUFFER_STATE b;
- -
- - if ( size < 2 ||
- - base[size-2] != YY_END_OF_BUFFER_CHAR ||
- - base[size-1] != YY_END_OF_BUFFER_CHAR )
- - /* They forgot to leave room for the EOB's. */
- - return 0;
- -
- - b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
- - if ( ! b )
- - YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" );
- -
- - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- - b->yy_buf_pos = b->yy_ch_buf = base;
- - b->yy_is_our_buffer = 0;
- - b->yy_input_file = 0;
- - b->yy_n_chars = b->yy_buf_size;
- - b->yy_is_interactive = 0;
- - b->yy_at_bol = 1;
- - b->yy_fill_buffer = 0;
- - b->yy_buffer_status = YY_BUFFER_NEW;
- -
- - zconf_switch_to_buffer(b );
- -
- - return b;
- -}
- -
- -/** Setup the input buffer state to scan a string. The next call to zconflex() will
- - * scan from a @e copy of @a str.
- - * @param yystr a NUL-terminated string to scan
- - *
- - * @return the newly allocated buffer state object.
- - * @note If you want to scan bytes that may contain NUL values, then use
- - * zconf_scan_bytes() instead.
- - */
- -YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
- -{
- -
- - return zconf_scan_bytes(yystr,strlen(yystr) );
- -}
- -
- -/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
- - * scan from a @e copy of @a bytes.
- - * @param bytes the byte buffer to scan
- - * @param len the number of bytes in the buffer pointed to by @a bytes.
- - *
- - * @return the newly allocated buffer state object.
- - */
- -YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len )
- -{
- - YY_BUFFER_STATE b;
- - char *buf;
- - yy_size_t n;
- - int i;
- -
- - /* Get memory for full buffer, including space for trailing EOB's. */
- - n = _yybytes_len + 2;
- - buf = (char *) zconfalloc(n );
- - if ( ! buf )
- - YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );
- -
- - for ( i = 0; i < _yybytes_len; ++i )
- - buf[i] = yybytes[i];
- -
- - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- -
- - b = zconf_scan_buffer(buf,n );
- - if ( ! b )
- - YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" );
- -
- - /* It's okay to grow etc. this buffer, and we should throw it
- - * away when we're done.
- - */
- - b->yy_is_our_buffer = 1;
- -
- - return b;
- -}
- -
- -#ifndef YY_EXIT_FAILURE
- -#define YY_EXIT_FAILURE 2
- -#endif
- -
- -static void yy_fatal_error (yyconst char* msg )
- -{
- - (void) fprintf( stderr, "%s\n", msg );
- - exit( YY_EXIT_FAILURE );
- -}
- -
- -/* Redefine yyless() so it works in section 3 code. */
- -
- -#undef yyless
- -#define yyless(n) \
- - do \
- - { \
- - /* Undo effects of setting up zconftext. */ \
- - int yyless_macro_arg = (n); \
- - YY_LESS_LINENO(yyless_macro_arg);\
- - zconftext[zconfleng] = (yy_hold_char); \
- - (yy_c_buf_p) = zconftext + yyless_macro_arg; \
- - (yy_hold_char) = *(yy_c_buf_p); \
- - *(yy_c_buf_p) = '\0'; \
- - zconfleng = yyless_macro_arg; \
- - } \
- - while ( 0 )
- -
- -/* Accessor methods (get/set functions) to struct members. */
- -
- -/** Get the current line number.
- - *
- - */
- -int zconfget_lineno (void)
- -{
- -
- - return zconflineno;
- -}
- -
- -/** Get the input stream.
- - *
- - */
- -FILE *zconfget_in (void)
- -{
- - return zconfin;
- -}
- -
- -/** Get the output stream.
- - *
- - */
- -FILE *zconfget_out (void)
- -{
- - return zconfout;
- -}
- -
- -/** Get the length of the current token.
- - *
- - */
- -int zconfget_leng (void)
- -{
- - return zconfleng;
- -}
- -
- -/** Get the current token.
- - *
- - */
- -
- -char *zconfget_text (void)
- -{
- - return zconftext;
- -}
- -
- -/** Set the current line number.
- - * @param line_number
- - *
- - */
- -void zconfset_lineno (int line_number )
- -{
- -
- - zconflineno = line_number;
- -}
- -
- -/** Set the input stream. This does not discard the current
- - * input buffer.
- - * @param in_str A readable stream.
- - *
- - * @see zconf_switch_to_buffer
- - */
- -void zconfset_in (FILE * in_str )
- -{
- - zconfin = in_str ;
- -}
- -
- -void zconfset_out (FILE * out_str )
- -{
- - zconfout = out_str ;
- -}
- -
- -int zconfget_debug (void)
- -{
- - return zconf_flex_debug;
- -}
- -
- -void zconfset_debug (int bdebug )
- -{
- - zconf_flex_debug = bdebug ;
- -}
- -
- -static int yy_init_globals (void)
- -{
- - /* Initialization is the same as for the non-reentrant scanner.
- - * This function is called from zconflex_destroy(), so don't allocate here.
- - */
- -
- - (yy_buffer_stack) = 0;
- - (yy_buffer_stack_top) = 0;
- - (yy_buffer_stack_max) = 0;
- - (yy_c_buf_p) = (char *) 0;
- - (yy_init) = 0;
- - (yy_start) = 0;
- -
- -/* Defined in main.c */
- -#ifdef YY_STDINIT
- - zconfin = stdin;
- - zconfout = stdout;
- -#else
- - zconfin = (FILE *) 0;
- - zconfout = (FILE *) 0;
- -#endif
- -
- - /* For future reference: Set errno on error, since we are called by
- - * zconflex_init()
- - */
- - return 0;
- -}
- -
- -/* zconflex_destroy is for both reentrant and non-reentrant scanners. */
- -int zconflex_destroy (void)
- -{
- -
- - /* Pop the buffer stack, destroying each element. */
- - while(YY_CURRENT_BUFFER){
- - zconf_delete_buffer(YY_CURRENT_BUFFER );
- - YY_CURRENT_BUFFER_LVALUE = NULL;
- - zconfpop_buffer_state();
- - }
- -
- - /* Destroy the stack itself. */
- - zconffree((yy_buffer_stack) );
- - (yy_buffer_stack) = NULL;
- -
- - /* Reset the globals. This is important in a non-reentrant scanner so the next time
- - * zconflex() is called, initialization will occur. */
- - yy_init_globals( );
- -
- - return 0;
- -}
- -
- -/*
- - * Internal utility routines.
- - */
- -
- -#ifndef yytext_ptr
- -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
- -{
- - register int i;
- - for ( i = 0; i < n; ++i )
- - s1[i] = s2[i];
- -}
- -#endif
- -
- -#ifdef YY_NEED_STRLEN
- -static int yy_flex_strlen (yyconst char * s )
- -{
- - register int n;
- - for ( n = 0; s[n]; ++n )
- - ;
- -
- - return n;
- -}
- -#endif
- -
- -void *zconfalloc (yy_size_t size )
- -{
- - return (void *) malloc( size );
- -}
- -
- -void *zconfrealloc (void * ptr, yy_size_t size )
- -{
- - /* The cast to (char *) in the following accommodates both
- - * implementations that use char* generic pointers, and those
- - * that use void* generic pointers. It works with the latter
- - * because both ANSI C and C++ allow castless assignment from
- - * any pointer type to void*, and deal with argument conversions
- - * as though doing an assignment.
- - */
- - return (void *) realloc( (char *) ptr, size );
- -}
- -
- -void zconffree (void * ptr )
- -{
- - free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */
- -}
- -
- -#define YYTABLES_NAME "yytables"
- -
- -void zconf_starthelp(void)
- -{
- - new_string();
- - last_ts = first_ts = 0;
- - BEGIN(HELP);
- -}
- -
- -static void zconf_endhelp(void)
- -{
- - zconflval.string = text;
- - BEGIN(INITIAL);
- -}
- -
- -/*
- - * Try to open specified file with following names:
- - * ./name
- - * $(srctree)/name
- - * The latter is used when srctree is separate from objtree
- - * when compiling the kernel.
- - * Return NULL if file is not found.
- - */
- -FILE *zconf_fopen(const char *name)
- -{
- - char *env, fullname[PATH_MAX+1];
- - FILE *f;
- -
- - f = fopen(name, "r");
- - if (!f && name != NULL && name[0] != '/') {
- - env = getenv(SRCTREE);
- - if (env) {
- - sprintf(fullname, "%s/%s", env, name);
- - f = fopen(fullname, "r");
- - }
- - }
- - return f;
- -}
- -
- -void zconf_initscan(const char *name)
- -{
- - zconfin = zconf_fopen(name);
- - if (!zconfin) {
- - printf("can't find file %s\n", name);
- - exit(1);
- - }
- -
- - current_buf = malloc(sizeof(*current_buf));
- - memset(current_buf, 0, sizeof(*current_buf));
- -
- - current_file = file_lookup(name);
- - current_file->lineno = 1;
- - current_file->flags = FILE_BUSY;
- -}
- -
- -void zconf_nextfile(const char *name)
- -{
- - struct file *file = file_lookup(name);
- - struct buffer *buf = malloc(sizeof(*buf));
- - memset(buf, 0, sizeof(*buf));
- -
- - current_buf->state = YY_CURRENT_BUFFER;
- - zconfin = zconf_fopen(name);
- - if (!zconfin) {
- - printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
- - exit(1);
- - }
- - zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE));
- - buf->parent = current_buf;
- - current_buf = buf;
- -
- - if (file->flags & FILE_BUSY) {
- - printf("%s:%d: do not source '%s' from itself\n",
- - zconf_curname(), zconf_lineno(), name);
- - exit(1);
- - }
- - if (file->flags & FILE_SCANNED) {
- - printf("%s:%d: file '%s' is already sourced from '%s'\n",
- - zconf_curname(), zconf_lineno(), name,
- - file->parent->name);
- - exit(1);
- - }
- - file->flags |= FILE_BUSY;
- - file->lineno = 1;
- - file->parent = current_file;
- - current_file = file;
- -}
- -
- -static void zconf_endfile(void)
- -{
- - struct buffer *parent;
- -
- - current_file->flags |= FILE_SCANNED;
- - current_file->flags &= ~FILE_BUSY;
- - current_file = current_file->parent;
- -
- - parent = current_buf->parent;
- - if (parent) {
- - fclose(zconfin);
- - zconf_delete_buffer(YY_CURRENT_BUFFER);
- - zconf_switch_to_buffer(parent->state);
- - }
- - free(current_buf);
- - current_buf = parent;
- -}
- -
- -int zconf_lineno(void)
- -{
- - return current_pos.lineno;
- -}
- -
- -char *zconf_curname(void)
- -{
- - return current_pos.file ? current_pos.file->name : "<none>";
- -}
- -
- diff -Nur uClibc-0.9.33.2/extra/config/list.h uClibc/extra/config/list.h
- --- uClibc-0.9.33.2/extra/config/list.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/config/list.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,131 @@
- +#ifndef LIST_H
- +#define LIST_H
- +
- +/*
- + * Copied from include/linux/...
- + */
- +
- +#undef offsetof
- +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
- +
- +/**
- + * container_of - cast a member of a structure out to the containing structure
- + * @ptr: the pointer to the member.
- + * @type: the type of the container struct this is embedded in.
- + * @member: the name of the member within the struct.
- + *
- + */
- +#define container_of(ptr, type, member) ({ \
- + const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- + (type *)( (char *)__mptr - offsetof(type,member) );})
- +
- +
- +struct list_head {
- + struct list_head *next, *prev;
- +};
- +
- +
- +#define LIST_HEAD_INIT(name) { &(name), &(name) }
- +
- +#define LIST_HEAD(name) \
- + struct list_head name = LIST_HEAD_INIT(name)
- +
- +/**
- + * list_entry - get the struct for this entry
- + * @ptr: the &struct list_head pointer.
- + * @type: the type of the struct this is embedded in.
- + * @member: the name of the list_struct within the struct.
- + */
- +#define list_entry(ptr, type, member) \
- + container_of(ptr, type, member)
- +
- +/**
- + * list_for_each_entry - iterate over list of given type
- + * @pos: the type * to use as a loop cursor.
- + * @head: the head for your list.
- + * @member: the name of the list_struct within the struct.
- + */
- +#define list_for_each_entry(pos, head, member) \
- + for (pos = list_entry((head)->next, typeof(*pos), member); \
- + &pos->member != (head); \
- + pos = list_entry(pos->member.next, typeof(*pos), member))
- +
- +/**
- + * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
- + * @pos: the type * to use as a loop cursor.
- + * @n: another type * to use as temporary storage
- + * @head: the head for your list.
- + * @member: the name of the list_struct within the struct.
- + */
- +#define list_for_each_entry_safe(pos, n, head, member) \
- + for (pos = list_entry((head)->next, typeof(*pos), member), \
- + n = list_entry(pos->member.next, typeof(*pos), member); \
- + &pos->member != (head); \
- + pos = n, n = list_entry(n->member.next, typeof(*n), member))
- +
- +/**
- + * list_empty - tests whether a list is empty
- + * @head: the list to test.
- + */
- +static inline int list_empty(const struct list_head *head)
- +{
- + return head->next == head;
- +}
- +
- +/*
- + * Insert a new entry between two known consecutive entries.
- + *
- + * This is only for internal list manipulation where we know
- + * the prev/next entries already!
- + */
- +static inline void __list_add(struct list_head *_new,
- + struct list_head *prev,
- + struct list_head *next)
- +{
- + next->prev = _new;
- + _new->next = next;
- + _new->prev = prev;
- + prev->next = _new;
- +}
- +
- +/**
- + * list_add_tail - add a new entry
- + * @new: new entry to be added
- + * @head: list head to add it before
- + *
- + * Insert a new entry before the specified head.
- + * This is useful for implementing queues.
- + */
- +static inline void list_add_tail(struct list_head *_new, struct list_head *head)
- +{
- + __list_add(_new, head->prev, head);
- +}
- +
- +/*
- + * Delete a list entry by making the prev/next entries
- + * point to each other.
- + *
- + * This is only for internal list manipulation where we know
- + * the prev/next entries already!
- + */
- +static inline void __list_del(struct list_head *prev, struct list_head *next)
- +{
- + next->prev = prev;
- + prev->next = next;
- +}
- +
- +#define LIST_POISON1 ((void *) 0x00100100)
- +#define LIST_POISON2 ((void *) 0x00200200)
- +/**
- + * list_del - deletes entry from list.
- + * @entry: the element to delete from the list.
- + * Note: list_empty() on entry does not return true after this, the entry is
- + * in an undefined state.
- + */
- +static inline void list_del(struct list_head *entry)
- +{
- + __list_del(entry->prev, entry->next);
- + entry->next = (struct list_head*)LIST_POISON1;
- + entry->prev = (struct list_head*)LIST_POISON2;
- +}
- +#endif
- diff -Nur uClibc-0.9.33.2/extra/config/lkc.h uClibc/extra/config/lkc.h
- --- uClibc-0.9.33.2/extra/config/lkc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lkc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,29 +14,37 @@
- static inline const char *gettext(const char *txt) { return txt; }
- static inline void textdomain(const char *domainname) {}
- static inline void bindtextdomain(const char *name, const char *dir) {}
- +static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; }
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- -#ifdef LKC_DIRECT_LINK
- #define P(name,type,arg) extern type name arg
- -#else
- -#include "lkc_defs.h"
- -#define P(name,type,arg) extern type (*name ## _p) arg
- -#endif
- #include "lkc_proto.h"
- #undef P
-
- #define SRCTREE "srctree"
-
- +#ifndef PACKAGE
- #define PACKAGE "linux"
- +#endif
- +
- #define LOCALEDIR "/usr/share/locale"
-
- #define _(text) gettext(text)
- #define N_(text) (text)
-
- +#ifndef CONFIG_
- +#define CONFIG_ "CONFIG_"
- +#endif
- +static inline const char *CONFIG_prefix(void)
- +{
- + return getenv( "CONFIG_" ) ?: CONFIG_;
- +}
- +#undef CONFIG_
- +#define CONFIG_ CONFIG_prefix()
-
- #define TF_COMMAND 0x0001
- #define TF_PARAM 0x0002
- @@ -61,35 +69,49 @@
- enum symbol_type stype;
- };
-
- +extern int zconfdebug;
- +
- int zconfparse(void);
- void zconfdump(FILE *out);
- -
- -extern int zconfdebug;
- void zconf_starthelp(void);
- FILE *zconf_fopen(const char *name);
- void zconf_initscan(const char *name);
- void zconf_nextfile(const char *name);
- int zconf_lineno(void);
- -char *zconf_curname(void);
- +const char *zconf_curname(void);
-
- /* confdata.c */
- const char *conf_get_configname(void);
- +const char *conf_get_autoconfig_name(void);
- char *conf_get_default_confname(void);
- void sym_set_change_count(int count);
- void sym_add_change_count(int count);
- -void conf_set_all_new_symbols(enum conf_def_mode mode);
- +bool conf_set_all_new_symbols(enum conf_def_mode mode);
- +void set_all_choice_values(struct symbol *csym);
- +
- +struct conf_printer {
- + void (*print_symbol)(FILE *, struct symbol *, const char *, void *);
- + void (*print_comment)(FILE *, const char *, void *);
- +};
-
- -/* kconfig_load.c */
- -void kconfig_load(void);
- +/* confdata.c and expr.c */
- +static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
- +{
- + assert(len != 0);
- +
- + if (fwrite(str, len, count, out) != count)
- + fprintf(stderr, "Error in writing or end of file.\n");
- +}
-
- /* menu.c */
- -void menu_init(void);
- +void _menu_init(void);
- void menu_warn(struct menu *menu, const char *fmt, ...);
- struct menu *menu_add_menu(void);
- void menu_end_menu(void);
- void menu_add_entry(struct symbol *sym);
- void menu_end_entry(void);
- void menu_add_dep(struct expr *dep);
- +void menu_add_visibility(struct expr *dep);
- struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
- struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
- void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
- @@ -101,10 +123,19 @@
- /* util.c */
- struct file *file_lookup(const char *name);
- int file_write_dep(const char *name);
- +void *xmalloc(size_t size);
- +void *xcalloc(size_t nmemb, size_t size);
- +char *dir_name(char *path);
- +char *base_name(char *path);
-
- struct gstr {
- size_t len;
- char *s;
- + /*
- + * when max_width is not zero long lines in string s (if any) get
- + * wrapped not to exceed the max_width value
- + */
- + int max_width;
- };
- struct gstr str_new(void);
- struct gstr str_assign(const char *s);
- @@ -120,6 +151,8 @@
- void sym_clear_all_valid(void);
- void sym_set_all_changed(void);
- void sym_set_changed(struct symbol *sym);
- +struct symbol *sym_choice_default(struct symbol *sym);
- +const char *sym_get_string_default(struct symbol *sym);
- struct symbol *sym_check_deps(struct symbol *sym);
- struct property *prop_alloc(enum prop_type type, struct symbol *sym);
- struct symbol *prop_get_symbol(struct property *prop);
- diff -Nur uClibc-0.9.33.2/extra/config/lkc_proto.h uClibc/extra/config/lkc_proto.h
- --- uClibc-0.9.33.2/extra/config/lkc_proto.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lkc_proto.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,28 +1,40 @@
- +#include <stdarg.h>
-
- /* confdata.c */
- P(conf_parse,void,(const char *name));
- P(conf_read,int,(const char *name));
- P(conf_read_simple,int,(const char *name, int));
- +P(conf_write_defconfig,int,(const char *name));
- P(conf_write,int,(const char *name));
- P(conf_write_autoconf,int,(void));
- P(conf_get_changed,bool,(void));
- P(conf_set_changed_callback, void,(void (*fn)(void)));
- +P(conf_set_message_callback, void,(void (*fn)(const char *fmt, va_list ap)));
-
- /* menu.c */
- P(rootmenu,struct menu,);
-
- -P(menu_is_visible,bool,(struct menu *menu));
- +P(menu_is_empty, bool, (struct menu *menu));
- +P(menu_is_visible, bool, (struct menu *menu));
- +P(menu_has_prompt, bool, (struct menu *menu));
- P(menu_get_prompt,const char *,(struct menu *menu));
- P(menu_get_root_menu,struct menu *,(struct menu *menu));
- P(menu_get_parent_menu,struct menu *,(struct menu *menu));
- P(menu_has_help,bool,(struct menu *menu));
- P(menu_get_help,const char *,(struct menu *menu));
- +P(get_symbol_str, void, (struct gstr *r, struct symbol *sym, struct list_head
- + *head));
- +P(get_relations_str, struct gstr, (struct symbol **sym_arr, struct list_head
- + *head));
- +P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));
-
- /* symbol.c */
- P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
-
- P(sym_lookup,struct symbol *,(const char *name, int flags));
- P(sym_find,struct symbol *,(const char *name));
- +P(sym_expand_string_value,const char *,(const char *in));
- +P(sym_escape_string_value, const char *,(const char *in));
- P(sym_re_search,struct symbol **,(const char *pattern));
- P(sym_type_name,const char *,(enum symbol_type type));
- P(sym_calc_value,void,(struct symbol *sym));
- diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/checklist.c uClibc/extra/config/lxdialog/checklist.c
- --- uClibc-0.9.33.2/extra/config/lxdialog/checklist.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lxdialog/checklist.c 2014-02-03 12:32:56.000000000 +0100
- @@ -31,6 +31,10 @@
- static void print_item(WINDOW * win, int choice, int selected)
- {
- int i;
- + char *list_item = malloc(list_width + 1);
- +
- + strncpy(list_item, item_str(), list_width - item_x);
- + list_item[list_width - item_x] = '\0';
-
- /* Clear 'residue' of last item */
- wattrset(win, dlg.menubox.atr);
- @@ -41,16 +45,18 @@
- wmove(win, choice, check_x);
- wattrset(win, selected ? dlg.check_selected.atr
- : dlg.check.atr);
- - wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' ');
- + if (!item_is_tag(':'))
- + wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' ');
-
- wattrset(win, selected ? dlg.tag_selected.atr : dlg.tag.atr);
- - mvwaddch(win, choice, item_x, item_str()[0]);
- + mvwaddch(win, choice, item_x, list_item[0]);
- wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr);
- - waddstr(win, (char *)item_str() + 1);
- + waddstr(win, list_item + 1);
- if (selected) {
- wmove(win, choice, check_x + 1);
- wrefresh(win);
- }
- + free(list_item);
- }
-
- /*
- @@ -126,16 +132,16 @@
- }
-
- do_resize:
- - if (getmaxy(stdscr) < (height + 6))
- + if (getmaxy(stdscr) < (height + CHECKLIST_HEIGTH_MIN))
- return -ERRDISPLAYTOOSMALL;
- - if (getmaxx(stdscr) < (width + 6))
- + if (getmaxx(stdscr) < (width + CHECKLIST_WIDTH_MIN))
- return -ERRDISPLAYTOOSMALL;
-
- max_choice = MIN(list_height, item_count());
-
- /* center dialog box on screen */
- - x = (COLS - width) / 2;
- - y = (LINES - height) / 2;
- + x = (getmaxx(stdscr) - width) / 2;
- + y = (getmaxy(stdscr) - height) / 2;
-
- draw_shadow(stdscr, y, x, height, width);
-
- @@ -174,6 +180,7 @@
- check_x = 0;
- item_foreach()
- check_x = MAX(check_x, strlen(item_str()) + 4);
- + check_x = MIN(check_x, list_width);
-
- check_x = (list_width - check_x) / 2;
- item_x = check_x + 4;
- diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/check-lxdialog.sh uClibc/extra/config/lxdialog/check-lxdialog.sh
- --- uClibc-0.9.33.2/extra/config/lxdialog/check-lxdialog.sh 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lxdialog/check-lxdialog.sh 2014-02-03 12:32:56.000000000 +0100
- @@ -4,7 +4,9 @@
- # What library to link
- ldflags()
- {
- - for ext in so a dylib ; do
- + pkg-config --libs ncursesw 2>/dev/null && exit
- + pkg-config --libs ncurses 2>/dev/null && exit
- + for ext in so a dll.a dylib ; do
- for lib in ncursesw ncurses curses ; do
- $cc -print-file-name=lib${lib}.${ext} | grep -q /
- if [ $? -eq 0 ]; then
- @@ -19,14 +21,13 @@
- # Where is ncurses.h?
- ccflags()
- {
- - if [ -f /usr/include/ncursesw/ncurses.h ]; then
- - echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
- - elif [ -f /usr/include/ncursesw/curses.h ]; then
- - echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"'
- + if [ -f /usr/include/ncursesw/curses.h ]; then
- + echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
- + echo ' -DNCURSES_WIDECHAR=1'
- elif [ -f /usr/include/ncurses/ncurses.h ]; then
- echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
- elif [ -f /usr/include/ncurses/curses.h ]; then
- - echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
- + echo '-I/usr/include/ncurses -DCURSES_LOC="<curses.h>"'
- elif [ -f /usr/include/ncurses.h ]; then
- echo '-DCURSES_LOC="<ncurses.h>"'
- else
- @@ -40,7 +41,7 @@
-
- # Check if we can link to ncurses
- check() {
- - $cc -xc - -o $tmp 2>/dev/null <<'EOF'
- + $cc -x c - -o $tmp 2>/dev/null <<'EOF'
- #include CURSES_LOC
- main() {}
- EOF
- diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/dialog.h uClibc/extra/config/lxdialog/dialog.h
- --- uClibc-0.9.33.2/extra/config/lxdialog/dialog.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lxdialog/dialog.h 2014-02-03 12:32:56.000000000 +0100
- @@ -106,8 +106,14 @@
- int hl; /* highlight this item */
- };
-
- +struct subtitle_list {
- + struct subtitle_list *next;
- + const char *text;
- +};
- +
- struct dialog_info {
- const char *backtitle;
- + struct subtitle_list *subtitles;
- struct dialog_color screen;
- struct dialog_color shadow;
- struct dialog_color dialog;
- @@ -144,6 +150,7 @@
- */
- extern struct dialog_info dlg;
- extern char dialog_input_result[];
- +extern int saved_x, saved_y; /* Needed in signal handler in mconf.c */
-
- /*
- * Function prototypes
- @@ -193,8 +200,23 @@
- int on_key_esc(WINDOW *win);
- int on_key_resize(void);
-
- +/* minimum (re)size values */
- +#define CHECKLIST_HEIGTH_MIN 6 /* For dialog_checklist() */
- +#define CHECKLIST_WIDTH_MIN 6
- +#define INPUTBOX_HEIGTH_MIN 2 /* For dialog_inputbox() */
- +#define INPUTBOX_WIDTH_MIN 2
- +#define MENUBOX_HEIGTH_MIN 15 /* For dialog_menu() */
- +#define MENUBOX_WIDTH_MIN 65
- +#define TEXTBOX_HEIGTH_MIN 8 /* For dialog_textbox() */
- +#define TEXTBOX_WIDTH_MIN 8
- +#define YESNO_HEIGTH_MIN 4 /* For dialog_yesno() */
- +#define YESNO_WIDTH_MIN 4
- +#define WINDOW_HEIGTH_MIN 19 /* For init_dialog() */
- +#define WINDOW_WIDTH_MIN 80
- +
- int init_dialog(const char *backtitle);
- void set_dialog_backtitle(const char *backtitle);
- +void set_dialog_subtitles(struct subtitle_list *subtitles);
- void end_dialog(int x, int y);
- void attr_clear(WINDOW * win, int height, int width, chtype attr);
- void dialog_clear(void);
- @@ -209,12 +231,17 @@
- int dialog_yesno(const char *title, const char *prompt, int height, int width);
- int dialog_msgbox(const char *title, const char *prompt, int height,
- int width, int pause);
- -int dialog_textbox(const char *title, const char *file, int height, int width);
- +
- +
- +typedef void (*update_text_fn)(char *buf, size_t start, size_t end, void
- + *_data);
- +int dialog_textbox(const char *title, char *tbuf, int initial_height,
- + int initial_width, int *keys, int *_vscroll, int *_hscroll,
- + update_text_fn update_text, void *data);
- int dialog_menu(const char *title, const char *prompt,
- const void *selected, int *s_scroll);
- int dialog_checklist(const char *title, const char *prompt, int height,
- int width, int list_height);
- -extern char dialog_input_result[];
- int dialog_inputbox(const char *title, const char *prompt, int height,
- int width, const char *init);
-
- diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/inputbox.c uClibc/extra/config/lxdialog/inputbox.c
- --- uClibc-0.9.33.2/extra/config/lxdialog/inputbox.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lxdialog/inputbox.c 2014-02-03 12:32:56.000000000 +0100
- @@ -45,7 +45,8 @@
- const char *init)
- {
- int i, x, y, box_y, box_x, box_width;
- - int input_x = 0, scroll = 0, key = 0, button = -1;
- + int input_x = 0, key = 0, button = -1;
- + int show_x, len, pos;
- char *instr = dialog_input_result;
- WINDOW *dialog;
-
- @@ -55,14 +56,14 @@
- strcpy(instr, init);
-
- do_resize:
- - if (getmaxy(stdscr) <= (height - 2))
- + if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGTH_MIN))
- return -ERRDISPLAYTOOSMALL;
- - if (getmaxx(stdscr) <= (width - 2))
- + if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN))
- return -ERRDISPLAYTOOSMALL;
-
- /* center dialog box on screen */
- - x = (COLS - width) / 2;
- - y = (LINES - height) / 2;
- + x = (getmaxx(stdscr) - width) / 2;
- + y = (getmaxy(stdscr) - height) / 2;
-
- draw_shadow(stdscr, y, x, height, width);
-
- @@ -97,14 +98,17 @@
- wmove(dialog, box_y, box_x);
- wattrset(dialog, dlg.inputbox.atr);
-
- - input_x = strlen(instr);
- + len = strlen(instr);
- + pos = len;
-
- - if (input_x >= box_width) {
- - scroll = input_x - box_width + 1;
- + if (len >= box_width) {
- + show_x = len - box_width + 1;
- input_x = box_width - 1;
- for (i = 0; i < box_width - 1; i++)
- - waddch(dialog, instr[scroll + i]);
- + waddch(dialog, instr[show_x + i]);
- } else {
- + show_x = 0;
- + input_x = len;
- waddstr(dialog, instr);
- }
-
- @@ -121,45 +125,104 @@
- case KEY_UP:
- case KEY_DOWN:
- break;
- - case KEY_LEFT:
- - continue;
- - case KEY_RIGHT:
- - continue;
- case KEY_BACKSPACE:
- case 127:
- - if (input_x || scroll) {
- + if (pos) {
- wattrset(dialog, dlg.inputbox.atr);
- - if (!input_x) {
- - scroll = scroll < box_width - 1 ? 0 : scroll - (box_width - 1);
- - wmove(dialog, box_y, box_x);
- - for (i = 0; i < box_width; i++)
- - waddch(dialog,
- - instr[scroll + input_x + i] ?
- - instr[scroll + input_x + i] : ' ');
- - input_x = strlen(instr) - scroll;
- + if (input_x == 0) {
- + show_x--;
- } else
- input_x--;
- - instr[scroll + input_x] = '\0';
- - mvwaddch(dialog, box_y, input_x + box_x, ' ');
- +
- + if (pos < len) {
- + for (i = pos - 1; i < len; i++) {
- + instr[i] = instr[i+1];
- + }
- + }
- +
- + pos--;
- + len--;
- + instr[len] = '\0';
- + wmove(dialog, box_y, box_x);
- + for (i = 0; i < box_width; i++) {
- + if (!instr[show_x + i]) {
- + waddch(dialog, ' ');
- + break;
- + }
- + waddch(dialog, instr[show_x + i]);
- + }
- wmove(dialog, box_y, input_x + box_x);
- wrefresh(dialog);
- }
- continue;
- + case KEY_LEFT:
- + if (pos > 0) {
- + if (input_x > 0) {
- + wmove(dialog, box_y, --input_x + box_x);
- + } else if (input_x == 0) {
- + show_x--;
- + wmove(dialog, box_y, box_x);
- + for (i = 0; i < box_width; i++) {
- + if (!instr[show_x + i]) {
- + waddch(dialog, ' ');
- + break;
- + }
- + waddch(dialog, instr[show_x + i]);
- + }
- + wmove(dialog, box_y, box_x);
- + }
- + pos--;
- + }
- + continue;
- + case KEY_RIGHT:
- + if (pos < len) {
- + if (input_x < box_width - 1) {
- + wmove(dialog, box_y, ++input_x + box_x);
- + } else if (input_x == box_width - 1) {
- + show_x++;
- + wmove(dialog, box_y, box_x);
- + for (i = 0; i < box_width; i++) {
- + if (!instr[show_x + i]) {
- + waddch(dialog, ' ');
- + break;
- + }
- + waddch(dialog, instr[show_x + i]);
- + }
- + wmove(dialog, box_y, input_x + box_x);
- + }
- + pos++;
- + }
- + continue;
- default:
- if (key < 0x100 && isprint(key)) {
- - if (scroll + input_x < MAX_LEN) {
- + if (len < MAX_LEN) {
- wattrset(dialog, dlg.inputbox.atr);
- - instr[scroll + input_x] = key;
- - instr[scroll + input_x + 1] = '\0';
- + if (pos < len) {
- + for (i = len; i > pos; i--)
- + instr[i] = instr[i-1];
- + instr[pos] = key;
- + } else {
- + instr[len] = key;
- + }
- + pos++;
- + len++;
- + instr[len] = '\0';
- +
- if (input_x == box_width - 1) {
- - scroll++;
- - wmove(dialog, box_y, box_x);
- - for (i = 0; i < box_width - 1; i++)
- - waddch(dialog, instr [scroll + i]);
- + show_x++;
- } else {
- - wmove(dialog, box_y, input_x++ + box_x);
- - waddch(dialog, key);
- + input_x++;
- + }
- +
- + wmove(dialog, box_y, box_x);
- + for (i = 0; i < box_width; i++) {
- + if (!instr[show_x + i]) {
- + waddch(dialog, ' ');
- + break;
- + }
- + waddch(dialog, instr[show_x + i]);
- }
- + wmove(dialog, box_y, input_x + box_x);
- wrefresh(dialog);
- } else
- flash(); /* Alarm user about overflow */
- @@ -180,7 +243,7 @@
- case KEY_LEFT:
- switch (button) {
- case -1:
- - button = 1; /* Indicates "Cancel" button is selected */
- + button = 1; /* Indicates "Help" button is selected */
- print_buttons(dialog, height, width, 1);
- break;
- case 0:
- @@ -204,7 +267,7 @@
- print_buttons(dialog, height, width, 0);
- break;
- case 0:
- - button = 1; /* Indicates "Cancel" button is selected */
- + button = 1; /* Indicates "Help" button is selected */
- print_buttons(dialog, height, width, 1);
- break;
- case 1:
- diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/menubox.c uClibc/extra/config/lxdialog/menubox.c
- --- uClibc-0.9.33.2/extra/config/lxdialog/menubox.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lxdialog/menubox.c 2014-02-03 12:32:56.000000000 +0100
- @@ -154,12 +154,14 @@
- */
- static void print_buttons(WINDOW * win, int height, int width, int selected)
- {
- - int x = width / 2 - 16;
- + int x = width / 2 - 28;
- int y = height - 2;
-
- print_button(win, gettext("Select"), y, x, selected == 0);
- print_button(win, gettext(" Exit "), y, x + 12, selected == 1);
- print_button(win, gettext(" Help "), y, x + 24, selected == 2);
- + print_button(win, gettext(" Save "), y, x + 36, selected == 3);
- + print_button(win, gettext(" Load "), y, x + 48, selected == 4);
-
- wmove(win, y, x + 1 + 12 * selected);
- wrefresh(win);
- @@ -191,7 +193,7 @@
- do_resize:
- height = getmaxy(stdscr);
- width = getmaxx(stdscr);
- - if (height < 15 || width < 65)
- + if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN)
- return -ERRDISPLAYTOOSMALL;
-
- height -= 4;
- @@ -201,8 +203,8 @@
- max_choice = MIN(menu_height, item_count());
-
- /* center dialog box on screen */
- - x = (COLS - width) / 2;
- - y = (LINES - height) / 2;
- + x = (getmaxx(stdscr) - width) / 2;
- + y = (getmaxy(stdscr) - height) / 2;
-
- draw_shadow(stdscr, y, x, height, width);
-
- @@ -301,10 +303,11 @@
- }
- }
-
- - if (i < max_choice ||
- - key == KEY_UP || key == KEY_DOWN ||
- - key == '-' || key == '+' ||
- - key == KEY_PPAGE || key == KEY_NPAGE) {
- + if (item_count() != 0 &&
- + (i < max_choice ||
- + key == KEY_UP || key == KEY_DOWN ||
- + key == '-' || key == '+' ||
- + key == KEY_PPAGE || key == KEY_NPAGE)) {
- /* Remove highligt of current item */
- print_item(scroll + choice, choice, FALSE);
-
- @@ -372,7 +375,7 @@
- case TAB:
- case KEY_RIGHT:
- button = ((key == KEY_LEFT ? --button : ++button) < 0)
- - ? 2 : (button > 2 ? 0 : button);
- + ? 4 : (button > 4 ? 0 : button);
-
- print_buttons(dialog, height, width, button);
- wrefresh(menu);
- @@ -383,6 +386,10 @@
- case 'n':
- case 'm':
- case '/':
- + case 'h':
- + case '?':
- + case 'z':
- + case '\n':
- /* save scroll info */
- *s_scroll = scroll;
- delwin(menu);
- @@ -390,30 +397,26 @@
- item_set(scroll + choice);
- item_set_selected(1);
- switch (key) {
- + case 'h':
- + case '?':
- + return 2;
- case 's':
- - return 3;
- case 'y':
- - return 3;
- + return 5;
- case 'n':
- - return 4;
- + return 6;
- case 'm':
- - return 5;
- + return 7;
- case ' ':
- - return 6;
- + return 8;
- case '/':
- - return 7;
- + return 9;
- + case 'z':
- + return 10;
- + case '\n':
- + return button;
- }
- return 0;
- - case 'h':
- - case '?':
- - button = 2;
- - case '\n':
- - *s_scroll = scroll;
- - delwin(menu);
- - delwin(dialog);
- - item_set(scroll + choice);
- - item_set_selected(1);
- - return button;
- case 'e':
- case 'x':
- key = KEY_ESC;
- diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/textbox.c uClibc/extra/config/lxdialog/textbox.c
- --- uClibc-0.9.33.2/extra/config/lxdialog/textbox.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lxdialog/textbox.c 2014-02-03 12:32:56.000000000 +0100
- @@ -22,23 +22,25 @@
- #include "dialog.h"
-
- static void back_lines(int n);
- -static void print_page(WINDOW * win, int height, int width);
- -static void print_line(WINDOW * win, int row, int width);
- +static void print_page(WINDOW *win, int height, int width, update_text_fn
- + update_text, void *data);
- +static void print_line(WINDOW *win, int row, int width);
- static char *get_line(void);
- static void print_position(WINDOW * win);
-
- static int hscroll;
- static int begin_reached, end_reached, page_length;
- -static const char *buf;
- -static const char *page;
- +static char *buf;
- +static char *page;
-
- /*
- * refresh window content
- */
- static void refresh_text_box(WINDOW *dialog, WINDOW *box, int boxh, int boxw,
- - int cur_y, int cur_x)
- + int cur_y, int cur_x, update_text_fn update_text,
- + void *data)
- {
- - print_page(box, boxh, boxw);
- + print_page(box, boxh, boxw, update_text, data);
- print_position(dialog);
- wmove(dialog, cur_y, cur_x); /* Restore cursor position */
- wrefresh(dialog);
- @@ -47,14 +49,18 @@
-
- /*
- * Display text from a file in a dialog box.
- + *
- + * keys is a null-terminated array
- + * update_text() may not add or remove any '\n' or '\0' in tbuf
- */
- -int dialog_textbox(const char *title, const char *tbuf,
- - int initial_height, int initial_width)
- +int dialog_textbox(const char *title, char *tbuf, int initial_height,
- + int initial_width, int *keys, int *_vscroll, int *_hscroll,
- + update_text_fn update_text, void *data)
- {
- int i, x, y, cur_x, cur_y, key = 0;
- int height, width, boxh, boxw;
- - int passed_end;
- WINDOW *dialog, *box;
- + bool done = false;
-
- begin_reached = 1;
- end_reached = 0;
- @@ -63,9 +69,18 @@
- buf = tbuf;
- page = buf; /* page is pointer to start of page to be displayed */
-
- + if (_vscroll && *_vscroll) {
- + begin_reached = 0;
- +
- + for (i = 0; i < *_vscroll; i++)
- + get_line();
- + }
- + if (_hscroll)
- + hscroll = *_hscroll;
- +
- do_resize:
- getmaxyx(stdscr, height, width);
- - if (height < 8 || width < 8)
- + if (height < TEXTBOX_HEIGTH_MIN || width < TEXTBOX_WIDTH_MIN)
- return -ERRDISPLAYTOOSMALL;
- if (initial_height != 0)
- height = initial_height;
- @@ -83,8 +98,8 @@
- width = 0;
-
- /* center dialog box on screen */
- - x = (COLS - width) / 2;
- - y = (LINES - height) / 2;
- + x = (getmaxx(stdscr) - width) / 2;
- + y = (getmaxy(stdscr) - height) / 2;
-
- draw_shadow(stdscr, y, x, height, width);
-
- @@ -120,25 +135,28 @@
-
- /* Print first page of text */
- attr_clear(box, boxh, boxw, dlg.dialog.atr);
- - refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x);
- + refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x, update_text,
- + data);
-
- - while ((key != KEY_ESC) && (key != '\n')) {
- + while (!done) {
- key = wgetch(dialog);
- switch (key) {
- case 'E': /* Exit */
- case 'e':
- case 'X':
- case 'x':
- - delwin(box);
- - delwin(dialog);
- - return 0;
- + case 'q':
- + case '\n':
- + done = true;
- + break;
- case 'g': /* First page */
- case KEY_HOME:
- if (!begin_reached) {
- begin_reached = 1;
- page = buf;
- refresh_text_box(dialog, box, boxh, boxw,
- - cur_y, cur_x);
- + cur_y, cur_x, update_text,
- + data);
- }
- break;
- case 'G': /* Last page */
- @@ -148,78 +166,48 @@
- /* point to last char in buf */
- page = buf + strlen(buf);
- back_lines(boxh);
- - refresh_text_box(dialog, box, boxh, boxw,
- - cur_y, cur_x);
- + refresh_text_box(dialog, box, boxh, boxw, cur_y,
- + cur_x, update_text, data);
- break;
- case 'K': /* Previous line */
- case 'k':
- case KEY_UP:
- - if (!begin_reached) {
- - back_lines(page_length + 1);
- -
- - /* We don't call print_page() here but use
- - * scrolling to ensure faster screen update.
- - * However, 'end_reached' and 'page_length'
- - * should still be updated, and 'page' should
- - * point to start of next page. This is done
- - * by calling get_line() in the following
- - * 'for' loop. */
- - scrollok(box, TRUE);
- - wscrl(box, -1); /* Scroll box region down one line */
- - scrollok(box, FALSE);
- - page_length = 0;
- - passed_end = 0;
- - for (i = 0; i < boxh; i++) {
- - if (!i) {
- - /* print first line of page */
- - print_line(box, 0, boxw);
- - wnoutrefresh(box);
- - } else
- - /* Called to update 'end_reached' and 'page' */
- - get_line();
- - if (!passed_end)
- - page_length++;
- - if (end_reached && !passed_end)
- - passed_end = 1;
- - }
- + if (begin_reached)
- + break;
-
- - print_position(dialog);
- - wmove(dialog, cur_y, cur_x); /* Restore cursor position */
- - wrefresh(dialog);
- - }
- + back_lines(page_length + 1);
- + refresh_text_box(dialog, box, boxh, boxw, cur_y,
- + cur_x, update_text, data);
- break;
- case 'B': /* Previous page */
- case 'b':
- + case 'u':
- case KEY_PPAGE:
- if (begin_reached)
- break;
- back_lines(page_length + boxh);
- - refresh_text_box(dialog, box, boxh, boxw,
- - cur_y, cur_x);
- + refresh_text_box(dialog, box, boxh, boxw, cur_y,
- + cur_x, update_text, data);
- break;
- case 'J': /* Next line */
- case 'j':
- case KEY_DOWN:
- - if (!end_reached) {
- - begin_reached = 0;
- - scrollok(box, TRUE);
- - scroll(box); /* Scroll box region up one line */
- - scrollok(box, FALSE);
- - print_line(box, boxh - 1, boxw);
- - wnoutrefresh(box);
- - print_position(dialog);
- - wmove(dialog, cur_y, cur_x); /* Restore cursor position */
- - wrefresh(dialog);
- - }
- + if (end_reached)
- + break;
- +
- + back_lines(page_length - 1);
- + refresh_text_box(dialog, box, boxh, boxw, cur_y,
- + cur_x, update_text, data);
- break;
- case KEY_NPAGE: /* Next page */
- case ' ':
- + case 'd':
- if (end_reached)
- break;
-
- begin_reached = 0;
- - refresh_text_box(dialog, box, boxh, boxw,
- - cur_y, cur_x);
- + refresh_text_box(dialog, box, boxh, boxw, cur_y,
- + cur_x, update_text, data);
- break;
- case '0': /* Beginning of line */
- case 'H': /* Scroll left */
- @@ -234,8 +222,8 @@
- hscroll--;
- /* Reprint current page to scroll horizontally */
- back_lines(page_length);
- - refresh_text_box(dialog, box, boxh, boxw,
- - cur_y, cur_x);
- + refresh_text_box(dialog, box, boxh, boxw, cur_y,
- + cur_x, update_text, data);
- break;
- case 'L': /* Scroll right */
- case 'l':
- @@ -245,11 +233,12 @@
- hscroll++;
- /* Reprint current page to scroll horizontally */
- back_lines(page_length);
- - refresh_text_box(dialog, box, boxh, boxw,
- - cur_y, cur_x);
- + refresh_text_box(dialog, box, boxh, boxw, cur_y,
- + cur_x, update_text, data);
- break;
- case KEY_ESC:
- - key = on_key_esc(dialog);
- + if (on_key_esc(dialog) == KEY_ESC)
- + done = true;
- break;
- case KEY_RESIZE:
- back_lines(height);
- @@ -257,11 +246,31 @@
- delwin(dialog);
- on_key_resize();
- goto do_resize;
- + default:
- + for (i = 0; keys[i]; i++) {
- + if (key == keys[i]) {
- + done = true;
- + break;
- + }
- + }
- }
- }
- delwin(box);
- delwin(dialog);
- - return key; /* ESC pressed */
- + if (_vscroll) {
- + const char *s;
- +
- + s = buf;
- + *_vscroll = 0;
- + back_lines(page_length);
- + while (s < page && (s = strchr(s, '\n'))) {
- + (*_vscroll)++;
- + s++;
- + }
- + }
- + if (_hscroll)
- + *_hscroll = hscroll;
- + return key;
- }
-
- /*
- @@ -298,12 +307,23 @@
- }
-
- /*
- - * Print a new page of text. Called by dialog_textbox().
- + * Print a new page of text.
- */
- -static void print_page(WINDOW * win, int height, int width)
- +static void print_page(WINDOW *win, int height, int width, update_text_fn
- + update_text, void *data)
- {
- int i, passed_end = 0;
-
- + if (update_text) {
- + char *end;
- +
- + for (i = 0; i < height; i++)
- + get_line();
- + end = page;
- + back_lines(height);
- + update_text(buf, page - buf, end - buf, data);
- + }
- +
- page_length = 0;
- for (i = 0; i < height; i++) {
- print_line(win, i, width);
- @@ -316,11 +336,10 @@
- }
-
- /*
- - * Print a new line of text. Called by dialog_textbox() and print_page().
- + * Print a new line of text.
- */
- static void print_line(WINDOW * win, int row, int width)
- {
- - int y, x;
- char *line;
-
- line = get_line();
- @@ -329,10 +348,10 @@
- waddch(win, ' ');
- waddnstr(win, line, MIN(strlen(line), width - 2));
-
- - getyx(win, y, x);
- /* Clear 'residue' of previous line */
- #if OLD_NCURSES
- {
- + int x = getcurx(win);
- int i;
- for (i = 0; i < width - x; i++)
- waddch(win, ' ');
- @@ -355,10 +374,8 @@
- end_reached = 0;
- while (*page != '\n') {
- if (*page == '\0') {
- - if (!end_reached) {
- - end_reached = 1;
- - break;
- - }
- + end_reached = 1;
- + break;
- } else if (i < MAX_LEN)
- line[i++] = *(page++);
- else {
- @@ -371,7 +388,7 @@
- if (i <= MAX_LEN)
- line[i] = '\0';
- if (!end_reached)
- - page++; /* move pass '\n' */
- + page++; /* move past '\n' */
-
- return line;
- }
- diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/util.c uClibc/extra/config/lxdialog/util.c
- --- uClibc-0.9.33.2/extra/config/lxdialog/util.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lxdialog/util.c 2014-02-03 12:32:56.000000000 +0100
- @@ -19,8 +19,13 @@
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
- +#include <stdarg.h>
- +
- #include "dialog.h"
-
- +/* Needed in signal handler in mconf.c */
- +int saved_x, saved_y;
- +
- struct dialog_info dlg;
-
- static void set_mono_theme(void)
- @@ -249,15 +254,56 @@
-
- void dialog_clear(void)
- {
- - attr_clear(stdscr, LINES, COLS, dlg.screen.atr);
- + int lines, columns;
- +
- + lines = getmaxy(stdscr);
- + columns = getmaxx(stdscr);
- +
- + attr_clear(stdscr, lines, columns, dlg.screen.atr);
- /* Display background title if it exists ... - SLH */
- if (dlg.backtitle != NULL) {
- - int i;
- + int i, len = 0, skip = 0;
- + struct subtitle_list *pos;
-
- wattrset(stdscr, dlg.screen.atr);
- mvwaddstr(stdscr, 0, 1, (char *)dlg.backtitle);
- +
- + for (pos = dlg.subtitles; pos != NULL; pos = pos->next) {
- + /* 3 is for the arrow and spaces */
- + len += strlen(pos->text) + 3;
- + }
- +
- wmove(stdscr, 1, 1);
- - for (i = 1; i < COLS - 1; i++)
- + if (len > columns - 2) {
- + const char *ellipsis = "[...] ";
- + waddstr(stdscr, ellipsis);
- + skip = len - (columns - 2 - strlen(ellipsis));
- + }
- +
- + for (pos = dlg.subtitles; pos != NULL; pos = pos->next) {
- + if (skip == 0)
- + waddch(stdscr, ACS_RARROW);
- + else
- + skip--;
- +
- + if (skip == 0)
- + waddch(stdscr, ' ');
- + else
- + skip--;
- +
- + if (skip < strlen(pos->text)) {
- + waddstr(stdscr, pos->text + skip);
- + skip = 0;
- + } else
- + skip -= strlen(pos->text);
- +
- + if (skip == 0)
- + waddch(stdscr, ' ');
- + else
- + skip--;
- + }
- +
- + for (i = len + 1; i < columns - 1; i++)
- waddch(stdscr, ACS_HLINE);
- }
- wnoutrefresh(stdscr);
- @@ -271,8 +317,12 @@
- int height, width;
-
- initscr(); /* Init curses */
- +
- + /* Get current cursor position for signal handler in mconf.c */
- + getyx(stdscr, saved_y, saved_x);
- +
- getmaxyx(stdscr, height, width);
- - if (height < 19 || width < 80) {
- + if (height < WINDOW_HEIGTH_MIN || width < WINDOW_WIDTH_MIN) {
- endwin();
- return -ERRDISPLAYTOOSMALL;
- }
- @@ -293,6 +343,11 @@
- dlg.backtitle = backtitle;
- }
-
- +void set_dialog_subtitles(struct subtitle_list *subtitles)
- +{
- + dlg.subtitles = subtitles;
- +}
- +
- /*
- * End using dialog functions.
- */
- @@ -321,27 +376,19 @@
- /*
- * Print a string of text in a window, automatically wrap around to the
- * next line if the string is too long to fit on one line. Newline
- - * characters '\n' are replaced by spaces. We start on a new line
- + * characters '\n' are propperly processed. We start on a new line
- * if there is no room for at least 4 nonblanks following a double-space.
- */
- void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
- {
- int newl, cur_x, cur_y;
- - int i, prompt_len, room, wlen;
- - char tempstr[MAX_LEN + 1], *word, *sp, *sp2;
- + int prompt_len, room, wlen;
- + char tempstr[MAX_LEN + 1], *word, *sp, *sp2, *newline_separator = 0;
-
- strcpy(tempstr, prompt);
-
- prompt_len = strlen(tempstr);
-
- - /*
- - * Remove newlines
- - */
- - for (i = 0; i < prompt_len; i++) {
- - if (tempstr[i] == '\n')
- - tempstr[i] = ' ';
- - }
- -
- if (prompt_len <= width - x * 2) { /* If prompt is short */
- wmove(win, y, (width - prompt_len) / 2);
- waddstr(win, tempstr);
- @@ -351,7 +398,10 @@
- newl = 1;
- word = tempstr;
- while (word && *word) {
- - sp = strchr(word, ' ');
- + sp = strpbrk(word, "\n ");
- + if (sp && *sp == '\n')
- + newline_separator = sp;
- +
- if (sp)
- *sp++ = 0;
-
- @@ -363,7 +413,7 @@
- if (wlen > room ||
- (newl && wlen < 4 && sp
- && wlen + 1 + strlen(sp) > room
- - && (!(sp2 = strchr(sp, ' '))
- + && (!(sp2 = strpbrk(sp, "\n "))
- || wlen + 1 + (sp2 - sp) > room))) {
- cur_y++;
- cur_x = x;
- @@ -371,7 +421,15 @@
- wmove(win, cur_y, cur_x);
- waddstr(win, word);
- getyx(win, cur_y, cur_x);
- - cur_x++;
- +
- + /* Move to the next line if the word separator was a newline */
- + if (newline_separator) {
- + cur_y++;
- + cur_x = x;
- + newline_separator = 0;
- + } else
- + cur_x++;
- +
- if (sp && *sp == ' ') {
- cur_x++; /* double space */
- while (*++sp == ' ') ;
- diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/yesno.c uClibc/extra/config/lxdialog/yesno.c
- --- uClibc-0.9.33.2/extra/config/lxdialog/yesno.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/lxdialog/yesno.c 2014-02-03 12:32:56.000000000 +0100
- @@ -45,14 +45,14 @@
- WINDOW *dialog;
-
- do_resize:
- - if (getmaxy(stdscr) < (height + 4))
- + if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN))
- return -ERRDISPLAYTOOSMALL;
- - if (getmaxx(stdscr) < (width + 4))
- + if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN))
- return -ERRDISPLAYTOOSMALL;
-
- /* center dialog box on screen */
- - x = (COLS - width) / 2;
- - y = (LINES - height) / 2;
- + x = (getmaxx(stdscr) - width) / 2;
- + y = (getmaxy(stdscr) - height) / 2;
-
- draw_shadow(stdscr, y, x, height, width);
-
- diff -Nur uClibc-0.9.33.2/extra/config/Makefile uClibc/extra/config/Makefile
- --- uClibc-0.9.33.2/extra/config/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -1,16 +1,17 @@
- top_srcdir ?= ../../
-
- -include $(top_srcdir)Rules.mak
- -include $(top_srcdir)Makerules
- -
- -# ugh
- -top_srcdir:=$(shell cd $(top_srcdir) && pwd)/
- ifdef O
- top_builddir ?= ../../
- else
- top_builddir = ../../
- endif
- -srctree := $(top_srcdir)
- +
- +include $(top_srcdir)Rules.mak
- +include $(top_srcdir)Makerules
- +
- +# ugh
- +top_srcdir:=$(shell cd $(top_srcdir) && pwd)/
- +
- src := extra/config
- obj := $(top_builddir)$(src)
-
- @@ -18,29 +19,23 @@
- generated := $(addprefix $(obj)/,$(generated:.c=.o))
-
- include $(top_srcdir)extra/config/Makefile.kconfig
- -PHONY += $(always)
- -chk-lxdialog := $(top_srcdir)$(src)/lxdialog/check-lxdialog.sh
- -check-lxdialog := cd $(obj) && $(CONFIG_SHELL) $(chk-lxdialog)
- -HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) -c '$(check-lxdialog) -ccflags')
- -HOST_LOADLIBES = $(shell $(CONFIG_SHELL) -c '$(check-lxdialog) -ldflags $(HOSTCC)')
- -HOST_EXTRACFLAGS += -DLOCALE
- -HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) -c '$(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)')
- +HOST_EXTRACFLAGS += -DCONFIG_='""'
-
- # do not create temporary object in the readonly srctree
- -$(obj)/dochecklxdialog:
- - $(Q)cd $(obj) && $(CONFIG_SHELL) $(chk-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
- -HOSTCFLAGS_lex.zconf.o := -I$(top_srcdir)$(src)
- +$(obj)/dochecklxdialog: CONFIG_SHELL:=cd $(obj) && $(CONFIG_SHELL)
- +HOSTCFLAGS_zconf.lex.o := -I$(top_srcdir)$(src)
- HOSTCFLAGS_zconf.tab.o := -I$(top_srcdir)$(src)
- conf-objs := $(addprefix $(obj)/,$(conf-objs))
- mconf-objs := $(addprefix $(obj)/,$(mconf-objs))
- +nconf-objs := $(addprefix $(obj)/,$(nconf-objs))
- kxgettext-objs := $(addprefix $(obj)/,$(kxgettext-objs))
-
- ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf)
- hostprogs-y += mconf
- endif
- -
- -#BUILD_CFLAGS-config = -W -Wall -pedantic
- -#BUILD_CFLAGS-lxdialog = -W -Wall -pedantic
- +ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf)
- +hostprogs-y += nconf
- +endif
-
- __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
- host-csingle:= $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m)))
- @@ -48,16 +43,18 @@
- $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m))))
- host-cobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-objs)))
-
- -conf mconf kxgettext: %: $(obj)/%
- -$(obj)/conf $(obj)/mconf $(obj)/kxgettext: BUILD_LDFLAGS=$(HOST_LOADLIBES)
- +conf mconf nconf kxgettext: %: $(obj)/%
- +$(obj)/conf $(obj)/mconf $(obj)/nconf $(obj)/kxgettext: BUILD_LDFLAGS=$(HOSTLOADLIBES_$(@F))
- $(obj)/conf: $(conf-objs)
- $(hcompile.u)
- $(obj)/mconf: $(mconf-objs)
- $(hcompile.u)
- +$(obj)/nconf: $(nconf-objs)
- + $(hcompile.u)
- $(obj)/kxgettext: $(kxgettext-objs)
- $(hcompile.u)
-
- -$(host-csingle) $(host-cmulti) $(host-cobjs): BUILD_CFLAGS=$(HOST_EXTRACFLAGS) \
- +$(host-csingle) $(host-cmulti) $(host-cobjs): BUILD_CFLAGS+=$(HOST_EXTRACFLAGS) \
- $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F))
-
- host-cobjs.nogen := $(filter-out $(generated),$(host-cobjs))
- @@ -68,19 +65,18 @@
- $(host-cobjs.generated): $(obj)/%.o: $(obj)/%.c
- $(hcompile.o)
-
- -ifndef LKC_GENPARSER
- +# we use the pre-generated always
- $(obj)/%:: $(top_srcdir)$(src)/%_shipped
- @$(disp_gen)
- $(Q)cat $< > $@
- -endif
- +
- CLEAN_extra/config menuconfig_clean:
- $(do_rm) $(clean-files) $(lxdialog) conf $(wildcard *.o)
- -distclean: clean
- - $(do_rm) $(lxdialog) $(conf-objs) $(mconf-objs) \
- +distclean: CLEAN_extra/config
- + $(Q)$(RM) -r $(lxdialog) $(conf-objs) $(mconf-objs) $(nconf-objs) \
- $(kxgettext-objs) \
- $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \
- - .depend
- - $(do_rm) -r $(top_builddir)include/config
- + .depend \
- + $(top_builddir)include/config $(top_builddir)include/generated
-
- -FORCE:
- -.PHONY: FORCE clean distclean $(always)
- +.PHONY: clean distclean $(PHONY)
- diff -Nur uClibc-0.9.33.2/extra/config/Makefile.kconfig uClibc/extra/config/Makefile.kconfig
- --- uClibc-0.9.33.2/extra/config/Makefile.kconfig 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/Makefile.kconfig 2014-02-03 12:32:56.000000000 +0100
- @@ -2,14 +2,18 @@
- # Kernel configuration targets
- # These targets are used from top-level makefile
-
- -PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
- +PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
- + localmodconfig localyesconfig
-
- ifdef KBUILD_KCONFIG
- Kconfig := $(KBUILD_KCONFIG)
- else
- -Kconfig := arch/$(SRCARCH)/Kconfig
- +Kconfig := Kconfig
- endif
-
- +# We need this, in case the user has it in its environment
- +unexport CONFIG_
- +
- xconfig: $(obj)/qconf
- $< $(Kconfig)
-
- @@ -20,91 +24,121 @@
- $< $(Kconfig)
-
- config: $(obj)/conf
- + $< --oldaskconfig $(Kconfig)
- +
- +nconfig: $(obj)/nconf
- $< $(Kconfig)
-
- oldconfig: $(obj)/conf
- - $< -o $(Kconfig)
- + $< --$@ $(Kconfig)
-
- silentoldconfig: $(obj)/conf
- - $< -s $(Kconfig)
- + $(Q)mkdir -p include/generated
- + $< --$@ $(Kconfig)
- +
- +localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
- + $(Q)mkdir -p include/generated
- + $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
- + $(Q)if [ -f .config ]; then \
- + cmp -s .tmp.config .config || \
- + (mv -f .config .config.old.1; \
- + mv -f .tmp.config .config; \
- + $(obj)/conf --silentoldconfig $(Kconfig); \
- + mv -f .config.old.1 .config.old) \
- + else \
- + mv -f .tmp.config .config; \
- + $(obj)/conf --silentoldconfig $(Kconfig); \
- + fi
- + $(Q)rm -f .tmp.config
-
- # Create new linux.pot file
- # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
- -# The symlink is used to repair a deficiency in arch/um
- update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
- - $(Q)echo " GEN config"
- - $(Q)xgettext --default-domain=linux \
- - --add-comments --keyword=_ --keyword=N_ \
- - --from-code=UTF-8 \
- - --files-from=scripts/kconfig/POTFILES.in \
- + $(Q)echo " GEN config.pot"
- + $(Q)xgettext --default-domain=linux \
- + --add-comments --keyword=_ --keyword=N_ \
- + --from-code=UTF-8 \
- + --files-from=$(srctree)/scripts/kconfig/POTFILES.in \
- + --directory=$(srctree) --directory=$(objtree) \
- --output $(obj)/config.pot
- $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
- - $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch
- - $(Q)(for i in `ls arch/*/Kconfig`; \
- + $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \
- + $(srctree)/arch/*/um/Kconfig`; \
- do \
- - echo " GEN $$i"; \
- + echo " GEN $$i"; \
- $(obj)/kxgettext $$i \
- >> $(obj)/config.pot; \
- done )
- + $(Q)echo " GEN linux.pot"
- $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
- --output $(obj)/linux.pot
- - $(Q)rm -f arch/um/Kconfig.arch
- $(Q)rm -f $(obj)/config.pot
-
- -PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig
- +PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
-
- -randconfig: $(obj)/conf
- - $< -r $(Kconfig)
- +allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
- + $< --$@ $(Kconfig)
-
- -allyesconfig: $(obj)/conf
- - $< -y $(Kconfig)
- +PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig
-
- -allnoconfig: $(obj)/conf
- - $< -n $(Kconfig)
- +listnewconfig olddefconfig: $(obj)/conf
- + $< --$@ $(Kconfig)
-
- -allmodconfig: $(obj)/conf
- - $< -m $(Kconfig)
- +# oldnoconfig is an alias of olddefconfig, because people already are dependent
- +# on its behavior(sets new symbols to their default value but not 'n') with the
- +# counter-intuitive name.
- +oldnoconfig: $(obj)/conf
- + $< --olddefconfig $(Kconfig)
- +
- +savedefconfig: $(obj)/conf
- + $< --$@=defconfig $(Kconfig)
-
- defconfig: $(obj)/conf
- ifeq ($(KBUILD_DEFCONFIG),)
- - $< -d $(Kconfig)
- + $< --defconfig $(Kconfig)
- else
- @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
- - $(Q)$< -D arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
- + $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
- endif
-
- %_defconfig: $(obj)/conf
- - $(Q)$< -D arch/$(SRCARCH)/configs/$@ $(Kconfig)
- + $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
-
- # Help text used by make help
- help:
- @echo ' config - Update current config utilising a line-oriented program'
- + @echo ' nconfig - Update current config utilising a ncurses menu based program'
- @echo ' menuconfig - Update current config utilising a menu based program'
- @echo ' xconfig - Update current config utilising a QT based front-end'
- @echo ' gconfig - Update current config utilising a GTK based front-end'
- @echo ' oldconfig - Update current config utilising a provided .config as base'
- - @echo ' silentoldconfig - Same as oldconfig, but quietly'
- - @echo ' randconfig - New config with random answer to all options'
- - @echo ' defconfig - New config with default answer to all options'
- - @echo ' allmodconfig - New config selecting modules when possible'
- - @echo ' allyesconfig - New config where all options are accepted with yes'
- + @echo ' localmodconfig - Update current config disabling modules not loaded'
- + @echo ' localyesconfig - Update current config converting local mods to core'
- + @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
- + @echo ' defconfig - New config with default from ARCH supplied defconfig'
- + @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
- @echo ' allnoconfig - New config where all options are answered with no'
- + @echo ' allyesconfig - New config where all options are accepted with yes'
- + @echo ' allmodconfig - New config selecting modules when possible'
- + @echo ' alldefconfig - New config with all symbols set to default'
- + @echo ' randconfig - New config with random answer to all options'
- + @echo ' listnewconfig - List new options'
- + @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
-
- # lxdialog stuff
- check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
-
- # Use recursively expanded variables so we do not call gcc unless
- # we really need to do so. (Do not call gcc as part of make mrproper)
- -HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
- -HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
- -
- -HOST_EXTRACFLAGS += -DLOCALE
- -
- +HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
- + -DLOCALE
-
- # ===========================================================================
- # Shared Makefile for the various kconfig executables:
- # conf: Used for defconfig, oldconfig and related targets
- -# mconf: Used for the mconfig target.
- +# nconf: Used for the nconfig target.
- +# Utilizes ncurses
- +# mconf: Used for the menuconfig target
- # Utilizes the lxdialog package
- # qconf: Used for the xconfig target
- # Based on QT which needs to be installed to compile it
- @@ -116,15 +150,27 @@
- lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
-
- conf-objs := conf.o zconf.tab.o
- -mconf-objs := mconf.o zconf.tab.o $(lxdialog)
- +mconf-objs := mconf.o zconf.tab.o $(lxdialog)
- +nconf-objs := nconf.o zconf.tab.o nconf.gui.o
- kxgettext-objs := kxgettext.o zconf.tab.o
- +qconf-cxxobjs := qconf.o
- +qconf-objs := zconf.tab.o
- +gconf-objs := gconf.o zconf.tab.o
- +
- +hostprogs-y := conf
-
- -hostprogs-y := conf qconf gconf kxgettext
- +ifeq ($(MAKECMDGOALS),nconfig)
- + hostprogs-y += nconf
- +endif
-
- ifeq ($(MAKECMDGOALS),menuconfig)
- hostprogs-y += mconf
- endif
-
- +ifeq ($(MAKECMDGOALS),update-po-config)
- + hostprogs-y += kxgettext
- +endif
- +
- ifeq ($(MAKECMDGOALS),xconfig)
- qconf-target := 1
- endif
- @@ -134,24 +180,23 @@
-
-
- ifeq ($(qconf-target),1)
- -qconf-cxxobjs := qconf.o
- -qconf-objs := kconfig_load.o zconf.tab.o
- + hostprogs-y += qconf
- endif
-
- ifeq ($(gconf-target),1)
- -gconf-objs := gconf.o kconfig_load.o zconf.tab.o
- + hostprogs-y += gconf
- endif
-
- -clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
- - .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
- -clean-files += mconf qconf gconf
- +clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
- +clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
- +clean-files += mconf qconf gconf nconf
- clean-files += config.pot linux.pot
-
- # Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
- PHONY += $(obj)/dochecklxdialog
- $(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
- -#$(obj)/dochecklxdialog:
- -# $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
- +$(obj)/dochecklxdialog:
- + $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
-
- always := dochecklxdialog
-
- @@ -159,16 +204,24 @@
- HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
-
- # generated files seem to need this to find local include files
- -HOSTCFLAGS_lex.zconf.o := -I$(src)
- +HOSTCFLAGS_zconf.lex.o := -I$(src)
- HOSTCFLAGS_zconf.tab.o := -I$(src)
-
- -HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
- -HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
- +LEX_PREFIX_zconf := zconf
- +YACC_PREFIX_zconf := zconf
- +
- +HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
- +HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
-
- HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
- HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
- - -D LKC_DIRECT_LINK
- + -Wno-missing-prototypes
-
- +HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
- +
- +HOSTLOADLIBES_nconf = $(shell \
- + pkg-config --libs menu panel ncurses 2>/dev/null \
- + || echo "-lmenu -lpanel -lncurses" )
- $(obj)/qconf.o: $(obj)/.tmp_qtcheck
-
- ifeq ($(qconf-target),1)
- @@ -178,40 +231,48 @@
- # QT needs some extra effort...
- $(obj)/.tmp_qtcheck:
- @set -e; echo " CHECK qt"; dir=""; pkg=""; \
- - pkg-config --exists qt 2> /dev/null && pkg=qt; \
- - pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
- - if [ -n "$$pkg" ]; then \
- - cflags="\$$(shell pkg-config $$pkg --cflags)"; \
- - libs="\$$(shell pkg-config $$pkg --libs)"; \
- - moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
- - dir="$$(pkg-config $$pkg --variable=prefix)"; \
- + if ! pkg-config --exists QtCore 2> /dev/null; then \
- + echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
- + pkg-config --exists qt 2> /dev/null && pkg=qt; \
- + pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
- + if [ -n "$$pkg" ]; then \
- + cflags="\$$(shell pkg-config $$pkg --cflags)"; \
- + libs="\$$(shell pkg-config $$pkg --libs)"; \
- + moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
- + dir="$$(pkg-config $$pkg --variable=prefix)"; \
- + else \
- + for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
- + if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
- + done; \
- + if [ -z "$$dir" ]; then \
- + echo >&2 "*"; \
- + echo >&2 "* Unable to find any QT installation. Please make sure that"; \
- + echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \
- + echo >&2 "* either qmake can be found or install pkg-config or set"; \
- + echo >&2 "* the QTDIR environment variable to the correct location."; \
- + echo >&2 "*"; \
- + false; \
- + fi; \
- + libpath=$$dir/lib; lib=qt; osdir=""; \
- + $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
- + osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
- + test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
- + test -f $$libpath/libqt-mt.so && lib=qt-mt; \
- + cflags="-I$$dir/include"; \
- + libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
- + moc="$$dir/bin/moc"; \
- + fi; \
- + if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
- + echo "*"; \
- + echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
- + echo "*"; \
- + moc="/usr/bin/moc"; \
- + fi; \
- else \
- - for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
- - if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
- - done; \
- - if [ -z "$$dir" ]; then \
- - echo "*"; \
- - echo "* Unable to find the QT3 installation. Please make sure that"; \
- - echo "* the QT3 development package is correctly installed and"; \
- - echo "* either install pkg-config or set the QTDIR environment"; \
- - echo "* variable to the correct location."; \
- - echo "*"; \
- - false; \
- - fi; \
- - libpath=$$dir/lib; lib=qt; osdir=""; \
- - $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
- - osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
- - test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
- - test -f $$libpath/libqt-mt.so && lib=qt-mt; \
- - cflags="-I$$dir/include"; \
- - libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
- - moc="$$dir/bin/moc"; \
- - fi; \
- - if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
- - echo "*"; \
- - echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
- - echo "*"; \
- - moc="/usr/bin/moc"; \
- + cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
- + libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
- + moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
- + [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \
- fi; \
- echo "KC_QT_CFLAGS=$$cflags" > $@; \
- echo "KC_QT_LIBS=$$libs" >> $@; \
- @@ -229,61 +290,33 @@
- if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \
- touch $@; \
- else \
- - echo "*"; \
- - echo "* GTK+ is present but version >= 2.0.0 is required."; \
- - echo "*"; \
- + echo >&2 "*"; \
- + echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \
- + echo >&2 "*"; \
- false; \
- fi \
- else \
- - echo "*"; \
- - echo "* Unable to find the GTK+ installation. Please make sure that"; \
- - echo "* the GTK+ 2.0 development package is correctly installed..."; \
- - echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
- - echo "*"; \
- + echo >&2 "*"; \
- + echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \
- + echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \
- + echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
- + echo >&2 "*"; \
- false; \
- fi
- endif
-
- -$(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c
- -
- -$(obj)/kconfig_load.o: $(obj)/lkc_defs.h
- +$(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c
-
- -$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
- +$(obj)/qconf.o: $(obj)/qconf.moc
-
- -$(obj)/gconf.o: $(obj)/lkc_defs.h
- +quiet_cmd_moc = MOC $@
- + cmd_moc = $(KC_QT_MOC) -i $< -o $@
-
- -$(obj)/%.moc: $(src)/%.h
- - $(KC_QT_MOC) -i $< -o $@
- -
- -$(obj)/lkc_defs.h: $(src)/lkc_proto.h
- - sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
- +$(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck
- + $(call cmd,moc)
-
- # Extract gconf menu items for I18N support
- $(obj)/gconf.glade.h: $(obj)/gconf.glade
- - intltool-extract --type=gettext/glade $(obj)/gconf.glade
- -
- -###
- -# The following requires flex/bison/gperf
- -# By default we use the _shipped versions, uncomment the following line if
- -# you are modifying the flex/bison src.
- -# LKC_GENPARSER := 1
- -
- -ifdef LKC_GENPARSER
- -
- -$(obj)/zconf.tab.c: $(src)/zconf.y
- -$(obj)/lex.zconf.c: $(src)/zconf.l
- -$(obj)/zconf.hash.c: $(src)/zconf.gperf
- -
- -%.tab.c: %.y
- - bison -l -b $* -p $(notdir $*) $<
- - cp $@ $@_shipped
- -
- -lex.%.c: %.l
- - flex -L -P$(notdir $*) -o$@ $<
- - cp $@ $@_shipped
- -
- -%.hash.c: %.gperf
- - gperf < $< > $@
- - cp $@ $@_shipped
- + $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
- + $(obj)/gconf.glade
-
- -endif
- diff -Nur uClibc-0.9.33.2/extra/config/mconf.c uClibc/extra/config/mconf.c
- --- uClibc-0.9.33.2/extra/config/mconf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/mconf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,20 +15,19 @@
- #include <stdarg.h>
- #include <stdlib.h>
- #include <string.h>
- +#include <signal.h>
- #include <unistd.h>
- #include <locale.h>
-
- -#define LKC_DIRECT_LINK
- #include "lkc.h"
- #include "lxdialog/dialog.h"
-
- static const char mconf_readme[] = N_(
- "Overview\n"
- "--------\n"
- -"Some features may be built directly into uClibc. Some features\n"
- -"may be completely removed altogether. There are also certain\n"
- -"parameters which are not really features, but must be\n"
- -"entered in as decimal or hexadecimal numbers or possibly text.\n"
- +"This interface let you select features and parameters for the build.\n"
- +"Features can either be built-in, modularized, or ignored. Parameters\n"
- +"must be entered in as decimal or hexadecimal numbers or text.\n"
- "\n"
- "Menu items beginning with following braces represent features that\n"
- " [ ] can be built in or removed\n"
- @@ -49,7 +48,7 @@
- "----------\n"
- "o Use the Up/Down arrow keys (cursor keys) to highlight the item\n"
- " you wish to change or submenu wish to select and press <Enter>.\n"
- -" Submenus are designated by \"--->\".\n"
- +" Submenus are designated by \"--->\", empty ones by \"----\".\n"
- "\n"
- " Shortcut: Press the option's highlighted letter (hotkey).\n"
- " Pressing a hotkey more than once will sequence\n"
- @@ -66,13 +65,15 @@
- " there is a delayed response which you may find annoying.\n"
- "\n"
- " Also, the <TAB> and cursor keys will cycle between <Select>,\n"
- -" <Exit> and <Help>\n"
- +" <Exit> and <Help>.\n"
- "\n"
- "o To get help with an item, use the cursor keys to highlight <Help>\n"
- -" and Press <ENTER>.\n"
- +" and press <ENTER>.\n"
- "\n"
- " Shortcut: Press <H> or <?>.\n"
- "\n"
- +"o To toggle the display of hidden options, press <Z>.\n"
- +"\n"
- "\n"
- "Radiolists (Choice lists)\n"
- "-----------\n"
- @@ -104,10 +105,10 @@
- "Text Box (Help Window)\n"
- "--------\n"
- "o Use the cursor keys to scroll up/down/left/right. The VI editor\n"
- -" keys h,j,k,l function here as do <SPACE BAR> and <B> for those\n"
- -" who are familiar with less and lynx.\n"
- +" keys h,j,k,l function here as do <u>, <d>, <SPACE BAR> and <B> for \n"
- +" those who are familiar with less and lynx.\n"
- "\n"
- -"o Press <E>, <X>, <Enter> or <Esc><Esc> to exit.\n"
- +"o Press <E>, <X>, <q>, <Enter> or <Esc><Esc> to exit.\n"
- "\n"
- "\n"
- "Alternate Configuration Files\n"
- @@ -147,9 +148,9 @@
- "\n"
- "Optional personality available\n"
- "------------------------------\n"
- -"If you prefer to have all of the options listed in a single\n"
- -"menu, rather than the default multimenu hierarchy, run the menuconfig\n"
- -"with MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
- +"If you prefer to have all of the options listed in a single menu, rather\n"
- +"than the default multimenu hierarchy, run the menuconfig with\n"
- +"MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
- "\n"
- "make MENUCONFIG_MODE=single_menu menuconfig\n"
- "\n"
- @@ -175,11 +176,11 @@
- "\n"),
- menu_instructions[] = N_(
- "Arrow keys navigate the menu. "
- - "<Enter> selects submenus --->. "
- + "<Enter> selects submenus ---> (or empty submenus ----). "
- "Highlighted letters are hotkeys. "
- - "Pressing <Y> selectes a feature, while <N> will exclude a feature. "
- + "Pressing <Y> includes, <N> excludes, <M> modularizes features. "
- "Press <Esc><Esc> to exit, <?> for Help, </> for Search. "
- - "Legend: [*] feature is selected [ ] feature is excluded"),
- + "Legend: [*] built-in [ ] excluded <M> module < > module capable"),
- radiolist_instructions[] = N_(
- "Use the arrow keys to navigate this window or "
- "press the hotkey of the item you wish to select "
- @@ -198,8 +199,6 @@
- setmod_text[] = N_(
- "This feature depends on another which has been configured as a module.\n"
- "As a result, this feature will be built as a module."),
- -nohelp_text[] = N_(
- - "There is no help available for this option.\n"),
- load_config_text[] = N_(
- "Enter the name of the configuration file you wish to load. "
- "Accept the name shown to restore the configuration you "
- @@ -210,18 +209,18 @@
- "configurations available on a single machine.\n"
- "\n"
- "If you have saved a previous configuration in a file other than the\n"
- - "default, entering the name of the file here will allow you\n"
- - "to modify that configuration.\n"
- + "default one, entering its name here will allow you to modify that\n"
- + "configuration.\n"
- "\n"
- "If you are uncertain, then you have probably never used alternate\n"
- - "configuration files. You should therefor leave this blank to abort.\n"),
- + "configuration files. You should therefore leave this blank to abort.\n"),
- save_config_text[] = N_(
- "Enter a filename to which this configuration should be saved "
- "as an alternate. Leave blank to abort."),
- save_config_help[] = N_(
- "\n"
- - "For various reasons, one may wish to keep different\n"
- - "configurations available on a single machine.\n"
- + "For various reasons, one may wish to keep different configurations\n"
- + "available on a single machine.\n"
- "\n"
- "Entering a file name here will allow you to later retrieve, modify\n"
- "and use the current configuration as an alternate to whatever\n"
- @@ -231,32 +230,39 @@
- "leave this blank.\n"),
- search_help[] = N_(
- "\n"
- - "Search for CONFIG_ symbols and display their relations.\n"
- + "Search for symbols and display their relations.\n"
- "Regular expressions are allowed.\n"
- "Example: search for \"^FOO\"\n"
- "Result:\n"
- "-----------------------------------------------------------------\n"
- "Symbol: FOO [=m]\n"
- + "Type : tristate\n"
- "Prompt: Foo bus is used to drive the bar HW\n"
- - "Defined at drivers/pci/Kconfig:47\n"
- - "Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
- - "Location:\n"
- - " -> Bus options (PCI, PCMCIA, EISA, MCA, ISA)\n"
- - " -> PCI support (PCI [=y])\n"
- - " -> PCI access mode (<choice> [=y])\n"
- - "Selects: LIBCRC32\n"
- - "Selected by: BAR\n"
- + " Defined at drivers/pci/Kconfig:47\n"
- + " Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
- + " Location:\n"
- + " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
- + " -> PCI support (PCI [=y])\n"
- + "(1) -> PCI access mode (<choice> [=y])\n"
- + " Selects: LIBCRC32\n"
- + " Selected by: BAR\n"
- "-----------------------------------------------------------------\n"
- + "o The line 'Type:' shows the type of the configuration option for\n"
- + " this symbol (boolean, tristate, string, ...)\n"
- "o The line 'Prompt:' shows the text used in the menu structure for\n"
- - " this CONFIG_ symbol\n"
- + " this symbol\n"
- "o The 'Defined at' line tell at what file / line number the symbol\n"
- " is defined\n"
- "o The 'Depends on:' line tell what symbols needs to be defined for\n"
- " this symbol to be visible in the menu (selectable)\n"
- "o The 'Location:' lines tell where in the menu structure this symbol\n"
- " is located\n"
- - " A location followed by a [=y] indicate that this is a selectable\n"
- - " menu item - and current value is displayed inside brackets.\n"
- + " A location followed by a [=y] indicates that this is a\n"
- + " selectable menu item - and the current value is displayed inside\n"
- + " brackets.\n"
- + " Press the key in the (#) prefix to jump directly to that\n"
- + " location. You will be returned to the current search results\n"
- + " after exiting this new menu.\n"
- "o The 'Selects:' line tell what symbol will be automatically\n"
- " selected if this symbol is selected (y or m)\n"
- "o The 'Selected by' line tell what symbol has selected this symbol\n"
- @@ -264,131 +270,144 @@
- "Only relevant lines are shown.\n"
- "\n\n"
- "Search examples:\n"
- - "Examples: USB => find all CONFIG_ symbols containing USB\n"
- - " ^USB => find all CONFIG_ symbols starting with USB\n"
- - " USB$ => find all CONFIG_ symbols ending with USB\n"
- + "Examples: USB => find all symbols containing USB\n"
- + " ^USB => find all symbols starting with USB\n"
- + " USB$ => find all symbols ending with USB\n"
- "\n");
-
- static int indent;
- static struct menu *current_menu;
- static int child_count;
- static int single_menu_mode;
- +static int show_all_options;
- +static int save_and_exit;
-
- -static void conf(struct menu *menu);
- +static void conf(struct menu *menu, struct menu *active_menu);
- static void conf_choice(struct menu *menu);
- static void conf_string(struct menu *menu);
- static void conf_load(void);
- static void conf_save(void);
- +static int show_textbox_ext(const char *title, char *text, int r, int c,
- + int *keys, int *vscroll, int *hscroll,
- + update_text_fn update_text, void *data);
- static void show_textbox(const char *title, const char *text, int r, int c);
- static void show_helptext(const char *title, const char *text);
- static void show_help(struct menu *menu);
-
- -static void get_prompt_str(struct gstr *r, struct property *prop)
- +static char filename[PATH_MAX+1];
- +static void set_config_filename(const char *config_filename)
- {
- - int i, j;
- - struct menu *submenu[8], *menu;
- + static char menu_backtitle[PATH_MAX+128];
- + int size;
-
- - str_printf(r, _("Prompt: %s\n"), _(prop->text));
- - str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
- - prop->menu->lineno);
- - if (!expr_is_yes(prop->visible.expr)) {
- - str_append(r, _(" Depends on: "));
- - expr_gstr_print(prop->visible.expr, r);
- - str_append(r, "\n");
- - }
- - menu = prop->menu->parent;
- - for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
- - submenu[i++] = menu;
- - if (i > 0) {
- - str_printf(r, _(" Location:\n"));
- - for (j = 4; --i >= 0; j += 2) {
- - menu = submenu[i];
- - str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
- - if (menu->sym) {
- - str_printf(r, " (%s [=%s])", menu->sym->name ?
- - menu->sym->name : _("<choice>"),
- - sym_get_string_value(menu->sym));
- - }
- - str_append(r, "\n");
- - }
- - }
- + size = snprintf(menu_backtitle, sizeof(menu_backtitle),
- + "%s - %s", config_filename, rootmenu.prompt->text);
- + if (size >= sizeof(menu_backtitle))
- + menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
- + set_dialog_backtitle(menu_backtitle);
- +
- + size = snprintf(filename, sizeof(filename), "%s", config_filename);
- + if (size >= sizeof(filename))
- + filename[sizeof(filename)-1] = '\0';
- }
-
- -static void get_symbol_str(struct gstr *r, struct symbol *sym)
- +struct subtitle_part {
- + struct list_head entries;
- + const char *text;
- +};
- +static LIST_HEAD(trail);
- +
- +static struct subtitle_list *subtitles;
- +static void set_subtitle(void)
- {
- - bool hit;
- - struct property *prop;
- + struct subtitle_part *sp;
- + struct subtitle_list *pos, *tmp;
-
- - if (sym && sym->name)
- - str_printf(r, "Symbol: %s [=%s]\n", sym->name,
- - sym_get_string_value(sym));
- - for_all_prompts(sym, prop)
- - get_prompt_str(r, prop);
- - hit = false;
- - for_all_properties(sym, prop, P_SELECT) {
- - if (!hit) {
- - str_append(r, " Selects: ");
- - hit = true;
- - } else
- - str_printf(r, " && ");
- - expr_gstr_print(prop->expr, r);
- + for (pos = subtitles; pos != NULL; pos = tmp) {
- + tmp = pos->next;
- + free(pos);
- }
- - if (hit)
- - str_append(r, "\n");
- - if (sym->rev_dep.expr) {
- - str_append(r, _(" Selected by: "));
- - expr_gstr_print(sym->rev_dep.expr, r);
- - str_append(r, "\n");
- +
- + subtitles = NULL;
- + list_for_each_entry(sp, &trail, entries) {
- + if (sp->text) {
- + if (pos) {
- + pos->next = xcalloc(sizeof(*pos), 1);
- + pos = pos->next;
- + } else {
- + subtitles = pos = xcalloc(sizeof(*pos), 1);
- + }
- + pos->text = sp->text;
- + }
- }
- - str_append(r, "\n\n");
- +
- + set_dialog_subtitles(subtitles);
- }
-
- -static struct gstr get_relations_str(struct symbol **sym_arr)
- +static void reset_subtitle(void)
- {
- - struct symbol *sym;
- - struct gstr res = str_new();
- - int i;
- + struct subtitle_list *pos, *tmp;
-
- - for (i = 0; sym_arr && (sym = sym_arr[i]); i++)
- - get_symbol_str(&res, sym);
- - if (!i)
- - str_append(&res, _("No matches found.\n"));
- - return res;
- + for (pos = subtitles; pos != NULL; pos = tmp) {
- + tmp = pos->next;
- + free(pos);
- + }
- + subtitles = NULL;
- + set_dialog_subtitles(subtitles);
- }
-
- -static char filename[PATH_MAX+1];
- -static void set_config_filename(const char *config_filename)
- -{
- - static char menu_backtitle[PATH_MAX+128];
- - int size;
- - struct symbol *sym;
- +struct search_data {
- + struct list_head *head;
- + struct menu **targets;
- + int *keys;
- +};
-
- - sym = sym_lookup("VERSION", 0);
- - sym_calc_value(sym);
- - size = snprintf(menu_backtitle, sizeof(menu_backtitle),
- - _("%s - uClibc v%s Configuration"),
- - config_filename, sym_get_string_value(sym));
- - if (size >= sizeof(menu_backtitle))
- - menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
- - set_dialog_backtitle(menu_backtitle);
- +static void update_text(char *buf, size_t start, size_t end, void *_data)
- +{
- + struct search_data *data = _data;
- + struct jump_key *pos;
- + int k = 0;
- +
- + list_for_each_entry(pos, data->head, entries) {
- + if (pos->offset >= start && pos->offset < end) {
- + char header[4];
- +
- + if (k < JUMP_NB) {
- + int key = '0' + (pos->index % JUMP_NB) + 1;
- +
- + sprintf(header, "(%c)", key);
- + data->keys[k] = key;
- + data->targets[k] = pos->target;
- + k++;
- + } else {
- + sprintf(header, " ");
- + }
-
- - size = snprintf(filename, sizeof(filename), "%s", config_filename);
- - if (size >= sizeof(filename))
- - filename[sizeof(filename)-1] = '\0';
- + memcpy(buf + pos->offset, header, sizeof(header) - 1);
- + }
- + }
- + data->keys[k] = 0;
- }
-
- -
- static void search_conf(void)
- {
- struct symbol **sym_arr;
- struct gstr res;
- + struct gstr title;
- char *dialog_input;
- - int dres;
- + int dres, vscroll = 0, hscroll = 0;
- + bool again;
- + struct gstr sttext;
- + struct subtitle_part stpart;
- +
- + title = str_new();
- + str_printf( &title, _("Enter %s (sub)string or regexp to search for "
- + "(with or without \"%s\")"), CONFIG_, CONFIG_);
- +
- again:
- dialog_clear();
- dres = dialog_inputbox(_("Search Configuration Parameter"),
- - _("Enter CONFIG_ (sub)string to search for "
- - "(with or without \"CONFIG\")"),
- + str_get(&title),
- 10, 75, "");
- switch (dres) {
- case 0:
- @@ -397,19 +416,52 @@
- show_helptext(_("Search Configuration"), search_help);
- goto again;
- default:
- + str_free(&title);
- return;
- }
-
- - /* strip CONFIG_ if necessary */
- + /* strip the prefix if necessary */
- dialog_input = dialog_input_result;
- - if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0)
- - dialog_input += 7;
- + if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0)
- + dialog_input += strlen(CONFIG_);
- +
- + sttext = str_new();
- + str_printf(&sttext, "Search (%s)", dialog_input_result);
- + stpart.text = str_get(&sttext);
- + list_add_tail(&stpart.entries, &trail);
-
- sym_arr = sym_re_search(dialog_input);
- - res = get_relations_str(sym_arr);
- + do {
- + LIST_HEAD(head);
- + struct menu *targets[JUMP_NB];
- + int keys[JUMP_NB + 1], i;
- + struct search_data data = {
- + .head = &head,
- + .targets = targets,
- + .keys = keys,
- + };
- + struct jump_key *pos, *tmp;
- +
- + res = get_relations_str(sym_arr, &head);
- + set_subtitle();
- + dres = show_textbox_ext(_("Search Results"), (char *)
- + str_get(&res), 0, 0, keys, &vscroll,
- + &hscroll, &update_text, (void *)
- + &data);
- + again = false;
- + for (i = 0; i < JUMP_NB && keys[i]; i++)
- + if (dres == keys[i]) {
- + conf(targets[i]->parent, targets[i]);
- + again = true;
- + }
- + str_free(&res);
- + list_for_each_entry_safe(pos, tmp, &head, entries)
- + free(pos);
- + } while (again);
- free(sym_arr);
- - show_textbox(_("Search Results"), str_get(&res), 0, 0);
- - str_free(&res);
- + str_free(&title);
- + list_del(trail.prev);
- + str_free(&sttext);
- }
-
- static void build_conf(struct menu *menu)
- @@ -420,8 +472,16 @@
- int type, tmp, doint = 2;
- tristate val;
- char ch;
- + bool visible;
-
- - if (!menu_is_visible(menu))
- + /*
- + * note: menu_is_visible() has side effect that it will
- + * recalc the value of the symbol.
- + */
- + visible = menu_is_visible(menu);
- + if (show_all_options && !menu_has_prompt(menu))
- + return;
- + else if (!show_all_options && !visible)
- return;
-
- sym = menu->sym;
- @@ -438,8 +498,9 @@
- menu->data ? "-->" : "++>",
- indent + 1, ' ', prompt);
- } else
- - item_make(" %*c%s --->", indent + 1, ' ', prompt);
- -
- + item_make(" %*c%s %s",
- + indent + 1, ' ', prompt,
- + menu_is_empty(menu) ? "----" : "--->");
- item_set_tag('m');
- item_set_data(menu);
- if (single_menu_mode && menu->data)
- @@ -570,7 +631,7 @@
- (sym_has_value(sym) || !sym_is_changable(sym)) ?
- "" : _(" (NEW)"));
- if (menu->prompt->type == P_MENU) {
- - item_add_str(" --->");
- + item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->");
- return;
- }
- }
- @@ -582,40 +643,40 @@
- indent -= doint;
- }
-
- -static void conf(struct menu *menu)
- +static void conf(struct menu *menu, struct menu *active_menu)
- {
- struct menu *submenu;
- const char *prompt = menu_get_prompt(menu);
- + struct subtitle_part stpart;
- struct symbol *sym;
- - struct menu *active_menu = NULL;
- int res;
- int s_scroll = 0;
-
- + if (menu != &rootmenu)
- + stpart.text = menu_get_prompt(menu);
- + else
- + stpart.text = NULL;
- + list_add_tail(&stpart.entries, &trail);
- +
- while (1) {
- item_reset();
- current_menu = menu;
- build_conf(menu);
- if (!child_count)
- break;
- - if (menu == &rootmenu) {
- - item_make("--- ");
- - item_set_tag(':');
- - item_make(_(" Load an Alternate Configuration File"));
- - item_set_tag('L');
- - item_make(_(" Save an Alternate Configuration File"));
- - item_set_tag('S');
- - }
- + set_subtitle();
- dialog_clear();
- res = dialog_menu(prompt ? _(prompt) : _("Main Menu"),
- _(menu_instructions),
- active_menu, &s_scroll);
- if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
- break;
- - if (!item_activate_selected())
- - continue;
- - if (!item_tag())
- - continue;
- -
- + if (item_count() != 0) {
- + if (!item_activate_selected())
- + continue;
- + if (!item_tag())
- + continue;
- + }
- submenu = item_data();
- active_menu = item_data();
- if (submenu)
- @@ -630,32 +691,36 @@
- if (single_menu_mode)
- submenu->data = (void *) (long) !submenu->data;
- else
- - conf(submenu);
- + conf(submenu, NULL);
- break;
- case 't':
- if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)
- conf_choice(submenu);
- else if (submenu->prompt->type == P_MENU)
- - conf(submenu);
- + conf(submenu, NULL);
- break;
- case 's':
- conf_string(submenu);
- break;
- - case 'L':
- - conf_load();
- - break;
- - case 'S':
- - conf_save();
- - break;
- }
- break;
- case 2:
- if (sym)
- show_help(submenu);
- - else
- + else {
- + reset_subtitle();
- show_helptext(_("README"), _(mconf_readme));
- + }
- break;
- case 3:
- + reset_subtitle();
- + conf_save();
- + break;
- + case 4:
- + reset_subtitle();
- + conf_load();
- + break;
- + case 5:
- if (item_is_tag('t')) {
- if (sym_set_tristate_value(sym, yes))
- break;
- @@ -663,31 +728,45 @@
- show_textbox(NULL, setmod_text, 6, 74);
- }
- break;
- - case 4:
- + case 6:
- if (item_is_tag('t'))
- sym_set_tristate_value(sym, no);
- break;
- - case 5:
- + case 7:
- if (item_is_tag('t'))
- sym_set_tristate_value(sym, mod);
- break;
- - case 6:
- + case 8:
- if (item_is_tag('t'))
- sym_toggle_tristate_value(sym);
- else if (item_is_tag('m'))
- - conf(submenu);
- + conf(submenu, NULL);
- break;
- - case 7:
- + case 9:
- search_conf();
- break;
- + case 10:
- + show_all_options = !show_all_options;
- + break;
- }
- }
- +
- + list_del(trail.prev);
- }
-
- -static void show_textbox(const char *title, const char *text, int r, int c)
- +static int show_textbox_ext(const char *title, char *text, int r, int c, int
- + *keys, int *vscroll, int *hscroll, update_text_fn
- + update_text, void *data)
- {
- dialog_clear();
- - dialog_textbox(title, text, r, c);
- + return dialog_textbox(title, text, r, c, keys, vscroll, hscroll,
- + update_text, data);
- +}
- +
- +static void show_textbox(const char *title, const char *text, int r, int c)
- +{
- + show_textbox_ext(title, (char *) text, r, c, (int []) {0}, NULL, NULL,
- + NULL, NULL);
- }
-
- static void show_helptext(const char *title, const char *text)
- @@ -695,25 +774,24 @@
- show_textbox(title, text, 0, 0);
- }
-
- +static void conf_message_callback(const char *fmt, va_list ap)
- +{
- + char buf[PATH_MAX+1];
- +
- + vsnprintf(buf, sizeof(buf), fmt, ap);
- + if (save_and_exit)
- + printf("%s", buf);
- + else
- + show_textbox(NULL, buf, 6, 60);
- +}
- +
- static void show_help(struct menu *menu)
- {
- struct gstr help = str_new();
- - struct symbol *sym = menu->sym;
-
- - if (menu_has_help(menu))
- - {
- - if (sym->name) {
- - str_printf(&help, "%s:\n\n", sym->name);
- - }
- - str_append(&help, _(menu_get_help(menu)));
- - str_append(&help, "\n");
- - } else if (menu_has_help(sym->prop->menu->parent)) {
- - str_append(&help, _(menu_get_help(sym->prop->menu->parent)));
- - str_append(&help, "\n");
- - } else {
- - str_append(&help, nohelp_text);
- - }
- - get_symbol_str(&help, sym);
- + help.max_width = getmaxx(stdscr) - 10;
- + menu_get_ext_help(menu, &help);
- +
- show_helptext(_(menu_get_prompt(menu)), str_get(&help));
- str_free(&help);
- }
- @@ -734,7 +812,12 @@
- for (child = menu->list; child; child = child->next) {
- if (!menu_is_visible(child))
- continue;
- - item_make("%s", _(menu_get_prompt(child)));
- + if (child->sym)
- + item_make("%s", _(menu_get_prompt(child)));
- + else {
- + item_make("*** %s ***", _(menu_get_prompt(child)));
- + item_set_tag(':');
- + }
- item_set_data(child);
- if (child->sym == active)
- item_set_selected(1);
- @@ -744,12 +827,17 @@
- dialog_clear();
- res = dialog_checklist(prompt ? _(prompt) : _("Main Menu"),
- _(radiolist_instructions),
- - 15, 70, 6);
- + MENUBOX_HEIGTH_MIN,
- + MENUBOX_WIDTH_MIN,
- + CHECKLIST_HEIGTH_MIN);
- selected = item_activate_selected();
- switch (res) {
- case 0:
- if (selected) {
- child = item_data();
- + if (!child->sym)
- + break;
- +
- sym_set_tristate_value(child->sym, yes);
- }
- return;
- @@ -863,9 +951,58 @@
- }
- }
-
- +static int handle_exit(void)
- +{
- + int res;
- +
- + save_and_exit = 1;
- + reset_subtitle();
- + dialog_clear();
- + if (conf_get_changed())
- + res = dialog_yesno(NULL,
- + _("Do you wish to save your new configuration?\n"
- + "(Press <ESC><ESC> to continue configuration.)"),
- + 6, 60);
- + else
- + res = -1;
- +
- + end_dialog(saved_x, saved_y);
- +
- + switch (res) {
- + case 0:
- + if (conf_write(filename)) {
- + fprintf(stderr, _("\n\n"
- + "Error while writing of the configuration.\n"
- + "Your configuration changes were NOT saved."
- + "\n\n"));
- + return 1;
- + }
- + /* fall through */
- + case -1:
- + printf(_("\n\n"
- + "*** End of the configuration.\n"
- + "*** Execute 'make' to start the build or try 'make help'."
- + "\n\n"));
- + res = 0;
- + break;
- + default:
- + fprintf(stderr, _("\n\n"
- + "Your configuration changes were NOT saved."
- + "\n\n"));
- + if (res != KEY_ESC)
- + res = 0;
- + }
- +
- + return res;
- +}
- +
- +static void sig_handler(int signo)
- +{
- + exit(handle_exit());
- +}
- +
- int main(int ac, char **av)
- {
- - int saved_x, saved_y;
- char *mode;
- int res;
-
- @@ -873,6 +1010,8 @@
- bindtextdomain(PACKAGE, LOCALEDIR);
- textdomain(PACKAGE);
-
- + signal(SIGINT, sig_handler);
- +
- conf_parse(av[1]);
- conf_read(NULL);
-
- @@ -882,7 +1021,6 @@
- single_menu_mode = 1;
- }
-
- - getyx(stdscr, saved_y, saved_x);
- if (init_dialog(NULL)) {
- fprintf(stderr, N_("Your display is too small to run Menuconfig!\n"));
- fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n"));
- @@ -890,41 +1028,12 @@
- }
-
- set_config_filename(conf_get_configname());
- + conf_set_message_callback(conf_message_callback);
- do {
- - conf(&rootmenu);
- - dialog_clear();
- - if (conf_get_changed())
- - res = dialog_yesno(NULL,
- - _("Do you wish to save your "
- - "new configuration?\n"
- - "<ESC><ESC> to continue."),
- - 6, 60);
- - else
- - res = -1;
- + conf(&rootmenu, NULL);
- + res = handle_exit();
- } while (res == KEY_ESC);
- - end_dialog(saved_x, saved_y);
- -
- - switch (res) {
- - case 0:
- - if (conf_write(filename)) {
- - fprintf(stderr, _("\n\n"
- - "Error during writing of the configuration.\n"
- - "Your configuration changes were NOT saved."
- - "\n\n"));
- - return 1;
- - }
- - case -1:
- - printf(_("\n\n"
- - "*** End of configuration.\n"
- - "*** Execute 'make' to build or try 'make help'."
- - "\n\n"));
- - break;
- - default:
- - fprintf(stderr, _("\n\n"
- - "Your configuration changes were NOT saved."
- - "\n\n"));
- - }
-
- - return conf_write_autoconf();
- + return res;
- }
-
- diff -Nur uClibc-0.9.33.2/extra/config/menu.c uClibc/extra/config/menu.c
- --- uClibc-0.9.33.2/extra/config/menu.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/menu.c 2014-02-03 12:32:56.000000000 +0100
- @@ -3,12 +3,15 @@
- * Released under the terms of the GNU GPL v2.0.
- */
-
- +#include <ctype.h>
- +#include <stdarg.h>
- #include <stdlib.h>
- #include <string.h>
-
- -#define LKC_DIRECT_LINK
- #include "lkc.h"
-
- +static const char nohelp_text[] = "There is no help available for this option.";
- +
- struct menu rootmenu;
- static struct menu **last_entry_ptr;
-
- @@ -35,7 +38,7 @@
- va_end(ap);
- }
-
- -void menu_init(void)
- +void _menu_init(void)
- {
- current_entry = current_menu = &rootmenu;
- last_entry_ptr = &rootmenu.list;
- @@ -45,7 +48,7 @@
- {
- struct menu *menu;
-
- - menu = malloc(sizeof(*menu));
- + menu = xmalloc(sizeof(*menu));
- memset(menu, 0, sizeof(*menu));
- menu->sym = sym;
- menu->parent = current_menu;
- @@ -55,6 +58,8 @@
- *last_entry_ptr = menu;
- last_entry_ptr = &menu->next;
- current_entry = menu;
- + if (sym)
- + menu_add_symbol(P_SYMBOL, sym, NULL);
- }
-
- void menu_end_entry(void)
- @@ -74,7 +79,7 @@
- current_menu = current_menu->parent;
- }
-
- -struct expr *menu_check_dep(struct expr *e)
- +static struct expr *menu_check_dep(struct expr *e)
- {
- if (!e)
- return e;
- @@ -133,8 +138,35 @@
- while (isspace(*prompt))
- prompt++;
- }
- - if (current_entry->prompt)
- + if (current_entry->prompt && current_entry != &rootmenu)
- prop_warn(prop, "prompt redefined");
- +
- + /* Apply all upper menus' visibilities to actual prompts. */
- + if(type == P_PROMPT) {
- + struct menu *menu = current_entry;
- +
- + while ((menu = menu->parent) != NULL) {
- + struct expr *dup_expr;
- +
- + if (!menu->visibility)
- + continue;
- + /*
- + * Do not add a reference to the
- + * menu's visibility expression but
- + * use a copy of it. Otherwise the
- + * expression reduction functions
- + * will modify expressions that have
- + * multiple references which can
- + * cause unwanted side effects.
- + */
- + dup_expr = expr_copy(menu->visibility);
- +
- + prop->visible.expr
- + = expr_alloc_and(prop->visible.expr,
- + dup_expr);
- + }
- + }
- +
- current_entry->prompt = prop;
- }
- prop->text = prompt;
- @@ -147,6 +179,12 @@
- return menu_add_prop(type, prompt, NULL, dep);
- }
-
- +void menu_add_visibility(struct expr *expr)
- +{
- + current_entry->visibility = expr_alloc_and(current_entry->visibility,
- + expr);
- +}
- +
- void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep)
- {
- menu_add_prop(type, NULL, expr, dep);
- @@ -178,13 +216,13 @@
- }
- }
-
- -static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2)
- +static int menu_validate_number(struct symbol *sym, struct symbol *sym2)
- {
- return sym2->type == S_INT || sym2->type == S_HEX ||
- (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name));
- }
-
- -void sym_check_prop(struct symbol *sym)
- +static void sym_check_prop(struct symbol *sym)
- {
- struct property *prop;
- struct symbol *sym2;
- @@ -194,8 +232,17 @@
- if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) &&
- prop->expr->type != E_SYMBOL)
- prop_warn(prop,
- - "default for config symbol '%'"
- + "default for config symbol '%s'"
- " must be a single symbol", sym->name);
- + if (prop->expr->type != E_SYMBOL)
- + break;
- + sym2 = prop_get_symbol(prop);
- + if (sym->type == S_HEX || sym->type == S_INT) {
- + if (!menu_validate_number(sym, sym2))
- + prop_warn(prop,
- + "'%s': number is invalid",
- + sym->name);
- + }
- break;
- case P_SELECT:
- sym2 = prop_get_symbol(prop);
- @@ -215,8 +262,8 @@
- if (sym->type != S_INT && sym->type != S_HEX)
- prop_warn(prop, "range is only allowed "
- "for int or hex symbols");
- - if (!menu_range_valid_sym(sym, prop->expr->left.sym) ||
- - !menu_range_valid_sym(sym, prop->expr->right.sym))
- + if (!menu_validate_number(sym, prop->expr->left.sym) ||
- + !menu_validate_number(sym, prop->expr->right.sym))
- prop_warn(prop, "range is invalid");
- break;
- default:
- @@ -315,6 +362,8 @@
- parent->next = last_menu->next;
- last_menu->next = NULL;
- }
- +
- + sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep);
- }
- for (menu = parent->list; menu; menu = menu->next) {
- if (sym && sym_is_choice(sym) &&
- @@ -387,6 +436,29 @@
- }
- }
-
- +bool menu_has_prompt(struct menu *menu)
- +{
- + if (!menu->prompt)
- + return false;
- + return true;
- +}
- +
- +/*
- + * Determine if a menu is empty.
- + * A menu is considered empty if it contains no or only
- + * invisible entries.
- + */
- +bool menu_is_empty(struct menu *menu)
- +{
- + struct menu *child;
- +
- + for (child = menu->list; child; child = child->next) {
- + if (menu_is_visible(child))
- + return(false);
- + }
- + return(true);
- +}
- +
- bool menu_is_visible(struct menu *menu)
- {
- struct menu *child;
- @@ -395,6 +467,12 @@
-
- if (!menu->prompt)
- return false;
- +
- + if (menu->visibility) {
- + if (expr_calc_value(menu->visibility) == no)
- + return no;
- + }
- +
- sym = menu->sym;
- if (sym) {
- sym_calc_value(sym);
- @@ -404,12 +482,18 @@
-
- if (visible != no)
- return true;
- +
- if (!sym || sym_get_tristate_value(menu->sym) == no)
- return false;
-
- - for (child = menu->list; child; child = child->next)
- - if (menu_is_visible(child))
- + for (child = menu->list; child; child = child->next) {
- + if (menu_is_visible(child)) {
- + if (sym)
- + sym->flags |= SYMBOL_DEF_USER;
- return true;
- + }
- + }
- +
- return false;
- }
-
- @@ -451,3 +535,156 @@
- else
- return "";
- }
- +
- +static void get_prompt_str(struct gstr *r, struct property *prop,
- + struct list_head *head)
- +{
- + int i, j;
- + struct menu *submenu[8], *menu, *location = NULL;
- + struct jump_key *jump;
- +
- + str_printf(r, _("Prompt: %s\n"), _(prop->text));
- + menu = prop->menu->parent;
- + for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) {
- + bool accessible = menu_is_visible(menu);
- +
- + submenu[i++] = menu;
- + if (location == NULL && accessible)
- + location = menu;
- + }
- + if (head && location) {
- + jump = xmalloc(sizeof(struct jump_key));
- +
- + if (menu_is_visible(prop->menu)) {
- + /*
- + * There is not enough room to put the hint at the
- + * beginning of the "Prompt" line. Put the hint on the
- + * last "Location" line even when it would belong on
- + * the former.
- + */
- + jump->target = prop->menu;
- + } else
- + jump->target = location;
- +
- + if (list_empty(head))
- + jump->index = 0;
- + else
- + jump->index = list_entry(head->prev, struct jump_key,
- + entries)->index + 1;
- +
- + list_add_tail(&jump->entries, head);
- + }
- +
- + if (i > 0) {
- + str_printf(r, _(" Location:\n"));
- + for (j = 4; --i >= 0; j += 2) {
- + menu = submenu[i];
- + if (head && location && menu == location)
- + jump->offset = r->len - 1;
- + str_printf(r, "%*c-> %s", j, ' ',
- + _(menu_get_prompt(menu)));
- + if (menu->sym) {
- + str_printf(r, " (%s [=%s])", menu->sym->name ?
- + menu->sym->name : _("<choice>"),
- + sym_get_string_value(menu->sym));
- + }
- + str_append(r, "\n");
- + }
- + }
- +}
- +
- +/*
- + * get peoperty of type P_SYMBOL
- + */
- +static struct property *get_symbol_prop(struct symbol *sym)
- +{
- + struct property *prop = NULL;
- +
- + for_all_properties(sym, prop, P_SYMBOL)
- + break;
- + return prop;
- +}
- +
- +/*
- + * head is optional and may be NULL
- + */
- +void get_symbol_str(struct gstr *r, struct symbol *sym,
- + struct list_head *head)
- +{
- + bool hit;
- + struct property *prop;
- +
- + if (sym && sym->name) {
- + str_printf(r, "Symbol: %s [=%s]\n", sym->name,
- + sym_get_string_value(sym));
- + str_printf(r, "Type : %s\n", sym_type_name(sym->type));
- + if (sym->type == S_INT || sym->type == S_HEX) {
- + prop = sym_get_range_prop(sym);
- + if (prop) {
- + str_printf(r, "Range : ");
- + expr_gstr_print(prop->expr, r);
- + str_append(r, "\n");
- + }
- + }
- + }
- + for_all_prompts(sym, prop)
- + get_prompt_str(r, prop, head);
- +
- + prop = get_symbol_prop(sym);
- + if (prop) {
- + str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
- + prop->menu->lineno);
- + if (!expr_is_yes(prop->visible.expr)) {
- + str_append(r, _(" Depends on: "));
- + expr_gstr_print(prop->visible.expr, r);
- + str_append(r, "\n");
- + }
- + }
- +
- + hit = false;
- + for_all_properties(sym, prop, P_SELECT) {
- + if (!hit) {
- + str_append(r, " Selects: ");
- + hit = true;
- + } else
- + str_printf(r, " && ");
- + expr_gstr_print(prop->expr, r);
- + }
- + if (hit)
- + str_append(r, "\n");
- + if (sym->rev_dep.expr) {
- + str_append(r, _(" Selected by: "));
- + expr_gstr_print(sym->rev_dep.expr, r);
- + str_append(r, "\n");
- + }
- + str_append(r, "\n\n");
- +}
- +
- +struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head)
- +{
- + struct symbol *sym;
- + struct gstr res = str_new();
- + int i;
- +
- + for (i = 0; sym_arr && (sym = sym_arr[i]); i++)
- + get_symbol_str(&res, sym, head);
- + if (!i)
- + str_append(&res, _("No matches found.\n"));
- + return res;
- +}
- +
- +
- +void menu_get_ext_help(struct menu *menu, struct gstr *help)
- +{
- + struct symbol *sym = menu->sym;
- + const char *help_text = nohelp_text;
- +
- + if (menu_has_help(menu)) {
- + if (sym->name)
- + str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
- + help_text = menu_get_help(menu);
- + }
- + str_printf(help, "%s\n", _(help_text));
- + if (sym)
- + get_symbol_str(help, sym, NULL);
- +}
- diff -Nur uClibc-0.9.33.2/extra/config/merge_config.sh uClibc/extra/config/merge_config.sh
- --- uClibc-0.9.33.2/extra/config/merge_config.sh 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/config/merge_config.sh 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,150 @@
- +#!/bin/sh
- +# merge_config.sh - Takes a list of config fragment values, and merges
- +# them one by one. Provides warnings on overridden values, and specified
- +# values that did not make it to the resulting .config file (due to missed
- +# dependencies or config symbol removal).
- +#
- +# Portions reused from kconf_check and generate_cfg:
- +# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/kconf_check
- +# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/generate_cfg
- +#
- +# Copyright (c) 2009-2010 Wind River Systems, Inc.
- +# Copyright 2011 Linaro
- +#
- +# This program is free software; you can redistribute it and/or modify
- +# it under the terms of the GNU General Public License version 2 as
- +# published by the Free Software Foundation.
- +#
- +# This program is distributed in the hope that it will be useful,
- +# but WITHOUT ANY WARRANTY; without even the implied warranty of
- +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- +# See the GNU General Public License for more details.
- +
- +clean_up() {
- + rm -f $TMP_FILE
- + exit
- +}
- +trap clean_up HUP INT TERM
- +
- +usage() {
- + echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
- + echo " -h display this help text"
- + echo " -m only merge the fragments, do not execute the make command"
- + echo " -n use allnoconfig instead of alldefconfig"
- + echo " -r list redundant entries when merging fragments"
- + echo " -O dir to put generated output files"
- +}
- +
- +MAKE=true
- +ALLTARGET=alldefconfig
- +WARNREDUN=false
- +OUTPUT=.
- +
- +while true; do
- + case $1 in
- + "-n")
- + ALLTARGET=allnoconfig
- + shift
- + continue
- + ;;
- + "-m")
- + MAKE=false
- + shift
- + continue
- + ;;
- + "-h")
- + usage
- + exit
- + ;;
- + "-r")
- + WARNREDUN=true
- + shift
- + continue
- + ;;
- + "-O")
- + if [ -d $2 ];then
- + OUTPUT=$(echo $2 | sed 's/\/*$//')
- + else
- + echo "output directory $2 does not exist" 1>&2
- + exit 1
- + fi
- + shift 2
- + continue
- + ;;
- + *)
- + break
- + ;;
- + esac
- +done
- +
- +INITFILE=$1
- +shift;
- +
- +MERGE_LIST=$*
- +SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
- +TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
- +
- +echo "Using $INITFILE as base"
- +cat $INITFILE > $TMP_FILE
- +
- +# Merge files, printing warnings on overrided values
- +for MERGE_FILE in $MERGE_LIST ; do
- + echo "Merging $MERGE_FILE"
- + CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE)
- +
- + for CFG in $CFG_LIST ; do
- + grep -q -w $CFG $TMP_FILE
- + if [ $? -eq 0 ] ; then
- + PREV_VAL=$(grep -w $CFG $TMP_FILE)
- + NEW_VAL=$(grep -w $CFG $MERGE_FILE)
- + if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then
- + echo Value of $CFG is redefined by fragment $MERGE_FILE:
- + echo Previous value: $PREV_VAL
- + echo New value: $NEW_VAL
- + echo
- + elif [ "$WARNREDUN" = "true" ]; then
- + echo Value of $CFG is redundant by fragment $MERGE_FILE:
- + fi
- + sed -i "/$CFG[ =]/d" $TMP_FILE
- + fi
- + done
- + cat $MERGE_FILE >> $TMP_FILE
- +done
- +
- +if [ "$MAKE" = "false" ]; then
- + cp $TMP_FILE $OUTPUT/.config
- + echo "#"
- + echo "# merged configuration written to $OUTPUT/.config (needs make)"
- + echo "#"
- + clean_up
- + exit
- +fi
- +
- +# If we have an output dir, setup the O= argument, otherwise leave
- +# it blank, since O=. will create an unnecessary ./source softlink
- +OUTPUT_ARG=""
- +if [ "$OUTPUT" != "." ] ; then
- + OUTPUT_ARG="O=$OUTPUT"
- +fi
- +
- +
- +# Use the merged file as the starting point for:
- +# alldefconfig: Fills in any missing symbols with Kconfig default
- +# allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
- +make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
- +
- +
- +# Check all specified config values took (might have missed-dependency issues)
- +for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
- +
- + REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
- + ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config)
- + if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
- + echo "Value requested for $CFG not in final .config"
- + echo "Requested value: $REQUESTED_VAL"
- + echo "Actual value: $ACTUAL_VAL"
- + echo ""
- + fi
- +done
- +
- +clean_up
- diff -Nur uClibc-0.9.33.2/extra/config/nconf.c uClibc/extra/config/nconf.c
- --- uClibc-0.9.33.2/extra/config/nconf.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/config/nconf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,1557 @@
- +/*
- + * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?
- + * Released under the terms of the GNU GPL v2.0.
- + *
- + * Derived from menuconfig.
- + *
- + */
- +#define _GNU_SOURCE
- +#include <string.h>
- +#include <stdlib.h>
- +
- +#include "lkc.h"
- +#include "nconf.h"
- +#include <ctype.h>
- +
- +static const char nconf_global_help[] = N_(
- +"Help windows\n"
- +"------------\n"
- +"o Global help: Unless in a data entry window, pressing <F1> will give \n"
- +" you the global help window, which you are just reading.\n"
- +"\n"
- +"o A short version of the global help is available by pressing <F3>.\n"
- +"\n"
- +"o Local help: To get help related to the current menu entry, use any\n"
- +" of <?> <h>, or if in a data entry window then press <F1>.\n"
- +"\n"
- +"\n"
- +"Menu entries\n"
- +"------------\n"
- +"This interface lets you select features and parameters for the \n"
- +"build. Features can either be built-in, modularized, or removed.\n"
- +"Parameters must be entered as text or decimal or hexadecimal numbers.\n"
- +"\n"
- +"Menu entries beginning with following braces represent features that\n"
- +" [ ] can be built in or removed\n"
- +" < > can be built in, modularized or removed\n"
- +" { } can be built in or modularized, are selected by another feature\n"
- +" - - are selected by another feature\n"
- +" XXX cannot be selected. Symbol Info <F2> tells you why.\n"
- +"*, M or whitespace inside braces means to build in, build as a module\n"
- +"or to exclude the feature respectively.\n"
- +"\n"
- +"To change any of these features, highlight it with the movement keys\n"
- +"listed below and press <y> to build it in, <m> to make it a module or\n"
- +"<n> to remove it. You may press the <Space> key to cycle through the\n"
- +"available options.\n"
- +"\n"
- +"A trailing \"--->\" designates a submenu, a trailing \"----\" an\n"
- +"empty submenu.\n"
- +"\n"
- +"Menu navigation keys\n"
- +"----------------------------------------------------------------------\n"
- +"Linewise up <Up>\n"
- +"Linewise down <Down>\n"
- +"Pagewise up <Page Up>\n"
- +"Pagewise down <Page Down>\n"
- +"First entry <Home>\n"
- +"Last entry <End>\n"
- +"Enter a submenu <Right> <Enter>\n"
- +"Go back to parent menu <Left> <Esc> <F5>\n"
- +"Close a help window <Enter> <Esc> <F5>\n"
- +"Close entry window, apply <Enter>\n"
- +"Close entry window, forget <Esc> <F5>\n"
- +"Start incremental, case-insensitive search for STRING in menu entries,\n"
- +" no regex support, STRING is displayed in upper left corner\n"
- +" </>STRING\n"
- +" Remove last character <Backspace>\n"
- +" Jump to next hit <Down>\n"
- +" Jump to previous hit <Up>\n"
- +"Exit menu search mode </> <Esc>\n"
- +"Search for configuration variables with or without leading CONFIG_\n"
- +" <F8>RegExpr<Enter>\n"
- +"Verbose search help <F8><F1>\n"
- +"----------------------------------------------------------------------\n"
- +"\n"
- +"Unless in a data entry window, key <1> may be used instead of <F1>,\n"
- +"<2> instead of <F2>, etc.\n"
- +"\n"
- +"\n"
- +"Radiolist (Choice list)\n"
- +"-----------------------\n"
- +"Use the movement keys listed above to select the option you wish to set\n"
- +"and press <Space>.\n"
- +"\n"
- +"\n"
- +"Data entry\n"
- +"----------\n"
- +"Enter the requested information and press <Enter>. Hexadecimal values\n"
- +"may be entered without the \"0x\" prefix.\n"
- +"\n"
- +"\n"
- +"Text Box (Help Window)\n"
- +"----------------------\n"
- +"Use movement keys as listed in table above.\n"
- +"\n"
- +"Press any of <Enter> <Esc> <q> <F5> <F9> to exit.\n"
- +"\n"
- +"\n"
- +"Alternate configuration files\n"
- +"-----------------------------\n"
- +"nconfig supports switching between different configurations.\n"
- +"Press <F6> to save your current configuration. Press <F7> and enter\n"
- +"a file name to load a previously saved configuration.\n"
- +"\n"
- +"\n"
- +"Terminal configuration\n"
- +"----------------------\n"
- +"If you use nconfig in a xterm window, make sure your TERM environment\n"
- +"variable specifies a terminal configuration which supports at least\n"
- +"16 colors. Otherwise nconfig will look rather bad.\n"
- +"\n"
- +"If the \"stty size\" command reports the current terminalsize correctly,\n"
- +"nconfig will adapt to sizes larger than the traditional 80x25 \"standard\"\n"
- +"and display longer menus properly.\n"
- +"\n"
- +"\n"
- +"Single menu mode\n"
- +"----------------\n"
- +"If you prefer to have all of the menu entries listed in a single menu,\n"
- +"rather than the default multimenu hierarchy, run nconfig with\n"
- +"NCONFIG_MODE environment variable set to single_menu. Example:\n"
- +"\n"
- +"make NCONFIG_MODE=single_menu nconfig\n"
- +"\n"
- +"<Enter> will then unfold the appropriate category, or fold it if it\n"
- +"is already unfolded. Folded menu entries will be designated by a\n"
- +"leading \"++>\" and unfolded entries by a leading \"-->\".\n"
- +"\n"
- +"Note that this mode can eventually be a little more CPU expensive than\n"
- +"the default mode, especially with a larger number of unfolded submenus.\n"
- +"\n"),
- +menu_no_f_instructions[] = N_(
- +"Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
- +"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
- +"\n"
- +"Use the following keys to navigate the menus:\n"
- +"Move up or down with <Up> and <Down>.\n"
- +"Enter a submenu with <Enter> or <Right>.\n"
- +"Exit a submenu to its parent menu with <Esc> or <Left>.\n"
- +"Pressing <y> includes, <n> excludes, <m> modularizes features.\n"
- +"Pressing <Space> cycles through the available options.\n"
- +"To search for menu entries press </>.\n"
- +"<Esc> always leaves the current window.\n"
- +"\n"
- +"You do not have function keys support.\n"
- +"Press <1> instead of <F1>, <2> instead of <F2>, etc.\n"
- +"For verbose global help use key <1>.\n"
- +"For help related to the current menu entry press <?> or <h>.\n"),
- +menu_instructions[] = N_(
- +"Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
- +"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
- +"\n"
- +"Use the following keys to navigate the menus:\n"
- +"Move up or down with <Up> or <Down>.\n"
- +"Enter a submenu with <Enter> or <Right>.\n"
- +"Exit a submenu to its parent menu with <Esc> or <Left>.\n"
- +"Pressing <y> includes, <n> excludes, <m> modularizes features.\n"
- +"Pressing <Space> cycles through the available options.\n"
- +"To search for menu entries press </>.\n"
- +"<Esc> always leaves the current window.\n"
- +"\n"
- +"Pressing <1> may be used instead of <F1>, <2> instead of <F2>, etc.\n"
- +"For verbose global help press <F1>.\n"
- +"For help related to the current menu entry press <?> or <h>.\n"),
- +radiolist_instructions[] = N_(
- +"Press <Up>, <Down>, <Home> or <End> to navigate a radiolist, select\n"
- +"with <Space>.\n"
- +"For help related to the current entry press <?> or <h>.\n"
- +"For global help press <F1>.\n"),
- +inputbox_instructions_int[] = N_(
- +"Please enter a decimal value.\n"
- +"Fractions will not be accepted.\n"
- +"Press <Enter> to apply, <Esc> to cancel."),
- +inputbox_instructions_hex[] = N_(
- +"Please enter a hexadecimal value.\n"
- +"Press <Enter> to apply, <Esc> to cancel."),
- +inputbox_instructions_string[] = N_(
- +"Please enter a string value.\n"
- +"Press <Enter> to apply, <Esc> to cancel."),
- +setmod_text[] = N_(
- +"This feature depends on another feature which has been configured as a\n"
- +"module. As a result, the current feature will be built as a module too."),
- +load_config_text[] = N_(
- +"Enter the name of the configuration file you wish to load.\n"
- +"Accept the name shown to restore the configuration you last\n"
- +"retrieved. Leave empty to abort."),
- +load_config_help[] = N_(
- +"For various reasons, one may wish to keep several different\n"
- +"configurations available on a single machine.\n"
- +"\n"
- +"If you have saved a previous configuration in a file other than the\n"
- +"default one, entering its name here will allow you to load and modify\n"
- +"that configuration.\n"
- +"\n"
- +"Leave empty to abort.\n"),
- +save_config_text[] = N_(
- +"Enter a filename to which this configuration should be saved\n"
- +"as an alternate. Leave empty to abort."),
- +save_config_help[] = N_(
- +"For various reasons, one may wish to keep several different\n"
- +"configurations available on a single machine.\n"
- +"\n"
- +"Entering a file name here will allow you to later retrieve, modify\n"
- +"and use the current configuration as an alternate to whatever\n"
- +"configuration options you have selected at that time.\n"
- +"\n"
- +"Leave empty to abort.\n"),
- +search_help[] = N_(
- +"Search for symbols (configuration variable names CONFIG_*) and display\n"
- +"their relations. Regular expressions are supported.\n"
- +"Example: Search for \"^FOO\".\n"
- +"Result:\n"
- +"-----------------------------------------------------------------\n"
- +"Symbol: FOO [ = m]\n"
- +"Prompt: Foo bus is used to drive the bar HW\n"
- +"Defined at drivers/pci/Kconfig:47\n"
- +"Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
- +"Location:\n"
- +" -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
- +" -> PCI support (PCI [ = y])\n"
- +" -> PCI access mode (<choice> [ = y])\n"
- +"Selects: LIBCRC32\n"
- +"Selected by: BAR\n"
- +"-----------------------------------------------------------------\n"
- +"o The line 'Prompt:' shows the text displayed for this symbol in\n"
- +" the menu hierarchy.\n"
- +"o The 'Defined at' line tells at what file / line number the symbol is\n"
- +" defined.\n"
- +"o The 'Depends on:' line lists symbols that need to be defined for\n"
- +" this symbol to be visible and selectable in the menu.\n"
- +"o The 'Location:' lines tell, where in the menu structure this symbol\n"
- +" is located. A location followed by a [ = y] indicates that this is\n"
- +" a selectable menu item, and the current value is displayed inside\n"
- +" brackets.\n"
- +"o The 'Selects:' line tells, what symbol will be automatically selected\n"
- +" if this symbol is selected (y or m).\n"
- +"o The 'Selected by' line tells what symbol has selected this symbol.\n"
- +"\n"
- +"Only relevant lines are shown.\n"
- +"\n\n"
- +"Search examples:\n"
- +"USB => find all symbols containing USB\n"
- +"^USB => find all symbols starting with USB\n"
- +"USB$ => find all symbols ending with USB\n"
- +"\n");
- +
- +struct mitem {
- + char str[256];
- + char tag;
- + void *usrptr;
- + int is_visible;
- +};
- +
- +#define MAX_MENU_ITEMS 4096
- +static int show_all_items;
- +static int indent;
- +static struct menu *current_menu;
- +static int child_count;
- +static int single_menu_mode;
- +/* the window in which all information appears */
- +static WINDOW *main_window;
- +/* the largest size of the menu window */
- +static int mwin_max_lines;
- +static int mwin_max_cols;
- +/* the window in which we show option buttons */
- +static MENU *curses_menu;
- +static ITEM *curses_menu_items[MAX_MENU_ITEMS];
- +static struct mitem k_menu_items[MAX_MENU_ITEMS];
- +static int items_num;
- +static int global_exit;
- +/* the currently selected button */
- +const char *current_instructions = menu_instructions;
- +
- +static char *dialog_input_result;
- +static int dialog_input_result_len;
- +
- +static void conf(struct menu *menu);
- +static void conf_choice(struct menu *menu);
- +static void conf_string(struct menu *menu);
- +static void conf_load(void);
- +static void conf_save(void);
- +static void show_help(struct menu *menu);
- +static int do_exit(void);
- +static void setup_windows(void);
- +static void search_conf(void);
- +
- +typedef void (*function_key_handler_t)(int *key, struct menu *menu);
- +static void handle_f1(int *key, struct menu *current_item);
- +static void handle_f2(int *key, struct menu *current_item);
- +static void handle_f3(int *key, struct menu *current_item);
- +static void handle_f4(int *key, struct menu *current_item);
- +static void handle_f5(int *key, struct menu *current_item);
- +static void handle_f6(int *key, struct menu *current_item);
- +static void handle_f7(int *key, struct menu *current_item);
- +static void handle_f8(int *key, struct menu *current_item);
- +static void handle_f9(int *key, struct menu *current_item);
- +
- +struct function_keys {
- + const char *key_str;
- + const char *func;
- + function_key key;
- + function_key_handler_t handler;
- +};
- +
- +static const int function_keys_num = 9;
- +struct function_keys function_keys[] = {
- + {
- + .key_str = "F1",
- + .func = "Help",
- + .key = F_HELP,
- + .handler = handle_f1,
- + },
- + {
- + .key_str = "F2",
- + .func = "SymInfo",
- + .key = F_SYMBOL,
- + .handler = handle_f2,
- + },
- + {
- + .key_str = "F3",
- + .func = "Help 2",
- + .key = F_INSTS,
- + .handler = handle_f3,
- + },
- + {
- + .key_str = "F4",
- + .func = "ShowAll",
- + .key = F_CONF,
- + .handler = handle_f4,
- + },
- + {
- + .key_str = "F5",
- + .func = "Back",
- + .key = F_BACK,
- + .handler = handle_f5,
- + },
- + {
- + .key_str = "F6",
- + .func = "Save",
- + .key = F_SAVE,
- + .handler = handle_f6,
- + },
- + {
- + .key_str = "F7",
- + .func = "Load",
- + .key = F_LOAD,
- + .handler = handle_f7,
- + },
- + {
- + .key_str = "F8",
- + .func = "SymSearch",
- + .key = F_SEARCH,
- + .handler = handle_f8,
- + },
- + {
- + .key_str = "F9",
- + .func = "Exit",
- + .key = F_EXIT,
- + .handler = handle_f9,
- + },
- +};
- +
- +static void print_function_line(void)
- +{
- + int i;
- + int offset = 1;
- + const int skip = 1;
- + int lines = getmaxy(stdscr);
- +
- + for (i = 0; i < function_keys_num; i++) {
- + (void) wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]);
- + mvwprintw(main_window, lines-3, offset,
- + "%s",
- + function_keys[i].key_str);
- + (void) wattrset(main_window, attributes[FUNCTION_TEXT]);
- + offset += strlen(function_keys[i].key_str);
- + mvwprintw(main_window, lines-3,
- + offset, "%s",
- + function_keys[i].func);
- + offset += strlen(function_keys[i].func) + skip;
- + }
- + (void) wattrset(main_window, attributes[NORMAL]);
- +}
- +
- +/* help */
- +static void handle_f1(int *key, struct menu *current_item)
- +{
- + show_scroll_win(main_window,
- + _("Global help"), _(nconf_global_help));
- + return;
- +}
- +
- +/* symbole help */
- +static void handle_f2(int *key, struct menu *current_item)
- +{
- + show_help(current_item);
- + return;
- +}
- +
- +/* instructions */
- +static void handle_f3(int *key, struct menu *current_item)
- +{
- + show_scroll_win(main_window,
- + _("Short help"),
- + _(current_instructions));
- + return;
- +}
- +
- +/* config */
- +static void handle_f4(int *key, struct menu *current_item)
- +{
- + int res = btn_dialog(main_window,
- + _("Show all symbols?"),
- + 2,
- + " <Show All> ",
- + "<Don't show all>");
- + if (res == 0)
- + show_all_items = 1;
- + else if (res == 1)
- + show_all_items = 0;
- +
- + return;
- +}
- +
- +/* back */
- +static void handle_f5(int *key, struct menu *current_item)
- +{
- + *key = KEY_LEFT;
- + return;
- +}
- +
- +/* save */
- +static void handle_f6(int *key, struct menu *current_item)
- +{
- + conf_save();
- + return;
- +}
- +
- +/* load */
- +static void handle_f7(int *key, struct menu *current_item)
- +{
- + conf_load();
- + return;
- +}
- +
- +/* search */
- +static void handle_f8(int *key, struct menu *current_item)
- +{
- + search_conf();
- + return;
- +}
- +
- +/* exit */
- +static void handle_f9(int *key, struct menu *current_item)
- +{
- + do_exit();
- + return;
- +}
- +
- +/* return != 0 to indicate the key was handles */
- +static int process_special_keys(int *key, struct menu *menu)
- +{
- + int i;
- +
- + if (*key == KEY_RESIZE) {
- + setup_windows();
- + return 1;
- + }
- +
- + for (i = 0; i < function_keys_num; i++) {
- + if (*key == KEY_F(function_keys[i].key) ||
- + *key == '0' + function_keys[i].key){
- + function_keys[i].handler(key, menu);
- + return 1;
- + }
- + }
- +
- + return 0;
- +}
- +
- +static void clean_items(void)
- +{
- + int i;
- + for (i = 0; curses_menu_items[i]; i++)
- + free_item(curses_menu_items[i]);
- + bzero(curses_menu_items, sizeof(curses_menu_items));
- + bzero(k_menu_items, sizeof(k_menu_items));
- + items_num = 0;
- +}
- +
- +typedef enum {MATCH_TINKER_PATTERN_UP, MATCH_TINKER_PATTERN_DOWN,
- + FIND_NEXT_MATCH_DOWN, FIND_NEXT_MATCH_UP} match_f;
- +
- +/* return the index of the matched item, or -1 if no such item exists */
- +static int get_mext_match(const char *match_str, match_f flag)
- +{
- + int match_start = item_index(current_item(curses_menu));
- + int index;
- +
- + if (flag == FIND_NEXT_MATCH_DOWN)
- + ++match_start;
- + else if (flag == FIND_NEXT_MATCH_UP)
- + --match_start;
- +
- + index = match_start;
- + index = (index + items_num) % items_num;
- + while (true) {
- + char *str = k_menu_items[index].str;
- + if (strcasestr(str, match_str) != 0)
- + return index;
- + if (flag == FIND_NEXT_MATCH_UP ||
- + flag == MATCH_TINKER_PATTERN_UP)
- + --index;
- + else
- + ++index;
- + index = (index + items_num) % items_num;
- + if (index == match_start)
- + return -1;
- + }
- +}
- +
- +/* Make a new item. */
- +static void item_make(struct menu *menu, char tag, const char *fmt, ...)
- +{
- + va_list ap;
- +
- + if (items_num > MAX_MENU_ITEMS-1)
- + return;
- +
- + bzero(&k_menu_items[items_num], sizeof(k_menu_items[0]));
- + k_menu_items[items_num].tag = tag;
- + k_menu_items[items_num].usrptr = menu;
- + if (menu != NULL)
- + k_menu_items[items_num].is_visible =
- + menu_is_visible(menu);
- + else
- + k_menu_items[items_num].is_visible = 1;
- +
- + va_start(ap, fmt);
- + vsnprintf(k_menu_items[items_num].str,
- + sizeof(k_menu_items[items_num].str),
- + fmt, ap);
- + va_end(ap);
- +
- + if (!k_menu_items[items_num].is_visible)
- + memcpy(k_menu_items[items_num].str, "XXX", 3);
- +
- + curses_menu_items[items_num] = new_item(
- + k_menu_items[items_num].str,
- + k_menu_items[items_num].str);
- + set_item_userptr(curses_menu_items[items_num],
- + &k_menu_items[items_num]);
- + /*
- + if (!k_menu_items[items_num].is_visible)
- + item_opts_off(curses_menu_items[items_num], O_SELECTABLE);
- + */
- +
- + items_num++;
- + curses_menu_items[items_num] = NULL;
- +}
- +
- +/* very hackish. adds a string to the last item added */
- +static void item_add_str(const char *fmt, ...)
- +{
- + va_list ap;
- + int index = items_num-1;
- + char new_str[256];
- + char tmp_str[256];
- +
- + if (index < 0)
- + return;
- +
- + va_start(ap, fmt);
- + vsnprintf(new_str, sizeof(new_str), fmt, ap);
- + va_end(ap);
- + snprintf(tmp_str, sizeof(tmp_str), "%s%s",
- + k_menu_items[index].str, new_str);
- + strncpy(k_menu_items[index].str,
- + tmp_str,
- + sizeof(k_menu_items[index].str));
- +
- + free_item(curses_menu_items[index]);
- + curses_menu_items[index] = new_item(
- + k_menu_items[index].str,
- + k_menu_items[index].str);
- + set_item_userptr(curses_menu_items[index],
- + &k_menu_items[index]);
- +}
- +
- +/* get the tag of the currently selected item */
- +static char item_tag(void)
- +{
- + ITEM *cur;
- + struct mitem *mcur;
- +
- + cur = current_item(curses_menu);
- + if (cur == NULL)
- + return 0;
- + mcur = (struct mitem *) item_userptr(cur);
- + return mcur->tag;
- +}
- +
- +static int curses_item_index(void)
- +{
- + return item_index(current_item(curses_menu));
- +}
- +
- +static void *item_data(void)
- +{
- + ITEM *cur;
- + struct mitem *mcur;
- +
- + cur = current_item(curses_menu);
- + if (!cur)
- + return NULL;
- + mcur = (struct mitem *) item_userptr(cur);
- + return mcur->usrptr;
- +
- +}
- +
- +static int item_is_tag(char tag)
- +{
- + return item_tag() == tag;
- +}
- +
- +static char filename[PATH_MAX+1];
- +static char menu_backtitle[PATH_MAX+128];
- +static const char *set_config_filename(const char *config_filename)
- +{
- + int size;
- +
- + size = snprintf(menu_backtitle, sizeof(menu_backtitle),
- + "%s - %s", config_filename, rootmenu.prompt->text);
- + if (size >= sizeof(menu_backtitle))
- + menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
- +
- + size = snprintf(filename, sizeof(filename), "%s", config_filename);
- + if (size >= sizeof(filename))
- + filename[sizeof(filename)-1] = '\0';
- + return menu_backtitle;
- +}
- +
- +/* return = 0 means we are successful.
- + * -1 means go on doing what you were doing
- + */
- +static int do_exit(void)
- +{
- + int res;
- + if (!conf_get_changed()) {
- + global_exit = 1;
- + return 0;
- + }
- + res = btn_dialog(main_window,
- + _("Do you wish to save your new configuration?\n"
- + "<ESC> to cancel and resume nconfig."),
- + 2,
- + " <save> ",
- + "<don't save>");
- + if (res == KEY_EXIT) {
- + global_exit = 0;
- + return -1;
- + }
- +
- + /* if we got here, the user really wants to exit */
- + switch (res) {
- + case 0:
- + res = conf_write(filename);
- + if (res)
- + btn_dialog(
- + main_window,
- + _("Error during writing of configuration.\n"
- + "Your configuration changes were NOT saved."),
- + 1,
- + "<OK>");
- + break;
- + default:
- + btn_dialog(
- + main_window,
- + _("Your configuration changes were NOT saved."),
- + 1,
- + "<OK>");
- + break;
- + }
- + global_exit = 1;
- + return 0;
- +}
- +
- +
- +static void search_conf(void)
- +{
- + struct symbol **sym_arr;
- + struct gstr res;
- + struct gstr title;
- + char *dialog_input;
- + int dres;
- +
- + title = str_new();
- + str_printf( &title, _("Enter %s (sub)string or regexp to search for "
- + "(with or without \"%s\")"), CONFIG_, CONFIG_);
- +
- +again:
- + dres = dialog_inputbox(main_window,
- + _("Search Configuration Parameter"),
- + str_get(&title),
- + "", &dialog_input_result, &dialog_input_result_len);
- + switch (dres) {
- + case 0:
- + break;
- + case 1:
- + show_scroll_win(main_window,
- + _("Search Configuration"), search_help);
- + goto again;
- + default:
- + str_free(&title);
- + return;
- + }
- +
- + /* strip the prefix if necessary */
- + dialog_input = dialog_input_result;
- + if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0)
- + dialog_input += strlen(CONFIG_);
- +
- + sym_arr = sym_re_search(dialog_input);
- + res = get_relations_str(sym_arr, NULL);
- + free(sym_arr);
- + show_scroll_win(main_window,
- + _("Search Results"), str_get(&res));
- + str_free(&res);
- + str_free(&title);
- +}
- +
- +
- +static void build_conf(struct menu *menu)
- +{
- + struct symbol *sym;
- + struct property *prop;
- + struct menu *child;
- + int type, tmp, doint = 2;
- + tristate val;
- + char ch;
- +
- + if (!menu || (!show_all_items && !menu_is_visible(menu)))
- + return;
- +
- + sym = menu->sym;
- + prop = menu->prompt;
- + if (!sym) {
- + if (prop && menu != current_menu) {
- + const char *prompt = menu_get_prompt(menu);
- + enum prop_type ptype;
- + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
- + switch (ptype) {
- + case P_MENU:
- + child_count++;
- + prompt = _(prompt);
- + if (single_menu_mode) {
- + item_make(menu, 'm',
- + "%s%*c%s",
- + menu->data ? "-->" : "++>",
- + indent + 1, ' ', prompt);
- + } else
- + item_make(menu, 'm',
- + " %*c%s %s",
- + indent + 1, ' ', prompt,
- + menu_is_empty(menu) ? "----" : "--->");
- +
- + if (single_menu_mode && menu->data)
- + goto conf_childs;
- + return;
- + case P_COMMENT:
- + if (prompt) {
- + child_count++;
- + item_make(menu, ':',
- + " %*c*** %s ***",
- + indent + 1, ' ',
- + _(prompt));
- + }
- + break;
- + default:
- + if (prompt) {
- + child_count++;
- + item_make(menu, ':', "---%*c%s",
- + indent + 1, ' ',
- + _(prompt));
- + }
- + }
- + } else
- + doint = 0;
- + goto conf_childs;
- + }
- +
- + type = sym_get_type(sym);
- + if (sym_is_choice(sym)) {
- + struct symbol *def_sym = sym_get_choice_value(sym);
- + struct menu *def_menu = NULL;
- +
- + child_count++;
- + for (child = menu->list; child; child = child->next) {
- + if (menu_is_visible(child) && child->sym == def_sym)
- + def_menu = child;
- + }
- +
- + val = sym_get_tristate_value(sym);
- + if (sym_is_changable(sym)) {
- + switch (type) {
- + case S_BOOLEAN:
- + item_make(menu, 't', "[%c]",
- + val == no ? ' ' : '*');
- + break;
- + case S_TRISTATE:
- + switch (val) {
- + case yes:
- + ch = '*';
- + break;
- + case mod:
- + ch = 'M';
- + break;
- + default:
- + ch = ' ';
- + break;
- + }
- + item_make(menu, 't', "<%c>", ch);
- + break;
- + }
- + } else {
- + item_make(menu, def_menu ? 't' : ':', " ");
- + }
- +
- + item_add_str("%*c%s", indent + 1,
- + ' ', _(menu_get_prompt(menu)));
- + if (val == yes) {
- + if (def_menu) {
- + item_add_str(" (%s)",
- + _(menu_get_prompt(def_menu)));
- + item_add_str(" --->");
- + if (def_menu->list) {
- + indent += 2;
- + build_conf(def_menu);
- + indent -= 2;
- + }
- + }
- + return;
- + }
- + } else {
- + if (menu == current_menu) {
- + item_make(menu, ':',
- + "---%*c%s", indent + 1,
- + ' ', _(menu_get_prompt(menu)));
- + goto conf_childs;
- + }
- + child_count++;
- + val = sym_get_tristate_value(sym);
- + if (sym_is_choice_value(sym) && val == yes) {
- + item_make(menu, ':', " ");
- + } else {
- + switch (type) {
- + case S_BOOLEAN:
- + if (sym_is_changable(sym))
- + item_make(menu, 't', "[%c]",
- + val == no ? ' ' : '*');
- + else
- + item_make(menu, 't', "-%c-",
- + val == no ? ' ' : '*');
- + break;
- + case S_TRISTATE:
- + switch (val) {
- + case yes:
- + ch = '*';
- + break;
- + case mod:
- + ch = 'M';
- + break;
- + default:
- + ch = ' ';
- + break;
- + }
- + if (sym_is_changable(sym)) {
- + if (sym->rev_dep.tri == mod)
- + item_make(menu,
- + 't', "{%c}", ch);
- + else
- + item_make(menu,
- + 't', "<%c>", ch);
- + } else
- + item_make(menu, 't', "-%c-", ch);
- + break;
- + default:
- + tmp = 2 + strlen(sym_get_string_value(sym));
- + item_make(menu, 's', " (%s)",
- + sym_get_string_value(sym));
- + tmp = indent - tmp + 4;
- + if (tmp < 0)
- + tmp = 0;
- + item_add_str("%*c%s%s", tmp, ' ',
- + _(menu_get_prompt(menu)),
- + (sym_has_value(sym) ||
- + !sym_is_changable(sym)) ? "" :
- + _(" (NEW)"));
- + goto conf_childs;
- + }
- + }
- + item_add_str("%*c%s%s", indent + 1, ' ',
- + _(menu_get_prompt(menu)),
- + (sym_has_value(sym) || !sym_is_changable(sym)) ?
- + "" : _(" (NEW)"));
- + if (menu->prompt && menu->prompt->type == P_MENU) {
- + item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->");
- + return;
- + }
- + }
- +
- +conf_childs:
- + indent += doint;
- + for (child = menu->list; child; child = child->next)
- + build_conf(child);
- + indent -= doint;
- +}
- +
- +static void reset_menu(void)
- +{
- + unpost_menu(curses_menu);
- + clean_items();
- +}
- +
- +/* adjust the menu to show this item.
- + * prefer not to scroll the menu if possible*/
- +static void center_item(int selected_index, int *last_top_row)
- +{
- + int toprow;
- +
- + set_top_row(curses_menu, *last_top_row);
- + toprow = top_row(curses_menu);
- + if (selected_index < toprow ||
- + selected_index >= toprow+mwin_max_lines) {
- + toprow = max(selected_index-mwin_max_lines/2, 0);
- + if (toprow >= item_count(curses_menu)-mwin_max_lines)
- + toprow = item_count(curses_menu)-mwin_max_lines;
- + set_top_row(curses_menu, toprow);
- + }
- + set_current_item(curses_menu,
- + curses_menu_items[selected_index]);
- + *last_top_row = toprow;
- + post_menu(curses_menu);
- + refresh_all_windows(main_window);
- +}
- +
- +/* this function assumes reset_menu has been called before */
- +static void show_menu(const char *prompt, const char *instructions,
- + int selected_index, int *last_top_row)
- +{
- + int maxx, maxy;
- + WINDOW *menu_window;
- +
- + current_instructions = instructions;
- +
- + clear();
- + (void) wattrset(main_window, attributes[NORMAL]);
- + print_in_middle(stdscr, 1, 0, getmaxx(stdscr),
- + menu_backtitle,
- + attributes[MAIN_HEADING]);
- +
- + (void) wattrset(main_window, attributes[MAIN_MENU_BOX]);
- + box(main_window, 0, 0);
- + (void) wattrset(main_window, attributes[MAIN_MENU_HEADING]);
- + mvwprintw(main_window, 0, 3, " %s ", prompt);
- + (void) wattrset(main_window, attributes[NORMAL]);
- +
- + set_menu_items(curses_menu, curses_menu_items);
- +
- + /* position the menu at the middle of the screen */
- + scale_menu(curses_menu, &maxy, &maxx);
- + maxx = min(maxx, mwin_max_cols-2);
- + maxy = mwin_max_lines;
- + menu_window = derwin(main_window,
- + maxy,
- + maxx,
- + 2,
- + (mwin_max_cols-maxx)/2);
- + keypad(menu_window, TRUE);
- + set_menu_win(curses_menu, menu_window);
- + set_menu_sub(curses_menu, menu_window);
- +
- + /* must reassert this after changing items, otherwise returns to a
- + * default of 16
- + */
- + set_menu_format(curses_menu, maxy, 1);
- + center_item(selected_index, last_top_row);
- + set_menu_format(curses_menu, maxy, 1);
- +
- + print_function_line();
- +
- + /* Post the menu */
- + post_menu(curses_menu);
- + refresh_all_windows(main_window);
- +}
- +
- +static void adj_match_dir(match_f *match_direction)
- +{
- + if (*match_direction == FIND_NEXT_MATCH_DOWN)
- + *match_direction =
- + MATCH_TINKER_PATTERN_DOWN;
- + else if (*match_direction == FIND_NEXT_MATCH_UP)
- + *match_direction =
- + MATCH_TINKER_PATTERN_UP;
- + /* else, do no change.. */
- +}
- +
- +struct match_state
- +{
- + int in_search;
- + match_f match_direction;
- + char pattern[256];
- +};
- +
- +/* Return 0 means I have handled the key. In such a case, ans should hold the
- + * item to center, or -1 otherwise.
- + * Else return -1 .
- + */
- +static int do_match(int key, struct match_state *state, int *ans)
- +{
- + char c = (char) key;
- + int terminate_search = 0;
- + *ans = -1;
- + if (key == '/' || (state->in_search && key == 27)) {
- + move(0, 0);
- + refresh();
- + clrtoeol();
- + state->in_search = 1-state->in_search;
- + bzero(state->pattern, sizeof(state->pattern));
- + state->match_direction = MATCH_TINKER_PATTERN_DOWN;
- + return 0;
- + } else if (!state->in_search)
- + return 1;
- +
- + if (isalnum(c) || isgraph(c) || c == ' ') {
- + state->pattern[strlen(state->pattern)] = c;
- + state->pattern[strlen(state->pattern)] = '\0';
- + adj_match_dir(&state->match_direction);
- + *ans = get_mext_match(state->pattern,
- + state->match_direction);
- + } else if (key == KEY_DOWN) {
- + state->match_direction = FIND_NEXT_MATCH_DOWN;
- + *ans = get_mext_match(state->pattern,
- + state->match_direction);
- + } else if (key == KEY_UP) {
- + state->match_direction = FIND_NEXT_MATCH_UP;
- + *ans = get_mext_match(state->pattern,
- + state->match_direction);
- + } else if (key == KEY_BACKSPACE || key == 127) {
- + state->pattern[strlen(state->pattern)-1] = '\0';
- + adj_match_dir(&state->match_direction);
- + } else
- + terminate_search = 1;
- +
- + if (terminate_search) {
- + state->in_search = 0;
- + bzero(state->pattern, sizeof(state->pattern));
- + move(0, 0);
- + refresh();
- + clrtoeol();
- + return -1;
- + }
- + return 0;
- +}
- +
- +static void conf(struct menu *menu)
- +{
- + struct menu *submenu = 0;
- + const char *prompt = menu_get_prompt(menu);
- + struct symbol *sym;
- + int res;
- + int current_index = 0;
- + int last_top_row = 0;
- + struct match_state match_state = {
- + .in_search = 0,
- + .match_direction = MATCH_TINKER_PATTERN_DOWN,
- + .pattern = "",
- + };
- +
- + while (!global_exit) {
- + reset_menu();
- + current_menu = menu;
- + build_conf(menu);
- + if (!child_count)
- + break;
- +
- + show_menu(prompt ? _(prompt) : _("Main Menu"),
- + _(menu_instructions),
- + current_index, &last_top_row);
- + keypad((menu_win(curses_menu)), TRUE);
- + while (!global_exit) {
- + if (match_state.in_search) {
- + mvprintw(0, 0,
- + "searching: %s", match_state.pattern);
- + clrtoeol();
- + }
- + refresh_all_windows(main_window);
- + res = wgetch(menu_win(curses_menu));
- + if (!res)
- + break;
- + if (do_match(res, &match_state, ¤t_index) == 0) {
- + if (current_index != -1)
- + center_item(current_index,
- + &last_top_row);
- + continue;
- + }
- + if (process_special_keys(&res,
- + (struct menu *) item_data()))
- + break;
- + switch (res) {
- + case KEY_DOWN:
- + menu_driver(curses_menu, REQ_DOWN_ITEM);
- + break;
- + case KEY_UP:
- + menu_driver(curses_menu, REQ_UP_ITEM);
- + break;
- + case KEY_NPAGE:
- + menu_driver(curses_menu, REQ_SCR_DPAGE);
- + break;
- + case KEY_PPAGE:
- + menu_driver(curses_menu, REQ_SCR_UPAGE);
- + break;
- + case KEY_HOME:
- + menu_driver(curses_menu, REQ_FIRST_ITEM);
- + break;
- + case KEY_END:
- + menu_driver(curses_menu, REQ_LAST_ITEM);
- + break;
- + case 'h':
- + case '?':
- + show_help((struct menu *) item_data());
- + break;
- + }
- + if (res == 10 || res == 27 ||
- + res == 32 || res == 'n' || res == 'y' ||
- + res == KEY_LEFT || res == KEY_RIGHT ||
- + res == 'm')
- + break;
- + refresh_all_windows(main_window);
- + }
- +
- + refresh_all_windows(main_window);
- + /* if ESC or left*/
- + if (res == 27 || (menu != &rootmenu && res == KEY_LEFT))
- + break;
- +
- + /* remember location in the menu */
- + last_top_row = top_row(curses_menu);
- + current_index = curses_item_index();
- +
- + if (!item_tag())
- + continue;
- +
- + submenu = (struct menu *) item_data();
- + if (!submenu || !menu_is_visible(submenu))
- + continue;
- + sym = submenu->sym;
- +
- + switch (res) {
- + case ' ':
- + if (item_is_tag('t'))
- + sym_toggle_tristate_value(sym);
- + else if (item_is_tag('m'))
- + conf(submenu);
- + break;
- + case KEY_RIGHT:
- + case 10: /* ENTER WAS PRESSED */
- + switch (item_tag()) {
- + case 'm':
- + if (single_menu_mode)
- + submenu->data =
- + (void *) (long) !submenu->data;
- + else
- + conf(submenu);
- + break;
- + case 't':
- + if (sym_is_choice(sym) &&
- + sym_get_tristate_value(sym) == yes)
- + conf_choice(submenu);
- + else if (submenu->prompt &&
- + submenu->prompt->type == P_MENU)
- + conf(submenu);
- + else if (res == 10)
- + sym_toggle_tristate_value(sym);
- + break;
- + case 's':
- + conf_string(submenu);
- + break;
- + }
- + break;
- + case 'y':
- + if (item_is_tag('t')) {
- + if (sym_set_tristate_value(sym, yes))
- + break;
- + if (sym_set_tristate_value(sym, mod))
- + btn_dialog(main_window, setmod_text, 0);
- + }
- + break;
- + case 'n':
- + if (item_is_tag('t'))
- + sym_set_tristate_value(sym, no);
- + break;
- + case 'm':
- + if (item_is_tag('t'))
- + sym_set_tristate_value(sym, mod);
- + break;
- + }
- + }
- +}
- +
- +static void conf_message_callback(const char *fmt, va_list ap)
- +{
- + char buf[1024];
- +
- + vsnprintf(buf, sizeof(buf), fmt, ap);
- + btn_dialog(main_window, buf, 1, "<OK>");
- +}
- +
- +static void show_help(struct menu *menu)
- +{
- + struct gstr help;
- +
- + if (!menu)
- + return;
- +
- + help = str_new();
- + menu_get_ext_help(menu, &help);
- + show_scroll_win(main_window, _(menu_get_prompt(menu)), str_get(&help));
- + str_free(&help);
- +}
- +
- +static void conf_choice(struct menu *menu)
- +{
- + const char *prompt = _(menu_get_prompt(menu));
- + struct menu *child = 0;
- + struct symbol *active;
- + int selected_index = 0;
- + int last_top_row = 0;
- + int res, i = 0;
- + struct match_state match_state = {
- + .in_search = 0,
- + .match_direction = MATCH_TINKER_PATTERN_DOWN,
- + .pattern = "",
- + };
- +
- + active = sym_get_choice_value(menu->sym);
- + /* this is mostly duplicated from the conf() function. */
- + while (!global_exit) {
- + reset_menu();
- +
- + for (i = 0, child = menu->list; child; child = child->next) {
- + if (!show_all_items && !menu_is_visible(child))
- + continue;
- +
- + if (child->sym == sym_get_choice_value(menu->sym))
- + item_make(child, ':', "<X> %s",
- + _(menu_get_prompt(child)));
- + else if (child->sym)
- + item_make(child, ':', " %s",
- + _(menu_get_prompt(child)));
- + else
- + item_make(child, ':', "*** %s ***",
- + _(menu_get_prompt(child)));
- +
- + if (child->sym == active){
- + last_top_row = top_row(curses_menu);
- + selected_index = i;
- + }
- + i++;
- + }
- + show_menu(prompt ? _(prompt) : _("Choice Menu"),
- + _(radiolist_instructions),
- + selected_index,
- + &last_top_row);
- + while (!global_exit) {
- + if (match_state.in_search) {
- + mvprintw(0, 0, "searching: %s",
- + match_state.pattern);
- + clrtoeol();
- + }
- + refresh_all_windows(main_window);
- + res = wgetch(menu_win(curses_menu));
- + if (!res)
- + break;
- + if (do_match(res, &match_state, &selected_index) == 0) {
- + if (selected_index != -1)
- + center_item(selected_index,
- + &last_top_row);
- + continue;
- + }
- + if (process_special_keys(
- + &res,
- + (struct menu *) item_data()))
- + break;
- + switch (res) {
- + case KEY_DOWN:
- + menu_driver(curses_menu, REQ_DOWN_ITEM);
- + break;
- + case KEY_UP:
- + menu_driver(curses_menu, REQ_UP_ITEM);
- + break;
- + case KEY_NPAGE:
- + menu_driver(curses_menu, REQ_SCR_DPAGE);
- + break;
- + case KEY_PPAGE:
- + menu_driver(curses_menu, REQ_SCR_UPAGE);
- + break;
- + case KEY_HOME:
- + menu_driver(curses_menu, REQ_FIRST_ITEM);
- + break;
- + case KEY_END:
- + menu_driver(curses_menu, REQ_LAST_ITEM);
- + break;
- + case 'h':
- + case '?':
- + show_help((struct menu *) item_data());
- + break;
- + }
- + if (res == 10 || res == 27 || res == ' ' ||
- + res == KEY_LEFT){
- + break;
- + }
- + refresh_all_windows(main_window);
- + }
- + /* if ESC or left */
- + if (res == 27 || res == KEY_LEFT)
- + break;
- +
- + child = item_data();
- + if (!child || !menu_is_visible(child) || !child->sym)
- + continue;
- + switch (res) {
- + case ' ':
- + case 10:
- + case KEY_RIGHT:
- + sym_set_tristate_value(child->sym, yes);
- + return;
- + case 'h':
- + case '?':
- + show_help(child);
- + active = child->sym;
- + break;
- + case KEY_EXIT:
- + return;
- + }
- + }
- +}
- +
- +static void conf_string(struct menu *menu)
- +{
- + const char *prompt = menu_get_prompt(menu);
- +
- + while (1) {
- + int res;
- + const char *heading;
- +
- + switch (sym_get_type(menu->sym)) {
- + case S_INT:
- + heading = _(inputbox_instructions_int);
- + break;
- + case S_HEX:
- + heading = _(inputbox_instructions_hex);
- + break;
- + case S_STRING:
- + heading = _(inputbox_instructions_string);
- + break;
- + default:
- + heading = _("Internal nconf error!");
- + }
- + res = dialog_inputbox(main_window,
- + prompt ? _(prompt) : _("Main Menu"),
- + heading,
- + sym_get_string_value(menu->sym),
- + &dialog_input_result,
- + &dialog_input_result_len);
- + switch (res) {
- + case 0:
- + if (sym_set_string_value(menu->sym,
- + dialog_input_result))
- + return;
- + btn_dialog(main_window,
- + _("You have made an invalid entry."), 0);
- + break;
- + case 1:
- + show_help(menu);
- + break;
- + case KEY_EXIT:
- + return;
- + }
- + }
- +}
- +
- +static void conf_load(void)
- +{
- + while (1) {
- + int res;
- + res = dialog_inputbox(main_window,
- + NULL, load_config_text,
- + filename,
- + &dialog_input_result,
- + &dialog_input_result_len);
- + switch (res) {
- + case 0:
- + if (!dialog_input_result[0])
- + return;
- + if (!conf_read(dialog_input_result)) {
- + set_config_filename(dialog_input_result);
- + sym_set_change_count(1);
- + return;
- + }
- + btn_dialog(main_window, _("File does not exist!"), 0);
- + break;
- + case 1:
- + show_scroll_win(main_window,
- + _("Load Alternate Configuration"),
- + load_config_help);
- + break;
- + case KEY_EXIT:
- + return;
- + }
- + }
- +}
- +
- +static void conf_save(void)
- +{
- + while (1) {
- + int res;
- + res = dialog_inputbox(main_window,
- + NULL, save_config_text,
- + filename,
- + &dialog_input_result,
- + &dialog_input_result_len);
- + switch (res) {
- + case 0:
- + if (!dialog_input_result[0])
- + return;
- + res = conf_write(dialog_input_result);
- + if (!res) {
- + set_config_filename(dialog_input_result);
- + return;
- + }
- + btn_dialog(main_window, _("Can't create file! "
- + "Probably a nonexistent directory."),
- + 1, "<OK>");
- + break;
- + case 1:
- + show_scroll_win(main_window,
- + _("Save Alternate Configuration"),
- + save_config_help);
- + break;
- + case KEY_EXIT:
- + return;
- + }
- + }
- +}
- +
- +void setup_windows(void)
- +{
- + int lines, columns;
- +
- + getmaxyx(stdscr, lines, columns);
- +
- + if (main_window != NULL)
- + delwin(main_window);
- +
- + /* set up the menu and menu window */
- + main_window = newwin(lines-2, columns-2, 2, 1);
- + keypad(main_window, TRUE);
- + mwin_max_lines = lines-7;
- + mwin_max_cols = columns-6;
- +
- + /* panels order is from bottom to top */
- + new_panel(main_window);
- +}
- +
- +int main(int ac, char **av)
- +{
- + int lines, columns;
- + char *mode;
- +
- + setlocale(LC_ALL, "");
- + bindtextdomain(PACKAGE, LOCALEDIR);
- + textdomain(PACKAGE);
- +
- + conf_parse(av[1]);
- + conf_read(NULL);
- +
- + mode = getenv("NCONFIG_MODE");
- + if (mode) {
- + if (!strcasecmp(mode, "single_menu"))
- + single_menu_mode = 1;
- + }
- +
- + /* Initialize curses */
- + initscr();
- + /* set color theme */
- + set_colors();
- +
- + cbreak();
- + noecho();
- + keypad(stdscr, TRUE);
- + curs_set(0);
- +
- + getmaxyx(stdscr, lines, columns);
- + if (columns < 75 || lines < 20) {
- + endwin();
- + printf("Your terminal should have at "
- + "least 20 lines and 75 columns\n");
- + return 1;
- + }
- +
- + notimeout(stdscr, FALSE);
- +#if NCURSES_REENTRANT
- + set_escdelay(1);
- +#else
- + ESCDELAY = 1;
- +#endif
- +
- + /* set btns menu */
- + curses_menu = new_menu(curses_menu_items);
- + menu_opts_off(curses_menu, O_SHOWDESC);
- + menu_opts_on(curses_menu, O_SHOWMATCH);
- + menu_opts_on(curses_menu, O_ONEVALUE);
- + menu_opts_on(curses_menu, O_NONCYCLIC);
- + menu_opts_on(curses_menu, O_IGNORECASE);
- + set_menu_mark(curses_menu, " ");
- + set_menu_fore(curses_menu, attributes[MAIN_MENU_FORE]);
- + set_menu_back(curses_menu, attributes[MAIN_MENU_BACK]);
- + set_menu_grey(curses_menu, attributes[MAIN_MENU_GREY]);
- +
- + set_config_filename(conf_get_configname());
- + setup_windows();
- +
- + /* check for KEY_FUNC(1) */
- + if (has_key(KEY_F(1)) == FALSE) {
- + show_scroll_win(main_window,
- + _("Instructions"),
- + _(menu_no_f_instructions));
- + }
- +
- + conf_set_message_callback(conf_message_callback);
- + /* do the work */
- + while (!global_exit) {
- + conf(&rootmenu);
- + if (!global_exit && do_exit() == 0)
- + break;
- + }
- + /* ok, we are done */
- + unpost_menu(curses_menu);
- + free_menu(curses_menu);
- + delwin(main_window);
- + clear();
- + refresh();
- + endwin();
- + return 0;
- +}
- +
- diff -Nur uClibc-0.9.33.2/extra/config/nconf.gui.c uClibc/extra/config/nconf.gui.c
- --- uClibc-0.9.33.2/extra/config/nconf.gui.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/config/nconf.gui.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,656 @@
- +/*
- + * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?
- + * Released under the terms of the GNU GPL v2.0.
- + *
- + * Derived from menuconfig.
- + *
- + */
- +#include "nconf.h"
- +
- +/* a list of all the different widgets we use */
- +attributes_t attributes[ATTR_MAX+1] = {0};
- +
- +/* available colors:
- + COLOR_BLACK 0
- + COLOR_RED 1
- + COLOR_GREEN 2
- + COLOR_YELLOW 3
- + COLOR_BLUE 4
- + COLOR_MAGENTA 5
- + COLOR_CYAN 6
- + COLOR_WHITE 7
- + */
- +static void set_normal_colors(void)
- +{
- + init_pair(NORMAL, -1, -1);
- + init_pair(MAIN_HEADING, COLOR_MAGENTA, -1);
- +
- + /* FORE is for the selected item */
- + init_pair(MAIN_MENU_FORE, -1, -1);
- + /* BACK for all the rest */
- + init_pair(MAIN_MENU_BACK, -1, -1);
- + init_pair(MAIN_MENU_GREY, -1, -1);
- + init_pair(MAIN_MENU_HEADING, COLOR_GREEN, -1);
- + init_pair(MAIN_MENU_BOX, COLOR_YELLOW, -1);
- +
- + init_pair(SCROLLWIN_TEXT, -1, -1);
- + init_pair(SCROLLWIN_HEADING, COLOR_GREEN, -1);
- + init_pair(SCROLLWIN_BOX, COLOR_YELLOW, -1);
- +
- + init_pair(DIALOG_TEXT, -1, -1);
- + init_pair(DIALOG_BOX, COLOR_YELLOW, -1);
- + init_pair(DIALOG_MENU_BACK, COLOR_YELLOW, -1);
- + init_pair(DIALOG_MENU_FORE, COLOR_RED, -1);
- +
- + init_pair(INPUT_BOX, COLOR_YELLOW, -1);
- + init_pair(INPUT_HEADING, COLOR_GREEN, -1);
- + init_pair(INPUT_TEXT, -1, -1);
- + init_pair(INPUT_FIELD, -1, -1);
- +
- + init_pair(FUNCTION_HIGHLIGHT, -1, -1);
- + init_pair(FUNCTION_TEXT, COLOR_YELLOW, -1);
- +}
- +
- +/* available attributes:
- + A_NORMAL Normal display (no highlight)
- + A_STANDOUT Best highlighting mode of the terminal.
- + A_UNDERLINE Underlining
- + A_REVERSE Reverse video
- + A_BLINK Blinking
- + A_DIM Half bright
- + A_BOLD Extra bright or bold
- + A_PROTECT Protected mode
- + A_INVIS Invisible or blank mode
- + A_ALTCHARSET Alternate character set
- + A_CHARTEXT Bit-mask to extract a character
- + COLOR_PAIR(n) Color-pair number n
- + */
- +static void normal_color_theme(void)
- +{
- + /* automatically add color... */
- +#define mkattr(name, attr) do { \
- +attributes[name] = attr | COLOR_PAIR(name); } while (0)
- + mkattr(NORMAL, NORMAL);
- + mkattr(MAIN_HEADING, A_BOLD | A_UNDERLINE);
- +
- + mkattr(MAIN_MENU_FORE, A_REVERSE);
- + mkattr(MAIN_MENU_BACK, A_NORMAL);
- + mkattr(MAIN_MENU_GREY, A_NORMAL);
- + mkattr(MAIN_MENU_HEADING, A_BOLD);
- + mkattr(MAIN_MENU_BOX, A_NORMAL);
- +
- + mkattr(SCROLLWIN_TEXT, A_NORMAL);
- + mkattr(SCROLLWIN_HEADING, A_BOLD);
- + mkattr(SCROLLWIN_BOX, A_BOLD);
- +
- + mkattr(DIALOG_TEXT, A_BOLD);
- + mkattr(DIALOG_BOX, A_BOLD);
- + mkattr(DIALOG_MENU_FORE, A_STANDOUT);
- + mkattr(DIALOG_MENU_BACK, A_NORMAL);
- +
- + mkattr(INPUT_BOX, A_NORMAL);
- + mkattr(INPUT_HEADING, A_BOLD);
- + mkattr(INPUT_TEXT, A_NORMAL);
- + mkattr(INPUT_FIELD, A_UNDERLINE);
- +
- + mkattr(FUNCTION_HIGHLIGHT, A_BOLD);
- + mkattr(FUNCTION_TEXT, A_REVERSE);
- +}
- +
- +static void no_colors_theme(void)
- +{
- + /* automatically add highlight, no color */
- +#define mkattrn(name, attr) { attributes[name] = attr; }
- +
- + mkattrn(NORMAL, NORMAL);
- + mkattrn(MAIN_HEADING, A_BOLD | A_UNDERLINE);
- +
- + mkattrn(MAIN_MENU_FORE, A_STANDOUT);
- + mkattrn(MAIN_MENU_BACK, A_NORMAL);
- + mkattrn(MAIN_MENU_GREY, A_NORMAL);
- + mkattrn(MAIN_MENU_HEADING, A_BOLD);
- + mkattrn(MAIN_MENU_BOX, A_NORMAL);
- +
- + mkattrn(SCROLLWIN_TEXT, A_NORMAL);
- + mkattrn(SCROLLWIN_HEADING, A_BOLD);
- + mkattrn(SCROLLWIN_BOX, A_BOLD);
- +
- + mkattrn(DIALOG_TEXT, A_NORMAL);
- + mkattrn(DIALOG_BOX, A_BOLD);
- + mkattrn(DIALOG_MENU_FORE, A_STANDOUT);
- + mkattrn(DIALOG_MENU_BACK, A_NORMAL);
- +
- + mkattrn(INPUT_BOX, A_BOLD);
- + mkattrn(INPUT_HEADING, A_BOLD);
- + mkattrn(INPUT_TEXT, A_NORMAL);
- + mkattrn(INPUT_FIELD, A_UNDERLINE);
- +
- + mkattrn(FUNCTION_HIGHLIGHT, A_BOLD);
- + mkattrn(FUNCTION_TEXT, A_REVERSE);
- +}
- +
- +void set_colors()
- +{
- + start_color();
- + use_default_colors();
- + set_normal_colors();
- + if (has_colors()) {
- + normal_color_theme();
- + } else {
- + /* give defaults */
- + no_colors_theme();
- + }
- +}
- +
- +
- +/* this changes the windows attributes !!! */
- +void print_in_middle(WINDOW *win,
- + int starty,
- + int startx,
- + int width,
- + const char *string,
- + chtype color)
- +{ int length, x, y;
- + float temp;
- +
- +
- + if (win == NULL)
- + win = stdscr;
- + getyx(win, y, x);
- + if (startx != 0)
- + x = startx;
- + if (starty != 0)
- + y = starty;
- + if (width == 0)
- + width = 80;
- +
- + length = strlen(string);
- + temp = (width - length) / 2;
- + x = startx + (int)temp;
- + (void) wattrset(win, color);
- + mvwprintw(win, y, x, "%s", string);
- + refresh();
- +}
- +
- +int get_line_no(const char *text)
- +{
- + int i;
- + int total = 1;
- +
- + if (!text)
- + return 0;
- +
- + for (i = 0; text[i] != '\0'; i++)
- + if (text[i] == '\n')
- + total++;
- + return total;
- +}
- +
- +const char *get_line(const char *text, int line_no)
- +{
- + int i;
- + int lines = 0;
- +
- + if (!text)
- + return 0;
- +
- + for (i = 0; text[i] != '\0' && lines < line_no; i++)
- + if (text[i] == '\n')
- + lines++;
- + return text+i;
- +}
- +
- +int get_line_length(const char *line)
- +{
- + int res = 0;
- + while (*line != '\0' && *line != '\n') {
- + line++;
- + res++;
- + }
- + return res;
- +}
- +
- +/* print all lines to the window. */
- +void fill_window(WINDOW *win, const char *text)
- +{
- + int x, y;
- + int total_lines = get_line_no(text);
- + int i;
- +
- + getmaxyx(win, y, x);
- + /* do not go over end of line */
- + total_lines = min(total_lines, y);
- + for (i = 0; i < total_lines; i++) {
- + char tmp[x+10];
- + const char *line = get_line(text, i);
- + int len = get_line_length(line);
- + strncpy(tmp, line, min(len, x));
- + tmp[len] = '\0';
- + mvwprintw(win, i, 0, "%s", tmp);
- + }
- +}
- +
- +/* get the message, and buttons.
- + * each button must be a char*
- + * return the selected button
- + *
- + * this dialog is used for 2 different things:
- + * 1) show a text box, no buttons.
- + * 2) show a dialog, with horizontal buttons
- + */
- +int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...)
- +{
- + va_list ap;
- + char *btn;
- + int btns_width = 0;
- + int msg_lines = 0;
- + int msg_width = 0;
- + int total_width;
- + int win_rows = 0;
- + WINDOW *win;
- + WINDOW *msg_win;
- + WINDOW *menu_win;
- + MENU *menu;
- + ITEM *btns[btn_num+1];
- + int i, x, y;
- + int res = -1;
- +
- +
- + va_start(ap, btn_num);
- + for (i = 0; i < btn_num; i++) {
- + btn = va_arg(ap, char *);
- + btns[i] = new_item(btn, "");
- + btns_width += strlen(btn)+1;
- + }
- + va_end(ap);
- + btns[btn_num] = NULL;
- +
- + /* find the widest line of msg: */
- + msg_lines = get_line_no(msg);
- + for (i = 0; i < msg_lines; i++) {
- + const char *line = get_line(msg, i);
- + int len = get_line_length(line);
- + if (msg_width < len)
- + msg_width = len;
- + }
- +
- + total_width = max(msg_width, btns_width);
- + /* place dialog in middle of screen */
- + y = (getmaxy(stdscr)-(msg_lines+4))/2;
- + x = (getmaxx(stdscr)-(total_width+4))/2;
- +
- +
- + /* create the windows */
- + if (btn_num > 0)
- + win_rows = msg_lines+4;
- + else
- + win_rows = msg_lines+2;
- +
- + win = newwin(win_rows, total_width+4, y, x);
- + keypad(win, TRUE);
- + menu_win = derwin(win, 1, btns_width, win_rows-2,
- + 1+(total_width+2-btns_width)/2);
- + menu = new_menu(btns);
- + msg_win = derwin(win, win_rows-2, msg_width, 1,
- + 1+(total_width+2-msg_width)/2);
- +
- + set_menu_fore(menu, attributes[DIALOG_MENU_FORE]);
- + set_menu_back(menu, attributes[DIALOG_MENU_BACK]);
- +
- + (void) wattrset(win, attributes[DIALOG_BOX]);
- + box(win, 0, 0);
- +
- + /* print message */
- + (void) wattrset(msg_win, attributes[DIALOG_TEXT]);
- + fill_window(msg_win, msg);
- +
- + set_menu_win(menu, win);
- + set_menu_sub(menu, menu_win);
- + set_menu_format(menu, 1, btn_num);
- + menu_opts_off(menu, O_SHOWDESC);
- + menu_opts_off(menu, O_SHOWMATCH);
- + menu_opts_on(menu, O_ONEVALUE);
- + menu_opts_on(menu, O_NONCYCLIC);
- + set_menu_mark(menu, "");
- + post_menu(menu);
- +
- +
- + touchwin(win);
- + refresh_all_windows(main_window);
- + while ((res = wgetch(win))) {
- + switch (res) {
- + case KEY_LEFT:
- + menu_driver(menu, REQ_LEFT_ITEM);
- + break;
- + case KEY_RIGHT:
- + menu_driver(menu, REQ_RIGHT_ITEM);
- + break;
- + case 10: /* ENTER */
- + case 27: /* ESCAPE */
- + case ' ':
- + case KEY_F(F_BACK):
- + case KEY_F(F_EXIT):
- + break;
- + }
- + touchwin(win);
- + refresh_all_windows(main_window);
- +
- + if (res == 10 || res == ' ') {
- + res = item_index(current_item(menu));
- + break;
- + } else if (res == 27 || res == KEY_F(F_BACK) ||
- + res == KEY_F(F_EXIT)) {
- + res = KEY_EXIT;
- + break;
- + }
- + }
- +
- + unpost_menu(menu);
- + free_menu(menu);
- + for (i = 0; i < btn_num; i++)
- + free_item(btns[i]);
- +
- + delwin(win);
- + return res;
- +}
- +
- +int dialog_inputbox(WINDOW *main_window,
- + const char *title, const char *prompt,
- + const char *init, char **resultp, int *result_len)
- +{
- + int prompt_lines = 0;
- + int prompt_width = 0;
- + WINDOW *win;
- + WINDOW *prompt_win;
- + WINDOW *form_win;
- + PANEL *panel;
- + int i, x, y;
- + int res = -1;
- + int cursor_position = strlen(init);
- + int cursor_form_win;
- + char *result = *resultp;
- +
- + if (strlen(init)+1 > *result_len) {
- + *result_len = strlen(init)+1;
- + *resultp = result = realloc(result, *result_len);
- + }
- +
- + /* find the widest line of msg: */
- + prompt_lines = get_line_no(prompt);
- + for (i = 0; i < prompt_lines; i++) {
- + const char *line = get_line(prompt, i);
- + int len = get_line_length(line);
- + prompt_width = max(prompt_width, len);
- + }
- +
- + if (title)
- + prompt_width = max(prompt_width, strlen(title));
- +
- + /* place dialog in middle of screen */
- + y = (getmaxy(stdscr)-(prompt_lines+4))/2;
- + x = (getmaxx(stdscr)-(prompt_width+4))/2;
- +
- + strncpy(result, init, *result_len);
- +
- + /* create the windows */
- + win = newwin(prompt_lines+6, prompt_width+7, y, x);
- + prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2);
- + form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2);
- + keypad(form_win, TRUE);
- +
- + (void) wattrset(form_win, attributes[INPUT_FIELD]);
- +
- + (void) wattrset(win, attributes[INPUT_BOX]);
- + box(win, 0, 0);
- + (void) wattrset(win, attributes[INPUT_HEADING]);
- + if (title)
- + mvwprintw(win, 0, 3, "%s", title);
- +
- + /* print message */
- + (void) wattrset(prompt_win, attributes[INPUT_TEXT]);
- + fill_window(prompt_win, prompt);
- +
- + mvwprintw(form_win, 0, 0, "%*s", prompt_width, " ");
- + cursor_form_win = min(cursor_position, prompt_width-1);
- + mvwprintw(form_win, 0, 0, "%s",
- + result + cursor_position-cursor_form_win);
- +
- + /* create panels */
- + panel = new_panel(win);
- +
- + /* show the cursor */
- + curs_set(1);
- +
- + touchwin(win);
- + refresh_all_windows(main_window);
- + while ((res = wgetch(form_win))) {
- + int len = strlen(result);
- + switch (res) {
- + case 10: /* ENTER */
- + case 27: /* ESCAPE */
- + case KEY_F(F_HELP):
- + case KEY_F(F_EXIT):
- + case KEY_F(F_BACK):
- + break;
- + case 127:
- + case KEY_BACKSPACE:
- + if (cursor_position > 0) {
- + memmove(&result[cursor_position-1],
- + &result[cursor_position],
- + len-cursor_position+1);
- + cursor_position--;
- + cursor_form_win--;
- + len--;
- + }
- + break;
- + case KEY_DC:
- + if (cursor_position >= 0 && cursor_position < len) {
- + memmove(&result[cursor_position],
- + &result[cursor_position+1],
- + len-cursor_position+1);
- + len--;
- + }
- + break;
- + case KEY_UP:
- + case KEY_RIGHT:
- + if (cursor_position < len) {
- + cursor_position++;
- + cursor_form_win++;
- + }
- + break;
- + case KEY_DOWN:
- + case KEY_LEFT:
- + if (cursor_position > 0) {
- + cursor_position--;
- + cursor_form_win--;
- + }
- + break;
- + case KEY_HOME:
- + cursor_position = 0;
- + cursor_form_win = 0;
- + break;
- + case KEY_END:
- + cursor_position = len;
- + cursor_form_win = min(cursor_position, prompt_width-1);
- + break;
- + default:
- + if ((isgraph(res) || isspace(res))) {
- + /* one for new char, one for '\0' */
- + if (len+2 > *result_len) {
- + *result_len = len+2;
- + *resultp = result = realloc(result,
- + *result_len);
- + }
- + /* insert the char at the proper position */
- + memmove(&result[cursor_position+1],
- + &result[cursor_position],
- + len-cursor_position+1);
- + result[cursor_position] = res;
- + cursor_position++;
- + cursor_form_win++;
- + len++;
- + } else {
- + mvprintw(0, 0, "unknown key: %d\n", res);
- + }
- + break;
- + }
- + if (cursor_form_win < 0)
- + cursor_form_win = 0;
- + else if (cursor_form_win > prompt_width-1)
- + cursor_form_win = prompt_width-1;
- +
- + wmove(form_win, 0, 0);
- + wclrtoeol(form_win);
- + mvwprintw(form_win, 0, 0, "%*s", prompt_width, " ");
- + mvwprintw(form_win, 0, 0, "%s",
- + result + cursor_position-cursor_form_win);
- + wmove(form_win, 0, cursor_form_win);
- + touchwin(win);
- + refresh_all_windows(main_window);
- +
- + if (res == 10) {
- + res = 0;
- + break;
- + } else if (res == 27 || res == KEY_F(F_BACK) ||
- + res == KEY_F(F_EXIT)) {
- + res = KEY_EXIT;
- + break;
- + } else if (res == KEY_F(F_HELP)) {
- + res = 1;
- + break;
- + }
- + }
- +
- + /* hide the cursor */
- + curs_set(0);
- + del_panel(panel);
- + delwin(prompt_win);
- + delwin(form_win);
- + delwin(win);
- + return res;
- +}
- +
- +/* refresh all windows in the correct order */
- +void refresh_all_windows(WINDOW *main_window)
- +{
- + update_panels();
- + touchwin(main_window);
- + refresh();
- +}
- +
- +/* layman's scrollable window... */
- +void show_scroll_win(WINDOW *main_window,
- + const char *title,
- + const char *text)
- +{
- + int res;
- + int total_lines = get_line_no(text);
- + int x, y, lines, columns;
- + int start_x = 0, start_y = 0;
- + int text_lines = 0, text_cols = 0;
- + int total_cols = 0;
- + int win_cols = 0;
- + int win_lines = 0;
- + int i = 0;
- + WINDOW *win;
- + WINDOW *pad;
- + PANEL *panel;
- +
- + getmaxyx(stdscr, lines, columns);
- +
- + /* find the widest line of msg: */
- + total_lines = get_line_no(text);
- + for (i = 0; i < total_lines; i++) {
- + const char *line = get_line(text, i);
- + int len = get_line_length(line);
- + total_cols = max(total_cols, len+2);
- + }
- +
- + /* create the pad */
- + pad = newpad(total_lines+10, total_cols+10);
- + (void) wattrset(pad, attributes[SCROLLWIN_TEXT]);
- + fill_window(pad, text);
- +
- + win_lines = min(total_lines+4, lines-2);
- + win_cols = min(total_cols+2, columns-2);
- + text_lines = max(win_lines-4, 0);
- + text_cols = max(win_cols-2, 0);
- +
- + /* place window in middle of screen */
- + y = (lines-win_lines)/2;
- + x = (columns-win_cols)/2;
- +
- + win = newwin(win_lines, win_cols, y, x);
- + keypad(win, TRUE);
- + /* show the help in the help window, and show the help panel */
- + (void) wattrset(win, attributes[SCROLLWIN_BOX]);
- + box(win, 0, 0);
- + (void) wattrset(win, attributes[SCROLLWIN_HEADING]);
- + mvwprintw(win, 0, 3, " %s ", title);
- + panel = new_panel(win);
- +
- + /* handle scrolling */
- + do {
- +
- + copywin(pad, win, start_y, start_x, 2, 2, text_lines,
- + text_cols, 0);
- + print_in_middle(win,
- + text_lines+2,
- + 0,
- + text_cols,
- + "<OK>",
- + attributes[DIALOG_MENU_FORE]);
- + wrefresh(win);
- +
- + res = wgetch(win);
- + switch (res) {
- + case KEY_NPAGE:
- + case ' ':
- + case 'd':
- + start_y += text_lines-2;
- + break;
- + case KEY_PPAGE:
- + case 'u':
- + start_y -= text_lines+2;
- + break;
- + case KEY_HOME:
- + start_y = 0;
- + break;
- + case KEY_END:
- + start_y = total_lines-text_lines;
- + break;
- + case KEY_DOWN:
- + case 'j':
- + start_y++;
- + break;
- + case KEY_UP:
- + case 'k':
- + start_y--;
- + break;
- + case KEY_LEFT:
- + case 'h':
- + start_x--;
- + break;
- + case KEY_RIGHT:
- + case 'l':
- + start_x++;
- + break;
- + }
- + if (res == 10 || res == 27 || res == 'q' ||
- + res == KEY_F(F_HELP) || res == KEY_F(F_BACK) ||
- + res == KEY_F(F_EXIT))
- + break;
- + if (start_y < 0)
- + start_y = 0;
- + if (start_y >= total_lines-text_lines)
- + start_y = total_lines-text_lines;
- + if (start_x < 0)
- + start_x = 0;
- + if (start_x >= total_cols-text_cols)
- + start_x = total_cols-text_cols;
- + } while (res);
- +
- + del_panel(panel);
- + delwin(win);
- + refresh_all_windows(main_window);
- +}
- diff -Nur uClibc-0.9.33.2/extra/config/nconf.h uClibc/extra/config/nconf.h
- --- uClibc-0.9.33.2/extra/config/nconf.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/config/nconf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,96 @@
- +/*
- + * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?
- + * Released under the terms of the GNU GPL v2.0.
- + *
- + * Derived from menuconfig.
- + *
- + */
- +
- +#include <ctype.h>
- +#include <errno.h>
- +#include <fcntl.h>
- +#include <limits.h>
- +#include <stdarg.h>
- +#include <stdlib.h>
- +#include <string.h>
- +#include <unistd.h>
- +#include <locale.h>
- +#include <curses.h>
- +#include <menu.h>
- +#include <panel.h>
- +#include <form.h>
- +
- +#include <stdio.h>
- +#include <time.h>
- +#include <sys/time.h>
- +
- +#include "ncurses.h"
- +
- +#define max(a, b) ({\
- + typeof(a) _a = a;\
- + typeof(b) _b = b;\
- + _a > _b ? _a : _b; })
- +
- +#define min(a, b) ({\
- + typeof(a) _a = a;\
- + typeof(b) _b = b;\
- + _a < _b ? _a : _b; })
- +
- +typedef enum {
- + NORMAL = 1,
- + MAIN_HEADING,
- + MAIN_MENU_BOX,
- + MAIN_MENU_FORE,
- + MAIN_MENU_BACK,
- + MAIN_MENU_GREY,
- + MAIN_MENU_HEADING,
- + SCROLLWIN_TEXT,
- + SCROLLWIN_HEADING,
- + SCROLLWIN_BOX,
- + DIALOG_TEXT,
- + DIALOG_MENU_FORE,
- + DIALOG_MENU_BACK,
- + DIALOG_BOX,
- + INPUT_BOX,
- + INPUT_HEADING,
- + INPUT_TEXT,
- + INPUT_FIELD,
- + FUNCTION_TEXT,
- + FUNCTION_HIGHLIGHT,
- + ATTR_MAX
- +} attributes_t;
- +extern attributes_t attributes[];
- +
- +typedef enum {
- + F_HELP = 1,
- + F_SYMBOL = 2,
- + F_INSTS = 3,
- + F_CONF = 4,
- + F_BACK = 5,
- + F_SAVE = 6,
- + F_LOAD = 7,
- + F_SEARCH = 8,
- + F_EXIT = 9,
- +} function_key;
- +
- +void set_colors(void);
- +
- +/* this changes the windows attributes !!! */
- +void print_in_middle(WINDOW *win,
- + int starty,
- + int startx,
- + int width,
- + const char *string,
- + chtype color);
- +int get_line_length(const char *line);
- +int get_line_no(const char *text);
- +const char *get_line(const char *text, int line_no);
- +void fill_window(WINDOW *win, const char *text);
- +int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...);
- +int dialog_inputbox(WINDOW *main_window,
- + const char *title, const char *prompt,
- + const char *init, char **resultp, int *result_len);
- +void refresh_all_windows(WINDOW *main_window);
- +void show_scroll_win(WINDOW *main_window,
- + const char *title,
- + const char *text);
- diff -Nur uClibc-0.9.33.2/extra/config/qconf.cc uClibc/extra/config/qconf.cc
- --- uClibc-0.9.33.2/extra/config/qconf.cc 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/qconf.cc 2014-02-03 12:32:56.000000000 +0100
- @@ -3,24 +3,43 @@
- * Released under the terms of the GNU GPL v2.0.
- */
-
- -#include <qapplication.h>
- +#include <qglobal.h>
- +
- +#if QT_VERSION < 0x040000
- +#include <stddef.h>
- #include <qmainwindow.h>
- +#include <qvbox.h>
- +#include <qvaluelist.h>
- +#include <qtextbrowser.h>
- +#include <qaction.h>
- +#include <qheader.h>
- +#include <qfiledialog.h>
- +#include <qdragobject.h>
- +#include <qpopupmenu.h>
- +#else
- +#include <q3mainwindow.h>
- +#include <q3vbox.h>
- +#include <q3valuelist.h>
- +#include <q3textbrowser.h>
- +#include <q3action.h>
- +#include <q3header.h>
- +#include <q3filedialog.h>
- +#include <q3dragobject.h>
- +#include <q3popupmenu.h>
- +#endif
- +
- +#include <qapplication.h>
- +#include <qdesktopwidget.h>
- #include <qtoolbar.h>
- #include <qlayout.h>
- -#include <qvbox.h>
- #include <qsplitter.h>
- -#include <qlistview.h>
- -#include <qtextbrowser.h>
- #include <qlineedit.h>
- #include <qlabel.h>
- #include <qpushbutton.h>
- #include <qmenubar.h>
- #include <qmessagebox.h>
- -#include <qaction.h>
- -#include <qheader.h>
- -#include <qfiledialog.h>
- -#include <qdragobject.h>
- #include <qregexp.h>
- +#include <qevent.h>
-
- #include <stdlib.h>
-
- @@ -38,7 +57,7 @@
- static QApplication *configApp;
- static ConfigSettings *configSettings;
-
- -QAction *ConfigMainWindow::saveAction;
- +Q3Action *ConfigMainWindow::saveAction;
-
- static inline QString qgettext(const char* str)
- {
- @@ -53,15 +72,14 @@
- /**
- * Reads a list of integer values from the application settings.
- */
- -QValueList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
- +Q3ValueList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
- {
- - QValueList<int> result;
- + Q3ValueList<int> result;
- QStringList entryList = readListEntry(key, ok);
- - if (ok) {
- - QStringList::Iterator it;
- - for (it = entryList.begin(); it != entryList.end(); ++it)
- - result.push_back((*it).toInt());
- - }
- + QStringList::Iterator it;
- +
- + for (it = entryList.begin(); it != entryList.end(); ++it)
- + result.push_back((*it).toInt());
-
- return result;
- }
- @@ -69,10 +87,10 @@
- /**
- * Writes a list of integer values to the application settings.
- */
- -bool ConfigSettings::writeSizes(const QString& key, const QValueList<int>& value)
- +bool ConfigSettings::writeSizes(const QString& key, const Q3ValueList<int>& value)
- {
- QStringList stringList;
- - QValueList<int>::ConstIterator it;
- + Q3ValueList<int>::ConstIterator it;
-
- for (it = value.begin(); it != value.end(); ++it)
- stringList.push_back(QString::number(*it));
- @@ -80,7 +98,6 @@
- }
-
-
- -#if QT_VERSION >= 300
- /*
- * set the new data
- * TODO check the value
- @@ -91,7 +108,6 @@
- sym_set_string_value(menu->sym, text(dataColIdx).latin1());
- listView()->updateList(this);
- }
- -#endif
-
- /*
- * update the displayed of a menu entry
- @@ -148,7 +164,7 @@
- case S_TRISTATE:
- char ch;
-
- - if (!sym_is_changable(sym) && !list->showAll) {
- + if (!sym_is_changable(sym) && list->optMode == normalOpt) {
- setPixmap(promptColIdx, 0);
- setText(noColIdx, QString::null);
- setText(modColIdx, QString::null);
- @@ -195,11 +211,9 @@
-
- data = sym_get_string_value(sym);
-
- -#if QT_VERSION >= 300
- int i = list->mapIdx(dataColIdx);
- if (i >= 0)
- setRenameEnabled(i, TRUE);
- -#endif
- setText(dataColIdx, data);
- if (type == S_STRING)
- prompt = QString("%1: %2").arg(prompt).arg(data);
- @@ -297,10 +311,10 @@
- void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
- {
- switch (e->key()) {
- - case Key_Escape:
- + case Qt::Key_Escape:
- break;
- - case Key_Return:
- - case Key_Enter:
- + case Qt::Key_Return:
- + case Qt::Key_Enter:
- sym_set_string_value(item->menu->sym, text().latin1());
- parent()->updateList(item);
- break;
- @@ -319,7 +333,7 @@
- symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no),
- choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no),
- menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void),
- - showAll(false), showName(false), showRange(false), showData(false),
- + showName(false), showRange(false), showData(false), optMode(normalOpt),
- rootEntry(0), headerPopup(0)
- {
- int i;
- @@ -336,10 +350,10 @@
-
- if (name) {
- configSettings->beginGroup(name);
- - showAll = configSettings->readBoolEntry("/showAll", false);
- showName = configSettings->readBoolEntry("/showName", false);
- showRange = configSettings->readBoolEntry("/showRange", false);
- showData = configSettings->readBoolEntry("/showData", false);
- + optMode = (enum optionMode)configSettings->readNumEntry("/optionMode", false);
- configSettings->endGroup();
- connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
- }
- @@ -351,6 +365,17 @@
- reinit();
- }
-
- +bool ConfigList::menuSkip(struct menu *menu)
- +{
- + if (optMode == normalOpt && menu_is_visible(menu))
- + return false;
- + if (optMode == promptOpt && menu_has_prompt(menu))
- + return false;
- + if (optMode == allOpt)
- + return false;
- + return true;
- +}
- +
- void ConfigList::reinit(void)
- {
- removeColumn(dataColIdx);
- @@ -379,7 +404,7 @@
- configSettings->writeEntry("/showName", showName);
- configSettings->writeEntry("/showRange", showRange);
- configSettings->writeEntry("/showData", showData);
- - configSettings->writeEntry("/showAll", showAll);
- + configSettings->writeEntry("/optionMode", (int)optMode);
- configSettings->endGroup();
- }
- }
- @@ -421,7 +446,7 @@
- if (!rootEntry) {
- if (mode != listMode)
- goto update;
- - QListViewItemIterator it(this);
- + Q3ListViewItemIterator it(this);
- ConfigItem* item;
-
- for (; it.current(); ++it) {
- @@ -516,11 +541,9 @@
- case S_INT:
- case S_HEX:
- case S_STRING:
- -#if QT_VERSION >= 300
- if (colMap[dataColIdx] >= 0)
- item->startRename(colMap[dataColIdx]);
- else
- -#endif
- parent()->lineEdit->show(item);
- break;
- }
- @@ -552,7 +575,7 @@
- return;
- setRootMenu(menu_get_parent_menu(rootEntry->parent));
-
- - QListViewItemIterator it(this);
- + Q3ListViewItemIterator it(this);
- for (; (item = (ConfigItem*)it.current()); it++) {
- if (item->menu == oldroot) {
- setCurrentItem(item);
- @@ -605,7 +628,7 @@
- }
-
- visible = menu_is_visible(child);
- - if (showAll || visible) {
- + if (!menuSkip(child)) {
- if (!child->sym && !child->list && !child->prompt)
- continue;
- if (!item || item->menu != child)
- @@ -634,12 +657,12 @@
-
- void ConfigList::keyPressEvent(QKeyEvent* ev)
- {
- - QListViewItem* i = currentItem();
- + Q3ListViewItem* i = currentItem();
- ConfigItem* item;
- struct menu *menu;
- enum prop_type type;
-
- - if (ev->key() == Key_Escape && mode != fullMode && mode != listMode) {
- + if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) {
- emit parentSelected();
- ev->accept();
- return;
- @@ -652,8 +675,8 @@
- item = (ConfigItem*)i;
-
- switch (ev->key()) {
- - case Key_Return:
- - case Key_Enter:
- + case Qt::Key_Return:
- + case Qt::Key_Enter:
- if (item->goParent) {
- emit parentSelected();
- break;
- @@ -667,16 +690,16 @@
- emit menuSelected(menu);
- break;
- }
- - case Key_Space:
- + case Qt::Key_Space:
- changeValue(item);
- break;
- - case Key_N:
- + case Qt::Key_N:
- setValue(item, no);
- break;
- - case Key_M:
- + case Qt::Key_M:
- setValue(item, mod);
- break;
- - case Key_Y:
- + case Qt::Key_Y:
- setValue(item, yes);
- break;
- default:
- @@ -800,10 +823,10 @@
- {
- if (e->y() <= header()->geometry().bottom()) {
- if (!headerPopup) {
- - QAction *action;
- + Q3Action *action;
-
- - headerPopup = new QPopupMenu(this);
- - action = new QAction(NULL, _("Show Name"), 0, this);
- + headerPopup = new Q3PopupMenu(this);
- + action = new Q3Action(NULL, _("Show Name"), 0, this);
- action->setToggleAction(TRUE);
- connect(action, SIGNAL(toggled(bool)),
- parent(), SLOT(setShowName(bool)));
- @@ -811,7 +834,7 @@
- action, SLOT(setOn(bool)));
- action->setOn(showName);
- action->addTo(headerPopup);
- - action = new QAction(NULL, _("Show Range"), 0, this);
- + action = new Q3Action(NULL, _("Show Range"), 0, this);
- action->setToggleAction(TRUE);
- connect(action, SIGNAL(toggled(bool)),
- parent(), SLOT(setShowRange(bool)));
- @@ -819,7 +842,7 @@
- action, SLOT(setOn(bool)));
- action->setOn(showRange);
- action->addTo(headerPopup);
- - action = new QAction(NULL, _("Show Data"), 0, this);
- + action = new Q3Action(NULL, _("Show Data"), 0, this);
- action->setToggleAction(TRUE);
- connect(action, SIGNAL(toggled(bool)),
- parent(), SLOT(setShowData(bool)));
- @@ -834,7 +857,10 @@
- e->ignore();
- }
-
- -ConfigView* ConfigView::viewList;
- +ConfigView*ConfigView::viewList;
- +QAction *ConfigView::showNormalAction;
- +QAction *ConfigView::showAllAction;
- +QAction *ConfigView::showPromptAction;
-
- ConfigView::ConfigView(QWidget* parent, const char *name)
- : Parent(parent, name)
- @@ -859,13 +885,16 @@
- }
- }
-
- -void ConfigView::setShowAll(bool b)
- +void ConfigView::setOptionMode(QAction *act)
- {
- - if (list->showAll != b) {
- - list->showAll = b;
- - list->updateListAll();
- - emit showAllChanged(b);
- - }
- + if (act == showNormalAction)
- + list->optMode = normalOpt;
- + else if (act == showAllAction)
- + list->optMode = allOpt;
- + else
- + list->optMode = promptOpt;
- +
- + list->updateListAll();
- }
-
- void ConfigView::setShowName(bool b)
- @@ -897,7 +926,7 @@
-
- void ConfigList::setAllOpen(bool open)
- {
- - QListViewItemIterator it(this);
- + Q3ListViewItemIterator it(this);
-
- for (; it.current(); it++)
- it.current()->setOpen(open);
- @@ -920,7 +949,7 @@
- }
-
- ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
- - : Parent(parent, name), menu(0), sym(0)
- + : Parent(parent, name), sym(0), _menu(0)
- {
- if (name) {
- configSettings->beginGroup(name);
- @@ -943,7 +972,7 @@
- {
- if (_showDebug != b) {
- _showDebug = b;
- - if (menu)
- + if (_menu)
- menuInfo();
- else if (sym)
- symbolInfo();
- @@ -953,44 +982,16 @@
-
- void ConfigInfoView::setInfo(struct menu *m)
- {
- - if (menu == m)
- + if (_menu == m)
- return;
- - menu = m;
- + _menu = m;
- sym = NULL;
- - if (!menu)
- + if (!_menu)
- clear();
- else
- menuInfo();
- }
-
- -void ConfigInfoView::setSource(const QString& name)
- -{
- - const char *p = name.latin1();
- -
- - menu = NULL;
- - sym = NULL;
- -
- - switch (p[0]) {
- - case 'm':
- - struct menu *m;
- -
- - if (sscanf(p, "m%p", &m) == 1 && menu != m) {
- - menu = m;
- - menuInfo();
- - emit menuSelected(menu);
- - }
- - break;
- - case 's':
- - struct symbol *s;
- -
- - if (sscanf(p, "s%p", &s) == 1 && sym != s) {
- - sym = s;
- - symbolInfo();
- - }
- - break;
- - }
- -}
- -
- void ConfigInfoView::symbolInfo(void)
- {
- QString str;
- @@ -1012,11 +1013,11 @@
- struct symbol* sym;
- QString head, debug, help;
-
- - sym = menu->sym;
- + sym = _menu->sym;
- if (sym) {
- - if (menu->prompt) {
- + if (_menu->prompt) {
- head += "<big><b>";
- - head += print_filter(_(menu->prompt->text));
- + head += print_filter(_(_menu->prompt->text));
- head += "</b></big>";
- if (sym->name) {
- head += " (";
- @@ -1041,26 +1042,24 @@
- if (showDebug())
- debug = debug_info(sym);
-
- - help = menu_get_help(menu);
- - /* Gettextize if the help text not empty */
- - if (help.isEmpty())
- - help = print_filter(menu_get_help(menu));
- - else
- - help = print_filter(_(menu_get_help(menu)));
- - } else if (menu->prompt) {
- + struct gstr help_gstr = str_new();
- + menu_get_ext_help(_menu, &help_gstr);
- + help = print_filter(str_get(&help_gstr));
- + str_free(&help_gstr);
- + } else if (_menu->prompt) {
- head += "<big><b>";
- - head += print_filter(_(menu->prompt->text));
- + head += print_filter(_(_menu->prompt->text));
- head += "</b></big><br><br>";
- if (showDebug()) {
- - if (menu->prompt->visible.expr) {
- + if (_menu->prompt->visible.expr) {
- debug += " dep: ";
- - expr_print(menu->prompt->visible.expr, expr_print_help, &debug, E_NONE);
- + expr_print(_menu->prompt->visible.expr, expr_print_help, &debug, E_NONE);
- debug += "<br><br>";
- }
- }
- }
- if (showDebug())
- - debug += QString().sprintf("defined at %s:%d<br><br>", menu->file->name, menu->lineno);
- + debug += QString().sprintf("defined at %s:%d<br><br>", _menu->file->name, _menu->lineno);
-
- setText(head + debug + help);
- }
- @@ -1163,10 +1162,10 @@
- *text += str2;
- }
-
- -QPopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos)
- +Q3PopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos)
- {
- - QPopupMenu* popup = Parent::createPopupMenu(pos);
- - QAction* action = new QAction(NULL, _("Show Debug Info"), 0, popup);
- + Q3PopupMenu* popup = Parent::createPopupMenu(pos);
- + Q3Action* action = new Q3Action(NULL, _("Show Debug Info"), 0, popup);
- action->setToggleAction(TRUE);
- connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
- connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
- @@ -1199,7 +1198,7 @@
- layout1->addLayout(layout2);
-
- split = new QSplitter(this);
- - split->setOrientation(QSplitter::Vertical);
- + split->setOrientation(Qt::Vertical);
- list = new ConfigView(split, name);
- list->list->mode = listMode;
- info = new ConfigInfoView(split, name);
- @@ -1223,7 +1222,7 @@
- y = configSettings->readNumEntry("/window y", 0, &ok);
- if (ok)
- move(x, y);
- - QValueList<int> sizes = configSettings->readSizes("/split", &ok);
- + Q3ValueList<int> sizes = configSettings->readSizes("/split", &ok);
- if (ok)
- split->setSizes(sizes);
- configSettings->endGroup();
- @@ -1275,9 +1274,15 @@
- int x, y, width, height;
- char title[256];
-
- - QWidget *d = configApp->desktop();
- - snprintf(title, sizeof(title), _("uClibc v%s Configuration"),
- - getenv("VERSION"));
- + QDesktopWidget *d = configApp->desktop();
- + snprintf(title, sizeof(title), "%s%s",
- + rootmenu.prompt->text,
- +#if QT_VERSION < 0x040000
- + " (Qt3)"
- +#else
- + ""
- +#endif
- + );
- setCaption(title);
-
- width = configSettings->readNumEntry("/window width", d->width() - 64);
- @@ -1290,14 +1295,14 @@
- move(x, y);
-
- split1 = new QSplitter(this);
- - split1->setOrientation(QSplitter::Horizontal);
- + split1->setOrientation(Qt::Horizontal);
- setCentralWidget(split1);
-
- menuView = new ConfigView(split1, "menu");
- menuList = menuView->list;
-
- split2 = new QSplitter(split1);
- - split2->setOrientation(QSplitter::Vertical);
- + split2->setOrientation(Qt::Vertical);
-
- // create config tree
- configView = new ConfigView(split2, "config");
- @@ -1310,60 +1315,79 @@
- configList->setFocus();
-
- menu = menuBar();
- - toolBar = new QToolBar("Tools", this);
- + toolBar = new Q3ToolBar("Tools", this);
-
- - backAction = new QAction("Back", QPixmap(xpm_back), _("Back"), 0, this);
- + backAction = new Q3Action("Back", QPixmap(xpm_back), _("Back"), 0, this);
- connect(backAction, SIGNAL(activated()), SLOT(goBack()));
- backAction->setEnabled(FALSE);
- - QAction *quitAction = new QAction("Quit", _("&Quit"), CTRL+Key_Q, this);
- + Q3Action *quitAction = new Q3Action("Quit", _("&Quit"), Qt::CTRL + Qt::Key_Q, this);
- connect(quitAction, SIGNAL(activated()), SLOT(close()));
- - QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), CTRL+Key_L, this);
- + Q3Action *loadAction = new Q3Action("Load", QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this);
- connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
- - saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), CTRL+Key_S, this);
- + saveAction = new Q3Action("Save", QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this);
- connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
- conf_set_changed_callback(conf_changed);
- // Set saveAction's initial state
- conf_changed();
- - QAction *saveAsAction = new QAction("Save As...", _("Save &As..."), 0, this);
- + Q3Action *saveAsAction = new Q3Action("Save As...", _("Save &As..."), 0, this);
- connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
- - QAction *searchAction = new QAction("Find", _("&Find"), CTRL+Key_F, this);
- + Q3Action *searchAction = new Q3Action("Find", _("&Find"), Qt::CTRL + Qt::Key_F, this);
- connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
- - QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this);
- + Q3Action *singleViewAction = new Q3Action("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this);
- connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
- - QAction *splitViewAction = new QAction("Split View", QPixmap(xpm_split_view), _("Split View"), 0, this);
- + Q3Action *splitViewAction = new Q3Action("Split View", QPixmap(xpm_split_view), _("Split View"), 0, this);
- connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView()));
- - QAction *fullViewAction = new QAction("Full View", QPixmap(xpm_tree_view), _("Full View"), 0, this);
- + Q3Action *fullViewAction = new Q3Action("Full View", QPixmap(xpm_tree_view), _("Full View"), 0, this);
- connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
-
- - QAction *showNameAction = new QAction(NULL, _("Show Name"), 0, this);
- + Q3Action *showNameAction = new Q3Action(NULL, _("Show Name"), 0, this);
- showNameAction->setToggleAction(TRUE);
- connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool)));
- connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool)));
- showNameAction->setOn(configView->showName());
- - QAction *showRangeAction = new QAction(NULL, _("Show Range"), 0, this);
- + Q3Action *showRangeAction = new Q3Action(NULL, _("Show Range"), 0, this);
- showRangeAction->setToggleAction(TRUE);
- connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool)));
- connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool)));
- showRangeAction->setOn(configList->showRange);
- - QAction *showDataAction = new QAction(NULL, _("Show Data"), 0, this);
- + Q3Action *showDataAction = new Q3Action(NULL, _("Show Data"), 0, this);
- showDataAction->setToggleAction(TRUE);
- connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool)));
- connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool)));
- showDataAction->setOn(configList->showData);
- - QAction *showAllAction = new QAction(NULL, _("Show All Options"), 0, this);
- - showAllAction->setToggleAction(TRUE);
- - connect(showAllAction, SIGNAL(toggled(bool)), configView, SLOT(setShowAll(bool)));
- - connect(showAllAction, SIGNAL(toggled(bool)), menuView, SLOT(setShowAll(bool)));
- - showAllAction->setOn(configList->showAll);
- - QAction *showDebugAction = new QAction(NULL, _("Show Debug Info"), 0, this);
- +
- + QActionGroup *optGroup = new QActionGroup(this);
- + optGroup->setExclusive(TRUE);
- + connect(optGroup, SIGNAL(selected(QAction *)), configView,
- + SLOT(setOptionMode(QAction *)));
- + connect(optGroup, SIGNAL(selected(QAction *)), menuView,
- + SLOT(setOptionMode(QAction *)));
- +
- +#if QT_VERSION >= 0x040000
- + configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup);
- + configView->showAllAction = new QAction(_("Show All Options"), optGroup);
- + configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup);
- +#else
- + configView->showNormalAction = new QAction(_("Show Normal Options"), 0, optGroup);
- + configView->showAllAction = new QAction(_("Show All Options"), 0, optGroup);
- + configView->showPromptAction = new QAction(_("Show Prompt Options"), 0, optGroup);
- +#endif
- + configView->showNormalAction->setToggleAction(TRUE);
- + configView->showNormalAction->setOn(configList->optMode == normalOpt);
- + configView->showAllAction->setToggleAction(TRUE);
- + configView->showAllAction->setOn(configList->optMode == allOpt);
- + configView->showPromptAction->setToggleAction(TRUE);
- + configView->showPromptAction->setOn(configList->optMode == promptOpt);
- +
- + Q3Action *showDebugAction = new Q3Action(NULL, _("Show Debug Info"), 0, this);
- showDebugAction->setToggleAction(TRUE);
- connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool)));
- connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool)));
- showDebugAction->setOn(helpText->showDebug());
-
- - QAction *showIntroAction = new QAction(NULL, _("Introduction"), 0, this);
- + Q3Action *showIntroAction = new Q3Action(NULL, _("Introduction"), 0, this);
- connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro()));
- - QAction *showAboutAction = new QAction(NULL, _("About"), 0, this);
- + Q3Action *showAboutAction = new Q3Action(NULL, _("About"), 0, this);
- connect(showAboutAction, SIGNAL(activated()), SLOT(showAbout()));
-
- // init tool bar
- @@ -1377,7 +1401,7 @@
- fullViewAction->addTo(toolBar);
-
- // create config menu
- - QPopupMenu* config = new QPopupMenu(this);
- + Q3PopupMenu* config = new Q3PopupMenu(this);
- menu->insertItem(_("&File"), config);
- loadAction->addTo(config);
- saveAction->addTo(config);
- @@ -1386,22 +1410,22 @@
- quitAction->addTo(config);
-
- // create edit menu
- - QPopupMenu* editMenu = new QPopupMenu(this);
- + Q3PopupMenu* editMenu = new Q3PopupMenu(this);
- menu->insertItem(_("&Edit"), editMenu);
- searchAction->addTo(editMenu);
-
- // create options menu
- - QPopupMenu* optionMenu = new QPopupMenu(this);
- + Q3PopupMenu* optionMenu = new Q3PopupMenu(this);
- menu->insertItem(_("&Option"), optionMenu);
- showNameAction->addTo(optionMenu);
- showRangeAction->addTo(optionMenu);
- showDataAction->addTo(optionMenu);
- optionMenu->insertSeparator();
- - showAllAction->addTo(optionMenu);
- - showDebugAction->addTo(optionMenu);
- + optGroup->addTo(optionMenu);
- + optionMenu->insertSeparator();
-
- // create help menu
- - QPopupMenu* helpMenu = new QPopupMenu(this);
- + Q3PopupMenu* helpMenu = new Q3PopupMenu(this);
- menu->insertSeparator();
- menu->insertItem(_("&Help"), helpMenu);
- showIntroAction->addTo(helpMenu);
- @@ -1436,7 +1460,7 @@
- showSplitView();
-
- // UI setup done, restore splitter positions
- - QValueList<int> sizes = configSettings->readSizes("/split1", &ok);
- + Q3ValueList<int> sizes = configSettings->readSizes("/split1", &ok);
- if (ok)
- split1->setSizes(sizes);
-
- @@ -1447,7 +1471,7 @@
-
- void ConfigMainWindow::loadConfig(void)
- {
- - QString s = QFileDialog::getOpenFileName(".config", NULL, this);
- + QString s = Q3FileDialog::getOpenFileName(conf_get_configname(), NULL, this);
- if (s.isNull())
- return;
- if (conf_read(QFile::encodeName(s)))
- @@ -1455,19 +1479,21 @@
- ConfigView::updateListAll();
- }
-
- -void ConfigMainWindow::saveConfig(void)
- +bool ConfigMainWindow::saveConfig(void)
- {
- - if (conf_write(NULL))
- + if (conf_write(NULL)) {
- QMessageBox::information(this, "qconf", _("Unable to save configuration!"));
- + return false;
- + }
- + return true;
- }
-
- void ConfigMainWindow::saveConfigAs(void)
- {
- - QString s = QFileDialog::getSaveFileName(".config", NULL, this);
- + QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this);
- if (s.isNull())
- return;
- - if (conf_write(QFile::encodeName(s)))
- - QMessageBox::information(this, "qconf", _("Unable to save configuration!"));
- + saveConfig();
- }
-
- void ConfigMainWindow::searchConfig(void)
- @@ -1492,7 +1518,7 @@
- ConfigList* list = NULL;
- ConfigItem* item;
-
- - if (!menu_is_visible(menu) && !configView->showAll())
- + if (configList->menuSkip(menu))
- return;
-
- switch (configList->mode) {
- @@ -1524,6 +1550,8 @@
- case fullMode:
- list = configList;
- break;
- + default:
- + break;
- }
-
- if (list) {
- @@ -1618,7 +1646,11 @@
- mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit"));
- switch (mb.exec()) {
- case QMessageBox::Yes:
- - conf_write(NULL);
- + if (saveConfig())
- + e->accept();
- + else
- + e->ignore();
- + break;
- case QMessageBox::No:
- e->accept();
- break;
- @@ -1630,7 +1662,7 @@
-
- void ConfigMainWindow::showIntro(void)
- {
- - static const QString str = _("Welcome to the qconf graphical configuration tool for uClibc.\n\n"
- + static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n"
- "For each option, a blank box indicates the feature is disabled, a check\n"
- "indicates it is enabled, and a dot indicates that it is to be compiled\n"
- "as a module. Clicking on the box will cycle through the three states.\n\n"
- @@ -1648,7 +1680,7 @@
- void ConfigMainWindow::showAbout(void)
- {
- static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n\n"
- - "Bug reports and feature request can also be entered at https://bugs.uClibc.org/\n");
- + "Bug reports and feature request can also be entered at http://bugs.uClibc.org/\n");
-
- QMessageBox::information(this, "qconf", str);
- }
- @@ -1673,6 +1705,9 @@
- case fullMode :
- entry = "full";
- break;
- +
- + default:
- + break;
- }
- configSettings->writeEntry("/listMode", entry);
-
- @@ -1718,10 +1753,6 @@
- bindtextdomain(PACKAGE, LOCALEDIR);
- textdomain(PACKAGE);
-
- -#ifndef LKC_DIRECT_LINK
- - kconfig_load();
- -#endif
- -
- progname = av[0];
- configApp = new QApplication(ac, av);
- if (ac > 1 && av[1][0] == '-') {
- diff -Nur uClibc-0.9.33.2/extra/config/qconf.h uClibc/extra/config/qconf.h
- --- uClibc-0.9.33.2/extra/config/qconf.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/qconf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -3,26 +3,25 @@
- * Released under the terms of the GNU GPL v2.0.
- */
-
- +#if QT_VERSION < 0x040000
- #include <qlistview.h>
- -#if QT_VERSION >= 300
- -#include <qsettings.h>
- #else
- -class QSettings {
- -public:
- - void beginGroup(const QString& group) { }
- - void endGroup(void) { }
- - bool readBoolEntry(const QString& key, bool def = FALSE, bool* ok = 0) const
- - { if (ok) *ok = FALSE; return def; }
- - int readNumEntry(const QString& key, int def = 0, bool* ok = 0) const
- - { if (ok) *ok = FALSE; return def; }
- - QString readEntry(const QString& key, const QString& def = QString::null, bool* ok = 0) const
- - { if (ok) *ok = FALSE; return def; }
- - QStringList readListEntry(const QString& key, bool* ok = 0) const
- - { if (ok) *ok = FALSE; return QStringList(); }
- - template <class t>
- - bool writeEntry(const QString& key, t value)
- - { return TRUE; }
- -};
- +#include <q3listview.h>
- +#endif
- +#include <qsettings.h>
- +
- +#if QT_VERSION < 0x040000
- +#define Q3ValueList QValueList
- +#define Q3PopupMenu QPopupMenu
- +#define Q3ListView QListView
- +#define Q3ListViewItem QListViewItem
- +#define Q3VBox QVBox
- +#define Q3TextBrowser QTextBrowser
- +#define Q3MainWindow QMainWindow
- +#define Q3Action QAction
- +#define Q3ToolBar QToolBar
- +#define Q3ListViewItemIterator QListViewItemIterator
- +#define Q3FileDialog QFileDialog
- #endif
-
- class ConfigView;
- @@ -31,11 +30,10 @@
- class ConfigLineEdit;
- class ConfigMainWindow;
-
- -
- class ConfigSettings : public QSettings {
- public:
- - QValueList<int> readSizes(const QString& key, bool *ok);
- - bool writeSizes(const QString& key, const QValueList<int>& value);
- + Q3ValueList<int> readSizes(const QString& key, bool *ok);
- + bool writeSizes(const QString& key, const Q3ValueList<int>& value);
- };
-
- enum colIdx {
- @@ -44,10 +42,13 @@
- enum listMode {
- singleMode, menuMode, symbolMode, fullMode, listMode
- };
- +enum optionMode {
- + normalOpt = 0, allOpt, promptOpt
- +};
-
- -class ConfigList : public QListView {
- +class ConfigList : public Q3ListView {
- Q_OBJECT
- - typedef class QListView Parent;
- + typedef class Q3ListView Parent;
- public:
- ConfigList(ConfigView* p, const char *name = 0);
- void reinit(void);
- @@ -115,6 +116,8 @@
- void setAllOpen(bool open);
- void setParentMenu(void);
-
- + bool menuSkip(struct menu *);
- +
- template <class P>
- void updateMenuList(P*, struct menu*);
-
- @@ -124,22 +127,23 @@
- QPixmap choiceYesPix, choiceNoPix;
- QPixmap menuPix, menuInvPix, menuBackPix, voidPix;
-
- - bool showAll, showName, showRange, showData;
- + bool showName, showRange, showData;
- enum listMode mode;
- + enum optionMode optMode;
- struct menu *rootEntry;
- QColorGroup disabledColorGroup;
- QColorGroup inactivedColorGroup;
- - QPopupMenu* headerPopup;
- + Q3PopupMenu* headerPopup;
-
- private:
- int colMap[colNr];
- int colRevMap[colNr];
- };
-
- -class ConfigItem : public QListViewItem {
- - typedef class QListViewItem Parent;
- +class ConfigItem : public Q3ListViewItem {
- + typedef class Q3ListViewItem Parent;
- public:
- - ConfigItem(QListView *parent, ConfigItem *after, struct menu *m, bool v)
- + ConfigItem(Q3ListView *parent, ConfigItem *after, struct menu *m, bool v)
- : Parent(parent, after), menu(m), visible(v), goParent(false)
- {
- init();
- @@ -149,16 +153,14 @@
- {
- init();
- }
- - ConfigItem(QListView *parent, ConfigItem *after, bool v)
- + ConfigItem(Q3ListView *parent, ConfigItem *after, bool v)
- : Parent(parent, after), menu(0), visible(v), goParent(true)
- {
- init();
- }
- ~ConfigItem(void);
- void init(void);
- -#if QT_VERSION >= 300
- void okRename(int col);
- -#endif
- void updateMenu(void);
- void testUpdateMenu(bool v);
- ConfigList* listView() const
- @@ -213,26 +215,24 @@
- ConfigItem *item;
- };
-
- -class ConfigView : public QVBox {
- +class ConfigView : public Q3VBox {
- Q_OBJECT
- - typedef class QVBox Parent;
- + typedef class Q3VBox Parent;
- public:
- ConfigView(QWidget* parent, const char *name = 0);
- ~ConfigView(void);
- static void updateList(ConfigItem* item);
- static void updateListAll(void);
-
- - bool showAll(void) const { return list->showAll; }
- bool showName(void) const { return list->showName; }
- bool showRange(void) const { return list->showRange; }
- bool showData(void) const { return list->showData; }
- public slots:
- - void setShowAll(bool);
- void setShowName(bool);
- void setShowRange(bool);
- void setShowData(bool);
- + void setOptionMode(QAction *);
- signals:
- - void showAllChanged(bool);
- void showNameChanged(bool);
- void showRangeChanged(bool);
- void showDataChanged(bool);
- @@ -242,11 +242,15 @@
-
- static ConfigView* viewList;
- ConfigView* nextView;
- +
- + static QAction *showNormalAction;
- + static QAction *showAllAction;
- + static QAction *showPromptAction;
- };
-
- -class ConfigInfoView : public QTextBrowser {
- +class ConfigInfoView : public Q3TextBrowser {
- Q_OBJECT
- - typedef class QTextBrowser Parent;
- + typedef class Q3TextBrowser Parent;
- public:
- ConfigInfoView(QWidget* parent, const char *name = 0);
- bool showDebug(void) const { return _showDebug; }
- @@ -254,7 +258,6 @@
- public slots:
- void setInfo(struct menu *menu);
- void saveSettings(void);
- - void setSource(const QString& name);
- void setShowDebug(bool);
-
- signals:
- @@ -267,11 +270,11 @@
- QString debug_info(struct symbol *sym);
- static QString print_filter(const QString &str);
- static void expr_print_help(void *data, struct symbol *sym, const char *str);
- - QPopupMenu* createPopupMenu(const QPoint& pos);
- + Q3PopupMenu* createPopupMenu(const QPoint& pos);
- void contentsContextMenuEvent(QContextMenuEvent *e);
-
- struct symbol *sym;
- - struct menu *menu;
- + struct menu *_menu;
- bool _showDebug;
- };
-
- @@ -295,10 +298,10 @@
- struct symbol **result;
- };
-
- -class ConfigMainWindow : public QMainWindow {
- +class ConfigMainWindow : public Q3MainWindow {
- Q_OBJECT
-
- - static QAction *saveAction;
- + static Q3Action *saveAction;
- static void conf_changed(void);
- public:
- ConfigMainWindow(void);
- @@ -308,7 +311,7 @@
- void listFocusChanged(void);
- void goBack(void);
- void loadConfig(void);
- - void saveConfig(void);
- + bool saveConfig(void);
- void saveConfigAs(void);
- void searchConfig(void);
- void showSingleView(void);
- @@ -327,8 +330,8 @@
- ConfigView *configView;
- ConfigList *configList;
- ConfigInfoView *helpText;
- - QToolBar *toolBar;
- - QAction *backAction;
- + Q3ToolBar *toolBar;
- + Q3Action *backAction;
- QSplitter* split1;
- QSplitter* split2;
- };
- diff -Nur uClibc-0.9.33.2/extra/config/README.uClibc uClibc/extra/config/README.uClibc
- --- uClibc-0.9.33.2/extra/config/README.uClibc 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/README.uClibc 2014-02-03 12:32:56.000000000 +0100
- @@ -5,7 +5,7 @@
- cd extra/config.new
- cp /usr/src/linux/Documentation/kbuild/kconfig-language.txt .
- mv Makefile Makefile.kconfig
- - zcat ../config/kconfig-to-uclibc.patch.gz | patch -p1
- + tar -O -xzf ../config/kconfig-to-uclibc.tar.gz | patch -p3
- cp ../config/README.uClibc .
- cp ../config/Makefile .
- cd ..
- diff -Nur uClibc-0.9.33.2/extra/config/streamline_config.pl uClibc/extra/config/streamline_config.pl
- --- uClibc-0.9.33.2/extra/config/streamline_config.pl 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/config/streamline_config.pl 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,640 @@
- +#!/usr/bin/perl -w
- +#
- +# Copyright 2005-2009 - Steven Rostedt
- +# Licensed under the terms of the GNU GPL License version 2
- +#
- +# It's simple enough to figure out how this works.
- +# If not, then you can ask me at stripconfig@goodmis.org
- +#
- +# What it does?
- +#
- +# If you have installed a Linux kernel from a distribution
- +# that turns on way too many modules than you need, and
- +# you only want the modules you use, then this program
- +# is perfect for you.
- +#
- +# It gives you the ability to turn off all the modules that are
- +# not loaded on your system.
- +#
- +# Howto:
- +#
- +# 1. Boot up the kernel that you want to stream line the config on.
- +# 2. Change directory to the directory holding the source of the
- +# kernel that you just booted.
- +# 3. Copy the configuraton file to this directory as .config
- +# 4. Have all your devices that you need modules for connected and
- +# operational (make sure that their corresponding modules are loaded)
- +# 5. Run this script redirecting the output to some other file
- +# like config_strip.
- +# 6. Back up your old config (if you want too).
- +# 7. copy the config_strip file to .config
- +# 8. Run "make oldconfig"
- +#
- +# Now your kernel is ready to be built with only the modules that
- +# are loaded.
- +#
- +# Here's what I did with my Debian distribution.
- +#
- +# cd /usr/src/linux-2.6.10
- +# cp /boot/config-2.6.10-1-686-smp .config
- +# ~/bin/streamline_config > config_strip
- +# mv .config config_sav
- +# mv config_strip .config
- +# make oldconfig
- +#
- +use strict;
- +use Getopt::Long;
- +
- +# set the environment variable LOCALMODCONFIG_DEBUG to get
- +# debug output.
- +my $debugprint = 0;
- +$debugprint = 1 if (defined($ENV{LOCALMODCONFIG_DEBUG}));
- +
- +sub dprint {
- + return if (!$debugprint);
- + print STDERR @_;
- +}
- +
- +my $config = ".config";
- +
- +my $uname = `uname -r`;
- +chomp $uname;
- +
- +my @searchconfigs = (
- + {
- + "file" => ".config",
- + "exec" => "cat",
- + },
- + {
- + "file" => "/proc/config.gz",
- + "exec" => "zcat",
- + },
- + {
- + "file" => "/boot/config-$uname",
- + "exec" => "cat",
- + },
- + {
- + "file" => "/boot/vmlinuz-$uname",
- + "exec" => "scripts/extract-ikconfig",
- + "test" => "scripts/extract-ikconfig",
- + },
- + {
- + "file" => "vmlinux",
- + "exec" => "scripts/extract-ikconfig",
- + "test" => "scripts/extract-ikconfig",
- + },
- + {
- + "file" => "/lib/modules/$uname/kernel/kernel/configs.ko",
- + "exec" => "scripts/extract-ikconfig",
- + "test" => "scripts/extract-ikconfig",
- + },
- + {
- + "file" => "kernel/configs.ko",
- + "exec" => "scripts/extract-ikconfig",
- + "test" => "scripts/extract-ikconfig",
- + },
- + {
- + "file" => "kernel/configs.o",
- + "exec" => "scripts/extract-ikconfig",
- + "test" => "scripts/extract-ikconfig",
- + },
- +);
- +
- +sub read_config {
- + foreach my $conf (@searchconfigs) {
- + my $file = $conf->{"file"};
- +
- + next if ( ! -f "$file");
- +
- + if (defined($conf->{"test"})) {
- + `$conf->{"test"} $conf->{"file"} 2>/dev/null`;
- + next if ($?);
- + }
- +
- + my $exec = $conf->{"exec"};
- +
- + print STDERR "using config: '$file'\n";
- +
- + open(my $infile, '-|', "$exec $file") || die "Failed to run $exec $file";
- + my @x = <$infile>;
- + close $infile;
- + return @x;
- + }
- + die "No config file found";
- +}
- +
- +my @config_file = read_config;
- +
- +# Parse options
- +my $localmodconfig = 0;
- +my $localyesconfig = 0;
- +
- +GetOptions("localmodconfig" => \$localmodconfig,
- + "localyesconfig" => \$localyesconfig);
- +
- +# Get the build source and top level Kconfig file (passed in)
- +my $ksource = ($ARGV[0] ? $ARGV[0] : '.');
- +my $kconfig = $ARGV[1];
- +my $lsmod_file = $ENV{'LSMOD'};
- +
- +my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
- +chomp @makefiles;
- +
- +my %depends;
- +my %selects;
- +my %prompts;
- +my %objects;
- +my $var;
- +my $iflevel = 0;
- +my @ifdeps;
- +
- +# prevent recursion
- +my %read_kconfigs;
- +
- +sub read_kconfig {
- + my ($kconfig) = @_;
- +
- + my $state = "NONE";
- + my $config;
- +
- + my $cont = 0;
- + my $line;
- +
- + my $source = "$ksource/$kconfig";
- + my $last_source = "";
- +
- + # Check for any environment variables used
- + while ($source =~ /\$(\w+)/ && $last_source ne $source) {
- + my $env = $1;
- + $last_source = $source;
- + $source =~ s/\$$env/$ENV{$env}/;
- + }
- +
- + open(my $kinfile, '<', $source) || die "Can't open $kconfig";
- + while (<$kinfile>) {
- + chomp;
- +
- + # Make sure that lines ending with \ continue
- + if ($cont) {
- + $_ = $line . " " . $_;
- + }
- +
- + if (s/\\$//) {
- + $cont = 1;
- + $line = $_;
- + next;
- + }
- +
- + $cont = 0;
- +
- + # collect any Kconfig sources
- + if (/^source\s*"(.*)"/) {
- + my $kconfig = $1;
- + # prevent reading twice.
- + if (!defined($read_kconfigs{$kconfig})) {
- + $read_kconfigs{$kconfig} = 1;
- + read_kconfig($kconfig);
- + }
- + next;
- + }
- +
- + # configs found
- + if (/^\s*(menu)?config\s+(\S+)\s*$/) {
- + $state = "NEW";
- + $config = $2;
- +
- + # Add depends for 'if' nesting
- + for (my $i = 0; $i < $iflevel; $i++) {
- + if ($i) {
- + $depends{$config} .= " " . $ifdeps[$i];
- + } else {
- + $depends{$config} = $ifdeps[$i];
- + }
- + $state = "DEP";
- + }
- +
- + # collect the depends for the config
- + } elsif ($state eq "NEW" && /^\s*depends\s+on\s+(.*)$/) {
- + $state = "DEP";
- + $depends{$config} = $1;
- + } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) {
- + $depends{$config} .= " " . $1;
- +
- + # Get the configs that select this config
- + } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) {
- + my $conf = $1;
- + if (defined($selects{$conf})) {
- + $selects{$conf} .= " " . $config;
- + } else {
- + $selects{$conf} = $config;
- + }
- +
- + # configs without prompts must be selected
- + } elsif ($state ne "NONE" && /^\s*tristate\s\S/) {
- + # note if the config has a prompt
- + $prompts{$config} = 1;
- +
- + # Check for if statements
- + } elsif (/^if\s+(.*\S)\s*$/) {
- + my $deps = $1;
- + # remove beginning and ending non text
- + $deps =~ s/^[^a-zA-Z0-9_]*//;
- + $deps =~ s/[^a-zA-Z0-9_]*$//;
- +
- + my @deps = split /[^a-zA-Z0-9_]+/, $deps;
- +
- + $ifdeps[$iflevel++] = join ':', @deps;
- +
- + } elsif (/^endif/) {
- +
- + $iflevel-- if ($iflevel);
- +
- + # stop on "help"
- + } elsif (/^\s*help\s*$/) {
- + $state = "NONE";
- + }
- + }
- + close($kinfile);
- +}
- +
- +if ($kconfig) {
- + read_kconfig($kconfig);
- +}
- +
- +# Makefiles can use variables to define their dependencies
- +sub convert_vars {
- + my ($line, %vars) = @_;
- +
- + my $process = "";
- +
- + while ($line =~ s/^(.*?)(\$\((.*?)\))//) {
- + my $start = $1;
- + my $variable = $2;
- + my $var = $3;
- +
- + if (defined($vars{$var})) {
- + $process .= $start . $vars{$var};
- + } else {
- + $process .= $start . $variable;
- + }
- + }
- +
- + $process .= $line;
- +
- + return $process;
- +}
- +
- +# Read all Makefiles to map the configs to the objects
- +foreach my $makefile (@makefiles) {
- +
- + my $line = "";
- + my %make_vars;
- +
- + open(my $infile, '<', $makefile) || die "Can't open $makefile";
- + while (<$infile>) {
- + # if this line ends with a backslash, continue
- + chomp;
- + if (/^(.*)\\$/) {
- + $line .= $1;
- + next;
- + }
- +
- + $line .= $_;
- + $_ = $line;
- + $line = "";
- +
- + my $objs;
- +
- + # Convert variables in a line (could define configs)
- + $_ = convert_vars($_, %make_vars);
- +
- + # collect objects after obj-$(CONFIG_FOO_BAR)
- + if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
- + $var = $1;
- + $objs = $2;
- +
- + # check if variables are set
- + } elsif (/^\s*(\S+)\s*[:]?=\s*(.*\S)/) {
- + $make_vars{$1} = $2;
- + }
- + if (defined($objs)) {
- + foreach my $obj (split /\s+/,$objs) {
- + $obj =~ s/-/_/g;
- + if ($obj =~ /(.*)\.o$/) {
- + # Objects may be enabled by more than one config.
- + # Store configs in an array.
- + my @arr;
- +
- + if (defined($objects{$1})) {
- + @arr = @{$objects{$1}};
- + }
- +
- + $arr[$#arr+1] = $var;
- +
- + # The objects have a hash mapping to a reference
- + # of an array of configs.
- + $objects{$1} = \@arr;
- + }
- + }
- + }
- + }
- + close($infile);
- +}
- +
- +my %modules;
- +my $linfile;
- +
- +if (defined($lsmod_file)) {
- + if ( ! -f $lsmod_file) {
- + if ( -f $ENV{'objtree'}."/".$lsmod_file) {
- + $lsmod_file = $ENV{'objtree'}."/".$lsmod_file;
- + } else {
- + die "$lsmod_file not found";
- + }
- + }
- +
- + my $otype = ( -x $lsmod_file) ? '-|' : '<';
- + open($linfile, $otype, $lsmod_file);
- +
- +} else {
- +
- + # see what modules are loaded on this system
- + my $lsmod;
- +
- + foreach my $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) {
- + if ( -x "$dir/lsmod" ) {
- + $lsmod = "$dir/lsmod";
- + last;
- + }
- +}
- + if (!defined($lsmod)) {
- + # try just the path
- + $lsmod = "lsmod";
- + }
- +
- + open($linfile, '-|', $lsmod) || die "Can not call lsmod with $lsmod";
- +}
- +
- +while (<$linfile>) {
- + next if (/^Module/); # Skip the first line.
- + if (/^(\S+)/) {
- + $modules{$1} = 1;
- + }
- +}
- +close ($linfile);
- +
- +# add to the configs hash all configs that are needed to enable
- +# a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o
- +# where we know we need bar.o so we add FOO to the list.
- +my %configs;
- +foreach my $module (keys(%modules)) {
- + if (defined($objects{$module})) {
- + my @arr = @{$objects{$module}};
- + foreach my $conf (@arr) {
- + $configs{$conf} = $module;
- + dprint "$conf added by direct ($module)\n";
- + if ($debugprint) {
- + my $c=$conf;
- + $c =~ s/^CONFIG_//;
- + if (defined($depends{$c})) {
- + dprint " deps = $depends{$c}\n";
- + } else {
- + dprint " no deps\n";
- + }
- + }
- + }
- + } else {
- + # Most likely, someone has a custom (binary?) module loaded.
- + print STDERR "$module config not found!!\n";
- + }
- +}
- +
- +# Read the current config, and see what is enabled. We want to
- +# ignore configs that we would not enable anyway.
- +
- +my %orig_configs;
- +my $valid = "A-Za-z_0-9";
- +
- +foreach my $line (@config_file) {
- + $_ = $line;
- +
- + if (/(CONFIG_[$valid]*)=(m|y)/) {
- + $orig_configs{$1} = $2;
- + }
- +}
- +
- +my $repeat = 1;
- +
- +my $depconfig;
- +
- +#
- +# Note, we do not care about operands (like: &&, ||, !) we want to add any
- +# config that is in the depend list of another config. This script does
- +# not enable configs that are not already enabled. If we come across a
- +# config A that depends on !B, we can still add B to the list of depends
- +# to keep on. If A was on in the original config, B would not have been
- +# and B would not be turned on by this script.
- +#
- +sub parse_config_depends
- +{
- + my ($p) = @_;
- +
- + while ($p =~ /[$valid]/) {
- +
- + if ($p =~ /^[^$valid]*([$valid]+)/) {
- + my $conf = "CONFIG_" . $1;
- +
- + $p =~ s/^[^$valid]*[$valid]+//;
- +
- + # We only need to process if the depend config is a module
- + if (!defined($orig_configs{$conf}) || !$orig_configs{conf} eq "m") {
- + next;
- + }
- +
- + if (!defined($configs{$conf})) {
- + # We must make sure that this config has its
- + # dependencies met.
- + $repeat = 1; # do again
- + dprint "$conf selected by depend $depconfig\n";
- + $configs{$conf} = 1;
- + }
- + } else {
- + die "this should never happen";
- + }
- + }
- +}
- +
- +# Select is treated a bit differently than depends. We call this
- +# when a config has no prompt and requires another config to be
- +# selected. We use to just select all configs that selected this
- +# config, but found that that can balloon into enabling hundreds
- +# of configs that we do not care about.
- +#
- +# The idea is we look at all the configs that select it. If one
- +# is already in our list of configs to enable, then there's nothing
- +# else to do. If there isn't, we pick the first config that was
- +# enabled in the orignal config and use that.
- +sub parse_config_selects
- +{
- + my ($config, $p) = @_;
- +
- + my $next_config;
- +
- + while ($p =~ /[$valid]/) {
- +
- + if ($p =~ /^[^$valid]*([$valid]+)/) {
- + my $conf = "CONFIG_" . $1;
- +
- + $p =~ s/^[^$valid]*[$valid]+//;
- +
- + # Make sure that this config exists in the current .config file
- + if (!defined($orig_configs{$conf})) {
- + dprint "$conf not set for $config select\n";
- + next;
- + }
- +
- + # Check if something other than a module selects this config
- + if (defined($orig_configs{$conf}) && $orig_configs{$conf} ne "m") {
- + dprint "$conf (non module) selects config, we are good\n";
- + # we are good with this
- + return;
- + }
- + if (defined($configs{$conf})) {
- + dprint "$conf selects $config so we are good\n";
- + # A set config selects this config, we are good
- + return;
- + }
- + # Set this config to be selected
- + if (!defined($next_config)) {
- + $next_config = $conf;
- + }
- + } else {
- + die "this should never happen";
- + }
- + }
- +
- + # If no possible config selected this, then something happened.
- + if (!defined($next_config)) {
- + print STDERR "WARNING: $config is required, but nothing in the\n";
- + print STDERR " current config selects it.\n";
- + return;
- + }
- +
- + # If we are here, then we found no config that is set and
- + # selects this config. Repeat.
- + $repeat = 1;
- + # Make this config need to be selected
- + $configs{$next_config} = 1;
- + dprint "$next_config selected by select $config\n";
- +}
- +
- +my %process_selects;
- +
- +# loop through all configs, select their dependencies.
- +sub loop_depend {
- + $repeat = 1;
- +
- + while ($repeat) {
- + $repeat = 0;
- +
- + forloop:
- + foreach my $config (keys %configs) {
- +
- + # If this config is not a module, we do not need to process it
- + if (defined($orig_configs{$config}) && $orig_configs{$config} ne "m") {
- + next forloop;
- + }
- +
- + $config =~ s/^CONFIG_//;
- + $depconfig = $config;
- +
- + if (defined($depends{$config})) {
- + # This config has dependencies. Make sure they are also included
- + parse_config_depends $depends{$config};
- + }
- +
- + # If the config has no prompt, then we need to check if a config
- + # that is enabled selected it. Or if we need to enable one.
- + if (!defined($prompts{$config}) && defined($selects{$config})) {
- + $process_selects{$config} = 1;
- + }
- + }
- + }
- +}
- +
- +sub loop_select {
- +
- + foreach my $config (keys %process_selects) {
- + $config =~ s/^CONFIG_//;
- +
- + dprint "Process select $config\n";
- +
- + # config has no prompt and must be selected.
- + parse_config_selects $config, $selects{$config};
- + }
- +}
- +
- +while ($repeat) {
- + # Get the first set of configs and their dependencies.
- + loop_depend;
- +
- + $repeat = 0;
- +
- + # Now we need to see if we have to check selects;
- + loop_select;
- +}
- +
- +my %setconfigs;
- +
- +# Finally, read the .config file and turn off any module enabled that
- +# we could not find a reason to keep enabled.
- +foreach my $line (@config_file) {
- + $_ = $line;
- +
- + if (/CONFIG_IKCONFIG/) {
- + if (/# CONFIG_IKCONFIG is not set/) {
- + # enable IKCONFIG at least as a module
- + print "CONFIG_IKCONFIG=m\n";
- + # don't ask about PROC
- + print "# CONFIG_IKCONFIG_PROC is not set\n";
- + } else {
- + print;
- + }
- + next;
- + }
- +
- + if (/^(CONFIG.*)=(m|y)/) {
- + if (defined($configs{$1})) {
- + if ($localyesconfig) {
- + $setconfigs{$1} = 'y';
- + print "$1=y\n";
- + next;
- + } else {
- + $setconfigs{$1} = $2;
- + }
- + } elsif ($2 eq "m") {
- + print "# $1 is not set\n";
- + next;
- + }
- + }
- + print;
- +}
- +
- +# Integrity check, make sure all modules that we want enabled do
- +# indeed have their configs set.
- +loop:
- +foreach my $module (keys(%modules)) {
- + if (defined($objects{$module})) {
- + my @arr = @{$objects{$module}};
- + foreach my $conf (@arr) {
- + if (defined($setconfigs{$conf})) {
- + next loop;
- + }
- + }
- + print STDERR "module $module did not have configs";
- + foreach my $conf (@arr) {
- + print STDERR " " , $conf;
- + }
- + print STDERR "\n";
- + }
- +}
- diff -Nur uClibc-0.9.33.2/extra/config/symbol.c uClibc/extra/config/symbol.c
- --- uClibc-0.9.33.2/extra/config/symbol.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/symbol.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,8 +7,8 @@
- #include <stdlib.h>
- #include <string.h>
- #include <regex.h>
- +#include <sys/utsname.h>
-
- -#define LKC_DIRECT_LINK
- #include "lkc.h"
-
- struct symbol symbol_yes = {
- @@ -35,7 +35,7 @@
-
- struct expr *sym_env_list;
-
- -void sym_add_default(struct symbol *sym, const char *def)
- +static void sym_add_default(struct symbol *sym, const char *def)
- {
- struct property *prop = prop_alloc(P_DEFAULT, sym);
-
- @@ -45,20 +45,19 @@
- void sym_init(void)
- {
- struct symbol *sym;
- - char *p;
- + struct utsname uts;
- static bool inited = false;
-
- if (inited)
- return;
- inited = true;
-
- - p = getenv("VERSION");
- - if (p) {
- - sym = sym_lookup("VERSION", 0);
- - sym->type = S_STRING;
- - sym->flags |= SYMBOL_AUTO;
- - sym_add_default(sym, p);
- - }
- + uname(&uts);
- +
- + sym = sym_lookup("UNAME_RELEASE", 0);
- + sym->type = S_STRING;
- + sym->flags |= SYMBOL_AUTO;
- + sym_add_default(sym, uts.release);
- }
-
- enum symbol_type sym_get_type(struct symbol *sym)
- @@ -125,7 +124,7 @@
- return NULL;
- }
-
- -struct property *sym_get_range_prop(struct symbol *sym)
- +static struct property *sym_get_range_prop(struct symbol *sym)
- {
- struct property *prop;
-
- @@ -137,7 +136,7 @@
- return NULL;
- }
-
- -static int sym_get_range_val(struct symbol *sym, int base)
- +static long sym_get_range_val(struct symbol *sym, int base)
- {
- sym_calc_value(sym);
- switch (sym->type) {
- @@ -156,7 +155,7 @@
- static void sym_validate_range(struct symbol *sym)
- {
- struct property *prop;
- - int base, val, val2;
- + long base, val, val2;
- char str[64];
-
- switch (sym->type) {
- @@ -180,9 +179,9 @@
- return;
- }
- if (sym->type == S_INT)
- - sprintf(str, "%d", val2);
- + sprintf(str, "%ld", val2);
- else
- - sprintf(str, "0x%x", val2);
- + sprintf(str, "0x%lx", val2);
- sym->curr.val = strdup(str);
- }
-
- @@ -205,6 +204,16 @@
- }
- if (sym_is_choice_value(sym))
- return;
- + /* defaulting to "yes" if no explicit "depends on" are given */
- + tri = yes;
- + if (sym->dir_dep.expr)
- + tri = expr_calc_value(sym->dir_dep.expr);
- + if (tri == mod)
- + tri = yes;
- + if (sym->dir_dep.tri != tri) {
- + sym->dir_dep.tri = tri;
- + sym_set_changed(sym);
- + }
- tri = no;
- if (sym->rev_dep.expr)
- tri = expr_calc_value(sym->rev_dep.expr);
- @@ -216,42 +225,68 @@
- }
- }
-
- -static struct symbol *sym_calc_choice(struct symbol *sym)
- +/*
- + * Find the default symbol for a choice.
- + * First try the default values for the choice symbol
- + * Next locate the first visible choice value
- + * Return NULL if none was found
- + */
- +struct symbol *sym_choice_default(struct symbol *sym)
- {
- struct symbol *def_sym;
- struct property *prop;
- struct expr *e;
-
- - /* is the user choice visible? */
- - def_sym = sym->def[S_DEF_USER].val;
- - if (def_sym) {
- - sym_calc_visibility(def_sym);
- - if (def_sym->visible != no)
- - return def_sym;
- - }
- -
- /* any of the defaults visible? */
- for_all_defaults(sym, prop) {
- prop->visible.tri = expr_calc_value(prop->visible.expr);
- if (prop->visible.tri == no)
- continue;
- def_sym = prop_get_symbol(prop);
- - sym_calc_visibility(def_sym);
- if (def_sym->visible != no)
- return def_sym;
- }
-
- /* just get the first visible value */
- prop = sym_get_choice_prop(sym);
- + expr_list_for_each_sym(prop->expr, e, def_sym)
- + if (def_sym->visible != no)
- + return def_sym;
- +
- + /* failed to locate any defaults */
- + return NULL;
- +}
- +
- +static struct symbol *sym_calc_choice(struct symbol *sym)
- +{
- + struct symbol *def_sym;
- + struct property *prop;
- + struct expr *e;
- + int flags;
- +
- + /* first calculate all choice values' visibilities */
- + flags = sym->flags;
- + prop = sym_get_choice_prop(sym);
- expr_list_for_each_sym(prop->expr, e, def_sym) {
- sym_calc_visibility(def_sym);
- if (def_sym->visible != no)
- - return def_sym;
- + flags &= def_sym->flags;
- }
-
- - /* no choice? reset tristate value */
- - sym->curr.tri = no;
- - return NULL;
- + sym->flags &= flags | ~SYMBOL_DEF_USER;
- +
- + /* is the user choice visible? */
- + def_sym = sym->def[S_DEF_USER].val;
- + if (def_sym && def_sym->visible != no)
- + return def_sym;
- +
- + def_sym = sym_choice_default(sym);
- +
- + if (def_sym == NULL)
- + /* no choice? reset tristate value */
- + sym->curr.tri = no;
- +
- + return def_sym;
- }
-
- void sym_calc_value(struct symbol *sym)
- @@ -265,6 +300,14 @@
-
- if (sym->flags & SYMBOL_VALID)
- return;
- +
- + if (sym_is_choice_value(sym) &&
- + sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES) {
- + sym->flags &= ~SYMBOL_NEED_SET_CHOICE_VALUES;
- + prop = sym_get_choice_prop(sym);
- + sym_calc_value(prop_get_symbol(prop));
- + }
- +
- sym->flags |= SYMBOL_VALID;
-
- oldval = sym->curr;
- @@ -321,6 +364,18 @@
- }
- }
- calc_newval:
- + if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) {
- + struct expr *e;
- + e = expr_simplify_unmet_dep(sym->rev_dep.expr,
- + sym->dir_dep.expr);
- + fprintf(stderr, "warning: (");
- + expr_fprint(e, stderr);
- + fprintf(stderr, ") selects %s which has unmet direct dependencies (",
- + sym->name);
- + expr_fprint(sym->dir_dep.expr, stderr);
- + fprintf(stderr, ")\n");
- + expr_free(e);
- + }
- newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri);
- }
- if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)
- @@ -365,18 +420,22 @@
-
- if (sym_is_choice(sym)) {
- struct symbol *choice_sym;
- - int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
-
- prop = sym_get_choice_prop(sym);
- expr_list_for_each_sym(prop->expr, e, choice_sym) {
- - choice_sym->flags |= flags;
- - if (flags & SYMBOL_CHANGED)
- + if ((sym->flags & SYMBOL_WRITE) &&
- + choice_sym->visible != no)
- + choice_sym->flags |= SYMBOL_WRITE;
- + if (sym->flags & SYMBOL_CHANGED)
- sym_set_changed(choice_sym);
- }
- }
-
- if (sym->flags & SYMBOL_AUTO)
- sym->flags &= ~SYMBOL_WRITE;
- +
- + if (sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES)
- + set_all_choice_values(sym);
- }
-
- void sym_clear_all_valid(void)
- @@ -535,7 +594,7 @@
- bool sym_string_within_range(struct symbol *sym, const char *str)
- {
- struct property *prop;
- - int val;
- + long val;
-
- switch (sym->type) {
- case S_STRING:
- @@ -608,11 +667,11 @@
- size = strlen(newval) + 1;
- if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) {
- size += 2;
- - sym->def[S_DEF_USER].val = val = malloc(size);
- + sym->def[S_DEF_USER].val = val = xmalloc(size);
- *val++ = '0';
- *val++ = 'x';
- } else if (!oldval || strcmp(oldval, newval))
- - sym->def[S_DEF_USER].val = val = malloc(size);
- + sym->def[S_DEF_USER].val = val = xmalloc(size);
- else
- return true;
-
- @@ -623,6 +682,80 @@
- return true;
- }
-
- +/*
- + * Find the default value associated to a symbol.
- + * For tristate symbol handle the modules=n case
- + * in which case "m" becomes "y".
- + * If the symbol does not have any default then fallback
- + * to the fixed default values.
- + */
- +const char *sym_get_string_default(struct symbol *sym)
- +{
- + struct property *prop;
- + struct symbol *ds;
- + const char *str;
- + tristate val;
- +
- + sym_calc_visibility(sym);
- + sym_calc_value(modules_sym);
- + val = symbol_no.curr.tri;
- + str = symbol_empty.curr.val;
- +
- + /* If symbol has a default value look it up */
- + prop = sym_get_default_prop(sym);
- + if (prop != NULL) {
- + switch (sym->type) {
- + case S_BOOLEAN:
- + case S_TRISTATE:
- + /* The visibility may limit the value from yes => mod */
- + val = EXPR_AND(expr_calc_value(prop->expr), prop->visible.tri);
- + break;
- + default:
- + /*
- + * The following fails to handle the situation
- + * where a default value is further limited by
- + * the valid range.
- + */
- + ds = prop_get_symbol(prop);
- + if (ds != NULL) {
- + sym_calc_value(ds);
- + str = (const char *)ds->curr.val;
- + }
- + }
- + }
- +
- + /* Handle select statements */
- + val = EXPR_OR(val, sym->rev_dep.tri);
- +
- + /* transpose mod to yes if modules are not enabled */
- + if (val == mod)
- + if (!sym_is_choice_value(sym) && modules_sym->curr.tri == no)
- + val = yes;
- +
- + /* transpose mod to yes if type is bool */
- + if (sym->type == S_BOOLEAN && val == mod)
- + val = yes;
- +
- + switch (sym->type) {
- + case S_BOOLEAN:
- + case S_TRISTATE:
- + switch (val) {
- + case no: return "n";
- + case mod: return "m";
- + case yes: return "y";
- + }
- + case S_INT:
- + case S_HEX:
- + return str;
- + case S_STRING:
- + return str;
- + case S_OTHER:
- + case S_UNKNOWN:
- + break;
- + }
- + return "";
- +}
- +
- const char *sym_get_string_value(struct symbol *sym)
- {
- tristate val;
- @@ -635,7 +768,8 @@
- case no:
- return "n";
- case mod:
- - return "m";
- + sym_calc_value(modules_sym);
- + return (modules_sym->curr.tri == no) ? "n" : "m";
- case yes:
- return "y";
- }
- @@ -651,12 +785,20 @@
- return sym->visible > sym->rev_dep.tri;
- }
-
- +static unsigned strhash(const char *s)
- +{
- + /* fnv32 hash */
- + unsigned hash = 2166136261U;
- + for (; *s; s++)
- + hash = (hash ^ *s) * 0x01000193;
- + return hash;
- +}
- +
- struct symbol *sym_lookup(const char *name, int flags)
- {
- struct symbol *symbol;
- - const char *ptr;
- char *new_name;
- - int hash = 0;
- + int hash;
-
- if (name) {
- if (name[0] && !name[1]) {
- @@ -666,12 +808,11 @@
- case 'n': return &symbol_no;
- }
- }
- - for (ptr = name; *ptr; ptr++)
- - hash += *ptr;
- - hash &= 0xff;
- + hash = strhash(name) % SYMBOL_HASHSIZE;
-
- for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
- - if (!strcmp(symbol->name, name) &&
- + if (symbol->name &&
- + !strcmp(symbol->name, name) &&
- (flags ? symbol->flags & flags
- : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE))))
- return symbol;
- @@ -679,10 +820,10 @@
- new_name = strdup(name);
- } else {
- new_name = NULL;
- - hash = 256;
- + hash = 0;
- }
-
- - symbol = malloc(sizeof(*symbol));
- + symbol = xmalloc(sizeof(*symbol));
- memset(symbol, 0, sizeof(*symbol));
- symbol->name = new_name;
- symbol->type = S_UNKNOWN;
- @@ -697,7 +838,6 @@
- struct symbol *sym_find(const char *name)
- {
- struct symbol *symbol = NULL;
- - const char *ptr;
- int hash = 0;
-
- if (!name)
- @@ -710,12 +850,11 @@
- case 'n': return &symbol_no;
- }
- }
- - for (ptr = name; *ptr; ptr++)
- - hash += *ptr;
- - hash &= 0xff;
- + hash = strhash(name) % SYMBOL_HASHSIZE;
-
- for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
- - if (!strcmp(symbol->name, name) &&
- + if (symbol->name &&
- + !strcmp(symbol->name, name) &&
- !(symbol->flags & SYMBOL_CONST))
- break;
- }
- @@ -723,42 +862,301 @@
- return symbol;
- }
-
- +/*
- + * Expand symbol's names embedded in the string given in argument. Symbols'
- + * name to be expanded shall be prefixed by a '$'. Unknown symbol expands to
- + * the empty string.
- + */
- +const char *sym_expand_string_value(const char *in)
- +{
- + const char *src;
- + char *res;
- + size_t reslen;
- +
- + reslen = strlen(in) + 1;
- + res = xmalloc(reslen);
- + res[0] = '\0';
- +
- + while ((src = strchr(in, '$'))) {
- + char *p, name[SYMBOL_MAXLENGTH];
- + const char *symval = "";
- + struct symbol *sym;
- + size_t newlen;
- +
- + strncat(res, in, src - in);
- + src++;
- +
- + p = name;
- + while (isalnum(*src) || *src == '_')
- + *p++ = *src++;
- + *p = '\0';
- +
- + sym = sym_find(name);
- + if (sym != NULL) {
- + sym_calc_value(sym);
- + symval = sym_get_string_value(sym);
- + }
- +
- + newlen = strlen(res) + strlen(symval) + strlen(src) + 1;
- + if (newlen > reslen) {
- + reslen = newlen;
- + res = realloc(res, reslen);
- + }
- +
- + strcat(res, symval);
- + in = src;
- + }
- + strcat(res, in);
- +
- + return res;
- +}
- +
- +const char *sym_escape_string_value(const char *in)
- +{
- + const char *p;
- + size_t reslen;
- + char *res;
- + size_t l;
- +
- + reslen = strlen(in) + strlen("\"\"") + 1;
- +
- + p = in;
- + for (;;) {
- + l = strcspn(p, "\"\\");
- + p += l;
- +
- + if (p[0] == '\0')
- + break;
- +
- + reslen++;
- + p++;
- + }
- +
- + res = xmalloc(reslen);
- + res[0] = '\0';
- +
- + strcat(res, "\"");
- +
- + p = in;
- + for (;;) {
- + l = strcspn(p, "\"\\");
- + strncat(res, p, l);
- + p += l;
- +
- + if (p[0] == '\0')
- + break;
- +
- + strcat(res, "\\");
- + strncat(res, p++, 1);
- + }
- +
- + strcat(res, "\"");
- + return res;
- +}
- +
- +struct sym_match {
- + struct symbol *sym;
- + off_t so, eo;
- +};
- +
- +/* Compare matched symbols as thus:
- + * - first, symbols that match exactly
- + * - then, alphabetical sort
- + */
- +static int sym_rel_comp( const void *sym1, const void *sym2 )
- +{
- + struct sym_match *s1 = *(struct sym_match **)sym1;
- + struct sym_match *s2 = *(struct sym_match **)sym2;
- + int l1, l2;
- +
- + /* Exact match:
- + * - if matched length on symbol s1 is the length of that symbol,
- + * then this symbol should come first;
- + * - if matched length on symbol s2 is the length of that symbol,
- + * then this symbol should come first.
- + * Note: since the search can be a regexp, both symbols may match
- + * exactly; if this is the case, we can't decide which comes first,
- + * and we fallback to sorting alphabetically.
- + */
- + l1 = s1->eo - s1->so;
- + l2 = s2->eo - s2->so;
- + if (l1 == strlen(s1->sym->name) && l2 != strlen(s2->sym->name))
- + return -1;
- + if (l1 != strlen(s1->sym->name) && l2 == strlen(s2->sym->name))
- + return 1;
- +
- + /* As a fallback, sort symbols alphabetically */
- + return strcmp(s1->sym->name, s2->sym->name);
- +}
- +
- struct symbol **sym_re_search(const char *pattern)
- {
- struct symbol *sym, **sym_arr = NULL;
- + struct sym_match **sym_match_arr = NULL;
- int i, cnt, size;
- regex_t re;
- + regmatch_t match[1];
-
- cnt = size = 0;
- /* Skip if empty */
- if (strlen(pattern) == 0)
- return NULL;
- - if (regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB|REG_ICASE))
- + if (regcomp(&re, pattern, REG_EXTENDED|REG_ICASE))
- return NULL;
-
- for_all_symbols(i, sym) {
- + struct sym_match *tmp_sym_match;
- if (sym->flags & SYMBOL_CONST || !sym->name)
- continue;
- - if (regexec(&re, sym->name, 0, NULL, 0))
- + if (regexec(&re, sym->name, 1, match, 0))
- continue;
- if (cnt + 1 >= size) {
- - void *tmp = sym_arr;
- + void *tmp;
- size += 16;
- - sym_arr = realloc(sym_arr, size * sizeof(struct symbol *));
- - if (!sym_arr) {
- - free(tmp);
- - return NULL;
- + tmp = realloc(sym_match_arr, size * sizeof(struct sym_match *));
- + if (!tmp) {
- + goto sym_re_search_free;
- }
- + sym_match_arr = tmp;
- }
- - sym_arr[cnt++] = sym;
- - }
- - if (sym_arr)
- + sym_calc_value(sym);
- + tmp_sym_match = (struct sym_match*)malloc(sizeof(struct sym_match));
- + if (!tmp_sym_match)
- + goto sym_re_search_free;
- + tmp_sym_match->sym = sym;
- + /* As regexec return 0, we know we have a match, so
- + * we can use match[0].rm_[se]o without further checks
- + */
- + tmp_sym_match->so = match[0].rm_so;
- + tmp_sym_match->eo = match[0].rm_eo;
- + sym_match_arr[cnt++] = tmp_sym_match;
- + }
- + if (sym_match_arr) {
- + qsort(sym_match_arr, cnt, sizeof(struct sym_match*), sym_rel_comp);
- + sym_arr = malloc((cnt+1) * sizeof(struct symbol));
- + if (!sym_arr)
- + goto sym_re_search_free;
- + for (i = 0; i < cnt; i++)
- + sym_arr[i] = sym_match_arr[i]->sym;
- sym_arr[cnt] = NULL;
- + }
- +sym_re_search_free:
- + if (sym_match_arr) {
- + for (i = 0; i < cnt; i++)
- + free(sym_match_arr[i]);
- + free(sym_match_arr);
- + }
- regfree(&re);
-
- return sym_arr;
- }
-
- +/*
- + * When we check for recursive dependencies we use a stack to save
- + * current state so we can print out relevant info to user.
- + * The entries are located on the call stack so no need to free memory.
- + * Note inser() remove() must always match to properly clear the stack.
- + */
- +static struct dep_stack {
- + struct dep_stack *prev, *next;
- + struct symbol *sym;
- + struct property *prop;
- + struct expr *expr;
- +} *check_top;
- +
- +static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym)
- +{
- + memset(stack, 0, sizeof(*stack));
- + if (check_top)
- + check_top->next = stack;
- + stack->prev = check_top;
- + stack->sym = sym;
- + check_top = stack;
- +}
- +
- +static void dep_stack_remove(void)
- +{
- + check_top = check_top->prev;
- + if (check_top)
- + check_top->next = NULL;
- +}
- +
- +/*
- + * Called when we have detected a recursive dependency.
- + * check_top point to the top of the stact so we use
- + * the ->prev pointer to locate the bottom of the stack.
- + */
- +static void sym_check_print_recursive(struct symbol *last_sym)
- +{
- + struct dep_stack *stack;
- + struct symbol *sym, *next_sym;
- + struct menu *menu = NULL;
- + struct property *prop;
- + struct dep_stack cv_stack;
- +
- + if (sym_is_choice_value(last_sym)) {
- + dep_stack_insert(&cv_stack, last_sym);
- + last_sym = prop_get_symbol(sym_get_choice_prop(last_sym));
- + }
- +
- + for (stack = check_top; stack != NULL; stack = stack->prev)
- + if (stack->sym == last_sym)
- + break;
- + if (!stack) {
- + fprintf(stderr, "unexpected recursive dependency error\n");
- + return;
- + }
- +
- + for (; stack; stack = stack->next) {
- + sym = stack->sym;
- + next_sym = stack->next ? stack->next->sym : last_sym;
- + prop = stack->prop;
- + if (prop == NULL)
- + prop = stack->sym->prop;
- +
- + /* for choice values find the menu entry (used below) */
- + if (sym_is_choice(sym) || sym_is_choice_value(sym)) {
- + for (prop = sym->prop; prop; prop = prop->next) {
- + menu = prop->menu;
- + if (prop->menu)
- + break;
- + }
- + }
- + if (stack->sym == last_sym)
- + fprintf(stderr, "%s:%d:error: recursive dependency detected!\n",
- + prop->file->name, prop->lineno);
- + if (stack->expr) {
- + fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n",
- + prop->file->name, prop->lineno,
- + sym->name ? sym->name : "<choice>",
- + prop_get_type_name(prop->type),
- + next_sym->name ? next_sym->name : "<choice>");
- + } else if (stack->prop) {
- + fprintf(stderr, "%s:%d:\tsymbol %s depends on %s\n",
- + prop->file->name, prop->lineno,
- + sym->name ? sym->name : "<choice>",
- + next_sym->name ? next_sym->name : "<choice>");
- + } else if (sym_is_choice(sym)) {
- + fprintf(stderr, "%s:%d:\tchoice %s contains symbol %s\n",
- + menu->file->name, menu->lineno,
- + sym->name ? sym->name : "<choice>",
- + next_sym->name ? next_sym->name : "<choice>");
- + } else if (sym_is_choice_value(sym)) {
- + fprintf(stderr, "%s:%d:\tsymbol %s is part of choice %s\n",
- + menu->file->name, menu->lineno,
- + sym->name ? sym->name : "<choice>",
- + next_sym->name ? next_sym->name : "<choice>");
- + } else {
- + fprintf(stderr, "%s:%d:\tsymbol %s is selected by %s\n",
- + prop->file->name, prop->lineno,
- + sym->name ? sym->name : "<choice>",
- + next_sym->name ? next_sym->name : "<choice>");
- + }
- + }
- +
- + if (check_top == &cv_stack)
- + dep_stack_remove();
- +}
-
- static struct symbol *sym_check_expr_deps(struct expr *e)
- {
- @@ -795,24 +1193,33 @@
- {
- struct symbol *sym2;
- struct property *prop;
- + struct dep_stack stack;
- +
- + dep_stack_insert(&stack, sym);
-
- sym2 = sym_check_expr_deps(sym->rev_dep.expr);
- if (sym2)
- - return sym2;
- + goto out;
-
- for (prop = sym->prop; prop; prop = prop->next) {
- if (prop->type == P_CHOICE || prop->type == P_SELECT)
- continue;
- + stack.prop = prop;
- sym2 = sym_check_expr_deps(prop->visible.expr);
- if (sym2)
- break;
- if (prop->type != P_DEFAULT || sym_is_choice(sym))
- continue;
- + stack.expr = prop->expr;
- sym2 = sym_check_expr_deps(prop->expr);
- if (sym2)
- break;
- + stack.expr = NULL;
- }
-
- +out:
- + dep_stack_remove();
- +
- return sym2;
- }
-
- @@ -821,6 +1228,9 @@
- struct symbol *sym, *sym2;
- struct property *prop;
- struct expr *e;
- + struct dep_stack stack;
- +
- + dep_stack_insert(&stack, choice);
-
- prop = sym_get_choice_prop(choice);
- expr_list_for_each_sym(prop->expr, e, sym)
- @@ -834,10 +1244,8 @@
-
- expr_list_for_each_sym(prop->expr, e, sym) {
- sym2 = sym_check_sym_deps(sym);
- - if (sym2) {
- - fprintf(stderr, " -> %s", sym->name);
- + if (sym2)
- break;
- - }
- }
- out:
- expr_list_for_each_sym(prop->expr, e, sym)
- @@ -847,6 +1255,8 @@
- prop_get_symbol(sym_get_choice_prop(sym2)) == choice)
- sym2 = choice;
-
- + dep_stack_remove();
- +
- return sym2;
- }
-
- @@ -856,18 +1266,20 @@
- struct property *prop;
-
- if (sym->flags & SYMBOL_CHECK) {
- - fprintf(stderr, "%s:%d:error: found recursive dependency: %s",
- - sym->prop->file->name, sym->prop->lineno,
- - sym->name ? sym->name : "<choice>");
- + sym_check_print_recursive(sym);
- return sym;
- }
- if (sym->flags & SYMBOL_CHECKED)
- return NULL;
-
- if (sym_is_choice_value(sym)) {
- + struct dep_stack stack;
- +
- /* for choice groups start the check with main choice symbol */
- + dep_stack_insert(&stack, sym);
- prop = sym_get_choice_prop(sym);
- sym2 = sym_check_deps(prop_get_symbol(prop));
- + dep_stack_remove();
- } else if (sym_is_choice(sym)) {
- sym2 = sym_check_choice_deps(sym);
- } else {
- @@ -876,14 +1288,8 @@
- sym->flags &= ~SYMBOL_CHECK;
- }
-
- - if (sym2) {
- - fprintf(stderr, " -> %s", sym->name ? sym->name : "<choice>");
- - if (sym2 == sym) {
- - fprintf(stderr, "\n");
- - zconfnerrs++;
- - sym2 = NULL;
- - }
- - }
- + if (sym2 && sym2 == sym)
- + sym2 = NULL;
-
- return sym2;
- }
- @@ -893,7 +1299,7 @@
- struct property *prop;
- struct property **propp;
-
- - prop = malloc(sizeof(*prop));
- + prop = xmalloc(sizeof(*prop));
- memset(prop, 0, sizeof(*prop));
- prop->type = type;
- prop->sym = sym;
- @@ -937,13 +1343,15 @@
- return "select";
- case P_RANGE:
- return "range";
- + case P_SYMBOL:
- + return "symbol";
- case P_UNKNOWN:
- break;
- }
- return "unknown";
- }
-
- -void prop_add_env(const char *env)
- +static void prop_add_env(const char *env)
- {
- struct symbol *sym, *sym2;
- struct property *prop;
- diff -Nur uClibc-0.9.33.2/extra/config/util.c uClibc/extra/config/util.c
- --- uClibc-0.9.33.2/extra/config/util.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/util.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,6 +5,8 @@
- * Released under the terms of the GNU GPL v2.0.
- */
-
- +#include <stdarg.h>
- +#include <stdlib.h>
- #include <string.h>
- #include "lkc.h"
-
- @@ -12,15 +14,18 @@
- struct file *file_lookup(const char *name)
- {
- struct file *file;
- + const char *file_name = sym_expand_string_value(name);
-
- for (file = file_list; file; file = file->next) {
- - if (!strcmp(name, file->name))
- + if (!strcmp(name, file->name)) {
- + free((void *)file_name);
- return file;
- + }
- }
-
- - file = malloc(sizeof(*file));
- + file = xmalloc(sizeof(*file));
- memset(file, 0, sizeof(*file));
- - file->name = strdup(name);
- + file->name = file_name;
- file->next = file_list;
- file_list = file;
- return file;
- @@ -32,11 +37,15 @@
- struct symbol *sym, *env_sym;
- struct expr *e;
- struct file *file;
- + char tmpf[PATH_MAX+1];
- FILE *out;
-
- if (!name)
- name = ".kconfig.d";
- - out = fopen("..config.tmp", "w");
- + strcpy(tmpf, name);
- + dir_name(tmpf);
- + strcat(tmpf, "..config.tmp");
- + out = fopen(tmpf, "w");
- if (!out)
- return 1;
- fprintf(out, "deps_config := \\\n");
- @@ -46,8 +55,8 @@
- else
- fprintf(out, "\t%s\n", file->name);
- }
- - fprintf(out, "\ninclude/config/auto.conf: \\\n"
- - "\t$(deps_config)\n\n");
- + fprintf(out, "\n%s: \\\n"
- + "\t$(deps_config)\n\n", conf_get_autoconfig_name());
-
- expr_list_for_each_sym(sym_env_list, e, sym) {
- struct property *prop;
- @@ -61,23 +70,24 @@
- if (!value)
- value = "";
- fprintf(out, "ifneq \"$(%s)\" \"%s\"\n", env_sym->name, value);
- - fprintf(out, "include/config/auto.conf: FORCE\n");
- + fprintf(out, "%s: FORCE\n", conf_get_autoconfig_name());
- fprintf(out, "endif\n");
- }
-
- fprintf(out, "\n$(deps_config): ;\n");
- fclose(out);
- - rename("..config.tmp", name);
- + rename(tmpf, name);
- return 0;
- }
-
-
- -/* Allocate initial growable sting */
- +/* Allocate initial growable string */
- struct gstr str_new(void)
- {
- struct gstr gs;
- - gs.s = malloc(sizeof(char) * 64);
- + gs.s = xmalloc(sizeof(char) * 64);
- gs.len = 64;
- + gs.max_width = 0;
- strcpy(gs.s, "\0");
- return gs;
- }
- @@ -88,6 +98,7 @@
- struct gstr gs;
- gs.s = strdup(s);
- gs.len = strlen(s) + 1;
- + gs.max_width = 0;
- return gs;
- }
-
- @@ -131,3 +142,40 @@
- return gs->s;
- }
-
- +void *xmalloc(size_t size)
- +{
- + void *p = malloc(size);
- + if (p)
- + return p;
- + fprintf(stderr, "Out of memory.\n");
- + exit(1);
- +}
- +
- +void *xcalloc(size_t nmemb, size_t size)
- +{
- + void *p = calloc(nmemb, size);
- + if (p)
- + return p;
- + fprintf(stderr, "Out of memory.\n");
- + exit(1);
- +}
- +
- +/* basename, dirname - parse pathname components */
- +char *dir_name(char *path)
- +{
- + char *slash = strrchr(path, '/');
- + int size = 0;
- + if (slash)
- + size = slash - path + 1;
- + path[size] = 0;
- + return path;
- +}
- +char *base_name(char *path)
- +{
- + char *slash = strrchr(path, '/');
- + if (slash)
- + path += slash - path + 1;
- + return path;
- +
- +}
- +
- diff -Nur uClibc-0.9.33.2/extra/config/zconf.gperf uClibc/extra/config/zconf.gperf
- --- uClibc-0.9.33.2/extra/config/zconf.gperf 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/zconf.gperf 2014-02-03 12:32:56.000000000 +0100
- @@ -9,6 +9,8 @@
-
- struct kconf_id;
-
- +static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
- +
- %%
- mainmenu, T_MAINMENU, TF_COMMAND
- menu, T_MENU, TF_COMMAND
- @@ -36,6 +38,7 @@
- string, T_TYPE, TF_COMMAND, S_STRING
- select, T_SELECT, TF_COMMAND
- range, T_RANGE, TF_COMMAND
- +visible, T_VISIBLE, TF_COMMAND
- option, T_OPTION, TF_COMMAND
- on, T_ON, TF_PARAM
- modules, T_OPT_MODULES, TF_OPTION
- diff -Nur uClibc-0.9.33.2/extra/config/zconf.hash.c_shipped uClibc/extra/config/zconf.hash.c_shipped
- --- uClibc-0.9.33.2/extra/config/zconf.hash.c_shipped 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/zconf.hash.c_shipped 2014-02-03 12:32:56.000000000 +0100
- @@ -1,6 +1,5 @@
- -/* ANSI-C code produced by gperf version 3.0.3 */
- -/* Command-line: gperf */
- -/* Computed positions: -k'1,3' */
- +/* ANSI-C code produced by gperf version 3.0.4 */
- +/* 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 */
-
- #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
- && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
- @@ -29,8 +28,11 @@
- #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
- #endif
-
- +#line 10 "scripts/kconfig/zconf.gperf"
- struct kconf_id;
- -/* maximum key range = 47, duplicates = 0 */
- +
- +static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
- +/* maximum key range = 71, duplicates = 0 */
-
- #ifdef __GNUC__
- __inline
- @@ -42,34 +44,34 @@
- static unsigned int
- kconf_id_hash (register const char *str, register unsigned int len)
- {
- - static unsigned char asso_values[] =
- + static const unsigned char asso_values[] =
- {
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 11, 5,
- - 0, 0, 5, 49, 5, 20, 49, 49, 5, 20,
- - 5, 0, 30, 49, 0, 15, 0, 10, 0, 49,
- - 25, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- - 49, 49, 49, 49, 49, 49
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 25, 25,
- + 0, 0, 0, 5, 0, 0, 73, 73, 5, 0,
- + 10, 5, 45, 73, 20, 20, 0, 15, 15, 73,
- + 20, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- + 73, 73, 73, 73, 73, 73
- };
- register int hval = len;
-
- @@ -83,137 +85,183 @@
- hval += asso_values[(unsigned char)str[0]];
- break;
- }
- - return hval;
- + return hval + asso_values[(unsigned char)str[len - 1]];
- }
-
- struct kconf_id_strings_t
- {
- - char kconf_id_strings_str2[sizeof("on")];
- - char kconf_id_strings_str3[sizeof("env")];
- + char kconf_id_strings_str2[sizeof("if")];
- + char kconf_id_strings_str3[sizeof("int")];
- char kconf_id_strings_str5[sizeof("endif")];
- - char kconf_id_strings_str6[sizeof("option")];
- - char kconf_id_strings_str7[sizeof("endmenu")];
- - char kconf_id_strings_str8[sizeof("optional")];
- + char kconf_id_strings_str7[sizeof("default")];
- + char kconf_id_strings_str8[sizeof("tristate")];
- char kconf_id_strings_str9[sizeof("endchoice")];
- - char kconf_id_strings_str10[sizeof("range")];
- - char kconf_id_strings_str11[sizeof("choice")];
- - char kconf_id_strings_str12[sizeof("default")];
- + char kconf_id_strings_str12[sizeof("def_tristate")];
- char kconf_id_strings_str13[sizeof("def_bool")];
- - char kconf_id_strings_str14[sizeof("help")];
- - char kconf_id_strings_str15[sizeof("bool")];
- - char kconf_id_strings_str16[sizeof("config")];
- - char kconf_id_strings_str17[sizeof("def_tristate")];
- - char kconf_id_strings_str18[sizeof("boolean")];
- - char kconf_id_strings_str19[sizeof("defconfig_list")];
- - char kconf_id_strings_str21[sizeof("string")];
- - char kconf_id_strings_str22[sizeof("if")];
- - char kconf_id_strings_str23[sizeof("int")];
- - char kconf_id_strings_str26[sizeof("select")];
- + char kconf_id_strings_str14[sizeof("defconfig_list")];
- + char kconf_id_strings_str17[sizeof("on")];
- + char kconf_id_strings_str18[sizeof("optional")];
- + char kconf_id_strings_str21[sizeof("option")];
- + char kconf_id_strings_str22[sizeof("endmenu")];
- + char kconf_id_strings_str23[sizeof("mainmenu")];
- + char kconf_id_strings_str25[sizeof("menuconfig")];
- char kconf_id_strings_str27[sizeof("modules")];
- - char kconf_id_strings_str28[sizeof("tristate")];
- char kconf_id_strings_str29[sizeof("menu")];
- - char kconf_id_strings_str31[sizeof("source")];
- + char kconf_id_strings_str31[sizeof("select")];
- char kconf_id_strings_str32[sizeof("comment")];
- - char kconf_id_strings_str33[sizeof("hex")];
- - char kconf_id_strings_str35[sizeof("menuconfig")];
- - char kconf_id_strings_str36[sizeof("prompt")];
- - char kconf_id_strings_str37[sizeof("depends")];
- - char kconf_id_strings_str48[sizeof("mainmenu")];
- + char kconf_id_strings_str33[sizeof("env")];
- + char kconf_id_strings_str35[sizeof("range")];
- + char kconf_id_strings_str36[sizeof("choice")];
- + char kconf_id_strings_str39[sizeof("bool")];
- + char kconf_id_strings_str41[sizeof("source")];
- + char kconf_id_strings_str42[sizeof("visible")];
- + char kconf_id_strings_str43[sizeof("hex")];
- + char kconf_id_strings_str46[sizeof("config")];
- + char kconf_id_strings_str47[sizeof("boolean")];
- + char kconf_id_strings_str51[sizeof("string")];
- + char kconf_id_strings_str54[sizeof("help")];
- + char kconf_id_strings_str56[sizeof("prompt")];
- + char kconf_id_strings_str72[sizeof("depends")];
- };
- -static struct kconf_id_strings_t kconf_id_strings_contents =
- +static const struct kconf_id_strings_t kconf_id_strings_contents =
- {
- - "on",
- - "env",
- + "if",
- + "int",
- "endif",
- + "default",
- + "tristate",
- + "endchoice",
- + "def_tristate",
- + "def_bool",
- + "defconfig_list",
- + "on",
- + "optional",
- "option",
- "endmenu",
- - "optional",
- - "endchoice",
- + "mainmenu",
- + "menuconfig",
- + "modules",
- + "menu",
- + "select",
- + "comment",
- + "env",
- "range",
- "choice",
- - "default",
- - "def_bool",
- - "help",
- "bool",
- + "source",
- + "visible",
- + "hex",
- "config",
- - "def_tristate",
- "boolean",
- - "defconfig_list",
- "string",
- - "if",
- - "int",
- - "select",
- - "modules",
- - "tristate",
- - "menu",
- - "source",
- - "comment",
- - "hex",
- - "menuconfig",
- + "help",
- "prompt",
- - "depends",
- - "mainmenu"
- + "depends"
- };
- #define kconf_id_strings ((const char *) &kconf_id_strings_contents)
- #ifdef __GNUC__
- __inline
- -#ifdef __GNUC_STDC_INLINE__
- +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
- __attribute__ ((__gnu_inline__))
- #endif
- #endif
- -struct kconf_id *
- +const struct kconf_id *
- kconf_id_lookup (register const char *str, register unsigned int len)
- {
- enum
- {
- - TOTAL_KEYWORDS = 31,
- + TOTAL_KEYWORDS = 32,
- MIN_WORD_LENGTH = 2,
- MAX_WORD_LENGTH = 14,
- MIN_HASH_VALUE = 2,
- - MAX_HASH_VALUE = 48
- + MAX_HASH_VALUE = 72
- };
-
- - static struct kconf_id wordlist[] =
- + static const struct kconf_id wordlist[] =
- {
- {-1}, {-1},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_OPT_ENV, TF_OPTION},
- +#line 25 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM},
- +#line 36 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT},
- {-1},
- +#line 26 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_OPTION, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_OPTIONAL, TF_COMMAND},
- + {-1},
- +#line 29 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
- +#line 31 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE},
- +#line 20 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_CHOICE, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
- + {-1}, {-1},
- +#line 32 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE},
- +#line 35 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str15, T_TYPE, TF_COMMAND, S_BOOLEAN},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_BOOLEAN},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION},
- - {-1},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_TYPE, TF_COMMAND, S_STRING},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT},
- +#line 45 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
- + {-1}, {-1},
- +#line 43 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM},
- +#line 28 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
- {-1}, {-1},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SELECT, TF_COMMAND},
- +#line 42 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND},
- +#line 17 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND},
- +#line 15 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_MAINMENU, TF_COMMAND},
- + {-1},
- +#line 23 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND},
- + {-1},
- +#line 44 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE},
- + {-1},
- +#line 16 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
- {-1},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SOURCE, TF_COMMAND},
- +#line 39 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND},
- +#line 21 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_TYPE, TF_COMMAND, S_HEX},
- +#line 46 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION},
- {-1},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_PROMPT, TF_COMMAND},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_DEPENDS, TF_COMMAND},
- - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- +#line 40 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND},
- +#line 19 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND},
- + {-1}, {-1},
- +#line 33 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_TYPE, TF_COMMAND, S_BOOLEAN},
- + {-1},
- +#line 18 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND},
- +#line 41 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND},
- +#line 37 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX},
- + {-1}, {-1},
- +#line 22 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND},
- +#line 34 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
- + {-1}, {-1}, {-1},
- +#line 38 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING},
- + {-1}, {-1},
- +#line 24 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54, T_HELP, TF_COMMAND},
- {-1},
- - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND}
- +#line 30 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56, T_PROMPT, TF_COMMAND},
- + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- + {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- +#line 27 "scripts/kconfig/zconf.gperf"
- + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72, T_DEPENDS, TF_COMMAND}
- };
-
- if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
- @@ -234,4 +282,5 @@
- }
- return 0;
- }
- +#line 47 "scripts/kconfig/zconf.gperf"
-
- diff -Nur uClibc-0.9.33.2/extra/config/zconf.l uClibc/extra/config/zconf.l
- --- uClibc-0.9.33.2/extra/config/zconf.l 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/zconf.l 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,5 @@
- -%option backup nostdinit noyywrap never-interactive full ecs
- -%option 8bit backup nodefault perf-report perf-report
- +%option nostdinit noyywrap never-interactive full ecs
- +%option 8bit nodefault perf-report perf-report
- %option noinput
- %x COMMAND HELP STRING PARAM
- %{
- @@ -14,7 +14,6 @@
- #include <string.h>
- #include <unistd.h>
-
- -#define LKC_DIRECT_LINK
- #include "lkc.h"
-
- #define START_STRSIZE 16
- @@ -39,15 +38,15 @@
- static void zconf_endhelp(void);
- static void zconf_endfile(void);
-
- -void new_string(void)
- +static void new_string(void)
- {
- - text = malloc(START_STRSIZE);
- + text = xmalloc(START_STRSIZE);
- text_asize = START_STRSIZE;
- text_size = 0;
- *text = 0;
- }
-
- -void append_string(const char *str, int size)
- +static void append_string(const char *str, int size)
- {
- int new_size = text_size + size + 1;
- if (new_size > text_asize) {
- @@ -61,9 +60,9 @@
- text[text_size] = 0;
- }
-
- -void alloc_string(const char *str, int size)
- +static void alloc_string(const char *str, int size)
- {
- - text = malloc(size + 1);
- + text = xmalloc(size + 1);
- memcpy(text, str, size);
- text[size] = 0;
- }
- @@ -96,7 +95,7 @@
-
- <COMMAND>{
- {n}+ {
- - struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
- + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
- BEGIN(PARAM);
- current_pos.file = current_file;
- current_pos.lineno = current_file->lineno;
- @@ -132,7 +131,7 @@
- \n BEGIN(INITIAL); current_file->lineno++; return T_EOL;
- --- /* ignore */
- ({n}|[-/.])+ {
- - struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
- + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
- if (id && id->flags & TF_PARAM) {
- zconflval.id = id;
- return id->token;
- @@ -289,42 +288,50 @@
- exit(1);
- }
-
- - current_buf = malloc(sizeof(*current_buf));
- + current_buf = xmalloc(sizeof(*current_buf));
- memset(current_buf, 0, sizeof(*current_buf));
-
- current_file = file_lookup(name);
- current_file->lineno = 1;
- - current_file->flags = FILE_BUSY;
- }
-
- void zconf_nextfile(const char *name)
- {
- + struct file *iter;
- struct file *file = file_lookup(name);
- - struct buffer *buf = malloc(sizeof(*buf));
- + struct buffer *buf = xmalloc(sizeof(*buf));
- memset(buf, 0, sizeof(*buf));
-
- current_buf->state = YY_CURRENT_BUFFER;
- - yyin = zconf_fopen(name);
- + yyin = zconf_fopen(file->name);
- if (!yyin) {
- - printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
- + printf("%s:%d: can't open file \"%s\"\n",
- + zconf_curname(), zconf_lineno(), file->name);
- exit(1);
- }
- yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
- buf->parent = current_buf;
- current_buf = buf;
-
- - if (file->flags & FILE_BUSY) {
- - printf("%s:%d: do not source '%s' from itself\n",
- - zconf_curname(), zconf_lineno(), name);
- - exit(1);
- - }
- - if (file->flags & FILE_SCANNED) {
- - printf("%s:%d: file '%s' is already sourced from '%s'\n",
- - zconf_curname(), zconf_lineno(), name,
- - file->parent->name);
- - exit(1);
- + for (iter = current_file->parent; iter; iter = iter->parent ) {
- + if (!strcmp(current_file->name,iter->name) ) {
- + printf("%s:%d: recursive inclusion detected. "
- + "Inclusion path:\n current file : '%s'\n",
- + zconf_curname(), zconf_lineno(),
- + zconf_curname());
- + iter = current_file->parent;
- + while (iter && \
- + strcmp(iter->name,current_file->name)) {
- + printf(" included from: '%s:%d'\n",
- + iter->name, iter->lineno-1);
- + iter = iter->parent;
- + }
- + if (iter)
- + printf(" included from: '%s:%d'\n",
- + iter->name, iter->lineno+1);
- + exit(1);
- + }
- }
- - file->flags |= FILE_BUSY;
- file->lineno = 1;
- file->parent = current_file;
- current_file = file;
- @@ -334,8 +341,6 @@
- {
- struct buffer *parent;
-
- - current_file->flags |= FILE_SCANNED;
- - current_file->flags &= ~FILE_BUSY;
- current_file = current_file->parent;
-
- parent = current_buf->parent;
- @@ -353,7 +358,7 @@
- return current_pos.lineno;
- }
-
- -char *zconf_curname(void)
- +const char *zconf_curname(void)
- {
- return current_pos.file ? current_pos.file->name : "<none>";
- }
- diff -Nur uClibc-0.9.33.2/extra/config/zconf.lex.c_shipped uClibc/extra/config/zconf.lex.c_shipped
- --- uClibc-0.9.33.2/extra/config/zconf.lex.c_shipped 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/config/zconf.lex.c_shipped 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,2420 @@
- +
- +#line 3 "scripts/kconfig/zconf.lex.c_shipped"
- +
- +#define YY_INT_ALIGNED short int
- +
- +/* A lexical scanner generated by flex */
- +
- +#define yy_create_buffer zconf_create_buffer
- +#define yy_delete_buffer zconf_delete_buffer
- +#define yy_flex_debug zconf_flex_debug
- +#define yy_init_buffer zconf_init_buffer
- +#define yy_flush_buffer zconf_flush_buffer
- +#define yy_load_buffer_state zconf_load_buffer_state
- +#define yy_switch_to_buffer zconf_switch_to_buffer
- +#define yyin zconfin
- +#define yyleng zconfleng
- +#define yylex zconflex
- +#define yylineno zconflineno
- +#define yyout zconfout
- +#define yyrestart zconfrestart
- +#define yytext zconftext
- +#define yywrap zconfwrap
- +#define yyalloc zconfalloc
- +#define yyrealloc zconfrealloc
- +#define yyfree zconffree
- +
- +#define FLEX_SCANNER
- +#define YY_FLEX_MAJOR_VERSION 2
- +#define YY_FLEX_MINOR_VERSION 5
- +#define YY_FLEX_SUBMINOR_VERSION 35
- +#if YY_FLEX_SUBMINOR_VERSION > 0
- +#define FLEX_BETA
- +#endif
- +
- +/* First, we deal with platform-specific or compiler-specific issues. */
- +
- +/* begin standard C headers. */
- +#include <stdio.h>
- +#include <string.h>
- +#include <errno.h>
- +#include <stdlib.h>
- +
- +/* end standard C headers. */
- +
- +/* flex integer type definitions */
- +
- +#ifndef FLEXINT_H
- +#define FLEXINT_H
- +
- +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
- +
- +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- +
- +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- + * if you want the limit (max/min) macros for int types.
- + */
- +#ifndef __STDC_LIMIT_MACROS
- +#define __STDC_LIMIT_MACROS 1
- +#endif
- +
- +#include <inttypes.h>
- +typedef int8_t flex_int8_t;
- +typedef uint8_t flex_uint8_t;
- +typedef int16_t flex_int16_t;
- +typedef uint16_t flex_uint16_t;
- +typedef int32_t flex_int32_t;
- +typedef uint32_t flex_uint32_t;
- +#else
- +typedef signed char flex_int8_t;
- +typedef short int flex_int16_t;
- +typedef int flex_int32_t;
- +typedef unsigned char flex_uint8_t;
- +typedef unsigned short int flex_uint16_t;
- +typedef unsigned int flex_uint32_t;
- +#endif /* ! C99 */
- +
- +/* Limits of integral types. */
- +#ifndef INT8_MIN
- +#define INT8_MIN (-128)
- +#endif
- +#ifndef INT16_MIN
- +#define INT16_MIN (-32767-1)
- +#endif
- +#ifndef INT32_MIN
- +#define INT32_MIN (-2147483647-1)
- +#endif
- +#ifndef INT8_MAX
- +#define INT8_MAX (127)
- +#endif
- +#ifndef INT16_MAX
- +#define INT16_MAX (32767)
- +#endif
- +#ifndef INT32_MAX
- +#define INT32_MAX (2147483647)
- +#endif
- +#ifndef UINT8_MAX
- +#define UINT8_MAX (255U)
- +#endif
- +#ifndef UINT16_MAX
- +#define UINT16_MAX (65535U)
- +#endif
- +#ifndef UINT32_MAX
- +#define UINT32_MAX (4294967295U)
- +#endif
- +
- +#endif /* ! FLEXINT_H */
- +
- +#ifdef __cplusplus
- +
- +/* The "const" storage-class-modifier is valid. */
- +#define YY_USE_CONST
- +
- +#else /* ! __cplusplus */
- +
- +/* C99 requires __STDC__ to be defined as 1. */
- +#if defined (__STDC__)
- +
- +#define YY_USE_CONST
- +
- +#endif /* defined (__STDC__) */
- +#endif /* ! __cplusplus */
- +
- +#ifdef YY_USE_CONST
- +#define yyconst const
- +#else
- +#define yyconst
- +#endif
- +
- +/* Returned upon end-of-file. */
- +#define YY_NULL 0
- +
- +/* Promotes a possibly negative, possibly signed char to an unsigned
- + * integer for use as an array index. If the signed char is negative,
- + * we want to instead treat it as an 8-bit unsigned char, hence the
- + * double cast.
- + */
- +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
- +
- +/* Enter a start condition. This macro really ought to take a parameter,
- + * but we do it the disgusting crufty way forced on us by the ()-less
- + * definition of BEGIN.
- + */
- +#define BEGIN (yy_start) = 1 + 2 *
- +
- +/* Translate the current start state into a value that can be later handed
- + * to BEGIN to return to the state. The YYSTATE alias is for lex
- + * compatibility.
- + */
- +#define YY_START (((yy_start) - 1) / 2)
- +#define YYSTATE YY_START
- +
- +/* Action number for EOF rule of a given start state. */
- +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
- +
- +/* Special action meaning "start processing a new file". */
- +#define YY_NEW_FILE zconfrestart(zconfin )
- +
- +#define YY_END_OF_BUFFER_CHAR 0
- +
- +/* Size of default input buffer. */
- +#ifndef YY_BUF_SIZE
- +#define YY_BUF_SIZE 16384
- +#endif
- +
- +/* The state buf must be large enough to hold one state per character in the main buffer.
- + */
- +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
- +
- +#ifndef YY_TYPEDEF_YY_BUFFER_STATE
- +#define YY_TYPEDEF_YY_BUFFER_STATE
- +typedef struct yy_buffer_state *YY_BUFFER_STATE;
- +#endif
- +
- +extern int zconfleng;
- +
- +extern FILE *zconfin, *zconfout;
- +
- +#define EOB_ACT_CONTINUE_SCAN 0
- +#define EOB_ACT_END_OF_FILE 1
- +#define EOB_ACT_LAST_MATCH 2
- +
- + #define YY_LESS_LINENO(n)
- +
- +/* Return all but the first "n" matched characters back to the input stream. */
- +#define yyless(n) \
- + do \
- + { \
- + /* Undo effects of setting up zconftext. */ \
- + int yyless_macro_arg = (n); \
- + YY_LESS_LINENO(yyless_macro_arg);\
- + *yy_cp = (yy_hold_char); \
- + YY_RESTORE_YY_MORE_OFFSET \
- + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- + YY_DO_BEFORE_ACTION; /* set up zconftext again */ \
- + } \
- + while ( 0 )
- +
- +#define unput(c) yyunput( c, (yytext_ptr) )
- +
- +#ifndef YY_TYPEDEF_YY_SIZE_T
- +#define YY_TYPEDEF_YY_SIZE_T
- +typedef size_t yy_size_t;
- +#endif
- +
- +#ifndef YY_STRUCT_YY_BUFFER_STATE
- +#define YY_STRUCT_YY_BUFFER_STATE
- +struct yy_buffer_state
- + {
- + FILE *yy_input_file;
- +
- + char *yy_ch_buf; /* input buffer */
- + char *yy_buf_pos; /* current position in input buffer */
- +
- + /* Size of input buffer in bytes, not including room for EOB
- + * characters.
- + */
- + yy_size_t yy_buf_size;
- +
- + /* Number of characters read into yy_ch_buf, not including EOB
- + * characters.
- + */
- + int yy_n_chars;
- +
- + /* Whether we "own" the buffer - i.e., we know we created it,
- + * and can realloc() it to grow it, and should free() it to
- + * delete it.
- + */
- + int yy_is_our_buffer;
- +
- + /* Whether this is an "interactive" input source; if so, and
- + * if we're using stdio for input, then we want to use getc()
- + * instead of fread(), to make sure we stop fetching input after
- + * each newline.
- + */
- + int yy_is_interactive;
- +
- + /* Whether we're considered to be at the beginning of a line.
- + * If so, '^' rules will be active on the next match, otherwise
- + * not.
- + */
- + int yy_at_bol;
- +
- + int yy_bs_lineno; /**< The line count. */
- + int yy_bs_column; /**< The column count. */
- +
- + /* Whether to try to fill the input buffer when we reach the
- + * end of it.
- + */
- + int yy_fill_buffer;
- +
- + int yy_buffer_status;
- +
- +#define YY_BUFFER_NEW 0
- +#define YY_BUFFER_NORMAL 1
- + /* When an EOF's been seen but there's still some text to process
- + * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- + * shouldn't try reading from the input source any more. We might
- + * still have a bunch of tokens to match, though, because of
- + * possible backing-up.
- + *
- + * When we actually see the EOF, we change the status to "new"
- + * (via zconfrestart()), so that the user can continue scanning by
- + * just pointing zconfin at a new input file.
- + */
- +#define YY_BUFFER_EOF_PENDING 2
- +
- + };
- +#endif /* !YY_STRUCT_YY_BUFFER_STATE */
- +
- +/* Stack of input buffers. */
- +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
- +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
- +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
- +
- +/* We provide macros for accessing buffer states in case in the
- + * future we want to put the buffer states in a more general
- + * "scanner state".
- + *
- + * Returns the top of the stack, or NULL.
- + */
- +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
- + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
- + : NULL)
- +
- +/* Same as previous macro, but useful when we know that the buffer stack is not
- + * NULL or when we need an lvalue. For internal use only.
- + */
- +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
- +
- +/* yy_hold_char holds the character lost when zconftext is formed. */
- +static char yy_hold_char;
- +static int yy_n_chars; /* number of characters read into yy_ch_buf */
- +int zconfleng;
- +
- +/* Points to current character in buffer. */
- +static char *yy_c_buf_p = (char *) 0;
- +static int yy_init = 0; /* whether we need to initialize */
- +static int yy_start = 0; /* start state number */
- +
- +/* Flag which is used to allow zconfwrap()'s to do buffer switches
- + * instead of setting up a fresh zconfin. A bit of a hack ...
- + */
- +static int yy_did_buffer_switch_on_eof;
- +
- +void zconfrestart (FILE *input_file );
- +void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer );
- +YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size );
- +void zconf_delete_buffer (YY_BUFFER_STATE b );
- +void zconf_flush_buffer (YY_BUFFER_STATE b );
- +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer );
- +void zconfpop_buffer_state (void );
- +
- +static void zconfensure_buffer_stack (void );
- +static void zconf_load_buffer_state (void );
- +static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file );
- +
- +#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER )
- +
- +YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size );
- +YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str );
- +YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len );
- +
- +void *zconfalloc (yy_size_t );
- +void *zconfrealloc (void *,yy_size_t );
- +void zconffree (void * );
- +
- +#define yy_new_buffer zconf_create_buffer
- +
- +#define yy_set_interactive(is_interactive) \
- + { \
- + if ( ! YY_CURRENT_BUFFER ){ \
- + zconfensure_buffer_stack (); \
- + YY_CURRENT_BUFFER_LVALUE = \
- + zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
- + } \
- + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
- + }
- +
- +#define yy_set_bol(at_bol) \
- + { \
- + if ( ! YY_CURRENT_BUFFER ){\
- + zconfensure_buffer_stack (); \
- + YY_CURRENT_BUFFER_LVALUE = \
- + zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
- + } \
- + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
- + }
- +
- +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
- +
- +/* Begin user sect3 */
- +
- +#define zconfwrap(n) 1
- +#define YY_SKIP_YYWRAP
- +
- +typedef unsigned char YY_CHAR;
- +
- +FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0;
- +
- +typedef int yy_state_type;
- +
- +extern int zconflineno;
- +
- +int zconflineno = 1;
- +
- +extern char *zconftext;
- +#define yytext_ptr zconftext
- +static yyconst flex_int16_t yy_nxt[][17] =
- + {
- + {
- + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- + 0, 0, 0, 0, 0, 0, 0
- + },
- +
- + {
- + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12,
- + 12, 12, 12, 12, 12, 12, 12
- + },
- +
- + {
- + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12,
- + 12, 12, 12, 12, 12, 12, 12
- + },
- +
- + {
- + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16,
- + 16, 16, 16, 18, 16, 16, 16
- + },
- +
- + {
- + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16,
- + 16, 16, 16, 18, 16, 16, 16
- +
- + },
- +
- + {
- + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19,
- + 19, 19, 19, 19, 19, 19, 19
- + },
- +
- + {
- + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19,
- + 19, 19, 19, 19, 19, 19, 19
- + },
- +
- + {
- + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22,
- + 22, 22, 22, 22, 22, 25, 22
- + },
- +
- + {
- + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22,
- + 22, 22, 22, 22, 22, 25, 22
- + },
- +
- + {
- + 11, 26, 26, 27, 28, 29, 30, 31, 29, 32,
- + 33, 34, 35, 35, 36, 37, 38
- +
- + },
- +
- + {
- + 11, 26, 26, 27, 28, 29, 30, 31, 29, 32,
- + 33, 34, 35, 35, 36, 37, 38
- + },
- +
- + {
- + -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
- + -11, -11, -11, -11, -11, -11, -11
- + },
- +
- + {
- + 11, -12, -12, -12, -12, -12, -12, -12, -12, -12,
- + -12, -12, -12, -12, -12, -12, -12
- + },
- +
- + {
- + 11, -13, 39, 40, -13, -13, 41, -13, -13, -13,
- + -13, -13, -13, -13, -13, -13, -13
- + },
- +
- + {
- + 11, -14, -14, -14, -14, -14, -14, -14, -14, -14,
- + -14, -14, -14, -14, -14, -14, -14
- +
- + },
- +
- + {
- + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
- + 42, 42, 42, 42, 42, 42, 42
- + },
- +
- + {
- + 11, -16, -16, -16, -16, -16, -16, -16, -16, -16,
- + -16, -16, -16, -16, -16, -16, -16
- + },
- +
- + {
- + 11, -17, -17, -17, -17, -17, -17, -17, -17, -17,
- + -17, -17, -17, -17, -17, -17, -17
- + },
- +
- + {
- + 11, -18, -18, -18, -18, -18, -18, -18, -18, -18,
- + -18, -18, -18, 44, -18, -18, -18
- + },
- +
- + {
- + 11, 45, 45, -19, 45, 45, 45, 45, 45, 45,
- + 45, 45, 45, 45, 45, 45, 45
- +
- + },
- +
- + {
- + 11, -20, 46, 47, -20, -20, -20, -20, -20, -20,
- + -20, -20, -20, -20, -20, -20, -20
- + },
- +
- + {
- + 11, 48, -21, -21, 48, 48, 48, 48, 48, 48,
- + 48, 48, 48, 48, 48, 48, 48
- + },
- +
- + {
- + 11, 49, 49, 50, 49, -22, 49, 49, -22, 49,
- + 49, 49, 49, 49, 49, -22, 49
- + },
- +
- + {
- + 11, -23, -23, -23, -23, -23, -23, -23, -23, -23,
- + -23, -23, -23, -23, -23, -23, -23
- + },
- +
- + {
- + 11, -24, -24, -24, -24, -24, -24, -24, -24, -24,
- + -24, -24, -24, -24, -24, -24, -24
- +
- + },
- +
- + {
- + 11, 51, 51, 52, 51, 51, 51, 51, 51, 51,
- + 51, 51, 51, 51, 51, 51, 51
- + },
- +
- + {
- + 11, -26, -26, -26, -26, -26, -26, -26, -26, -26,
- + -26, -26, -26, -26, -26, -26, -26
- + },
- +
- + {
- + 11, -27, -27, -27, -27, -27, -27, -27, -27, -27,
- + -27, -27, -27, -27, -27, -27, -27
- + },
- +
- + {
- + 11, -28, -28, -28, -28, -28, -28, -28, -28, -28,
- + -28, -28, -28, -28, 53, -28, -28
- + },
- +
- + {
- + 11, -29, -29, -29, -29, -29, -29, -29, -29, -29,
- + -29, -29, -29, -29, -29, -29, -29
- +
- + },
- +
- + {
- + 11, 54, 54, -30, 54, 54, 54, 54, 54, 54,
- + 54, 54, 54, 54, 54, 54, 54
- + },
- +
- + {
- + 11, -31, -31, -31, -31, -31, -31, 55, -31, -31,
- + -31, -31, -31, -31, -31, -31, -31
- + },
- +
- + {
- + 11, -32, -32, -32, -32, -32, -32, -32, -32, -32,
- + -32, -32, -32, -32, -32, -32, -32
- + },
- +
- + {
- + 11, -33, -33, -33, -33, -33, -33, -33, -33, -33,
- + -33, -33, -33, -33, -33, -33, -33
- + },
- +
- + {
- + 11, -34, -34, -34, -34, -34, -34, -34, -34, -34,
- + -34, 56, 57, 57, -34, -34, -34
- +
- + },
- +
- + {
- + 11, -35, -35, -35, -35, -35, -35, -35, -35, -35,
- + -35, 57, 57, 57, -35, -35, -35
- + },
- +
- + {
- + 11, -36, -36, -36, -36, -36, -36, -36, -36, -36,
- + -36, -36, -36, -36, -36, -36, -36
- + },
- +
- + {
- + 11, -37, -37, 58, -37, -37, -37, -37, -37, -37,
- + -37, -37, -37, -37, -37, -37, -37
- + },
- +
- + {
- + 11, -38, -38, -38, -38, -38, -38, -38, -38, -38,
- + -38, -38, -38, -38, -38, -38, 59
- + },
- +
- + {
- + 11, -39, 39, 40, -39, -39, 41, -39, -39, -39,
- + -39, -39, -39, -39, -39, -39, -39
- +
- + },
- +
- + {
- + 11, -40, -40, -40, -40, -40, -40, -40, -40, -40,
- + -40, -40, -40, -40, -40, -40, -40
- + },
- +
- + {
- + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
- + 42, 42, 42, 42, 42, 42, 42
- + },
- +
- + {
- + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
- + 42, 42, 42, 42, 42, 42, 42
- + },
- +
- + {
- + 11, -43, -43, -43, -43, -43, -43, -43, -43, -43,
- + -43, -43, -43, -43, -43, -43, -43
- + },
- +
- + {
- + 11, -44, -44, -44, -44, -44, -44, -44, -44, -44,
- + -44, -44, -44, 44, -44, -44, -44
- +
- + },
- +
- + {
- + 11, 45, 45, -45, 45, 45, 45, 45, 45, 45,
- + 45, 45, 45, 45, 45, 45, 45
- + },
- +
- + {
- + 11, -46, 46, 47, -46, -46, -46, -46, -46, -46,
- + -46, -46, -46, -46, -46, -46, -46
- + },
- +
- + {
- + 11, 48, -47, -47, 48, 48, 48, 48, 48, 48,
- + 48, 48, 48, 48, 48, 48, 48
- + },
- +
- + {
- + 11, -48, -48, -48, -48, -48, -48, -48, -48, -48,
- + -48, -48, -48, -48, -48, -48, -48
- + },
- +
- + {
- + 11, 49, 49, 50, 49, -49, 49, 49, -49, 49,
- + 49, 49, 49, 49, 49, -49, 49
- +
- + },
- +
- + {
- + 11, -50, -50, -50, -50, -50, -50, -50, -50, -50,
- + -50, -50, -50, -50, -50, -50, -50
- + },
- +
- + {
- + 11, -51, -51, 52, -51, -51, -51, -51, -51, -51,
- + -51, -51, -51, -51, -51, -51, -51
- + },
- +
- + {
- + 11, -52, -52, -52, -52, -52, -52, -52, -52, -52,
- + -52, -52, -52, -52, -52, -52, -52
- + },
- +
- + {
- + 11, -53, -53, -53, -53, -53, -53, -53, -53, -53,
- + -53, -53, -53, -53, -53, -53, -53
- + },
- +
- + {
- + 11, 54, 54, -54, 54, 54, 54, 54, 54, 54,
- + 54, 54, 54, 54, 54, 54, 54
- +
- + },
- +
- + {
- + 11, -55, -55, -55, -55, -55, -55, -55, -55, -55,
- + -55, -55, -55, -55, -55, -55, -55
- + },
- +
- + {
- + 11, -56, -56, -56, -56, -56, -56, -56, -56, -56,
- + -56, 60, 57, 57, -56, -56, -56
- + },
- +
- + {
- + 11, -57, -57, -57, -57, -57, -57, -57, -57, -57,
- + -57, 57, 57, 57, -57, -57, -57
- + },
- +
- + {
- + 11, -58, -58, -58, -58, -58, -58, -58, -58, -58,
- + -58, -58, -58, -58, -58, -58, -58
- + },
- +
- + {
- + 11, -59, -59, -59, -59, -59, -59, -59, -59, -59,
- + -59, -59, -59, -59, -59, -59, -59
- +
- + },
- +
- + {
- + 11, -60, -60, -60, -60, -60, -60, -60, -60, -60,
- + -60, 57, 57, 57, -60, -60, -60
- + },
- +
- + } ;
- +
- +static yy_state_type yy_get_previous_state (void );
- +static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
- +static int yy_get_next_buffer (void );
- +static void yy_fatal_error (yyconst char msg[] );
- +
- +/* Done after the current pattern has been matched and before the
- + * corresponding action - sets up zconftext.
- + */
- +#define YY_DO_BEFORE_ACTION \
- + (yytext_ptr) = yy_bp; \
- + zconfleng = (size_t) (yy_cp - yy_bp); \
- + (yy_hold_char) = *yy_cp; \
- + *yy_cp = '\0'; \
- + (yy_c_buf_p) = yy_cp;
- +
- +#define YY_NUM_RULES 33
- +#define YY_END_OF_BUFFER 34
- +/* This struct is not used in this scanner,
- + but its presence is necessary. */
- +struct yy_trans_info
- + {
- + flex_int32_t yy_verify;
- + flex_int32_t yy_nxt;
- + };
- +static yyconst flex_int16_t yy_accept[61] =
- + { 0,
- + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- + 34, 5, 4, 2, 3, 7, 8, 6, 32, 29,
- + 31, 24, 28, 27, 26, 22, 17, 13, 16, 20,
- + 22, 11, 12, 19, 19, 14, 22, 22, 4, 2,
- + 3, 3, 1, 6, 32, 29, 31, 30, 24, 23,
- + 26, 25, 15, 20, 9, 19, 19, 21, 10, 18
- + } ;
- +
- +static yyconst flex_int32_t yy_ec[256] =
- + { 0,
- + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 2, 4, 5, 6, 1, 1, 7, 8, 9,
- + 10, 1, 1, 1, 11, 12, 12, 13, 13, 13,
- + 13, 13, 13, 13, 13, 13, 13, 1, 1, 1,
- + 14, 1, 1, 1, 13, 13, 13, 13, 13, 13,
- + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- + 1, 15, 1, 1, 13, 1, 13, 13, 13, 13,
- +
- + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- + 13, 13, 1, 16, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- +
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1
- + } ;
- +
- +extern int zconf_flex_debug;
- +int zconf_flex_debug = 0;
- +
- +/* The intent behind this definition is that it'll catch
- + * any uses of REJECT which flex missed.
- + */
- +#define REJECT reject_used_but_not_detected
- +#define yymore() yymore_used_but_not_detected
- +#define YY_MORE_ADJ 0
- +#define YY_RESTORE_YY_MORE_OFFSET
- +char *zconftext;
- +#define YY_NO_INPUT 1
- +
- +/*
- + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
- + * Released under the terms of the GNU GPL v2.0.
- + */
- +
- +#include <limits.h>
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include <string.h>
- +#include <unistd.h>
- +
- +#include "lkc.h"
- +
- +#define START_STRSIZE 16
- +
- +static struct {
- + struct file *file;
- + int lineno;
- +} current_pos;
- +
- +static char *text;
- +static int text_size, text_asize;
- +
- +struct buffer {
- + struct buffer *parent;
- + YY_BUFFER_STATE state;
- +};
- +
- +struct buffer *current_buf;
- +
- +static int last_ts, first_ts;
- +
- +static void zconf_endhelp(void);
- +static void zconf_endfile(void);
- +
- +static void new_string(void)
- +{
- + text = xmalloc(START_STRSIZE);
- + text_asize = START_STRSIZE;
- + text_size = 0;
- + *text = 0;
- +}
- +
- +static void append_string(const char *str, int size)
- +{
- + int new_size = text_size + size + 1;
- + if (new_size > text_asize) {
- + new_size += START_STRSIZE - 1;
- + new_size &= -START_STRSIZE;
- + text = realloc(text, new_size);
- + text_asize = new_size;
- + }
- + memcpy(text + text_size, str, size);
- + text_size += size;
- + text[text_size] = 0;
- +}
- +
- +static void alloc_string(const char *str, int size)
- +{
- + text = xmalloc(size + 1);
- + memcpy(text, str, size);
- + text[size] = 0;
- +}
- +
- +#define INITIAL 0
- +#define COMMAND 1
- +#define HELP 2
- +#define STRING 3
- +#define PARAM 4
- +
- +#ifndef YY_NO_UNISTD_H
- +/* Special case for "unistd.h", since it is non-ANSI. We include it way
- + * down here because we want the user's section 1 to have been scanned first.
- + * The user has a chance to override it with an option.
- + */
- +#include <unistd.h>
- +#endif
- +
- +#ifndef YY_EXTRA_TYPE
- +#define YY_EXTRA_TYPE void *
- +#endif
- +
- +static int yy_init_globals (void );
- +
- +/* Accessor methods to globals.
- + These are made visible to non-reentrant scanners for convenience. */
- +
- +int zconflex_destroy (void );
- +
- +int zconfget_debug (void );
- +
- +void zconfset_debug (int debug_flag );
- +
- +YY_EXTRA_TYPE zconfget_extra (void );
- +
- +void zconfset_extra (YY_EXTRA_TYPE user_defined );
- +
- +FILE *zconfget_in (void );
- +
- +void zconfset_in (FILE * in_str );
- +
- +FILE *zconfget_out (void );
- +
- +void zconfset_out (FILE * out_str );
- +
- +int zconfget_leng (void );
- +
- +char *zconfget_text (void );
- +
- +int zconfget_lineno (void );
- +
- +void zconfset_lineno (int line_number );
- +
- +/* Macros after this point can all be overridden by user definitions in
- + * section 1.
- + */
- +
- +#ifndef YY_SKIP_YYWRAP
- +#ifdef __cplusplus
- +extern "C" int zconfwrap (void );
- +#else
- +extern int zconfwrap (void );
- +#endif
- +#endif
- +
- + static void yyunput (int c,char *buf_ptr );
- +
- +#ifndef yytext_ptr
- +static void yy_flex_strncpy (char *,yyconst char *,int );
- +#endif
- +
- +#ifdef YY_NEED_STRLEN
- +static int yy_flex_strlen (yyconst char * );
- +#endif
- +
- +#ifndef YY_NO_INPUT
- +
- +#ifdef __cplusplus
- +static int yyinput (void );
- +#else
- +static int input (void );
- +#endif
- +
- +#endif
- +
- +/* Amount of stuff to slurp up with each read. */
- +#ifndef YY_READ_BUF_SIZE
- +#define YY_READ_BUF_SIZE 8192
- +#endif
- +
- +/* Copy whatever the last rule matched to the standard output. */
- +#ifndef ECHO
- +/* This used to be an fputs(), but since the string might contain NUL's,
- + * we now use fwrite().
- + */
- +#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0)
- +#endif
- +
- +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- + * is returned in "result".
- + */
- +#ifndef YY_INPUT
- +#define YY_INPUT(buf,result,max_size) \
- + errno=0; \
- + while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \
- + { \
- + if( errno != EINTR) \
- + { \
- + YY_FATAL_ERROR( "input in flex scanner failed" ); \
- + break; \
- + } \
- + errno=0; \
- + clearerr(zconfin); \
- + }\
- +\
- +
- +#endif
- +
- +/* No semi-colon after return; correct usage is to write "yyterminate();" -
- + * we don't want an extra ';' after the "return" because that will cause
- + * some compilers to complain about unreachable statements.
- + */
- +#ifndef yyterminate
- +#define yyterminate() return YY_NULL
- +#endif
- +
- +/* Number of entries by which start-condition stack grows. */
- +#ifndef YY_START_STACK_INCR
- +#define YY_START_STACK_INCR 25
- +#endif
- +
- +/* Report a fatal error. */
- +#ifndef YY_FATAL_ERROR
- +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
- +#endif
- +
- +/* end tables serialization structures and prototypes */
- +
- +/* Default declaration of generated scanner - a define so the user can
- + * easily add parameters.
- + */
- +#ifndef YY_DECL
- +#define YY_DECL_IS_OURS 1
- +
- +extern int zconflex (void);
- +
- +#define YY_DECL int zconflex (void)
- +#endif /* !YY_DECL */
- +
- +/* Code executed at the beginning of each rule, after zconftext and zconfleng
- + * have been set up.
- + */
- +#ifndef YY_USER_ACTION
- +#define YY_USER_ACTION
- +#endif
- +
- +/* Code executed at the end of each rule. */
- +#ifndef YY_BREAK
- +#define YY_BREAK break;
- +#endif
- +
- +#define YY_RULE_SETUP \
- + YY_USER_ACTION
- +
- +/** The main scanner function which does all the work.
- + */
- +YY_DECL
- +{
- + register yy_state_type yy_current_state;
- + register char *yy_cp, *yy_bp;
- + register int yy_act;
- +
- + int str = 0;
- + int ts, i;
- +
- + if ( !(yy_init) )
- + {
- + (yy_init) = 1;
- +
- +#ifdef YY_USER_INIT
- + YY_USER_INIT;
- +#endif
- +
- + if ( ! (yy_start) )
- + (yy_start) = 1; /* first start state */
- +
- + if ( ! zconfin )
- + zconfin = stdin;
- +
- + if ( ! zconfout )
- + zconfout = stdout;
- +
- + if ( ! YY_CURRENT_BUFFER ) {
- + zconfensure_buffer_stack ();
- + YY_CURRENT_BUFFER_LVALUE =
- + zconf_create_buffer(zconfin,YY_BUF_SIZE );
- + }
- +
- + zconf_load_buffer_state( );
- + }
- +
- + while ( 1 ) /* loops until end-of-file is reached */
- + {
- + yy_cp = (yy_c_buf_p);
- +
- + /* Support of zconftext. */
- + *yy_cp = (yy_hold_char);
- +
- + /* yy_bp points to the position in yy_ch_buf of the start of
- + * the current run.
- + */
- + yy_bp = yy_cp;
- +
- + yy_current_state = (yy_start);
- +yy_match:
- + while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 )
- + ++yy_cp;
- +
- + yy_current_state = -yy_current_state;
- +
- +yy_find_action:
- + yy_act = yy_accept[yy_current_state];
- +
- + YY_DO_BEFORE_ACTION;
- +
- +do_action: /* This label is used only to access EOF actions. */
- +
- + switch ( yy_act )
- + { /* beginning of action switch */
- +case 1:
- +/* rule 1 can match eol */
- +case 2:
- +/* rule 2 can match eol */
- +YY_RULE_SETUP
- +{
- + current_file->lineno++;
- + return T_EOL;
- +}
- + YY_BREAK
- +case 3:
- +YY_RULE_SETUP
- +
- + YY_BREAK
- +case 4:
- +YY_RULE_SETUP
- +{
- + BEGIN(COMMAND);
- +}
- + YY_BREAK
- +case 5:
- +YY_RULE_SETUP
- +{
- + unput(zconftext[0]);
- + BEGIN(COMMAND);
- +}
- + YY_BREAK
- +
- +case 6:
- +YY_RULE_SETUP
- +{
- + const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
- + BEGIN(PARAM);
- + current_pos.file = current_file;
- + current_pos.lineno = current_file->lineno;
- + if (id && id->flags & TF_COMMAND) {
- + zconflval.id = id;
- + return id->token;
- + }
- + alloc_string(zconftext, zconfleng);
- + zconflval.string = text;
- + return T_WORD;
- + }
- + YY_BREAK
- +case 7:
- +YY_RULE_SETUP
- +
- + YY_BREAK
- +case 8:
- +/* rule 8 can match eol */
- +YY_RULE_SETUP
- +{
- + BEGIN(INITIAL);
- + current_file->lineno++;
- + return T_EOL;
- + }
- + YY_BREAK
- +
- +case 9:
- +YY_RULE_SETUP
- +return T_AND;
- + YY_BREAK
- +case 10:
- +YY_RULE_SETUP
- +return T_OR;
- + YY_BREAK
- +case 11:
- +YY_RULE_SETUP
- +return T_OPEN_PAREN;
- + YY_BREAK
- +case 12:
- +YY_RULE_SETUP
- +return T_CLOSE_PAREN;
- + YY_BREAK
- +case 13:
- +YY_RULE_SETUP
- +return T_NOT;
- + YY_BREAK
- +case 14:
- +YY_RULE_SETUP
- +return T_EQUAL;
- + YY_BREAK
- +case 15:
- +YY_RULE_SETUP
- +return T_UNEQUAL;
- + YY_BREAK
- +case 16:
- +YY_RULE_SETUP
- +{
- + str = zconftext[0];
- + new_string();
- + BEGIN(STRING);
- + }
- + YY_BREAK
- +case 17:
- +/* rule 17 can match eol */
- +YY_RULE_SETUP
- +BEGIN(INITIAL); current_file->lineno++; return T_EOL;
- + YY_BREAK
- +case 18:
- +YY_RULE_SETUP
- +/* ignore */
- + YY_BREAK
- +case 19:
- +YY_RULE_SETUP
- +{
- + const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
- + if (id && id->flags & TF_PARAM) {
- + zconflval.id = id;
- + return id->token;
- + }
- + alloc_string(zconftext, zconfleng);
- + zconflval.string = text;
- + return T_WORD;
- + }
- + YY_BREAK
- +case 20:
- +YY_RULE_SETUP
- +/* comment */
- + YY_BREAK
- +case 21:
- +/* rule 21 can match eol */
- +YY_RULE_SETUP
- +current_file->lineno++;
- + YY_BREAK
- +case 22:
- +YY_RULE_SETUP
- +
- + YY_BREAK
- +case YY_STATE_EOF(PARAM):
- +{
- + BEGIN(INITIAL);
- + }
- + YY_BREAK
- +
- +case 23:
- +/* rule 23 can match eol */
- +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
- +(yy_c_buf_p) = yy_cp -= 1;
- +YY_DO_BEFORE_ACTION; /* set up zconftext again */
- +YY_RULE_SETUP
- +{
- + append_string(zconftext, zconfleng);
- + zconflval.string = text;
- + return T_WORD_QUOTE;
- + }
- + YY_BREAK
- +case 24:
- +YY_RULE_SETUP
- +{
- + append_string(zconftext, zconfleng);
- + }
- + YY_BREAK
- +case 25:
- +/* rule 25 can match eol */
- +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
- +(yy_c_buf_p) = yy_cp -= 1;
- +YY_DO_BEFORE_ACTION; /* set up zconftext again */
- +YY_RULE_SETUP
- +{
- + append_string(zconftext + 1, zconfleng - 1);
- + zconflval.string = text;
- + return T_WORD_QUOTE;
- + }
- + YY_BREAK
- +case 26:
- +YY_RULE_SETUP
- +{
- + append_string(zconftext + 1, zconfleng - 1);
- + }
- + YY_BREAK
- +case 27:
- +YY_RULE_SETUP
- +{
- + if (str == zconftext[0]) {
- + BEGIN(PARAM);
- + zconflval.string = text;
- + return T_WORD_QUOTE;
- + } else
- + append_string(zconftext, 1);
- + }
- + YY_BREAK
- +case 28:
- +/* rule 28 can match eol */
- +YY_RULE_SETUP
- +{
- + printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno());
- + current_file->lineno++;
- + BEGIN(INITIAL);
- + return T_EOL;
- + }
- + YY_BREAK
- +case YY_STATE_EOF(STRING):
- +{
- + BEGIN(INITIAL);
- + }
- + YY_BREAK
- +
- +case 29:
- +YY_RULE_SETUP
- +{
- + ts = 0;
- + for (i = 0; i < zconfleng; i++) {
- + if (zconftext[i] == '\t')
- + ts = (ts & ~7) + 8;
- + else
- + ts++;
- + }
- + last_ts = ts;
- + if (first_ts) {
- + if (ts < first_ts) {
- + zconf_endhelp();
- + return T_HELPTEXT;
- + }
- + ts -= first_ts;
- + while (ts > 8) {
- + append_string(" ", 8);
- + ts -= 8;
- + }
- + append_string(" ", ts);
- + }
- + }
- + YY_BREAK
- +case 30:
- +/* rule 30 can match eol */
- +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
- +(yy_c_buf_p) = yy_cp -= 1;
- +YY_DO_BEFORE_ACTION; /* set up zconftext again */
- +YY_RULE_SETUP
- +{
- + current_file->lineno++;
- + zconf_endhelp();
- + return T_HELPTEXT;
- + }
- + YY_BREAK
- +case 31:
- +/* rule 31 can match eol */
- +YY_RULE_SETUP
- +{
- + current_file->lineno++;
- + append_string("\n", 1);
- + }
- + YY_BREAK
- +case 32:
- +YY_RULE_SETUP
- +{
- + while (zconfleng) {
- + if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t'))
- + break;
- + zconfleng--;
- + }
- + append_string(zconftext, zconfleng);
- + if (!first_ts)
- + first_ts = last_ts;
- + }
- + YY_BREAK
- +case YY_STATE_EOF(HELP):
- +{
- + zconf_endhelp();
- + return T_HELPTEXT;
- + }
- + YY_BREAK
- +
- +case YY_STATE_EOF(INITIAL):
- +case YY_STATE_EOF(COMMAND):
- +{
- + if (current_file) {
- + zconf_endfile();
- + return T_EOL;
- + }
- + fclose(zconfin);
- + yyterminate();
- +}
- + YY_BREAK
- +case 33:
- +YY_RULE_SETUP
- +YY_FATAL_ERROR( "flex scanner jammed" );
- + YY_BREAK
- +
- + case YY_END_OF_BUFFER:
- + {
- + /* Amount of text matched not including the EOB char. */
- + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
- +
- + /* Undo the effects of YY_DO_BEFORE_ACTION. */
- + *yy_cp = (yy_hold_char);
- + YY_RESTORE_YY_MORE_OFFSET
- +
- + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
- + {
- + /* We're scanning a new file or input source. It's
- + * possible that this happened because the user
- + * just pointed zconfin at a new source and called
- + * zconflex(). If so, then we have to assure
- + * consistency between YY_CURRENT_BUFFER and our
- + * globals. Here is the right place to do so, because
- + * this is the first action (other than possibly a
- + * back-up) that will match for the new input source.
- + */
- + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- + YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin;
- + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
- + }
- +
- + /* Note that here we test for yy_c_buf_p "<=" to the position
- + * of the first EOB in the buffer, since yy_c_buf_p will
- + * already have been incremented past the NUL character
- + * (since all states make transitions on EOB to the
- + * end-of-buffer state). Contrast this with the test
- + * in input().
- + */
- + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- + { /* This was really a NUL. */
- + yy_state_type yy_next_state;
- +
- + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
- +
- + yy_current_state = yy_get_previous_state( );
- +
- + /* Okay, we're now positioned to make the NUL
- + * transition. We couldn't have
- + * yy_get_previous_state() go ahead and do it
- + * for us because it doesn't know how to deal
- + * with the possibility of jamming (and we don't
- + * want to build jamming into it because then it
- + * will run more slowly).
- + */
- +
- + yy_next_state = yy_try_NUL_trans( yy_current_state );
- +
- + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- +
- + if ( yy_next_state )
- + {
- + /* Consume the NUL. */
- + yy_cp = ++(yy_c_buf_p);
- + yy_current_state = yy_next_state;
- + goto yy_match;
- + }
- +
- + else
- + {
- + yy_cp = (yy_c_buf_p);
- + goto yy_find_action;
- + }
- + }
- +
- + else switch ( yy_get_next_buffer( ) )
- + {
- + case EOB_ACT_END_OF_FILE:
- + {
- + (yy_did_buffer_switch_on_eof) = 0;
- +
- + if ( zconfwrap( ) )
- + {
- + /* Note: because we've taken care in
- + * yy_get_next_buffer() to have set up
- + * zconftext, we can now set up
- + * yy_c_buf_p so that if some total
- + * hoser (like flex itself) wants to
- + * call the scanner after we return the
- + * YY_NULL, it'll still work - another
- + * YY_NULL will get returned.
- + */
- + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
- +
- + yy_act = YY_STATE_EOF(YY_START);
- + goto do_action;
- + }
- +
- + else
- + {
- + if ( ! (yy_did_buffer_switch_on_eof) )
- + YY_NEW_FILE;
- + }
- + break;
- + }
- +
- + case EOB_ACT_CONTINUE_SCAN:
- + (yy_c_buf_p) =
- + (yytext_ptr) + yy_amount_of_matched_text;
- +
- + yy_current_state = yy_get_previous_state( );
- +
- + yy_cp = (yy_c_buf_p);
- + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- + goto yy_match;
- +
- + case EOB_ACT_LAST_MATCH:
- + (yy_c_buf_p) =
- + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
- +
- + yy_current_state = yy_get_previous_state( );
- +
- + yy_cp = (yy_c_buf_p);
- + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- + goto yy_find_action;
- + }
- + break;
- + }
- +
- + default:
- + YY_FATAL_ERROR(
- + "fatal flex scanner internal error--no action found" );
- + } /* end of action switch */
- + } /* end of scanning one token */
- +} /* end of zconflex */
- +
- +/* yy_get_next_buffer - try to read in a new buffer
- + *
- + * Returns a code representing an action:
- + * EOB_ACT_LAST_MATCH -
- + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- + * EOB_ACT_END_OF_FILE - end of file
- + */
- +static int yy_get_next_buffer (void)
- +{
- + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- + register char *source = (yytext_ptr);
- + register int number_to_move, i;
- + int ret_val;
- +
- + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
- + YY_FATAL_ERROR(
- + "fatal flex scanner internal error--end of buffer missed" );
- +
- + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
- + { /* Don't try to fill the buffer, so this is an EOF. */
- + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
- + {
- + /* We matched a single character, the EOB, so
- + * treat this as a final EOF.
- + */
- + return EOB_ACT_END_OF_FILE;
- + }
- +
- + else
- + {
- + /* We matched some text prior to the EOB, first
- + * process it.
- + */
- + return EOB_ACT_LAST_MATCH;
- + }
- + }
- +
- + /* Try to read more data. */
- +
- + /* First move last chars to start of buffer. */
- + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
- +
- + for ( i = 0; i < number_to_move; ++i )
- + *(dest++) = *(source++);
- +
- + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- + /* don't do the read, it's not guaranteed to return an EOF,
- + * just force an EOF
- + */
- + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
- +
- + else
- + {
- + int num_to_read =
- + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
- +
- + while ( num_to_read <= 0 )
- + { /* Not enough room in the buffer - grow it. */
- +
- + /* just a shorter name for the current buffer */
- + YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
- +
- + int yy_c_buf_p_offset =
- + (int) ((yy_c_buf_p) - b->yy_ch_buf);
- +
- + if ( b->yy_is_our_buffer )
- + {
- + int new_size = b->yy_buf_size * 2;
- +
- + if ( new_size <= 0 )
- + b->yy_buf_size += b->yy_buf_size / 8;
- + else
- + b->yy_buf_size *= 2;
- +
- + b->yy_ch_buf = (char *)
- + /* Include room in for 2 EOB chars. */
- + zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
- + }
- + else
- + /* Can't grow it, we don't own it. */
- + b->yy_ch_buf = 0;
- +
- + if ( ! b->yy_ch_buf )
- + YY_FATAL_ERROR(
- + "fatal error - scanner input buffer overflow" );
- +
- + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
- +
- + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
- + number_to_move - 1;
- +
- + }
- +
- + if ( num_to_read > YY_READ_BUF_SIZE )
- + num_to_read = YY_READ_BUF_SIZE;
- +
- + /* Read in more data. */
- + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- + (yy_n_chars), (size_t) num_to_read );
- +
- + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- + }
- +
- + if ( (yy_n_chars) == 0 )
- + {
- + if ( number_to_move == YY_MORE_ADJ )
- + {
- + ret_val = EOB_ACT_END_OF_FILE;
- + zconfrestart(zconfin );
- + }
- +
- + else
- + {
- + ret_val = EOB_ACT_LAST_MATCH;
- + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
- + YY_BUFFER_EOF_PENDING;
- + }
- + }
- +
- + else
- + ret_val = EOB_ACT_CONTINUE_SCAN;
- +
- + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
- + /* Extend the array by 50%, plus the number we really need. */
- + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
- + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
- + }
- +
- + (yy_n_chars) += number_to_move;
- + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
- + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
- +
- + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
- +
- + return ret_val;
- +}
- +
- +/* yy_get_previous_state - get the state just before the EOB char was reached */
- +
- + static yy_state_type yy_get_previous_state (void)
- +{
- + register yy_state_type yy_current_state;
- + register char *yy_cp;
- +
- + yy_current_state = (yy_start);
- +
- + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
- + {
- + yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)];
- + }
- +
- + return yy_current_state;
- +}
- +
- +/* yy_try_NUL_trans - try to make a transition on the NUL character
- + *
- + * synopsis
- + * next_state = yy_try_NUL_trans( current_state );
- + */
- + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
- +{
- + register int yy_is_jam;
- +
- + yy_current_state = yy_nxt[yy_current_state][1];
- + yy_is_jam = (yy_current_state <= 0);
- +
- + return yy_is_jam ? 0 : yy_current_state;
- +}
- +
- + static void yyunput (int c, register char * yy_bp )
- +{
- + register char *yy_cp;
- +
- + yy_cp = (yy_c_buf_p);
- +
- + /* undo effects of setting up zconftext */
- + *yy_cp = (yy_hold_char);
- +
- + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- + { /* need to shift things up to make room */
- + /* +2 for EOB chars. */
- + register int number_to_move = (yy_n_chars) + 2;
- + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- + register char *source =
- + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
- +
- + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- + *--dest = *--source;
- +
- + yy_cp += (int) (dest - source);
- + yy_bp += (int) (dest - source);
- + YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
- +
- + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- + YY_FATAL_ERROR( "flex scanner push-back overflow" );
- + }
- +
- + *--yy_cp = (char) c;
- +
- + (yytext_ptr) = yy_bp;
- + (yy_hold_char) = *yy_cp;
- + (yy_c_buf_p) = yy_cp;
- +}
- +
- +#ifndef YY_NO_INPUT
- +#ifdef __cplusplus
- + static int yyinput (void)
- +#else
- + static int input (void)
- +#endif
- +
- +{
- + int c;
- +
- + *(yy_c_buf_p) = (yy_hold_char);
- +
- + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
- + {
- + /* yy_c_buf_p now points to the character we want to return.
- + * If this occurs *before* the EOB characters, then it's a
- + * valid NUL; if not, then we've hit the end of the buffer.
- + */
- + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- + /* This was really a NUL. */
- + *(yy_c_buf_p) = '\0';
- +
- + else
- + { /* need more input */
- + int offset = (yy_c_buf_p) - (yytext_ptr);
- + ++(yy_c_buf_p);
- +
- + switch ( yy_get_next_buffer( ) )
- + {
- + case EOB_ACT_LAST_MATCH:
- + /* This happens because yy_g_n_b()
- + * sees that we've accumulated a
- + * token and flags that we need to
- + * try matching the token before
- + * proceeding. But for input(),
- + * there's no matching to consider.
- + * So convert the EOB_ACT_LAST_MATCH
- + * to EOB_ACT_END_OF_FILE.
- + */
- +
- + /* Reset buffer status. */
- + zconfrestart(zconfin );
- +
- + /*FALLTHROUGH*/
- +
- + case EOB_ACT_END_OF_FILE:
- + {
- + if ( zconfwrap( ) )
- + return EOF;
- +
- + if ( ! (yy_did_buffer_switch_on_eof) )
- + YY_NEW_FILE;
- +#ifdef __cplusplus
- + return yyinput();
- +#else
- + return input();
- +#endif
- + }
- +
- + case EOB_ACT_CONTINUE_SCAN:
- + (yy_c_buf_p) = (yytext_ptr) + offset;
- + break;
- + }
- + }
- + }
- +
- + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- + *(yy_c_buf_p) = '\0'; /* preserve zconftext */
- + (yy_hold_char) = *++(yy_c_buf_p);
- +
- + return c;
- +}
- +#endif /* ifndef YY_NO_INPUT */
- +
- +/** Immediately switch to a different input stream.
- + * @param input_file A readable stream.
- + *
- + * @note This function does not reset the start condition to @c INITIAL .
- + */
- + void zconfrestart (FILE * input_file )
- +{
- +
- + if ( ! YY_CURRENT_BUFFER ){
- + zconfensure_buffer_stack ();
- + YY_CURRENT_BUFFER_LVALUE =
- + zconf_create_buffer(zconfin,YY_BUF_SIZE );
- + }
- +
- + zconf_init_buffer(YY_CURRENT_BUFFER,input_file );
- + zconf_load_buffer_state( );
- +}
- +
- +/** Switch to a different input buffer.
- + * @param new_buffer The new input buffer.
- + *
- + */
- + void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer )
- +{
- +
- + /* TODO. We should be able to replace this entire function body
- + * with
- + * zconfpop_buffer_state();
- + * zconfpush_buffer_state(new_buffer);
- + */
- + zconfensure_buffer_stack ();
- + if ( YY_CURRENT_BUFFER == new_buffer )
- + return;
- +
- + if ( YY_CURRENT_BUFFER )
- + {
- + /* Flush out information for old buffer. */
- + *(yy_c_buf_p) = (yy_hold_char);
- + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- + }
- +
- + YY_CURRENT_BUFFER_LVALUE = new_buffer;
- + zconf_load_buffer_state( );
- +
- + /* We don't actually know whether we did this switch during
- + * EOF (zconfwrap()) processing, but the only time this flag
- + * is looked at is after zconfwrap() is called, so it's safe
- + * to go ahead and always set it.
- + */
- + (yy_did_buffer_switch_on_eof) = 1;
- +}
- +
- +static void zconf_load_buffer_state (void)
- +{
- + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- + zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
- + (yy_hold_char) = *(yy_c_buf_p);
- +}
- +
- +/** Allocate and initialize an input buffer state.
- + * @param file A readable stream.
- + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- + *
- + * @return the allocated buffer state.
- + */
- + YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size )
- +{
- + YY_BUFFER_STATE b;
- +
- + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
- + if ( ! b )
- + YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
- +
- + b->yy_buf_size = size;
- +
- + /* yy_ch_buf has to be 2 characters longer than the size given because
- + * we need to put in 2 end-of-buffer characters.
- + */
- + b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 );
- + if ( ! b->yy_ch_buf )
- + YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
- +
- + b->yy_is_our_buffer = 1;
- +
- + zconf_init_buffer(b,file );
- +
- + return b;
- +}
- +
- +/** Destroy the buffer.
- + * @param b a buffer created with zconf_create_buffer()
- + *
- + */
- + void zconf_delete_buffer (YY_BUFFER_STATE b )
- +{
- +
- + if ( ! b )
- + return;
- +
- + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
- +
- + if ( b->yy_is_our_buffer )
- + zconffree((void *) b->yy_ch_buf );
- +
- + zconffree((void *) b );
- +}
- +
- +/* Initializes or reinitializes a buffer.
- + * This function is sometimes called more than once on the same buffer,
- + * such as during a zconfrestart() or at EOF.
- + */
- + static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file )
- +
- +{
- + int oerrno = errno;
- +
- + zconf_flush_buffer(b );
- +
- + b->yy_input_file = file;
- + b->yy_fill_buffer = 1;
- +
- + /* If b is the current buffer, then zconf_init_buffer was _probably_
- + * called from zconfrestart() or through yy_get_next_buffer.
- + * In that case, we don't want to reset the lineno or column.
- + */
- + if (b != YY_CURRENT_BUFFER){
- + b->yy_bs_lineno = 1;
- + b->yy_bs_column = 0;
- + }
- +
- + b->yy_is_interactive = 0;
- +
- + errno = oerrno;
- +}
- +
- +/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- + *
- + */
- + void zconf_flush_buffer (YY_BUFFER_STATE b )
- +{
- + if ( ! b )
- + return;
- +
- + b->yy_n_chars = 0;
- +
- + /* We always need two end-of-buffer characters. The first causes
- + * a transition to the end-of-buffer state. The second causes
- + * a jam in that state.
- + */
- + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
- +
- + b->yy_buf_pos = &b->yy_ch_buf[0];
- +
- + b->yy_at_bol = 1;
- + b->yy_buffer_status = YY_BUFFER_NEW;
- +
- + if ( b == YY_CURRENT_BUFFER )
- + zconf_load_buffer_state( );
- +}
- +
- +/** Pushes the new state onto the stack. The new state becomes
- + * the current state. This function will allocate the stack
- + * if necessary.
- + * @param new_buffer The new state.
- + *
- + */
- +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
- +{
- + if (new_buffer == NULL)
- + return;
- +
- + zconfensure_buffer_stack();
- +
- + /* This block is copied from zconf_switch_to_buffer. */
- + if ( YY_CURRENT_BUFFER )
- + {
- + /* Flush out information for old buffer. */
- + *(yy_c_buf_p) = (yy_hold_char);
- + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- + }
- +
- + /* Only push if top exists. Otherwise, replace top. */
- + if (YY_CURRENT_BUFFER)
- + (yy_buffer_stack_top)++;
- + YY_CURRENT_BUFFER_LVALUE = new_buffer;
- +
- + /* copied from zconf_switch_to_buffer. */
- + zconf_load_buffer_state( );
- + (yy_did_buffer_switch_on_eof) = 1;
- +}
- +
- +/** Removes and deletes the top of the stack, if present.
- + * The next element becomes the new top.
- + *
- + */
- +void zconfpop_buffer_state (void)
- +{
- + if (!YY_CURRENT_BUFFER)
- + return;
- +
- + zconf_delete_buffer(YY_CURRENT_BUFFER );
- + YY_CURRENT_BUFFER_LVALUE = NULL;
- + if ((yy_buffer_stack_top) > 0)
- + --(yy_buffer_stack_top);
- +
- + if (YY_CURRENT_BUFFER) {
- + zconf_load_buffer_state( );
- + (yy_did_buffer_switch_on_eof) = 1;
- + }
- +}
- +
- +/* Allocates the stack if it does not exist.
- + * Guarantees space for at least one push.
- + */
- +static void zconfensure_buffer_stack (void)
- +{
- + int num_to_alloc;
- +
- + if (!(yy_buffer_stack)) {
- +
- + /* First allocation is just for 2 elements, since we don't know if this
- + * scanner will even need a stack. We use 2 instead of 1 to avoid an
- + * immediate realloc on the next call.
- + */
- + num_to_alloc = 1;
- + (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc
- + (num_to_alloc * sizeof(struct yy_buffer_state*)
- + );
- + if ( ! (yy_buffer_stack) )
- + YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
- +
- + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
- +
- + (yy_buffer_stack_max) = num_to_alloc;
- + (yy_buffer_stack_top) = 0;
- + return;
- + }
- +
- + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
- +
- + /* Increase the buffer to prepare for a possible push. */
- + int grow_size = 8 /* arbitrary grow size */;
- +
- + num_to_alloc = (yy_buffer_stack_max) + grow_size;
- + (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc
- + ((yy_buffer_stack),
- + num_to_alloc * sizeof(struct yy_buffer_state*)
- + );
- + if ( ! (yy_buffer_stack) )
- + YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
- +
- + /* zero only the new slots.*/
- + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
- + (yy_buffer_stack_max) = num_to_alloc;
- + }
- +}
- +
- +/** Setup the input buffer state to scan directly from a user-specified character buffer.
- + * @param base the character buffer
- + * @param size the size in bytes of the character buffer
- + *
- + * @return the newly allocated buffer state object.
- + */
- +YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
- +{
- + YY_BUFFER_STATE b;
- +
- + if ( size < 2 ||
- + base[size-2] != YY_END_OF_BUFFER_CHAR ||
- + base[size-1] != YY_END_OF_BUFFER_CHAR )
- + /* They forgot to leave room for the EOB's. */
- + return 0;
- +
- + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
- + if ( ! b )
- + YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" );
- +
- + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- + b->yy_buf_pos = b->yy_ch_buf = base;
- + b->yy_is_our_buffer = 0;
- + b->yy_input_file = 0;
- + b->yy_n_chars = b->yy_buf_size;
- + b->yy_is_interactive = 0;
- + b->yy_at_bol = 1;
- + b->yy_fill_buffer = 0;
- + b->yy_buffer_status = YY_BUFFER_NEW;
- +
- + zconf_switch_to_buffer(b );
- +
- + return b;
- +}
- +
- +/** Setup the input buffer state to scan a string. The next call to zconflex() will
- + * scan from a @e copy of @a str.
- + * @param yystr a NUL-terminated string to scan
- + *
- + * @return the newly allocated buffer state object.
- + * @note If you want to scan bytes that may contain NUL values, then use
- + * zconf_scan_bytes() instead.
- + */
- +YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
- +{
- +
- + return zconf_scan_bytes(yystr,strlen(yystr) );
- +}
- +
- +/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
- + * scan from a @e copy of @a bytes.
- + * @param bytes the byte buffer to scan
- + * @param len the number of bytes in the buffer pointed to by @a bytes.
- + *
- + * @return the newly allocated buffer state object.
- + */
- +YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len )
- +{
- + YY_BUFFER_STATE b;
- + char *buf;
- + yy_size_t n;
- + int i;
- +
- + /* Get memory for full buffer, including space for trailing EOB's. */
- + n = _yybytes_len + 2;
- + buf = (char *) zconfalloc(n );
- + if ( ! buf )
- + YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );
- +
- + for ( i = 0; i < _yybytes_len; ++i )
- + buf[i] = yybytes[i];
- +
- + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- +
- + b = zconf_scan_buffer(buf,n );
- + if ( ! b )
- + YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" );
- +
- + /* It's okay to grow etc. this buffer, and we should throw it
- + * away when we're done.
- + */
- + b->yy_is_our_buffer = 1;
- +
- + return b;
- +}
- +
- +#ifndef YY_EXIT_FAILURE
- +#define YY_EXIT_FAILURE 2
- +#endif
- +
- +static void yy_fatal_error (yyconst char* msg )
- +{
- + (void) fprintf( stderr, "%s\n", msg );
- + exit( YY_EXIT_FAILURE );
- +}
- +
- +/* Redefine yyless() so it works in section 3 code. */
- +
- +#undef yyless
- +#define yyless(n) \
- + do \
- + { \
- + /* Undo effects of setting up zconftext. */ \
- + int yyless_macro_arg = (n); \
- + YY_LESS_LINENO(yyless_macro_arg);\
- + zconftext[zconfleng] = (yy_hold_char); \
- + (yy_c_buf_p) = zconftext + yyless_macro_arg; \
- + (yy_hold_char) = *(yy_c_buf_p); \
- + *(yy_c_buf_p) = '\0'; \
- + zconfleng = yyless_macro_arg; \
- + } \
- + while ( 0 )
- +
- +/* Accessor methods (get/set functions) to struct members. */
- +
- +/** Get the current line number.
- + *
- + */
- +int zconfget_lineno (void)
- +{
- +
- + return zconflineno;
- +}
- +
- +/** Get the input stream.
- + *
- + */
- +FILE *zconfget_in (void)
- +{
- + return zconfin;
- +}
- +
- +/** Get the output stream.
- + *
- + */
- +FILE *zconfget_out (void)
- +{
- + return zconfout;
- +}
- +
- +/** Get the length of the current token.
- + *
- + */
- +int zconfget_leng (void)
- +{
- + return zconfleng;
- +}
- +
- +/** Get the current token.
- + *
- + */
- +
- +char *zconfget_text (void)
- +{
- + return zconftext;
- +}
- +
- +/** Set the current line number.
- + * @param line_number
- + *
- + */
- +void zconfset_lineno (int line_number )
- +{
- +
- + zconflineno = line_number;
- +}
- +
- +/** Set the input stream. This does not discard the current
- + * input buffer.
- + * @param in_str A readable stream.
- + *
- + * @see zconf_switch_to_buffer
- + */
- +void zconfset_in (FILE * in_str )
- +{
- + zconfin = in_str ;
- +}
- +
- +void zconfset_out (FILE * out_str )
- +{
- + zconfout = out_str ;
- +}
- +
- +int zconfget_debug (void)
- +{
- + return zconf_flex_debug;
- +}
- +
- +void zconfset_debug (int bdebug )
- +{
- + zconf_flex_debug = bdebug ;
- +}
- +
- +static int yy_init_globals (void)
- +{
- + /* Initialization is the same as for the non-reentrant scanner.
- + * This function is called from zconflex_destroy(), so don't allocate here.
- + */
- +
- + (yy_buffer_stack) = 0;
- + (yy_buffer_stack_top) = 0;
- + (yy_buffer_stack_max) = 0;
- + (yy_c_buf_p) = (char *) 0;
- + (yy_init) = 0;
- + (yy_start) = 0;
- +
- +/* Defined in main.c */
- +#ifdef YY_STDINIT
- + zconfin = stdin;
- + zconfout = stdout;
- +#else
- + zconfin = (FILE *) 0;
- + zconfout = (FILE *) 0;
- +#endif
- +
- + /* For future reference: Set errno on error, since we are called by
- + * zconflex_init()
- + */
- + return 0;
- +}
- +
- +/* zconflex_destroy is for both reentrant and non-reentrant scanners. */
- +int zconflex_destroy (void)
- +{
- +
- + /* Pop the buffer stack, destroying each element. */
- + while(YY_CURRENT_BUFFER){
- + zconf_delete_buffer(YY_CURRENT_BUFFER );
- + YY_CURRENT_BUFFER_LVALUE = NULL;
- + zconfpop_buffer_state();
- + }
- +
- + /* Destroy the stack itself. */
- + zconffree((yy_buffer_stack) );
- + (yy_buffer_stack) = NULL;
- +
- + /* Reset the globals. This is important in a non-reentrant scanner so the next time
- + * zconflex() is called, initialization will occur. */
- + yy_init_globals( );
- +
- + return 0;
- +}
- +
- +/*
- + * Internal utility routines.
- + */
- +
- +#ifndef yytext_ptr
- +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
- +{
- + register int i;
- + for ( i = 0; i < n; ++i )
- + s1[i] = s2[i];
- +}
- +#endif
- +
- +#ifdef YY_NEED_STRLEN
- +static int yy_flex_strlen (yyconst char * s )
- +{
- + register int n;
- + for ( n = 0; s[n]; ++n )
- + ;
- +
- + return n;
- +}
- +#endif
- +
- +void *zconfalloc (yy_size_t size )
- +{
- + return (void *) malloc( size );
- +}
- +
- +void *zconfrealloc (void * ptr, yy_size_t size )
- +{
- + /* The cast to (char *) in the following accommodates both
- + * implementations that use char* generic pointers, and those
- + * that use void* generic pointers. It works with the latter
- + * because both ANSI C and C++ allow castless assignment from
- + * any pointer type to void*, and deal with argument conversions
- + * as though doing an assignment.
- + */
- + return (void *) realloc( (char *) ptr, size );
- +}
- +
- +void zconffree (void * ptr )
- +{
- + free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */
- +}
- +
- +#define YYTABLES_NAME "yytables"
- +
- +void zconf_starthelp(void)
- +{
- + new_string();
- + last_ts = first_ts = 0;
- + BEGIN(HELP);
- +}
- +
- +static void zconf_endhelp(void)
- +{
- + zconflval.string = text;
- + BEGIN(INITIAL);
- +}
- +
- +/*
- + * Try to open specified file with following names:
- + * ./name
- + * $(srctree)/name
- + * The latter is used when srctree is separate from objtree
- + * when compiling the kernel.
- + * Return NULL if file is not found.
- + */
- +FILE *zconf_fopen(const char *name)
- +{
- + char *env, fullname[PATH_MAX+1];
- + FILE *f;
- +
- + f = fopen(name, "r");
- + if (!f && name != NULL && name[0] != '/') {
- + env = getenv(SRCTREE);
- + if (env) {
- + sprintf(fullname, "%s/%s", env, name);
- + f = fopen(fullname, "r");
- + }
- + }
- + return f;
- +}
- +
- +void zconf_initscan(const char *name)
- +{
- + zconfin = zconf_fopen(name);
- + if (!zconfin) {
- + printf("can't find file %s\n", name);
- + exit(1);
- + }
- +
- + current_buf = xmalloc(sizeof(*current_buf));
- + memset(current_buf, 0, sizeof(*current_buf));
- +
- + current_file = file_lookup(name);
- + current_file->lineno = 1;
- +}
- +
- +void zconf_nextfile(const char *name)
- +{
- + struct file *iter;
- + struct file *file = file_lookup(name);
- + struct buffer *buf = xmalloc(sizeof(*buf));
- + memset(buf, 0, sizeof(*buf));
- +
- + current_buf->state = YY_CURRENT_BUFFER;
- + zconfin = zconf_fopen(file->name);
- + if (!zconfin) {
- + printf("%s:%d: can't open file \"%s\"\n",
- + zconf_curname(), zconf_lineno(), file->name);
- + exit(1);
- + }
- + zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE));
- + buf->parent = current_buf;
- + current_buf = buf;
- +
- + for (iter = current_file->parent; iter; iter = iter->parent ) {
- + if (!strcmp(current_file->name,iter->name) ) {
- + printf("%s:%d: recursive inclusion detected. "
- + "Inclusion path:\n current file : '%s'\n",
- + zconf_curname(), zconf_lineno(),
- + zconf_curname());
- + iter = current_file->parent;
- + while (iter && \
- + strcmp(iter->name,current_file->name)) {
- + printf(" included from: '%s:%d'\n",
- + iter->name, iter->lineno-1);
- + iter = iter->parent;
- + }
- + if (iter)
- + printf(" included from: '%s:%d'\n",
- + iter->name, iter->lineno+1);
- + exit(1);
- + }
- + }
- + file->lineno = 1;
- + file->parent = current_file;
- + current_file = file;
- +}
- +
- +static void zconf_endfile(void)
- +{
- + struct buffer *parent;
- +
- + current_file = current_file->parent;
- +
- + parent = current_buf->parent;
- + if (parent) {
- + fclose(zconfin);
- + zconf_delete_buffer(YY_CURRENT_BUFFER);
- + zconf_switch_to_buffer(parent->state);
- + }
- + free(current_buf);
- + current_buf = parent;
- +}
- +
- +int zconf_lineno(void)
- +{
- + return current_pos.lineno;
- +}
- +
- +const char *zconf_curname(void)
- +{
- + return current_pos.file ? current_pos.file->name : "<none>";
- +}
- +
- diff -Nur uClibc-0.9.33.2/extra/config/zconf.tab.c_shipped uClibc/extra/config/zconf.tab.c_shipped
- --- uClibc-0.9.33.2/extra/config/zconf.tab.c_shipped 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/zconf.tab.c_shipped 2014-02-03 12:32:56.000000000 +0100
- @@ -1,24 +1,22 @@
- -/* A Bison parser, made by GNU Bison 2.3. */
- +/* A Bison parser, made by GNU Bison 2.4.3. */
-
- /* Skeleton implementation for Bison's Yacc-like parsers in C
- -
- - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- - Free Software Foundation, Inc.
- -
- - This program is free software; you can redistribute it and/or modify
- +
- + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- + 2009, 2010 Free Software Foundation, Inc.
- +
- + This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- - the Free Software Foundation; either version 2, or (at your option)
- - any later version.
- -
- + the Free Software Foundation, either version 3 of the License, or
- + (at your option) any later version.
- +
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- -
- +
- You should have received a copy of the GNU General Public License
- - along with this program; if not, write to the Free Software
- - Foundation, Inc., 51 Franklin Street, Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
- /* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- @@ -29,7 +27,7 @@
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
- -
- +
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
- @@ -47,7 +45,7 @@
- #define YYBISON 1
-
- /* Bison version. */
- -#define YYBISON_VERSION "2.3"
- +#define YYBISON_VERSION "2.4.3"
-
- /* Skeleton name. */
- #define YYSKELETON_NAME "yacc.c"
- @@ -55,94 +53,23 @@
- /* Pure parsers. */
- #define YYPURE 0
-
- +/* Push parsers. */
- +#define YYPUSH 0
- +
- +/* Pull parsers. */
- +#define YYPULL 1
- +
- /* Using locations. */
- #define YYLSP_NEEDED 0
-
- /* Substitute the variable and function names. */
- -#define yyparse zconfparse
- -#define yylex zconflex
- -#define yyerror zconferror
- -#define yylval zconflval
- -#define yychar zconfchar
- -#define yydebug zconfdebug
- -#define yynerrs zconfnerrs
- -
- -
- -/* Tokens. */
- -#ifndef YYTOKENTYPE
- -# define YYTOKENTYPE
- - /* Put the tokens into the symbol table, so that GDB and other debuggers
- - know about them. */
- - enum yytokentype {
- - T_MAINMENU = 258,
- - T_MENU = 259,
- - T_ENDMENU = 260,
- - T_SOURCE = 261,
- - T_CHOICE = 262,
- - T_ENDCHOICE = 263,
- - T_COMMENT = 264,
- - T_CONFIG = 265,
- - T_MENUCONFIG = 266,
- - T_HELP = 267,
- - T_HELPTEXT = 268,
- - T_IF = 269,
- - T_ENDIF = 270,
- - T_DEPENDS = 271,
- - T_OPTIONAL = 272,
- - T_PROMPT = 273,
- - T_TYPE = 274,
- - T_DEFAULT = 275,
- - T_SELECT = 276,
- - T_RANGE = 277,
- - T_OPTION = 278,
- - T_ON = 279,
- - T_WORD = 280,
- - T_WORD_QUOTE = 281,
- - T_UNEQUAL = 282,
- - T_CLOSE_PAREN = 283,
- - T_OPEN_PAREN = 284,
- - T_EOL = 285,
- - T_OR = 286,
- - T_AND = 287,
- - T_EQUAL = 288,
- - T_NOT = 289
- - };
- -#endif
- -/* Tokens. */
- -#define T_MAINMENU 258
- -#define T_MENU 259
- -#define T_ENDMENU 260
- -#define T_SOURCE 261
- -#define T_CHOICE 262
- -#define T_ENDCHOICE 263
- -#define T_COMMENT 264
- -#define T_CONFIG 265
- -#define T_MENUCONFIG 266
- -#define T_HELP 267
- -#define T_HELPTEXT 268
- -#define T_IF 269
- -#define T_ENDIF 270
- -#define T_DEPENDS 271
- -#define T_OPTIONAL 272
- -#define T_PROMPT 273
- -#define T_TYPE 274
- -#define T_DEFAULT 275
- -#define T_SELECT 276
- -#define T_RANGE 277
- -#define T_OPTION 278
- -#define T_ON 279
- -#define T_WORD 280
- -#define T_WORD_QUOTE 281
- -#define T_UNEQUAL 282
- -#define T_CLOSE_PAREN 283
- -#define T_OPEN_PAREN 284
- -#define T_EOL 285
- -#define T_OR 286
- -#define T_AND 287
- -#define T_EQUAL 288
- -#define T_NOT 289
- -
- -
- +#define yyparse zconfparse
- +#define yylex zconflex
- +#define yyerror zconferror
- +#define yylval zconflval
- +#define yychar zconfchar
- +#define yydebug zconfdebug
- +#define yynerrs zconfnerrs
-
-
- /* Copy the first part of user declarations. */
- @@ -160,11 +87,8 @@
- #include <string.h>
- #include <stdbool.h>
-
- -#define LKC_DIRECT_LINK
- #include "lkc.h"
-
- -#include "zconf.hash.c"
- -
- #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
-
- #define PRINTD 0x0001
- @@ -176,21 +100,18 @@
- static void zconfprint(const char *err, ...);
- static void zconf_error(const char *err, ...);
- static void zconferror(const char *err);
- -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
- +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
-
- -struct symbol *symbol_hash[257];
- +struct symbol *symbol_hash[SYMBOL_HASHSIZE];
-
- static struct menu *current_menu, *current_entry;
-
- -#define YYDEBUG 0
- -#if YYDEBUG
- -#define YYERROR_VERBOSE
- -#endif
- +
-
-
- /* Enabling traces. */
- #ifndef YYDEBUG
- -# define YYDEBUG 0
- +# define YYDEBUG 1
- #endif
-
- /* Enabling verbose error messages. */
- @@ -206,31 +127,78 @@
- # define YYTOKEN_TABLE 0
- #endif
-
- +
- +/* Tokens. */
- +#ifndef YYTOKENTYPE
- +# define YYTOKENTYPE
- + /* Put the tokens into the symbol table, so that GDB and other debuggers
- + know about them. */
- + enum yytokentype {
- + T_MAINMENU = 258,
- + T_MENU = 259,
- + T_ENDMENU = 260,
- + T_SOURCE = 261,
- + T_CHOICE = 262,
- + T_ENDCHOICE = 263,
- + T_COMMENT = 264,
- + T_CONFIG = 265,
- + T_MENUCONFIG = 266,
- + T_HELP = 267,
- + T_HELPTEXT = 268,
- + T_IF = 269,
- + T_ENDIF = 270,
- + T_DEPENDS = 271,
- + T_OPTIONAL = 272,
- + T_PROMPT = 273,
- + T_TYPE = 274,
- + T_DEFAULT = 275,
- + T_SELECT = 276,
- + T_RANGE = 277,
- + T_VISIBLE = 278,
- + T_OPTION = 279,
- + T_ON = 280,
- + T_WORD = 281,
- + T_WORD_QUOTE = 282,
- + T_UNEQUAL = 283,
- + T_CLOSE_PAREN = 284,
- + T_OPEN_PAREN = 285,
- + T_EOL = 286,
- + T_OR = 287,
- + T_AND = 288,
- + T_EQUAL = 289,
- + T_NOT = 290
- + };
- +#endif
- +
- +
- +
- #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
- typedef union YYSTYPE
- -
- {
- +
- +
- char *string;
- struct file *file;
- struct symbol *symbol;
- struct expr *expr;
- struct menu *menu;
- - struct kconf_id *id;
- -}
- -/* Line 187 of yacc.c. */
- + const struct kconf_id *id;
- +
- +
-
- - YYSTYPE;
- +} YYSTYPE;
- +# define YYSTYPE_IS_TRIVIAL 1
- # define yystype YYSTYPE /* obsolescent; will be withdrawn */
- # define YYSTYPE_IS_DECLARED 1
- -# define YYSTYPE_IS_TRIVIAL 1
- #endif
-
-
- -
- /* Copy the second part of user declarations. */
-
-
- -/* Line 216 of yacc.c. */
- +/* Include zconf.hash.c here so it can see the token constants. */
- +#include "zconf.hash.c"
- +
-
-
- #ifdef short
- @@ -281,7 +249,7 @@
- #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
- #ifndef YY_
- -# if YYENABLE_NLS
- +# if defined YYENABLE_NLS && YYENABLE_NLS
- # if ENABLE_NLS
- # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
- # define YY_(msgid) dgettext ("bison-runtime", msgid)
- @@ -306,14 +274,14 @@
- #if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- static int
- -YYID (int i)
- +YYID (int yyi)
- #else
- static int
- -YYID (i)
- - int i;
- +YYID (yyi)
- + int yyi;
- #endif
- {
- - return i;
- + return yyi;
- }
- #endif
-
- @@ -394,9 +362,9 @@
- /* A type that is properly aligned for any stack member. */
- union yyalloc
- {
- - yytype_int16 yyss;
- - YYSTYPE yyvs;
- - };
- + yytype_int16 yyss_alloc;
- + YYSTYPE yyvs_alloc;
- +};
-
- /* The size of the maximum gap between one aligned stack and the next. */
- # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
- @@ -430,12 +398,12 @@
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
- -# define YYSTACK_RELOCATE(Stack) \
- +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- - YYCOPY (&yyptr->Stack, Stack, yysize); \
- - Stack = &yyptr->Stack; \
- + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- + Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- @@ -444,22 +412,22 @@
- #endif
-
- /* YYFINAL -- State number of the termination state. */
- -#define YYFINAL 3
- +#define YYFINAL 11
- /* YYLAST -- Last index in YYTABLE. */
- -#define YYLAST 259
- +#define YYLAST 290
-
- /* YYNTOKENS -- Number of terminals. */
- -#define YYNTOKENS 35
- +#define YYNTOKENS 36
- /* YYNNTS -- Number of nonterminals. */
- -#define YYNNTS 46
- +#define YYNNTS 50
- /* YYNRULES -- Number of rules. */
- -#define YYNRULES 110
- +#define YYNRULES 118
- /* YYNRULES -- Number of states. */
- -#define YYNSTATES 180
- +#define YYNSTATES 191
-
- /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
- #define YYUNDEFTOK 2
- -#define YYMAXUTOK 289
- +#define YYMAXUTOK 290
-
- #define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
- @@ -495,7 +463,8 @@
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34
- + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- + 35
- };
-
- #if YYDEBUG
- @@ -503,73 +472,75 @@
- YYRHS. */
- static const yytype_uint16 yyprhs[] =
- {
- - 0, 0, 3, 5, 6, 9, 12, 15, 20, 23,
- - 28, 33, 37, 39, 41, 43, 45, 47, 49, 51,
- - 53, 55, 57, 59, 61, 63, 67, 70, 74, 77,
- - 81, 84, 85, 88, 91, 94, 97, 100, 103, 107,
- - 112, 117, 122, 128, 132, 133, 137, 138, 141, 145,
- - 148, 150, 154, 155, 158, 161, 164, 167, 170, 175,
- - 179, 182, 187, 188, 191, 195, 197, 201, 202, 205,
- - 208, 211, 215, 218, 220, 224, 225, 228, 231, 234,
- - 238, 242, 245, 248, 251, 252, 255, 258, 261, 266,
- - 267, 270, 272, 274, 277, 280, 283, 285, 288, 289,
- - 292, 294, 298, 302, 306, 309, 313, 317, 319, 321,
- - 322
- + 0, 0, 3, 6, 8, 11, 13, 14, 17, 20,
- + 23, 26, 31, 36, 40, 42, 44, 46, 48, 50,
- + 52, 54, 56, 58, 60, 62, 64, 66, 68, 72,
- + 75, 79, 82, 86, 89, 90, 93, 96, 99, 102,
- + 105, 108, 112, 117, 122, 127, 133, 137, 138, 142,
- + 143, 146, 150, 153, 155, 159, 160, 163, 166, 169,
- + 172, 175, 180, 184, 187, 192, 193, 196, 200, 202,
- + 206, 207, 210, 213, 216, 220, 224, 228, 230, 234,
- + 235, 238, 241, 244, 248, 252, 255, 258, 261, 262,
- + 265, 268, 271, 276, 277, 280, 283, 286, 287, 290,
- + 292, 294, 297, 300, 303, 305, 308, 309, 312, 314,
- + 318, 322, 326, 329, 333, 337, 339, 341, 342
- };
-
- /* YYRHS -- A `-1'-separated list of the rules' RHS. */
- static const yytype_int8 yyrhs[] =
- {
- - 36, 0, -1, 37, -1, -1, 37, 39, -1, 37,
- - 53, -1, 37, 64, -1, 37, 3, 74, 76, -1,
- - 37, 75, -1, 37, 25, 1, 30, -1, 37, 38,
- - 1, 30, -1, 37, 1, 30, -1, 16, -1, 18,
- - -1, 19, -1, 21, -1, 17, -1, 22, -1, 20,
- - -1, 30, -1, 59, -1, 68, -1, 42, -1, 44,
- - -1, 66, -1, 25, 1, 30, -1, 1, 30, -1,
- - 10, 25, 30, -1, 41, 45, -1, 11, 25, 30,
- - -1, 43, 45, -1, -1, 45, 46, -1, 45, 47,
- - -1, 45, 72, -1, 45, 70, -1, 45, 40, -1,
- - 45, 30, -1, 19, 73, 30, -1, 18, 74, 77,
- - 30, -1, 20, 78, 77, 30, -1, 21, 25, 77,
- - 30, -1, 22, 79, 79, 77, 30, -1, 23, 48,
- - 30, -1, -1, 48, 25, 49, -1, -1, 33, 74,
- - -1, 7, 80, 30, -1, 50, 54, -1, 75, -1,
- - 51, 56, 52, -1, -1, 54, 55, -1, 54, 72,
- - -1, 54, 70, -1, 54, 30, -1, 54, 40, -1,
- - 18, 74, 77, 30, -1, 19, 73, 30, -1, 17,
- - 30, -1, 20, 25, 77, 30, -1, -1, 56, 39,
- - -1, 14, 78, 76, -1, 75, -1, 57, 60, 58,
- - -1, -1, 60, 39, -1, 60, 64, -1, 60, 53,
- - -1, 4, 74, 30, -1, 61, 71, -1, 75, -1,
- - 62, 65, 63, -1, -1, 65, 39, -1, 65, 64,
- - -1, 65, 53, -1, 6, 74, 30, -1, 9, 74,
- - 30, -1, 67, 71, -1, 12, 30, -1, 69, 13,
- - -1, -1, 71, 72, -1, 71, 30, -1, 71, 40,
- - -1, 16, 24, 78, 30, -1, -1, 74, 77, -1,
- - 25, -1, 26, -1, 5, 30, -1, 8, 30, -1,
- - 15, 30, -1, 30, -1, 76, 30, -1, -1, 14,
- - 78, -1, 79, -1, 79, 33, 79, -1, 79, 27,
- - 79, -1, 29, 78, 28, -1, 34, 78, -1, 78,
- - 31, 78, -1, 78, 32, 78, -1, 25, -1, 26,
- - -1, -1, 25, -1
- + 37, 0, -1, 81, 38, -1, 38, -1, 63, 39,
- + -1, 39, -1, -1, 39, 41, -1, 39, 55, -1,
- + 39, 67, -1, 39, 80, -1, 39, 26, 1, 31,
- + -1, 39, 40, 1, 31, -1, 39, 1, 31, -1,
- + 16, -1, 18, -1, 19, -1, 21, -1, 17, -1,
- + 22, -1, 20, -1, 23, -1, 31, -1, 61, -1,
- + 71, -1, 44, -1, 46, -1, 69, -1, 26, 1,
- + 31, -1, 1, 31, -1, 10, 26, 31, -1, 43,
- + 47, -1, 11, 26, 31, -1, 45, 47, -1, -1,
- + 47, 48, -1, 47, 49, -1, 47, 75, -1, 47,
- + 73, -1, 47, 42, -1, 47, 31, -1, 19, 78,
- + 31, -1, 18, 79, 82, 31, -1, 20, 83, 82,
- + 31, -1, 21, 26, 82, 31, -1, 22, 84, 84,
- + 82, 31, -1, 24, 50, 31, -1, -1, 50, 26,
- + 51, -1, -1, 34, 79, -1, 7, 85, 31, -1,
- + 52, 56, -1, 80, -1, 53, 58, 54, -1, -1,
- + 56, 57, -1, 56, 75, -1, 56, 73, -1, 56,
- + 31, -1, 56, 42, -1, 18, 79, 82, 31, -1,
- + 19, 78, 31, -1, 17, 31, -1, 20, 26, 82,
- + 31, -1, -1, 58, 41, -1, 14, 83, 81, -1,
- + 80, -1, 59, 62, 60, -1, -1, 62, 41, -1,
- + 62, 67, -1, 62, 55, -1, 3, 79, 81, -1,
- + 4, 79, 31, -1, 64, 76, 74, -1, 80, -1,
- + 65, 68, 66, -1, -1, 68, 41, -1, 68, 67,
- + -1, 68, 55, -1, 6, 79, 31, -1, 9, 79,
- + 31, -1, 70, 74, -1, 12, 31, -1, 72, 13,
- + -1, -1, 74, 75, -1, 74, 31, -1, 74, 42,
- + -1, 16, 25, 83, 31, -1, -1, 76, 77, -1,
- + 76, 31, -1, 23, 82, -1, -1, 79, 82, -1,
- + 26, -1, 27, -1, 5, 31, -1, 8, 31, -1,
- + 15, 31, -1, 31, -1, 81, 31, -1, -1, 14,
- + 83, -1, 84, -1, 84, 34, 84, -1, 84, 28,
- + 84, -1, 30, 83, 29, -1, 35, 83, -1, 83,
- + 32, 83, -1, 83, 33, 83, -1, 26, -1, 27,
- + -1, -1, 26, -1
- };
-
- /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
- static const yytype_uint16 yyrline[] =
- {
- - 0, 104, 104, 106, 108, 109, 110, 111, 112, 113,
- - 114, 118, 122, 122, 122, 122, 122, 122, 122, 126,
- - 127, 128, 129, 130, 131, 135, 136, 142, 150, 156,
- - 164, 174, 176, 177, 178, 179, 180, 181, 184, 192,
- - 198, 208, 214, 220, 223, 225, 236, 237, 242, 251,
- - 256, 264, 267, 269, 270, 271, 272, 273, 276, 282,
- - 293, 299, 309, 311, 316, 324, 332, 335, 337, 338,
- - 339, 344, 351, 356, 364, 367, 369, 370, 371, 374,
- - 382, 389, 396, 402, 409, 411, 412, 413, 416, 424,
- - 426, 431, 432, 435, 436, 437, 441, 442, 445, 446,
- - 449, 450, 451, 452, 453, 454, 455, 458, 459, 462,
- - 463
- + 0, 104, 104, 104, 106, 106, 108, 110, 111, 112,
- + 113, 114, 115, 119, 123, 123, 123, 123, 123, 123,
- + 123, 123, 127, 128, 129, 130, 131, 132, 136, 137,
- + 143, 151, 157, 165, 175, 177, 178, 179, 180, 181,
- + 182, 185, 193, 199, 209, 215, 221, 224, 226, 237,
- + 238, 243, 252, 257, 265, 268, 270, 271, 272, 273,
- + 274, 277, 283, 294, 300, 310, 312, 317, 325, 333,
- + 336, 338, 339, 340, 345, 352, 359, 364, 372, 375,
- + 377, 378, 379, 382, 390, 397, 404, 410, 417, 419,
- + 420, 421, 424, 432, 434, 435, 438, 445, 447, 452,
- + 453, 456, 457, 458, 462, 463, 466, 467, 470, 471,
- + 472, 473, 474, 475, 476, 479, 480, 483, 484
- };
- #endif
-
- @@ -582,19 +553,19 @@
- "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
- "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
- "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE",
- - "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL",
- + "T_VISIBLE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL",
- "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL",
- - "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt",
- - "option_error", "config_entry_start", "config_stmt",
- + "T_NOT", "$accept", "input", "start", "stmt_list", "option_name",
- + "common_stmt", "option_error", "config_entry_start", "config_stmt",
- "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
- "config_option", "symbol_option", "symbol_option_list",
- "symbol_option_arg", "choice", "choice_entry", "choice_end",
- "choice_stmt", "choice_option_list", "choice_option", "choice_block",
- - "if_entry", "if_end", "if_stmt", "if_block", "menu", "menu_entry",
- - "menu_end", "menu_stmt", "menu_block", "source_stmt", "comment",
- - "comment_stmt", "help_start", "help", "depends_list", "depends",
- - "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", "symbol",
- - "word_opt", 0
- + "if_entry", "if_end", "if_stmt", "if_block", "mainmenu_stmt", "menu",
- + "menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt",
- + "comment", "comment_stmt", "help_start", "help", "depends_list",
- + "depends", "visibility_list", "visible", "prompt_stmt_opt", "prompt",
- + "end", "nl", "if_expr", "expr", "symbol", "word_opt", 0
- };
- #endif
-
- @@ -606,42 +577,42 @@
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- - 285, 286, 287, 288, 289
- + 285, 286, 287, 288, 289, 290
- };
- # endif
-
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
- static const yytype_uint8 yyr1[] =
- {
- - 0, 35, 36, 37, 37, 37, 37, 37, 37, 37,
- - 37, 37, 38, 38, 38, 38, 38, 38, 38, 39,
- - 39, 39, 39, 39, 39, 40, 40, 41, 42, 43,
- - 44, 45, 45, 45, 45, 45, 45, 45, 46, 46,
- - 46, 46, 46, 47, 48, 48, 49, 49, 50, 51,
- - 52, 53, 54, 54, 54, 54, 54, 54, 55, 55,
- - 55, 55, 56, 56, 57, 58, 59, 60, 60, 60,
- - 60, 61, 62, 63, 64, 65, 65, 65, 65, 66,
- - 67, 68, 69, 70, 71, 71, 71, 71, 72, 73,
- - 73, 74, 74, 75, 75, 75, 76, 76, 77, 77,
- - 78, 78, 78, 78, 78, 78, 78, 79, 79, 80,
- - 80
- + 0, 36, 37, 37, 38, 38, 39, 39, 39, 39,
- + 39, 39, 39, 39, 40, 40, 40, 40, 40, 40,
- + 40, 40, 41, 41, 41, 41, 41, 41, 42, 42,
- + 43, 44, 45, 46, 47, 47, 47, 47, 47, 47,
- + 47, 48, 48, 48, 48, 48, 49, 50, 50, 51,
- + 51, 52, 53, 54, 55, 56, 56, 56, 56, 56,
- + 56, 57, 57, 57, 57, 58, 58, 59, 60, 61,
- + 62, 62, 62, 62, 63, 64, 65, 66, 67, 68,
- + 68, 68, 68, 69, 70, 71, 72, 73, 74, 74,
- + 74, 74, 75, 76, 76, 76, 77, 78, 78, 79,
- + 79, 80, 80, 80, 81, 81, 82, 82, 83, 83,
- + 83, 83, 83, 83, 83, 84, 84, 85, 85
- };
-
- /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
- static const yytype_uint8 yyr2[] =
- {
- - 0, 2, 1, 0, 2, 2, 2, 4, 2, 4,
- - 4, 3, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 3, 2, 3, 2, 3,
- - 2, 0, 2, 2, 2, 2, 2, 2, 3, 4,
- - 4, 4, 5, 3, 0, 3, 0, 2, 3, 2,
- - 1, 3, 0, 2, 2, 2, 2, 2, 4, 3,
- - 2, 4, 0, 2, 3, 1, 3, 0, 2, 2,
- - 2, 3, 2, 1, 3, 0, 2, 2, 2, 3,
- - 3, 2, 2, 2, 0, 2, 2, 2, 4, 0,
- - 2, 1, 1, 2, 2, 2, 1, 2, 0, 2,
- - 1, 3, 3, 3, 2, 3, 3, 1, 1, 0,
- - 1
- + 0, 2, 2, 1, 2, 1, 0, 2, 2, 2,
- + 2, 4, 4, 3, 1, 1, 1, 1, 1, 1,
- + 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
- + 3, 2, 3, 2, 0, 2, 2, 2, 2, 2,
- + 2, 3, 4, 4, 4, 5, 3, 0, 3, 0,
- + 2, 3, 2, 1, 3, 0, 2, 2, 2, 2,
- + 2, 4, 3, 2, 4, 0, 2, 3, 1, 3,
- + 0, 2, 2, 2, 3, 3, 3, 1, 3, 0,
- + 2, 2, 2, 3, 3, 2, 2, 2, 0, 2,
- + 2, 2, 4, 0, 2, 2, 2, 0, 2, 1,
- + 1, 2, 2, 2, 1, 2, 0, 2, 1, 3,
- + 3, 3, 2, 3, 3, 1, 1, 0, 1
- };
-
- /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- @@ -649,158 +620,172 @@
- means the default is an error. */
- static const yytype_uint8 yydefact[] =
- {
- - 3, 0, 0, 1, 0, 0, 0, 0, 0, 109,
- - 0, 0, 0, 0, 0, 0, 12, 16, 13, 14,
- - 18, 15, 17, 0, 19, 0, 4, 31, 22, 31,
- - 23, 52, 62, 5, 67, 20, 84, 75, 6, 24,
- - 84, 21, 8, 11, 91, 92, 0, 0, 93, 0,
- - 110, 0, 94, 0, 0, 0, 107, 108, 0, 0,
- - 0, 100, 95, 0, 0, 0, 0, 0, 0, 0,
- - 0, 0, 0, 96, 7, 71, 79, 48, 80, 27,
- - 29, 0, 104, 0, 0, 64, 0, 0, 9, 10,
- - 0, 0, 0, 0, 89, 0, 0, 0, 44, 0,
- - 37, 36, 32, 33, 0, 35, 34, 0, 0, 89,
- - 0, 56, 57, 53, 55, 54, 63, 51, 50, 68,
- - 70, 66, 69, 65, 86, 87, 85, 76, 78, 74,
- - 77, 73, 97, 103, 105, 106, 102, 101, 26, 82,
- - 0, 98, 0, 98, 98, 98, 0, 0, 0, 83,
- - 60, 98, 0, 98, 0, 0, 0, 38, 90, 0,
- - 0, 98, 46, 43, 25, 0, 59, 0, 88, 99,
- - 39, 40, 41, 0, 0, 45, 58, 61, 42, 47
- + 6, 0, 104, 0, 3, 0, 6, 6, 99, 100,
- + 0, 1, 0, 0, 0, 0, 117, 0, 0, 0,
- + 0, 0, 0, 14, 18, 15, 16, 20, 17, 19,
- + 21, 0, 22, 0, 7, 34, 25, 34, 26, 55,
- + 65, 8, 70, 23, 93, 79, 9, 27, 88, 24,
- + 10, 0, 105, 2, 74, 13, 0, 101, 0, 118,
- + 0, 102, 0, 0, 0, 115, 116, 0, 0, 0,
- + 108, 103, 0, 0, 0, 0, 0, 0, 0, 88,
- + 0, 0, 75, 83, 51, 84, 30, 32, 0, 112,
- + 0, 0, 67, 0, 0, 11, 12, 0, 0, 0,
- + 0, 97, 0, 0, 0, 47, 0, 40, 39, 35,
- + 36, 0, 38, 37, 0, 0, 97, 0, 59, 60,
- + 56, 58, 57, 66, 54, 53, 71, 73, 69, 72,
- + 68, 106, 95, 0, 94, 80, 82, 78, 81, 77,
- + 90, 91, 89, 111, 113, 114, 110, 109, 29, 86,
- + 0, 106, 0, 106, 106, 106, 0, 0, 0, 87,
- + 63, 106, 0, 106, 0, 96, 0, 0, 41, 98,
- + 0, 0, 106, 49, 46, 28, 0, 62, 0, 107,
- + 92, 42, 43, 44, 0, 0, 48, 61, 64, 45,
- + 50
- };
-
- /* YYDEFGOTO[NTERM-NUM]. */
- static const yytype_int16 yydefgoto[] =
- {
- - -1, 1, 2, 25, 26, 101, 27, 28, 29, 30,
- - 65, 102, 103, 147, 175, 31, 32, 117, 33, 67,
- - 113, 68, 34, 121, 35, 69, 36, 37, 129, 38,
- - 71, 39, 40, 41, 104, 105, 70, 106, 142, 143,
- - 42, 74, 156, 60, 61, 51
- + -1, 3, 4, 5, 33, 34, 108, 35, 36, 37,
- + 38, 74, 109, 110, 157, 186, 39, 40, 124, 41,
- + 76, 120, 77, 42, 128, 43, 78, 6, 44, 45,
- + 137, 46, 80, 47, 48, 49, 111, 112, 81, 113,
- + 79, 134, 152, 153, 50, 7, 165, 69, 70, 60
- };
-
- /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
- -#define YYPACT_NINF -80
- +#define YYPACT_NINF -90
- static const yytype_int16 yypact[] =
- {
- - -80, 2, 132, -80, -13, -1, -1, -2, -1, 9,
- - 33, -1, 27, 40, -3, 38, -80, -80, -80, -80,
- - -80, -80, -80, 71, -80, 77, -80, -80, -80, -80,
- - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
- - -80, -80, -80, -80, -80, -80, 57, 61, -80, 63,
- - -80, 76, -80, 87, 101, 133, -80, -80, -3, -3,
- - 195, -6, -80, 136, 149, 39, 104, 65, 150, 5,
- - 194, 5, 167, -80, 176, -80, -80, -80, -80, -80,
- - -80, 68, -80, -3, -3, 176, 72, 72, -80, -80,
- - 177, 187, 78, -1, -1, -3, 196, 72, -80, 222,
- - -80, -80, -80, -80, 221, -80, -80, 205, -1, -1,
- - 211, -80, -80, -80, -80, -80, -80, -80, -80, -80,
- - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
- - -80, -80, -80, -80, 206, -80, -80, -80, -80, -80,
- - -3, 223, 209, 223, 197, 223, 72, 7, 210, -80,
- - -80, 223, 212, 223, 201, -3, 213, -80, -80, 214,
- - 215, 223, 208, -80, -80, 216, -80, 217, -80, 113,
- - -80, -80, -80, 218, -1, -80, -80, -80, -80, -80
- + 4, 42, -90, 96, -90, 111, -90, 15, -90, -90,
- + 75, -90, 82, 42, 104, 42, 110, 107, 42, 115,
- + 125, -4, 121, -90, -90, -90, -90, -90, -90, -90,
- + -90, 162, -90, 163, -90, -90, -90, -90, -90, -90,
- + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
- + -90, 139, -90, -90, 138, -90, 142, -90, 143, -90,
- + 152, -90, 164, 167, 168, -90, -90, -4, -4, 77,
- + -18, -90, 177, 185, 33, 71, 195, 247, 236, -2,
- + 236, 171, -90, -90, -90, -90, -90, -90, 41, -90,
- + -4, -4, 138, 97, 97, -90, -90, 186, 187, 194,
- + 42, 42, -4, 196, 97, -90, 219, -90, -90, -90,
- + -90, 210, -90, -90, 204, 42, 42, 199, -90, -90,
- + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
- + -90, 222, -90, 223, -90, -90, -90, -90, -90, -90,
- + -90, -90, -90, -90, 215, -90, -90, -90, -90, -90,
- + -4, 222, 228, 222, -5, 222, 97, 35, 229, -90,
- + -90, 222, 232, 222, -4, -90, 135, 233, -90, -90,
- + 234, 235, 222, 240, -90, -90, 237, -90, 239, -13,
- + -90, -90, -90, -90, 244, 42, -90, -90, -90, -90,
- + -90
- };
-
- /* YYPGOTO[NTERM-NUM]. */
- static const yytype_int16 yypgoto[] =
- {
- - -80, -80, -80, -80, 122, -34, -80, -80, -80, -80,
- - 220, -80, -80, -80, -80, -80, -80, -80, 59, -80,
- - -80, -80, -80, -80, -80, -80, -80, -80, -80, 125,
- - -80, -80, -80, -80, -80, 183, 219, 22, 142, -5,
- - 147, 192, 69, -54, -79, -80
- + -90, -90, 269, 271, -90, 23, -70, -90, -90, -90,
- + -90, 243, -90, -90, -90, -90, -90, -90, -90, -48,
- + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
- + -90, -20, -90, -90, -90, -90, -90, 206, 205, -68,
- + -90, -90, 169, -1, 27, -7, 118, -66, -89, -90
- };
-
- /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
- -#define YYTABLE_NINF -82
- +#define YYTABLE_NINF -86
- static const yytype_int16 yytable[] =
- {
- - 46, 47, 3, 49, 81, 82, 53, 136, 137, 6,
- - 7, 8, 9, 10, 11, 12, 13, 43, 146, 14,
- - 15, 86, 56, 57, 44, 45, 58, 87, 48, 134,
- - 135, 59, 162, 112, 50, 24, 125, 163, 125, -28,
- - 90, 144, -28, -28, -28, -28, -28, -28, -28, -28,
- - -28, 91, 54, -28, -28, 92, -28, 93, 94, 95,
- - 96, 97, 98, 52, 99, 55, 90, 161, 62, 100,
- - -49, -49, 63, -49, -49, -49, -49, 91, 64, -49,
- - -49, 92, 107, 108, 109, 110, 154, 73, 141, 115,
- - 99, 75, 126, 76, 126, 111, 133, 56, 57, 83,
- - 84, 169, 140, 151, -30, 90, 77, -30, -30, -30,
- - -30, -30, -30, -30, -30, -30, 91, 78, -30, -30,
- - 92, -30, 93, 94, 95, 96, 97, 98, 120, 99,
- - 128, 79, -2, 4, 100, 5, 6, 7, 8, 9,
- - 10, 11, 12, 13, 83, 84, 14, 15, 16, 17,
- - 18, 19, 20, 21, 22, 7, 8, 23, 10, 11,
- - 12, 13, 24, 80, 14, 15, 88, -81, 90, 179,
- - -81, -81, -81, -81, -81, -81, -81, -81, -81, 89,
- - 24, -81, -81, 92, -81, -81, -81, -81, -81, -81,
- - 116, 119, 99, 127, 122, 90, 130, 124, -72, -72,
- - -72, -72, -72, -72, -72, -72, 132, 138, -72, -72,
- - 92, 155, 158, 159, 160, 118, 123, 139, 131, 99,
- - 165, 145, 167, 148, 124, 73, 83, 84, 83, 84,
- - 173, 168, 83, 84, 149, 150, 153, 155, 84, 157,
- - 164, 174, 166, 170, 171, 172, 176, 177, 178, 66,
- - 114, 152, 85, 0, 0, 0, 0, 0, 0, 72
- + 10, 88, 89, 54, 146, 147, 119, 1, 122, 164,
- + 93, 141, 56, 142, 58, 156, 94, 62, 1, 90,
- + 91, 131, 65, 66, 144, 145, 67, 90, 91, 132,
- + 127, 68, 136, -31, 97, 2, 154, -31, -31, -31,
- + -31, -31, -31, -31, -31, 98, 52, -31, -31, 99,
- + -31, 100, 101, 102, 103, 104, -31, 105, 129, 106,
- + 138, 173, 92, 141, 107, 142, 174, 172, 8, 9,
- + 143, -33, 97, 90, 91, -33, -33, -33, -33, -33,
- + -33, -33, -33, 98, 166, -33, -33, 99, -33, 100,
- + 101, 102, 103, 104, -33, 105, 11, 106, 179, 151,
- + 123, 126, 107, 135, 125, 130, 2, 139, 2, 90,
- + 91, -5, 12, 55, 161, 13, 14, 15, 16, 17,
- + 18, 19, 20, 65, 66, 21, 22, 23, 24, 25,
- + 26, 27, 28, 29, 30, 57, 59, 31, 61, -4,
- + 12, 63, 32, 13, 14, 15, 16, 17, 18, 19,
- + 20, 64, 71, 21, 22, 23, 24, 25, 26, 27,
- + 28, 29, 30, 72, 73, 31, 180, 90, 91, 52,
- + 32, -85, 97, 82, 83, -85, -85, -85, -85, -85,
- + -85, -85, -85, 84, 190, -85, -85, 99, -85, -85,
- + -85, -85, -85, -85, -85, 85, 97, 106, 86, 87,
- + -52, -52, 140, -52, -52, -52, -52, 98, 95, -52,
- + -52, 99, 114, 115, 116, 117, 96, 148, 149, 150,
- + 158, 106, 155, 159, 97, 163, 118, -76, -76, -76,
- + -76, -76, -76, -76, -76, 160, 164, -76, -76, 99,
- + 13, 14, 15, 16, 17, 18, 19, 20, 91, 106,
- + 21, 22, 14, 15, 140, 17, 18, 19, 20, 168,
- + 175, 21, 22, 177, 181, 182, 183, 32, 187, 167,
- + 188, 169, 170, 171, 185, 189, 53, 51, 32, 176,
- + 75, 178, 121, 0, 133, 162, 0, 0, 0, 0,
- + 184
- };
-
- static const yytype_int16 yycheck[] =
- {
- - 5, 6, 0, 8, 58, 59, 11, 86, 87, 4,
- - 5, 6, 7, 8, 9, 10, 11, 30, 97, 14,
- - 15, 27, 25, 26, 25, 26, 29, 33, 30, 83,
- - 84, 34, 25, 67, 25, 30, 70, 30, 72, 0,
- - 1, 95, 3, 4, 5, 6, 7, 8, 9, 10,
- - 11, 12, 25, 14, 15, 16, 17, 18, 19, 20,
- - 21, 22, 23, 30, 25, 25, 1, 146, 30, 30,
- - 5, 6, 1, 8, 9, 10, 11, 12, 1, 14,
- - 15, 16, 17, 18, 19, 20, 140, 30, 93, 67,
- - 25, 30, 70, 30, 72, 30, 28, 25, 26, 31,
- - 32, 155, 24, 108, 0, 1, 30, 3, 4, 5,
- - 6, 7, 8, 9, 10, 11, 12, 30, 14, 15,
- - 16, 17, 18, 19, 20, 21, 22, 23, 69, 25,
- - 71, 30, 0, 1, 30, 3, 4, 5, 6, 7,
- - 8, 9, 10, 11, 31, 32, 14, 15, 16, 17,
- - 18, 19, 20, 21, 22, 5, 6, 25, 8, 9,
- - 10, 11, 30, 30, 14, 15, 30, 0, 1, 174,
- - 3, 4, 5, 6, 7, 8, 9, 10, 11, 30,
- - 30, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- - 68, 69, 25, 71, 69, 1, 71, 30, 4, 5,
- - 6, 7, 8, 9, 10, 11, 30, 30, 14, 15,
- - 16, 14, 143, 144, 145, 68, 69, 30, 71, 25,
- - 151, 25, 153, 1, 30, 30, 31, 32, 31, 32,
- - 161, 30, 31, 32, 13, 30, 25, 14, 32, 30,
- - 30, 33, 30, 30, 30, 30, 30, 30, 30, 29,
- - 67, 109, 60, -1, -1, -1, -1, -1, -1, 40
- + 1, 67, 68, 10, 93, 94, 76, 3, 76, 14,
- + 28, 81, 13, 81, 15, 104, 34, 18, 3, 32,
- + 33, 23, 26, 27, 90, 91, 30, 32, 33, 31,
- + 78, 35, 80, 0, 1, 31, 102, 4, 5, 6,
- + 7, 8, 9, 10, 11, 12, 31, 14, 15, 16,
- + 17, 18, 19, 20, 21, 22, 23, 24, 78, 26,
- + 80, 26, 69, 133, 31, 133, 31, 156, 26, 27,
- + 29, 0, 1, 32, 33, 4, 5, 6, 7, 8,
- + 9, 10, 11, 12, 150, 14, 15, 16, 17, 18,
- + 19, 20, 21, 22, 23, 24, 0, 26, 164, 100,
- + 77, 78, 31, 80, 77, 78, 31, 80, 31, 32,
- + 33, 0, 1, 31, 115, 4, 5, 6, 7, 8,
- + 9, 10, 11, 26, 27, 14, 15, 16, 17, 18,
- + 19, 20, 21, 22, 23, 31, 26, 26, 31, 0,
- + 1, 26, 31, 4, 5, 6, 7, 8, 9, 10,
- + 11, 26, 31, 14, 15, 16, 17, 18, 19, 20,
- + 21, 22, 23, 1, 1, 26, 31, 32, 33, 31,
- + 31, 0, 1, 31, 31, 4, 5, 6, 7, 8,
- + 9, 10, 11, 31, 185, 14, 15, 16, 17, 18,
- + 19, 20, 21, 22, 23, 31, 1, 26, 31, 31,
- + 5, 6, 31, 8, 9, 10, 11, 12, 31, 14,
- + 15, 16, 17, 18, 19, 20, 31, 31, 31, 25,
- + 1, 26, 26, 13, 1, 26, 31, 4, 5, 6,
- + 7, 8, 9, 10, 11, 31, 14, 14, 15, 16,
- + 4, 5, 6, 7, 8, 9, 10, 11, 33, 26,
- + 14, 15, 5, 6, 31, 8, 9, 10, 11, 31,
- + 31, 14, 15, 31, 31, 31, 31, 31, 31, 151,
- + 31, 153, 154, 155, 34, 31, 7, 6, 31, 161,
- + 37, 163, 76, -1, 79, 116, -1, -1, -1, -1,
- + 172
- };
-
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
- static const yytype_uint8 yystos[] =
- {
- - 0, 36, 37, 0, 1, 3, 4, 5, 6, 7,
- - 8, 9, 10, 11, 14, 15, 16, 17, 18, 19,
- - 20, 21, 22, 25, 30, 38, 39, 41, 42, 43,
- - 44, 50, 51, 53, 57, 59, 61, 62, 64, 66,
- - 67, 68, 75, 30, 25, 26, 74, 74, 30, 74,
- - 25, 80, 30, 74, 25, 25, 25, 26, 29, 34,
- - 78, 79, 30, 1, 1, 45, 45, 54, 56, 60,
- - 71, 65, 71, 30, 76, 30, 30, 30, 30, 30,
- - 30, 78, 78, 31, 32, 76, 27, 33, 30, 30,
- - 1, 12, 16, 18, 19, 20, 21, 22, 23, 25,
- - 30, 40, 46, 47, 69, 70, 72, 17, 18, 19,
- - 20, 30, 40, 55, 70, 72, 39, 52, 75, 39,
- - 53, 58, 64, 75, 30, 40, 72, 39, 53, 63,
- - 64, 75, 30, 28, 78, 78, 79, 79, 30, 30,
- - 24, 74, 73, 74, 78, 25, 79, 48, 1, 13,
- - 30, 74, 73, 25, 78, 14, 77, 30, 77, 77,
- - 77, 79, 25, 30, 30, 77, 30, 77, 30, 78,
- - 30, 30, 30, 77, 33, 49, 30, 30, 30, 74
- + 0, 3, 31, 37, 38, 39, 63, 81, 26, 27,
- + 79, 0, 1, 4, 5, 6, 7, 8, 9, 10,
- + 11, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- + 23, 26, 31, 40, 41, 43, 44, 45, 46, 52,
- + 53, 55, 59, 61, 64, 65, 67, 69, 70, 71,
- + 80, 39, 31, 38, 81, 31, 79, 31, 79, 26,
- + 85, 31, 79, 26, 26, 26, 27, 30, 35, 83,
- + 84, 31, 1, 1, 47, 47, 56, 58, 62, 76,
- + 68, 74, 31, 31, 31, 31, 31, 31, 83, 83,
- + 32, 33, 81, 28, 34, 31, 31, 1, 12, 16,
- + 18, 19, 20, 21, 22, 24, 26, 31, 42, 48,
- + 49, 72, 73, 75, 17, 18, 19, 20, 31, 42,
- + 57, 73, 75, 41, 54, 80, 41, 55, 60, 67,
- + 80, 23, 31, 74, 77, 41, 55, 66, 67, 80,
- + 31, 42, 75, 29, 83, 83, 84, 84, 31, 31,
- + 25, 79, 78, 79, 83, 26, 84, 50, 1, 13,
- + 31, 79, 78, 26, 14, 82, 83, 82, 31, 82,
- + 82, 82, 84, 26, 31, 31, 82, 31, 82, 83,
- + 31, 31, 31, 31, 82, 34, 51, 31, 31, 31,
- + 79
- };
-
- #define yyerrok (yyerrstatus = 0)
- @@ -815,9 +800,18 @@
-
- /* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- - Once GCC version 2 has supplanted version 1, this can go. */
- + Once GCC version 2 has supplanted version 1, this can go. However,
- + YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- + in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- + discussed. */
-
- #define YYFAIL goto yyerrlab
- +#if defined YYFAIL
- + /* This is here to suppress warnings from the GCC cpp's
- + -Wunused-macros. Normally we don't worry about that warning, but
- + some users do, and we want to make it easy for users to remove
- + YYFAIL uses, which will produce warnings from Bison 2.5. */
- +#endif
-
- #define YYRECOVERING() (!!yyerrstatus)
-
- @@ -874,7 +868,7 @@
- we won't break user code: when these are the locations we know. */
-
- #ifndef YY_LOCATION_PRINT
- -# if YYLTYPE_IS_TRIVIAL
- +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
- # define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- @@ -985,17 +979,20 @@
- #if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
- static void
- -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
- +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
- #else
- static void
- -yy_stack_print (bottom, top)
- - yytype_int16 *bottom;
- - yytype_int16 *top;
- +yy_stack_print (yybottom, yytop)
- + yytype_int16 *yybottom;
- + yytype_int16 *yytop;
- #endif
- {
- YYFPRINTF (stderr, "Stack now");
- - for (; bottom <= top; ++bottom)
- - YYFPRINTF (stderr, " %d", *bottom);
- + for (; yybottom <= yytop; yybottom++)
- + {
- + int yybot = *yybottom;
- + YYFPRINTF (stderr, " %d", yybot);
- + }
- YYFPRINTF (stderr, "\n");
- }
-
- @@ -1029,11 +1026,11 @@
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- - fprintf (stderr, " $%d = ", yyi + 1);
- + YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
- - fprintf (stderr, "\n");
- + YYFPRINTF (stderr, "\n");
- }
- }
-
- @@ -1308,7 +1305,7 @@
-
- switch (yytype)
- {
- - case 51: /* "choice_entry" */
- + case 53: /* "choice_entry" */
-
- {
- fprintf(stderr, "%s:%d: missing end statement for this entry\n",
- @@ -1318,7 +1315,7 @@
- };
-
- break;
- - case 57: /* "if_entry" */
- + case 59: /* "if_entry" */
-
- {
- fprintf(stderr, "%s:%d: missing end statement for this entry\n",
- @@ -1328,7 +1325,7 @@
- };
-
- break;
- - case 62: /* "menu_entry" */
- + case 65: /* "menu_entry" */
-
- {
- fprintf(stderr, "%s:%d: missing end statement for this entry\n",
- @@ -1343,10 +1340,8 @@
- break;
- }
- }
- -
-
- /* Prevent warnings from -Wmissing-prototypes. */
- -
- #ifdef YYPARSE_PARAM
- #if defined __STDC__ || defined __cplusplus
- int yyparse (void *YYPARSE_PARAM);
- @@ -1362,11 +1357,10 @@
- #endif /* ! YYPARSE_PARAM */
-
-
- -
- -/* The look-ahead symbol. */
- +/* The lookahead symbol. */
- int yychar;
-
- -/* The semantic value of the look-ahead symbol. */
- +/* The semantic value of the lookahead symbol. */
- YYSTYPE yylval;
-
- /* Number of syntax errors so far. */
- @@ -1374,9 +1368,9 @@
-
-
-
- -/*----------.
- -| yyparse. |
- -`----------*/
- +/*-------------------------.
- +| yyparse or yypush_parse. |
- +`-------------------------*/
-
- #ifdef YYPARSE_PARAM
- #if (defined __STDC__ || defined __C99__FUNC__ \
- @@ -1400,14 +1394,39 @@
- #endif
- #endif
- {
- -
- - int yystate;
- +
- +
- + int yystate;
- + /* Number of tokens to shift before error messages enabled. */
- + int yyerrstatus;
- +
- + /* The stacks and their tools:
- + `yyss': related to states.
- + `yyvs': related to semantic values.
- +
- + Refer to the stacks thru separate pointers, to allow yyoverflow
- + to reallocate them elsewhere. */
- +
- + /* The state stack. */
- + yytype_int16 yyssa[YYINITDEPTH];
- + yytype_int16 *yyss;
- + yytype_int16 *yyssp;
- +
- + /* The semantic value stack. */
- + YYSTYPE yyvsa[YYINITDEPTH];
- + YYSTYPE *yyvs;
- + YYSTYPE *yyvsp;
- +
- + YYSIZE_T yystacksize;
- +
- int yyn;
- int yyresult;
- - /* Number of tokens to shift before error messages enabled. */
- - int yyerrstatus;
- - /* Look-ahead token as an internal (translated) token number. */
- - int yytoken = 0;
- + /* Lookahead token as an internal (translated) token number. */
- + int yytoken;
- + /* The variables used to return semantic value and location from the
- + action routines. */
- + YYSTYPE yyval;
- +
- #if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- @@ -1415,51 +1434,28 @@
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
- #endif
-
- - /* Three stacks and their tools:
- - `yyss': related to states,
- - `yyvs': related to semantic values,
- - `yyls': related to locations.
- -
- - Refer to the stacks thru separate pointers, to allow yyoverflow
- - to reallocate them elsewhere. */
- -
- - /* The state stack. */
- - yytype_int16 yyssa[YYINITDEPTH];
- - yytype_int16 *yyss = yyssa;
- - yytype_int16 *yyssp;
- -
- - /* The semantic value stack. */
- - YYSTYPE yyvsa[YYINITDEPTH];
- - YYSTYPE *yyvs = yyvsa;
- - YYSTYPE *yyvsp;
- -
- -
- -
- #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- - YYSIZE_T yystacksize = YYINITDEPTH;
- -
- - /* The variables used to return semantic value and location from the
- - action routines. */
- - YYSTYPE yyval;
- -
- -
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- + yytoken = 0;
- + yyss = yyssa;
- + yyvs = yyvsa;
- + yystacksize = YYINITDEPTH;
- +
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- - yychar = YYEMPTY; /* Cause a token to be read. */
- + yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
- -
- yyssp = yyss;
- yyvsp = yyvs;
-
- @@ -1489,7 +1485,6 @@
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- -
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- @@ -1497,7 +1492,6 @@
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- -
- &yystacksize);
-
- yyss = yyss1;
- @@ -1520,9 +1514,8 @@
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- - YYSTACK_RELOCATE (yyss);
- - YYSTACK_RELOCATE (yyvs);
- -
- + YYSTACK_RELOCATE (yyss_alloc, yyss);
- + YYSTACK_RELOCATE (yyvs_alloc, yyvs);
- # undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- @@ -1533,7 +1526,6 @@
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
- -
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- @@ -1543,6 +1535,9 @@
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
- + if (yystate == YYFINAL)
- + YYACCEPT;
- +
- goto yybackup;
-
- /*-----------.
- @@ -1551,16 +1546,16 @@
- yybackup:
-
- /* Do appropriate processing given the current state. Read a
- - look-ahead token if we need one and don't already have one. */
- + lookahead token if we need one and don't already have one. */
-
- - /* First try to decide what to do without reference to look-ahead token. */
- + /* First try to decide what to do without reference to lookahead token. */
- yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
- goto yydefault;
-
- - /* Not known => get a look-ahead token if don't already have one. */
- + /* Not known => get a lookahead token if don't already have one. */
-
- - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
- + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- @@ -1592,20 +1587,16 @@
- goto yyreduce;
- }
-
- - if (yyn == YYFINAL)
- - YYACCEPT;
- -
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- - /* Shift the look-ahead token. */
- + /* Shift the lookahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- - /* Discard the shifted token unless it is eof. */
- - if (yychar != YYEOF)
- - yychar = YYEMPTY;
- + /* Discard the shifted token. */
- + yychar = YYEMPTY;
-
- yystate = yyn;
- *++yyvsp = yylval;
- @@ -1644,39 +1635,39 @@
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- - case 8:
- + case 10:
-
- { zconf_error("unexpected end statement"); ;}
- break;
-
- - case 9:
- + case 11:
-
- { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); ;}
- break;
-
- - case 10:
- + case 12:
-
- {
- zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name);
- ;}
- break;
-
- - case 11:
- + case 13:
-
- { zconf_error("invalid statement"); ;}
- break;
-
- - case 25:
- + case 28:
-
- { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;}
- break;
-
- - case 26:
- + case 29:
-
- { zconf_error("invalid option"); ;}
- break;
-
- - case 27:
- + case 30:
-
- {
- struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
- @@ -1686,7 +1677,7 @@
- ;}
- break;
-
- - case 28:
- + case 31:
-
- {
- menu_end_entry();
- @@ -1694,7 +1685,7 @@
- ;}
- break;
-
- - case 29:
- + case 32:
-
- {
- struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
- @@ -1704,7 +1695,7 @@
- ;}
- break;
-
- - case 30:
- + case 33:
-
- {
- if (current_entry->prompt)
- @@ -1716,7 +1707,7 @@
- ;}
- break;
-
- - case 38:
- + case 41:
-
- {
- menu_set_type((yyvsp[(1) - (3)].id)->stype);
- @@ -1726,7 +1717,7 @@
- ;}
- break;
-
- - case 39:
- + case 42:
-
- {
- menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
- @@ -1734,7 +1725,7 @@
- ;}
- break;
-
- - case 40:
- + case 43:
-
- {
- menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr));
- @@ -1746,7 +1737,7 @@
- ;}
- break;
-
- - case 41:
- + case 44:
-
- {
- menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
- @@ -1754,7 +1745,7 @@
- ;}
- break;
-
- - case 42:
- + case 45:
-
- {
- menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr));
- @@ -1762,10 +1753,10 @@
- ;}
- break;
-
- - case 45:
- + case 48:
-
- {
- - struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
- + const struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
- if (id && id->flags & TF_OPTION)
- menu_add_option(id->token, (yyvsp[(3) - (3)].string));
- else
- @@ -1774,17 +1765,17 @@
- ;}
- break;
-
- - case 46:
- + case 49:
-
- { (yyval.string) = NULL; ;}
- break;
-
- - case 47:
- + case 50:
-
- { (yyval.string) = (yyvsp[(2) - (2)].string); ;}
- break;
-
- - case 48:
- + case 51:
-
- {
- struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE);
- @@ -1795,14 +1786,14 @@
- ;}
- break;
-
- - case 49:
- + case 52:
-
- {
- (yyval.menu) = menu_add_menu();
- ;}
- break;
-
- - case 50:
- + case 53:
-
- {
- if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) {
- @@ -1812,7 +1803,7 @@
- ;}
- break;
-
- - case 58:
- + case 61:
-
- {
- menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
- @@ -1820,7 +1811,7 @@
- ;}
- break;
-
- - case 59:
- + case 62:
-
- {
- if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) {
- @@ -1833,7 +1824,7 @@
- ;}
- break;
-
- - case 60:
- + case 63:
-
- {
- current_entry->sym->flags |= SYMBOL_OPTIONAL;
- @@ -1841,7 +1832,7 @@
- ;}
- break;
-
- - case 61:
- + case 64:
-
- {
- if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) {
- @@ -1853,7 +1844,7 @@
- ;}
- break;
-
- - case 64:
- + case 67:
-
- {
- printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
- @@ -1863,7 +1854,7 @@
- ;}
- break;
-
- - case 65:
- + case 68:
-
- {
- if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) {
- @@ -1873,7 +1864,14 @@
- ;}
- break;
-
- - case 71:
- + case 74:
- +
- + {
- + menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
- +;}
- + break;
- +
- + case 75:
-
- {
- menu_add_entry(NULL);
- @@ -1882,14 +1880,14 @@
- ;}
- break;
-
- - case 72:
- + case 76:
-
- {
- (yyval.menu) = menu_add_menu();
- ;}
- break;
-
- - case 73:
- + case 77:
-
- {
- if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) {
- @@ -1899,7 +1897,7 @@
- ;}
- break;
-
- - case 79:
- + case 83:
-
- {
- printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
- @@ -1907,7 +1905,7 @@
- ;}
- break;
-
- - case 80:
- + case 84:
-
- {
- menu_add_entry(NULL);
- @@ -1916,14 +1914,14 @@
- ;}
- break;
-
- - case 81:
- + case 85:
-
- {
- menu_end_entry();
- ;}
- break;
-
- - case 82:
- + case 86:
-
- {
- printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
- @@ -1931,14 +1929,14 @@
- ;}
- break;
-
- - case 83:
- + case 87:
-
- {
- current_entry->help = (yyvsp[(2) - (2)].string);
- ;}
- break;
-
- - case 88:
- + case 92:
-
- {
- menu_add_dep((yyvsp[(3) - (4)].expr));
- @@ -1946,90 +1944,96 @@
- ;}
- break;
-
- - case 90:
- + case 96:
- +
- + {
- + menu_add_visibility((yyvsp[(2) - (2)].expr));
- +;}
- + break;
- +
- + case 98:
-
- {
- menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr));
- ;}
- break;
-
- - case 93:
- + case 101:
-
- { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
- break;
-
- - case 94:
- + case 102:
-
- { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
- break;
-
- - case 95:
- + case 103:
-
- { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
- break;
-
- - case 98:
- + case 106:
-
- { (yyval.expr) = NULL; ;}
- break;
-
- - case 99:
- + case 107:
-
- { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;}
- break;
-
- - case 100:
- + case 108:
-
- { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;}
- break;
-
- - case 101:
- + case 109:
-
- { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
- break;
-
- - case 102:
- + case 110:
-
- { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
- break;
-
- - case 103:
- + case 111:
-
- { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;}
- break;
-
- - case 104:
- + case 112:
-
- { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;}
- break;
-
- - case 105:
- + case 113:
-
- { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
- break;
-
- - case 106:
- + case 114:
-
- { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
- break;
-
- - case 107:
- + case 115:
-
- { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;}
- break;
-
- - case 108:
- + case 116:
-
- { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); ;}
- break;
-
- - case 109:
- + case 117:
-
- { (yyval.string) = NULL; ;}
- break;
-
-
- -/* Line 1267 of yacc.c. */
-
- default: break;
- }
- @@ -2041,7 +2045,6 @@
-
- *++yyvsp = yyval;
-
- -
- /* Now `shift' the result of the reduction. Determine what state
- that goes to, based on the state we popped back to and the rule
- number reduced by. */
- @@ -2106,7 +2109,7 @@
-
- if (yyerrstatus == 3)
- {
- - /* If just tried and failed to reuse look-ahead token after an
- + /* If just tried and failed to reuse lookahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- @@ -2123,7 +2126,7 @@
- }
- }
-
- - /* Else will try to reuse look-ahead token after shifting the error
- + /* Else will try to reuse lookahead token after shifting the error
- token. */
- goto yyerrlab1;
-
- @@ -2180,9 +2183,6 @@
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- - if (yyn == YYFINAL)
- - YYACCEPT;
- -
- *++yyvsp = yylval;
-
-
- @@ -2207,7 +2207,7 @@
- yyresult = 1;
- goto yyreturn;
-
- -#ifndef yyoverflow
- +#if !defined(yyoverflow) || YYERROR_VERBOSE
- /*-------------------------------------------------.
- | yyexhaustedlab -- memory exhaustion comes here. |
- `-------------------------------------------------*/
- @@ -2218,7 +2218,7 @@
- #endif
-
- yyreturn:
- - if (yychar != YYEOF && yychar != YYEMPTY)
- + if (yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- /* Do not reclaim the symbols of the rule which action triggered
- @@ -2255,16 +2255,14 @@
- zconf_initscan(name);
-
- sym_init();
- - menu_init();
- + _menu_init();
- modules_sym = sym_lookup(NULL, 0);
- modules_sym->type = S_BOOLEAN;
- modules_sym->flags |= SYMBOL_AUTO;
- rootmenu.prompt = menu_add_prompt(P_MENU, "uClibc Configuration", NULL);
-
- -#if YYDEBUG
- if (getenv("ZCONF_DEBUG"))
- zconfdebug = 1;
- -#endif
- zconfparse();
- if (zconfnerrs)
- exit(1);
- @@ -2274,6 +2272,10 @@
- prop = prop_alloc(P_DEFAULT, modules_sym);
- prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
- }
- +
- + rootmenu.prompt->text = _(rootmenu.prompt->text);
- + rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);
- +
- menu_finalize(&rootmenu);
- for_all_symbols(i, sym) {
- if (sym_check_deps(sym))
- @@ -2284,7 +2286,7 @@
- sym_set_change_count(1);
- }
-
- -const char *zconf_tokenname(int token)
- +static const char *zconf_tokenname(int token)
- {
- switch (token) {
- case T_MENU: return "menu";
- @@ -2294,11 +2296,12 @@
- case T_IF: return "if";
- case T_ENDIF: return "endif";
- case T_DEPENDS: return "depends";
- + case T_VISIBLE: return "visible";
- }
- return "<token>";
- }
-
- -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
- +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken)
- {
- if (id->token != endtoken) {
- zconf_error("unexpected '%s' within %s block",
- @@ -2343,12 +2346,10 @@
-
- static void zconferror(const char *err)
- {
- -#if YYDEBUG
- fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
- -#endif
- }
-
- -void print_quoted_string(FILE *out, const char *str)
- +static void print_quoted_string(FILE *out, const char *str)
- {
- const char *p;
- int len;
- @@ -2365,15 +2366,15 @@
- putc('"', out);
- }
-
- -void print_symbol(FILE *out, struct menu *menu)
- +static void print_symbol(FILE *out, struct menu *menu)
- {
- struct symbol *sym = menu->sym;
- struct property *prop;
-
- if (sym_is_choice(sym))
- - fprintf(out, "choice\n");
- + fprintf(out, "\nchoice\n");
- else
- - fprintf(out, "config %s\n", sym->name);
- + fprintf(out, "\nconfig %s\n", sym->name);
- switch (sym->type) {
- case S_BOOLEAN:
- fputs(" boolean\n", out);
- @@ -2419,6 +2420,21 @@
- case P_CHOICE:
- fputs(" #choice value\n", out);
- break;
- + case P_SELECT:
- + fputs( " select ", out);
- + expr_fprint(prop->expr, out);
- + fputc('\n', out);
- + break;
- + case P_RANGE:
- + fputs( " range ", out);
- + expr_fprint(prop->expr, out);
- + fputc('\n', out);
- + break;
- + case P_MENU:
- + fputs( " menu ", out);
- + print_quoted_string(out, prop->text);
- + fputc('\n', out);
- + break;
- default:
- fprintf(out, " unknown prop %d!\n", prop->type);
- break;
- @@ -2430,7 +2446,6 @@
- menu->help[len] = 0;
- fprintf(out, " help\n%s\n", menu->help);
- }
- - fputc('\n', out);
- }
-
- void zconfdump(FILE *out)
- @@ -2463,7 +2478,6 @@
- expr_fprint(prop->visible.expr, out);
- fputc('\n', out);
- }
- - fputs("\n", out);
- }
-
- if (menu->list)
- @@ -2481,7 +2495,7 @@
- }
- }
-
- -#include "lex.zconf.c"
- +#include "zconf.lex.c"
- #include "util.c"
- #include "confdata.c"
- #include "expr.c"
- diff -Nur uClibc-0.9.33.2/extra/config/zconf.y uClibc/extra/config/zconf.y
- --- uClibc-0.9.33.2/extra/config/zconf.y 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/config/zconf.y 2014-02-03 12:32:56.000000000 +0100
- @@ -11,11 +11,8 @@
- #include <string.h>
- #include <stdbool.h>
-
- -#define LKC_DIRECT_LINK
- #include "lkc.h"
-
- -#include "zconf.hash.c"
- -
- #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
-
- #define PRINTD 0x0001
- @@ -27,18 +24,14 @@
- static void zconfprint(const char *err, ...);
- static void zconf_error(const char *err, ...);
- static void zconferror(const char *err);
- -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
- +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
-
- -struct symbol *symbol_hash[257];
- +struct symbol *symbol_hash[SYMBOL_HASHSIZE];
-
- static struct menu *current_menu, *current_entry;
-
- -#define YYDEBUG 0
- -#if YYDEBUG
- -#define YYERROR_VERBOSE
- -#endif
- %}
- -%expect 26
- +%expect 30
-
- %union
- {
- @@ -47,7 +40,7 @@
- struct symbol *symbol;
- struct expr *expr;
- struct menu *menu;
- - struct kconf_id *id;
- + const struct kconf_id *id;
- }
-
- %token <id>T_MAINMENU
- @@ -70,6 +63,7 @@
- %token <id>T_DEFAULT
- %token <id>T_SELECT
- %token <id>T_RANGE
- +%token <id>T_VISIBLE
- %token <id>T_OPTION
- %token <id>T_ON
- %token <string> T_WORD
- @@ -100,15 +94,21 @@
- menu_end_menu();
- } if_entry menu_entry choice_entry
-
- +%{
- +/* Include zconf.hash.c here so it can see the token constants. */
- +#include "zconf.hash.c"
- +%}
- +
- %%
- -input: stmt_list;
- +input: nl start | start;
- +
- +start: mainmenu_stmt stmt_list | stmt_list;
-
- stmt_list:
- /* empty */
- | stmt_list common_stmt
- | stmt_list choice_stmt
- | stmt_list menu_stmt
- - | stmt_list T_MAINMENU prompt nl
- | stmt_list end { zconf_error("unexpected end statement"); }
- | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); }
- | stmt_list option_name error T_EOL
- @@ -119,7 +119,7 @@
- ;
-
- option_name:
- - T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT
- + T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE
- ;
-
- common_stmt:
- @@ -224,7 +224,7 @@
- /* empty */
- | symbol_option_list T_WORD symbol_option_arg
- {
- - struct kconf_id *id = kconf_id_lookup($2, strlen($2));
- + const struct kconf_id *id = kconf_id_lookup($2, strlen($2));
- if (id && id->flags & TF_OPTION)
- menu_add_option(id->token, $3);
- else
- @@ -339,6 +339,13 @@
- | if_block choice_stmt
- ;
-
- +/* mainmenu entry */
- +
- +mainmenu_stmt: T_MAINMENU prompt nl
- +{
- + menu_add_prompt(P_MENU, $2, NULL);
- +};
- +
- /* menu entry */
-
- menu: T_MENU prompt T_EOL
- @@ -348,7 +355,7 @@
- printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
- };
-
- -menu_entry: menu depends_list
- +menu_entry: menu visibility_list depends_list
- {
- $$ = menu_add_menu();
- };
- @@ -419,6 +426,19 @@
- printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
- };
-
- +/* visibility option */
- +
- +visibility_list:
- + /* empty */
- + | visibility_list visible
- + | visibility_list T_EOL
- +;
- +
- +visible: T_VISIBLE if_expr
- +{
- + menu_add_visibility($2);
- +};
- +
- /* prompt statement */
-
- prompt_stmt_opt:
- @@ -472,16 +492,14 @@
- zconf_initscan(name);
-
- sym_init();
- - menu_init();
- + _menu_init();
- modules_sym = sym_lookup(NULL, 0);
- modules_sym->type = S_BOOLEAN;
- modules_sym->flags |= SYMBOL_AUTO;
- rootmenu.prompt = menu_add_prompt(P_MENU, "uClibc Configuration", NULL);
-
- -#if YYDEBUG
- if (getenv("ZCONF_DEBUG"))
- zconfdebug = 1;
- -#endif
- zconfparse();
- if (zconfnerrs)
- exit(1);
- @@ -491,6 +509,10 @@
- prop = prop_alloc(P_DEFAULT, modules_sym);
- prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
- }
- +
- + rootmenu.prompt->text = _(rootmenu.prompt->text);
- + rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);
- +
- menu_finalize(&rootmenu);
- for_all_symbols(i, sym) {
- if (sym_check_deps(sym))
- @@ -501,7 +523,7 @@
- sym_set_change_count(1);
- }
-
- -const char *zconf_tokenname(int token)
- +static const char *zconf_tokenname(int token)
- {
- switch (token) {
- case T_MENU: return "menu";
- @@ -511,11 +533,12 @@
- case T_IF: return "if";
- case T_ENDIF: return "endif";
- case T_DEPENDS: return "depends";
- + case T_VISIBLE: return "visible";
- }
- return "<token>";
- }
-
- -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
- +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken)
- {
- if (id->token != endtoken) {
- zconf_error("unexpected '%s' within %s block",
- @@ -560,12 +583,10 @@
-
- static void zconferror(const char *err)
- {
- -#if YYDEBUG
- fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
- -#endif
- }
-
- -void print_quoted_string(FILE *out, const char *str)
- +static void print_quoted_string(FILE *out, const char *str)
- {
- const char *p;
- int len;
- @@ -582,15 +603,15 @@
- putc('"', out);
- }
-
- -void print_symbol(FILE *out, struct menu *menu)
- +static void print_symbol(FILE *out, struct menu *menu)
- {
- struct symbol *sym = menu->sym;
- struct property *prop;
-
- if (sym_is_choice(sym))
- - fprintf(out, "choice\n");
- + fprintf(out, "\nchoice\n");
- else
- - fprintf(out, "config %s\n", sym->name);
- + fprintf(out, "\nconfig %s\n", sym->name);
- switch (sym->type) {
- case S_BOOLEAN:
- fputs(" boolean\n", out);
- @@ -636,6 +657,21 @@
- case P_CHOICE:
- fputs(" #choice value\n", out);
- break;
- + case P_SELECT:
- + fputs( " select ", out);
- + expr_fprint(prop->expr, out);
- + fputc('\n', out);
- + break;
- + case P_RANGE:
- + fputs( " range ", out);
- + expr_fprint(prop->expr, out);
- + fputc('\n', out);
- + break;
- + case P_MENU:
- + fputs( " menu ", out);
- + print_quoted_string(out, prop->text);
- + fputc('\n', out);
- + break;
- default:
- fprintf(out, " unknown prop %d!\n", prop->type);
- break;
- @@ -647,7 +683,6 @@
- menu->help[len] = 0;
- fprintf(out, " help\n%s\n", menu->help);
- }
- - fputc('\n', out);
- }
-
- void zconfdump(FILE *out)
- @@ -680,7 +715,6 @@
- expr_fprint(prop->visible.expr, out);
- fputc('\n', out);
- }
- - fputs("\n", out);
- }
-
- if (menu->list)
- @@ -698,7 +732,7 @@
- }
- }
-
- -#include "lex.zconf.c"
- +#include "zconf.lex.c"
- #include "util.c"
- #include "confdata.c"
- #include "expr.c"
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.alpha uClibc/extra/Configs/Config.alpha
- --- uClibc-0.9.33.2/extra/Configs/Config.alpha 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.alpha 2014-02-03 12:32:56.000000000 +0100
- @@ -13,4 +13,5 @@
- select ARCH_LITTLE_ENDIAN
- select ARCH_HAS_MMU
- select ARCH_HAS_NO_LDSO
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- select UCLIBC_HAS_LFS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.arc uClibc/extra/Configs/Config.arc
- --- uClibc-0.9.33.2/extra/Configs/Config.arc 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/Configs/Config.arc 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,23 @@
- +#
- +# For a description of the syntax of this configuration file,
- +# see extra/config/Kconfig-language.txt
- +#
- +config TARGET_ARCH
- + default "arc"
- +
- +config FORCE_OPTIONS_FOR_ARCH
- + bool
- + default y
- + select ARCH_ANY_ENDIAN
- +
- +choice
- + prompt "Target Processor Type"
- + default CONFIG_ARC_CPU_700
- +
- +config CONFIG_ARC_CPU_700
- + bool "ARC700"
- + select ARCH_HAS_MMU
- + help
- + ARCompact ISA based ARC CPU
- +
- +endchoice
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.arm uClibc/extra/Configs/Config.arm
- --- uClibc-0.9.33.2/extra/Configs/Config.arm 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.arm 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,8 @@
- bool
- default y
- select ARCH_ANY_ENDIAN
- + select ARCH_HAS_UCONTEXT
- + select ARCH_HAS_DEPRECATED_SYSCALLS
-
- config CONFIG_ARM_EABI
- bool "Build for EABI"
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.avr32 uClibc/extra/Configs/Config.avr32
- --- uClibc-0.9.33.2/extra/Configs/Config.avr32 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.avr32 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
- bool
- default y
- select ARCH_BIG_ENDIAN
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- select FORCE_SHAREABLE_TEXT_SEGMENTS
-
- choice
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.bfin uClibc/extra/Configs/Config.bfin
- --- uClibc-0.9.33.2/extra/Configs/Config.bfin 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.bfin 2014-02-03 12:32:56.000000000 +0100
- @@ -12,3 +12,4 @@
- default y
- select ARCH_LITTLE_ENDIAN
- select ARCH_HAS_NO_MMU
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.cris uClibc/extra/Configs/Config.cris
- --- uClibc-0.9.33.2/extra/Configs/Config.cris 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.cris 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
- bool
- default y
- select ARCH_LITTLE_ENDIAN
- + select ARCH_HAS_DEPRECATED_SYSCALLS
-
- choice
- prompt "Target Architecture Type"
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.e1 uClibc/extra/Configs/Config.e1
- --- uClibc-0.9.33.2/extra/Configs/Config.e1 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.e1 2014-02-03 12:32:56.000000000 +0100
- @@ -13,3 +13,4 @@
- select ARCH_BIG_ENDIAN
- select ARCH_HAS_NO_MMU
- select ARCH_HAS_NO_SHARED
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.frv uClibc/extra/Configs/Config.frv
- --- uClibc-0.9.33.2/extra/Configs/Config.frv 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.frv 2014-02-03 12:32:56.000000000 +0100
- @@ -13,3 +13,4 @@
- select ARCH_BIG_ENDIAN
- select UCLIBC_HAS_FPU
- select ARCH_HAS_NO_MMU
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.h8300 uClibc/extra/Configs/Config.h8300
- --- uClibc-0.9.33.2/extra/Configs/Config.h8300 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.h8300 2014-02-03 12:32:56.000000000 +0100
- @@ -12,6 +12,7 @@
- default y
- select ARCH_ANY_ENDIAN
- select ARCH_HAS_NO_MMU
- + select ARCH_HAS_DEPRECATED_SYSCALLS
-
- choice
- prompt "Target Processor"
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.hppa uClibc/extra/Configs/Config.hppa
- --- uClibc-0.9.33.2/extra/Configs/Config.hppa 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.hppa 2014-02-03 12:32:56.000000000 +0100
- @@ -15,3 +15,4 @@
- select HAS_NO_THREADS
- select ARCH_HAS_NO_LDSO
- select HAVE_NO_SSP
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.i386 uClibc/extra/Configs/Config.i386
- --- uClibc-0.9.33.2/extra/Configs/Config.i386 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.i386 2014-02-03 12:32:56.000000000 +0100
- @@ -12,44 +12,17 @@
- default y
- select ARCH_LITTLE_ENDIAN
- select ARCH_HAS_MMU
- + select ARCH_HAS_UCONTEXT
- + select ARCH_HAS_DEPRECATED_SYSCALLS
-
- choice
- prompt "Target x86 Processor Family"
- - default CONFIG_486
- + default CONFIG_686
- help
- This is the processor type of your CPU. This information is used for
- - optimizing purposes. To build a library that will run on all x86 CPU
- - types (albeit not optimally fast), you can specify "386" here. If
- - you pick anything other than "386", there is no guarantee that uClibc
- - will even run on anything other than the selected processor type.
- -
- - Here are the settings recommended for greatest speed:
- - - "Generic 386" select this if your compiler is already setup to
- - optimize things properly.
- - - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
- - 486DLC/DLC2, UMC 486SX-S and NexGen Nx586. Only "386" kernels
- - will run on a 386 class machine.
- - - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
- - SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
- - - "586" for Intel Pentium and other generic Pentium CPUs
- - - "Pentium-MMX" for the Intel Pentium MMX.
- - - "Pentium-Pro" for the Intel Pentium Pro/Celeron/Pentium II.
- - - "Pentium-III" for the Intel Pentium III
- - and Celerons based on the Coppermine core.
- - - "Pentium-4" for the Intel Pentium 4.
- - - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
- - - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
- - - "Elan" for the AMD Elan.
- - - "Crusoe" for the Transmeta Crusoe series.
- - - "Winchip-C6" for original IDT Winchip.
- - - "Winchip-2/Winchip-2A/Winchip-3" for IDT Winchip CPUs
- - - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
- - - "VIA C3-2 Nehemiah" model 9 and above.
- -
- - If you don't know what to do, choose "386".
- -
- -config CONFIG_GENERIC_386
- - bool "Generic 386"
- + selecting different handcoded optimization functions. Nowadays, most
- + people have an i686 CPU. If you don't, you most likely know what this
- + means and can pick the right one for your processor.
-
- config CONFIG_386
- bool "386"
- @@ -58,45 +31,9 @@
- bool "486"
-
- config CONFIG_586
- - bool "Pentium/586/K5/5x86/6x86/6x86MX"
- -
- -config CONFIG_586MMX
- - bool "Pentium-MMX"
- + bool "586"
-
- config CONFIG_686
- - bool "Pentium-Pro"
- -
- -config CONFIG_PENTIUMII
- - bool "Celeron/Pentium-II"
- -
- -config CONFIG_PENTIUMIII
- - bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
- -
- -config CONFIG_PENTIUM4
- - bool "Pentium-4/Celeron(P4-based)/Xeon"
- -
- -config CONFIG_K6
- - bool "K6/K6-II/K6-III"
- -
- -config CONFIG_K7
- - bool "Athlon/Duron/K7"
- -
- -config CONFIG_ELAN
- - bool "Elan"
- -
- -config CONFIG_CRUSOE
- - bool "Crusoe"
- -
- -config CONFIG_WINCHIPC6
- - bool "Winchip-C6"
- -
- -config CONFIG_WINCHIP2
- - bool "Winchip-2/Winchip-2A/Winchip-3"
- -
- -config CONFIG_CYRIXIII
- - bool "CyrixIII/VIA-C3"
- -
- -config CONFIG_NEHEMIAH
- - bool "VIA C3-2 (Nehemiah)"
- + bool "686"
-
- endchoice
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.i960 uClibc/extra/Configs/Config.i960
- --- uClibc-0.9.33.2/extra/Configs/Config.i960 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.i960 2014-02-03 12:32:56.000000000 +0100
- @@ -13,3 +13,4 @@
- select ARCH_LITTLE_ENDIAN
- select ARCH_HAS_NO_MMU
- select HAS_NO_THREADS
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.ia64 uClibc/extra/Configs/Config.ia64
- --- uClibc-0.9.33.2/extra/Configs/Config.ia64 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.ia64 2014-02-03 12:32:56.000000000 +0100
- @@ -13,3 +13,4 @@
- select ARCH_LITTLE_ENDIAN
- select ARCH_HAS_MMU
- select ARCH_HAS_NO_LDSO
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.in uClibc/extra/Configs/Config.in
- --- uClibc-0.9.33.2/extra/Configs/Config.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.in 2014-02-03 12:32:56.000000000 +0100
- @@ -3,15 +3,20 @@
- # see extra/config/Kconfig-language.txt
- #
-
- -mainmenu "uClibc C Library Configuration"
- +mainmenu "uClibc $VERSION C Library Configuration"
-
- config DESIRED_TARGET_ARCH
- string
- option env="ARCH"
-
- +config VERSION
- + string
- + option env="VERSION"
- +
- choice
- prompt "Target Architecture"
- default TARGET_alpha if DESIRED_TARGET_ARCH = "alpha"
- + default TARGET_arc if DESIRED_TARGET_ARCH = "arc"
- default TARGET_arm if DESIRED_TARGET_ARCH = "arm"
- default TARGET_avr32 if DESIRED_TARGET_ARCH = "avr32"
- default TARGET_bfin if DESIRED_TARGET_ARCH = "bfin"
- @@ -24,6 +29,7 @@
- default TARGET_i960 if DESIRED_TARGET_ARCH = "i960"
- default TARGET_ia64 if DESIRED_TARGET_ARCH = "ia64"
- default TARGET_m68k if DESIRED_TARGET_ARCH = "m68k"
- + default TARGET_metag if DESIRED_TARGET_ARCH = "metag"
- default TARGET_microblaze if DESIRED_TARGET_ARCH = "microblaze"
- default TARGET_mips if DESIRED_TARGET_ARCH = "mips"
- default TARGET_nios if DESIRED_TARGET_ARCH = "nios"
- @@ -42,6 +48,9 @@
- config TARGET_alpha
- bool "alpha"
-
- +config TARGET_arc
- + bool "arc"
- +
- config TARGET_arm
- bool "arm"
-
- @@ -81,6 +90,9 @@
- config TARGET_m68k
- bool "m68k"
-
- +config TARGET_metag
- + bool "metag"
- +
- config TARGET_microblaze
- bool "microblaze"
-
- @@ -174,6 +186,10 @@
- source "extra/Configs/Config.m68k"
- endif
-
- +if TARGET_metag
- +source "extra/Configs/Config.metag"
- +endif
- +
- if TARGET_nios
- source "extra/Configs/Config.nios"
- endif
- @@ -226,15 +242,19 @@
- source "extra/Configs/Config.c6x"
- endif
-
- +if TARGET_arc
- +source "extra/Configs/Config.arc"
- +endif
- +
- config TARGET_SUBARCH
- string
- default "e500" if CONFIG_E500
- default "classic" if CONFIG_CLASSIC
- default "sh4" if CONFIG_SH4
- - default "" if CONFIG_GENERIC_386 || CONFIG_386
- + default "" if CONFIG_386
- default "i486" if CONFIG_486
- - default "i586" if CONFIG_586 || CONFIG_586MMX
- - default "i686" if TARGET_ARCH = "i386"
- + default "i586" if CONFIG_586
- + default "i686" if CONFIG_686
- default ""
-
- source "extra/Configs/Config.in.arch"
- @@ -261,6 +281,9 @@
- bool
- select ARCH_HAS_NO_SHARED
-
- +config ARCH_HAS_UCONTEXT
- + bool
- +
- config HAVE_SHARED
- bool "Enable shared libraries"
- depends on !ARCH_HAS_NO_SHARED
- @@ -395,6 +418,13 @@
- Usage of RUNPATH tags is not too common, so disabling this feature
- should be safe for most people.
-
- +config LDSO_SAFE_RUNPATH
- + bool "Allow only RUNPATH beginning with /"
- + depends on LDSO_RUNPATH
- + default y
- + help
- + Allow only absolute path in RPATH/RUNPATH.
- +
- config LDSO_SEARCH_INTERP_PATH
- bool "Add ldso path to lib search path"
- depends on HAVE_SHARED
- @@ -423,7 +453,6 @@
- config LDSO_NO_CLEANUP
- bool "Disable automatic unloading of dynamically loaded shared objects"
- depends on HAVE_SHARED
- - default n
- help
- If you need complete allocation traces when debugging memory leaks
- using Valgrind in a process that dynamically loads shared objects,
- @@ -491,6 +520,7 @@
-
- config LINUXTHREADS_NEW
- bool "slightly newer version of linuxthreads"
- + depends on ARCH_HAS_DEPRECATED_SYSCALLS
- help
- The new version has not been tested much, and lacks ports for arches
- which glibc does not support (like bfin/frv/etc...), but is based on
- @@ -501,6 +531,7 @@
- bool "Native POSIX Threading (NPTL)"
- select UCLIBC_HAS_TLS
- select UCLIBC_HAS_STDIO_FUTEXES
- + select UCLIBC_HAS_REALTIME
- # i386 has no lowlevellock support (yet) as opposed to i486 onward
- depends on !CONFIG_386
- help
- @@ -629,6 +660,15 @@
- does not detect glibc style returning-a-valid-pointer-for-malloc(0)
- behavior). Most people can safely answer N.
-
- +config UCLIBC_HAS_OBSTACK
- + bool "Obstack Support (gnu extension)"
- + help
- + When this option is enabled, uClibc will provide support for obstacks.
- + An obstack is a structure in which memory can be dynamically allocated
- + as a 'stack of objects'. Many programs need this GNU extention and
- + you should say Y if you are using any. Otherwise, say N to save some
- + space.
- +
- config UCLIBC_DYNAMIC_ATEXIT
- bool "Dynamic atexit() Support"
- default y
- @@ -650,6 +690,16 @@
- Enable this option if you want to update from 0.9.28 to git/0.9.29,
- else you will be missing atexit() until you rebuild all apps.
-
- +config UCLIBC_SUSV2_LEGACY
- + bool "Enable SuSv2 LEGACY functions"
- + help
- + Enable this option if you want to have SuSv2 LEGACY functions
- + Currently applies to:
- +
- + valloc
- +
- + WARNING! ABI incompatibility.
- +
- config UCLIBC_SUSV3_LEGACY
- bool "Enable SuSv3 LEGACY functions"
- #vfork,
- @@ -670,6 +720,19 @@
-
- WARNING! ABI incompatibility.
-
- +config UCLIBC_HAS_CONTEXT_FUNCS
- + bool "Use obsolescent context control functions"
- + depends on UCLIBC_SUSV3_LEGACY && ARCH_HAS_UCONTEXT
- + help
- + Add into library the SuSv3 obsolescent functions used for context
- + control. The setcontext family allows the implementation in C of
- + advanced control flow patterns such as iterators, fibers, and
- + coroutines. They may be viewed as an advanced version of
- + setjmp/longjmp; whereas the latter allows only a single non-local jump
- + up the stack, setcontext allows the creation of multiple cooperative
- + threads of control, each with its own stack.
- + These functions are: setcontext, getcontext, makecontext, swapcontext.
- +
- config UCLIBC_SUSV3_LEGACY_MACROS
- bool "Enable SuSv3 LEGACY macros"
- help
- @@ -737,7 +800,6 @@
- config UCLIBC_HAS___PROGNAME
- bool "Support for __progname"
- default y
- - depends on UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- help
- Some packages (like openssh) like to peek into internal libc
- symbols to make their output a bit more user friendly.
- @@ -1320,6 +1382,12 @@
- In particular, the following functions will be added to the
- library:
-
- + ns_skiprr, ns_initparse, ns_parserr, ns_msg_getflag,
- + res_mkquery, res_init, res_ninit, res_close, res_nclose
- + res_query, res_search, res_querydomain,
- + dn_expand, dn_comp,
- + ns_name_uncompress, ns_name_ntop, ns_name_pton, ns_name_unpack,
- + ns_name_pack, ns_name_compress, ns_name_skip, dn_skipname,
- ns_get16, ns_get32, ns_put16, ns_put32
-
- config UCLIBC_HAS_LIBRESOLV_STUB
- @@ -1462,7 +1530,7 @@
-
- config UCLIBC_PREGENERATED_LOCALE_DATA
- bool "Use Pre-generated Locale Data"
- - depends on UCLIBC_HAS_LOCALE
- + depends on UCLIBC_HAS_LOCALE && !TARGET_metag
- help
- Use pre-built locale data.
-
- @@ -1590,19 +1658,6 @@
-
- Most people will answer 9.
-
- -
- -config UCLIBC_HAS_SCANF_GLIBC_A_FLAG
- - bool "Support glibc's 'a' flag for scanf string conversions (not implemented)"
- - help
- - NOTE!!! Currently Not Implemented!!! Just A Place Holder!! NOTE!!!
- - NOTE!!! Conflicts with an ANSI/ISO C99 scanf flag!! NOTE!!!
- -
- - Answer Y to enable support for glibc's 'a' flag for the scanf string
- - conversions '%s', '%[', '%ls', '%l[', and '%S'. This is used to
- - auto-allocate sufficient memory to hold the data retrieved.
- -
- - Most people will answer N.
- -
- choice
- prompt "Stdio buffer size"
- default UCLIBC_HAS_STDIO_BUFSIZ_4096
- @@ -2093,6 +2148,16 @@
-
- Most people will answer N.
-
- +config ARC4RANDOM_USES_NODEV
- + bool "Do not use /dev/urandom with arc4random()"
- + depends on UCLIBC_HAS_ARC4RANDOM
- + help
- + Answer Y to use gettimeofday(2) and getpid(2) exclusively for
- + arc4random(). This is not a bad idea for a diskless system, but
- + it uses a lot of syscalls to stir each array element.
- +
- + Most people will answer N.
- +
- config HAVE_NO_SSP
- bool
-
- @@ -2145,8 +2210,8 @@
- choice
- prompt "Propolice protection blocking signal"
- depends on UCLIBC_HAS_SSP
- - default PROPOLICE_BLOCK_ABRT if ! DODEBUG
- - default PROPOLICE_BLOCK_SEGV if DODEBUG
- + depends on DODEBUG
- + default PROPOLICE_BLOCK_SEGV
- help
- "abort" use SIGABRT to block offending programs.
- This is the default implementation.
- @@ -2340,6 +2405,7 @@
- config UCLIBC_MALLOC_DEBUGGING
- bool "Build malloc with debugging support"
- depends on MALLOC || MALLOC_STANDARD
- + select DOASSERTS
- help
- Answer Y here to compile extra debugging support code into malloc.
- Malloc debugging output may then be enabled at runtime using the
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.in.arch uClibc/extra/Configs/Config.in.arch
- --- uClibc-0.9.33.2/extra/Configs/Config.in.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.in.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -10,9 +10,6 @@
- if !ARCH_USE_MMU
- choice
- prompt "Target File Format"
- -config UCLIBC_FORMAT_ELF
- - bool "ELF"
- - depends on ARCH_USE_MMU
- config UCLIBC_FORMAT_FDPIC_ELF
- bool "FDPIC ELF"
- depends on !ARCH_USE_MMU && (TARGET_bfin || TARGET_frv)
- @@ -42,6 +39,14 @@
- comment "Using ELF file format"
- endif
-
- +config ARCH_HAS_DEPRECATED_SYSCALLS
- + bool
- + help
- + New architectures do not support deprecated system calls. However,
- + these system calls are needed to build linuxthreads (old and new) so
- + this symbol controls whether there is support for these threading libraries
- + or not.
- +
- config UCLIBC_SHARED_FLAT_ID
- int "Shared library ID"
- default 1
- @@ -152,7 +157,6 @@
- config DO_C99_MATH
- bool "Enable full C99 math library support"
- depends on UCLIBC_HAS_FLOATS
- - default n
- help
- If you want the uClibc math library to contain the full set C99
- math library features, then answer Y. If you leave this set to
- @@ -166,7 +170,6 @@
- config DO_XSI_MATH
- bool "Enable XSI math extensions to the ISO C standard (bessel)"
- depends on UCLIBC_HAS_FLOATS
- - default n
- help
- X/Open System Interfaces extensions to ISO C math functions
- (differential equation functions):
- @@ -177,7 +180,6 @@
- config UCLIBC_HAS_FENV
- bool "Enable C99 Floating-point environment"
- depends on UCLIBC_HAS_FLOATS
- - default n
- help
- If you want the uClibc math library to contain the C99 floating
- point environment, rounding and exception handling functions then
- @@ -198,7 +200,7 @@
-
- config KERNEL_HEADERS
- string "Linux kernel header location"
- - default "/usr/include"
- + default ""
- help
- The kernel source you use to compile with should be the same
- as the Linux kernel you run your apps on. uClibc doesn't even
- @@ -209,6 +211,8 @@
- but then run on Linux 2.0.x, lchown will be compiled into uClibc,
- but won't work at all. You have been warned.
-
- + If you don't set this, we'll assume the toolchain can find them.
- +
- config UCLIBC_UCLINUX_BROKEN_MUNMAP
- bool
- depends on !ARCH_USE_MMU
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.m68k uClibc/extra/Configs/Config.m68k
- --- uClibc-0.9.33.2/extra/Configs/Config.m68k 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.m68k 2014-02-03 12:32:56.000000000 +0100
- @@ -11,3 +11,4 @@
- bool
- default y
- select ARCH_BIG_ENDIAN
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.metag uClibc/extra/Configs/Config.metag
- --- uClibc-0.9.33.2/extra/Configs/Config.metag 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/Configs/Config.metag 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,32 @@
- +#
- +# For a description of the syntax of this configuration file,
- +# see extra/config/Kconfig-language.txt
- +#
- +# Copyright (C) 2013, Imagination Technologies Ltd.
- +#
- +# Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +config TARGET_ARCH
- + default "metag"
- +
- +config FORCE_OPTIONS_FOR_ARCH
- + bool
- + default y
- + select ARCH_LITTLE_ENDIAN
- + select ARCH_HAS_MMU
- +
- +choice
- + prompt "Target Processor Type"
- + default CONFIG_META_2_1
- + help
- + This is the processor type of your CPU. This information is used for
- + optimizing purposes.
- +
- +config CONFIG_META_1_2
- + bool "Meta 1.2"
- +
- +config CONFIG_META_2_1
- + bool "Meta 2.1"
- +
- +endchoice
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.microblaze uClibc/extra/Configs/Config.microblaze
- --- uClibc-0.9.33.2/extra/Configs/Config.microblaze 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.microblaze 2014-02-03 12:32:56.000000000 +0100
- @@ -6,3 +6,8 @@
- config TARGET_ARCH
- string
- default "microblaze"
- +
- +config FORCE_OPTIONS_FOR_ARCH
- + bool
- + default y
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.mips uClibc/extra/Configs/Config.mips
- --- uClibc-0.9.33.2/extra/Configs/Config.mips 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.mips 2014-02-15 14:18:15.000000000 +0100
- @@ -11,6 +11,8 @@
- bool
- default y
- select ARCH_ANY_ENDIAN
- + select ARCH_HAS_UCONTEXT
- + select ARCH_HAS_DEPRECATED_SYSCALLS
-
- choice
- prompt "Target ABI"
- @@ -70,4 +72,7 @@
- config CONFIG_MIPS_ISA_MIPS64
- bool "MIPS64"
-
- +config CONFIG_MIPS_ISA_MIPS64R2
- + bool "MIPS64r2"
- +
- endchoice
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.nios uClibc/extra/Configs/Config.nios
- --- uClibc-0.9.33.2/extra/Configs/Config.nios 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.nios 2014-02-03 12:32:56.000000000 +0100
- @@ -13,4 +13,5 @@
- select ARCH_LITTLE_ENDIAN
- select ARCH_HAS_NO_MMU
- select ARCH_HAS_NO_LDSO
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- select HAVE_NO_PIC
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.nios2 uClibc/extra/Configs/Config.nios2
- --- uClibc-0.9.33.2/extra/Configs/Config.nios2 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.nios2 2014-02-03 12:32:56.000000000 +0100
- @@ -13,4 +13,5 @@
- select ARCH_LITTLE_ENDIAN
- select ARCH_HAS_NO_MMU
- select ARCH_HAS_NO_LDSO
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- select HAVE_NO_PIC
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.powerpc uClibc/extra/Configs/Config.powerpc
- --- uClibc-0.9.33.2/extra/Configs/Config.powerpc 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.powerpc 2014-02-03 12:32:56.000000000 +0100
- @@ -12,6 +12,7 @@
- default y
- select ARCH_BIG_ENDIAN
- select ARCH_HAS_MMU
- + select ARCH_HAS_DEPRECATED_SYSCALLS
-
- choice
- prompt "Target Processor Type"
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.sh uClibc/extra/Configs/Config.sh
- --- uClibc-0.9.33.2/extra/Configs/Config.sh 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.sh 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
- bool
- default y
- select ARCH_ANY_ENDIAN
- + select ARCH_HAS_DEPRECATED_SYSCALLS
-
- choice
- prompt "Target Processor Type"
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.sh64 uClibc/extra/Configs/Config.sh64
- --- uClibc-0.9.33.2/extra/Configs/Config.sh64 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.sh64 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
- bool
- default y
- select ARCH_ANY_ENDIAN
- + select ARCH_HAS_DEPRECATED_SYSCALLS
-
- choice
- prompt "Target Processor Type"
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.sparc uClibc/extra/Configs/Config.sparc
- --- uClibc-0.9.33.2/extra/Configs/Config.sparc 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.sparc 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
- bool
- default y
- select ARCH_BIG_ENDIAN
- + select ARCH_HAS_DEPRECATED_SYSCALLS
-
- choice
- prompt "Target Processor Type"
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.v850 uClibc/extra/Configs/Config.v850
- --- uClibc-0.9.33.2/extra/Configs/Config.v850 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.v850 2014-02-03 12:32:56.000000000 +0100
- @@ -12,4 +12,5 @@
- default y
- select ARCH_LITTLE_ENDIAN
- select ARCH_HAS_NO_MMU
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- select HAVE_NO_PIC
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.vax uClibc/extra/Configs/Config.vax
- --- uClibc-0.9.33.2/extra/Configs/Config.vax 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.vax 2014-02-03 12:32:56.000000000 +0100
- @@ -12,3 +12,4 @@
- default y
- select ARCH_LITTLE_ENDIAN
- select ARCH_HAS_NO_LDSO
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.x86_64 uClibc/extra/Configs/Config.x86_64
- --- uClibc-0.9.33.2/extra/Configs/Config.x86_64 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.x86_64 2014-02-03 12:32:56.000000000 +0100
- @@ -12,3 +12,5 @@
- default y
- select ARCH_LITTLE_ENDIAN
- select ARCH_HAS_MMU
- + select ARCH_HAS_UCONTEXT
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/Config.xtensa uClibc/extra/Configs/Config.xtensa
- --- uClibc-0.9.33.2/extra/Configs/Config.xtensa 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/Configs/Config.xtensa 2014-02-03 12:32:56.000000000 +0100
- @@ -6,3 +6,8 @@
- config TARGET_ARCH
- string
- default "xtensa"
- +
- +config FORCE_OPTIONS_FOR_ARCH
- + bool
- + default y
- + select ARCH_HAS_DEPRECATED_SYSCALLS
- diff -Nur uClibc-0.9.33.2/extra/Configs/defconfigs/arc/defconfig uClibc/extra/Configs/defconfigs/arc/defconfig
- --- uClibc-0.9.33.2/extra/Configs/defconfigs/arc/defconfig 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/Configs/defconfigs/arc/defconfig 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,28 @@
- +ARCH_WANTS_LITTLE_ENDIAN=y
- +# UCLIBC_HAS_FPU is not set
- +DO_C99_MATH=y
- +KERNEL_HEADERS="%KERNEL_HEADERS%"
- +# DOPIC is not set
- +# LDSO_CACHE_SUPPORT is not set
- +LDSO_RUNPATH=y
- +# LDSO_SAFE_RUNPATH is not set
- +LINUXTHREADS_OLD=y
- +PTHREADS_DEBUG_SUPPORT=y
- +UCLIBC_SUSV2_LEGACY=y
- +UCLIBC_SUSV3_LEGACY=y
- +UCLIBC_SUSV4_LEGACY=y
- +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
- +UCLIBC_SV4_DEPRECATED=y
- +UCLIBC_HAS_RPC=y
- +UCLIBC_HAS_FULL_RPC=y
- +UCLIBC_HAS_RESOLVER_SUPPORT=y
- +UCLIBC_HAS_LIBRESOLV_STUB=y
- +UCLIBC_HAS_LOCALE=y
- +UCLIBC_HAS_NFTW=y
- +UCLIBC_HAS_FTW=y
- +RUNTIME_PREFIX="%RUNTIME_PREFIX%"
- +DEVEL_PREFIX="%DEVEL_PREFIX%"
- +CROSS_COMPILER_PREFIX="arc-linux-uclibc-"
- +# DOSTRIP is not set
- +SUPPORT_LD_DEBUG=y
- +UCLIBC_HAS_BACKTRACE=y
- diff -Nur uClibc-0.9.33.2/extra/Configs/defconfigs/arc/tb10x_defconfig uClibc/extra/Configs/defconfigs/arc/tb10x_defconfig
- --- uClibc-0.9.33.2/extra/Configs/defconfigs/arc/tb10x_defconfig 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/Configs/defconfigs/arc/tb10x_defconfig 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,37 @@
- +ARCH_WANTS_LITTLE_ENDIAN=y
- +# UCLIBC_HAS_FPU is not set
- +DO_C99_MATH=y
- +KERNEL_HEADERS="%KERNEL_HEADERS%"
- +# DOPIC is not set
- +# LDSO_CACHE_SUPPORT is not set
- +LDSO_RUNPATH=y
- +# LDSO_SAFE_RUNPATH is not set
- +LINUXTHREADS_OLD=y
- +PTHREADS_DEBUG_SUPPORT=y
- +MALLOC_GLIBC_COMPAT=y
- +UCLIBC_SUSV3_LEGACY=y
- +UCLIBC_SUSV4_LEGACY=y
- +UCLIBC_HAS_GETPT=y
- +UCLIBC_HAS_LIBUTIL=y
- +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
- +UCLIBC_SV4_DEPRECATED=y
- +UCLIBC_HAS_IPV6=y
- +UCLIBC_HAS_RPC=y
- +UCLIBC_HAS_FULL_RPC=y
- +UCLIBC_HAS_REENTRANT_RPC=y
- +UCLIBC_HAS_RESOLVER_SUPPORT=y
- +UCLIBC_HAS_LIBRESOLV_STUB=y
- +UCLIBC_HAS_LIBNSL_STUB=y
- +UCLIBC_HAS_CTYPE_CHECKED=y
- +UCLIBC_HAS_LOCALE=y
- +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
- +UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE=y
- +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
- +UCLIBC_HAS_PRINTF_M_SPEC=y
- +UCLIBC_HAS_NFTW=y
- +UCLIBC_HAS_FTW=y
- +RUNTIME_PREFIX="%RUNTIME_PREFIX%"
- +DEVEL_PREFIX="%DEVEL_PREFIX%"
- +CROSS_COMPILER_PREFIX="arc-linux-uclibc-"
- +# DOSTRIP is not set
- +SUPPORT_LD_DEBUG=y
- diff -Nur uClibc-0.9.33.2/extra/Configs/defconfigs/metag/defconfig uClibc/extra/Configs/defconfigs/metag/defconfig
- --- uClibc-0.9.33.2/extra/Configs/defconfigs/metag/defconfig 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/Configs/defconfigs/metag/defconfig 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1 @@
- +TARGET_metag=y
- diff -Nur uClibc-0.9.33.2/extra/locale/gen_wc8bit.c uClibc/extra/locale/gen_wc8bit.c
- --- uClibc-0.9.33.2/extra/locale/gen_wc8bit.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/locale/gen_wc8bit.c 2014-02-03 12:32:56.000000000 +0100
- @@ -182,7 +182,11 @@
- printf("\tunsigned char idx8c2wc[%d];\n", C2WC_IDX_LEN);
- printf("\tunsigned char idx8wc2c[%d];\n", II_LEN);
- #endif
- +#ifndef __metag__
- printf("} __codeset_8_bit_t;\n\n");
- +#else
- + printf("} __attribute__((__packed__)) __codeset_8_bit_t;\n\n");
- +#endif /* __metag__ */
-
- printf("#ifdef WANT_DATA\n\n");
- printf("static const __codeset_8_bit_t codeset_8_bit[%d] = {\n", argc-1);
- diff -Nur uClibc-0.9.33.2/extra/locale/Makefile.in uClibc/extra/locale/Makefile.in
- --- uClibc-0.9.33.2/extra/locale/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/locale/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -111,16 +111,10 @@
- $(Q)echo "$(CURDIR)/$(locale_DIR)/charmaps/ISO-8859-1.pairs" >> $@
- else
- $(Q)set -e; \
- - tmp=`mktemp $@.XXXXXX 2>/dev/null || true`; \
- - [ -z "$$tmp" ] && tmp='$@.new'; \
- find $(CURDIR)/$(locale_DIR)/charmaps/ -name '*.pairs' | \
- - sort > $$tmp; \
- - [ -s $$tmp ]; \
- - if cmp $@ $$tmp >/dev/null 2>&1; then \
- - $(RM) $$tmp; \
- - else \
- - mv -f $$tmp $@; \
- - fi
- + sort > $@.new; \
- + [ -s $@.new ]; \
- + cmp -s $@ $@.new && $(RM) $@.new || mv -f $@.new $@
- endif
-
- # the lines beginning w/ '#-' are mandatory
- diff -Nur uClibc-0.9.33.2/extra/locale/programs/locale.c uClibc/extra/locale/programs/locale.c
- --- uClibc-0.9.33.2/extra/locale/programs/locale.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/locale/programs/locale.c 2014-02-03 12:32:56.000000000 +0100
- @@ -31,7 +31,7 @@
- unsigned char lc_messages_row;
- } locale_entry;
-
- -/* Need to include this before locale.h and xlocale.h! */
- +/* Need to include this before locale.h! */
- #include <bits/uClibc_locale.h>
-
- #undef CODESET_LIST
- diff -Nur uClibc-0.9.33.2/extra/scripts/gen_bits_syscall_h.sh uClibc/extra/scripts/gen_bits_syscall_h.sh
- --- uClibc-0.9.33.2/extra/scripts/gen_bits_syscall_h.sh 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/scripts/gen_bits_syscall_h.sh 2014-02-03 12:32:56.000000000 +0100
- @@ -8,14 +8,18 @@
-
- # June 27, 2001 Manuel Novoa III
- #
- -# This script expects top_builddir and CC (as used in the Makefiles) to be set
- -# in the environment, and outputs the appropriate
- -# $top_builddir/include/bits/sysnum.h # corresponding to
- -# $top_builddir/include/asm/unistd.h to stdout.
- +# This script expects CC (as used in the Makefiles) to be set
- +# in the environment, and outputs the appropriate bits/sysnum.h #
- +# corresponding to asm/unistd.h to stdout.
- #
- # Warning!!! This does _no_ error checking!!!
-
- -INCLUDE_OPTS="-nostdinc -I${KERNEL_HEADERS}"
- +if [ "${KERNEL_HEADERS:-/}" != "/" ] ; then
- + INCLUDE_OPTS="-nostdinc -I${KERNEL_HEADERS}"
- +else
- + # Let the toolchain use its configure paths.
- + INCLUDE_OPTS=
- +fi
-
- case $CC in
- *icc*) CC_SYSNUM_ARGS="-dM" ;;
- @@ -25,22 +29,31 @@
- ( echo "#include <asm/unistd.h>";
- echo "#include <asm/unistd.h>" |
- $CC -E $CC_SYSNUM_ARGS $INCLUDE_OPTS - |
- - sed -ne 's/^[ ]*#define[ ]*\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/UCLIBC\1\2 \1\2/gp' \
- - -e 's/^[ ]*#undef[ ]*\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/UNDEFUCLIBC\1\2 \1\2/gp' # needed to strip out any kernel-internal defines
- + sed -n -r \
- + -e 's/^[ ]*#define[ ]*(__ARM_NR_|__NR_)([A-Za-z0-9_]*).*/UCLIBC\1\2 \1\2/gp' \
- + -e 's/^[ ]*#undef[ ]*(__ARM_NR_|__NR_)([A-Za-z0-9_]*).*/UNDEFUCLIBC\1\2 \1\2/gp' # needed to strip out any kernel-internal defines
- ) |
- $CC -E $INCLUDE_OPTS - |
- -( echo "/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */" ;
- - echo ;
- - echo "#ifndef _BITS_SYSNUM_H" ;
- - echo "#define _BITS_SYSNUM_H" ;
- - echo ;
- - echo "#ifndef _SYSCALL_H" ;
- - echo "# error \"Never use <bits/sysnum.h> directly; include <sys/syscall.h> instead.\"" ;
- - echo "#endif" ; echo ;
- - sed -ne 's/^UCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\) *\(.*\)/#undef \1\2\
- +(
- + cat <<-EOF
- +/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */
- +/* See $0 for more information. */
- +
- +#ifndef _BITS_SYSNUM_H
- +#define _BITS_SYSNUM_H
- +
- +#ifndef _SYSCALL_H
- +# error "Never use <bits/sysnum.h> directly; include <sys/syscall.h> instead."
- +#endif
- +
- +EOF
- + sed -n -r -e 's/^UCLIBC(__ARM_NR_|__NR_)([A-Za-z0-9_]*) *(.*)/#undef \1\2\
- #define \1\2 \3\
- #define SYS_\2 \1\2/gp' \
- - -e 's/^UNDEFUCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/#undef \1\2/gp'
- - echo ;
- - echo "#endif" ;
- + -e 's/^UNDEFUCLIBC(__ARM_NR_|__NR_)([A-Za-z0-9_]*).*/#undef \1\2\
- +#undef SYS_\2/gp'
- + cat <<-EOF
- +
- +#endif
- +EOF
- )
- diff -Nur uClibc-0.9.33.2/extra/scripts/getent uClibc/extra/scripts/getent
- --- uClibc-0.9.33.2/extra/scripts/getent 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/scripts/getent 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,4 @@
- #!/bin/sh
- -# $Header: /var/cvs/uClibc/extra/scripts/getent,v 1.2 2005/02/02 14:18:01 solar Exp $
- #
- # Closely (not perfectly) emulate the behavior of glibc's getent utility
- #
- @@ -9,7 +8,8 @@
- # case-insensitive matches not supported (ethers; others?)
- # may return false-positives (hosts,protocols,rpc,services,ethers)
-
- -export PATH="${PATH}:/bin:/usr/bin"
- +[ -z "$PATH" ] && PATH="/bin:/usr/bin" || PATH="${PATH}:/bin:/usr/bin"
- +export PATH
-
- file="/etc/$1"
- case $1 in
- diff -Nur uClibc-0.9.33.2/extra/scripts/install_headers.sh uClibc/extra/scripts/install_headers.sh
- --- uClibc-0.9.33.2/extra/scripts/install_headers.sh 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/scripts/install_headers.sh 2014-02-03 12:32:56.000000000 +0100
- @@ -32,10 +32,9 @@
- exit 1
- fi
-
- -
- # Sanitize and copy uclibc headers
- (
- -# We must cd, or else we'll prepend "${srcdir}" to filenames!
- +# We must cd, or else we will prepend "${srcdir}" to filenames!
- cd "${srcdir}" || exit 1
- find . ! -name '.' -a ! -path '*/.*' | sed -e 's/^\.\///' -e '/^config\//d' \
- -e '/^config$/d'
- @@ -51,18 +50,20 @@
- # Do not install libc-XXXX.h files
- continue
- fi
- - # NB: unifdef exits with 1 if output is not
- - # exactly the same as input. That's ok.
- # Do not abort the script if unifdef "fails"!
- # NB2: careful with sed command arguments, they contain tab character
- "$top_builddir/extra/scripts/unifdef" \
- + -B \
- + -t \
- + -x 2 \
- + -f "$top_builddir/include/generated/unifdef_config.h" \
- -U_LIBC \
- -U__UCLIBC_GEN_LOCALE \
- -U__NO_CTYPE \
- "${srcdir}/$filename" \
- | sed -e '/^rtld_hidden_proto[ ]*([a-zA-Z0-9_]*)$/d' \
- | sed -e '/^lib\(c\|m\|resolv\|dl\|intl\|rt\|nsl\|util\|crypt\|pthread\)_hidden_proto[ ]*([a-zA-Z0-9_]*)$/d' \
- - >"${dstdir}/$filename"
- + > "${dstdir}/$filename"
- done
- )
-
- diff -Nur uClibc-0.9.33.2/extra/scripts/relinfo.pl uClibc/extra/scripts/relinfo.pl
- --- uClibc-0.9.33.2/extra/scripts/relinfo.pl 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/scripts/relinfo.pl 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,5 @@
- #! /usr/bin/perl
- -eval "exec /usr/bin/perl -S $0 $*"
- +eval "exec /usr/bin/env perl -w -S $0 $@"
- if 0;
- # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
- # Written by Ulrich Drepper <drepper@redhat.com>, 2000.
- @@ -14,8 +14,7 @@
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- -# along with this program; if not, write to the Free Software Foundation,
- -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- +# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
- for ($cnt = 0; $cnt <= $#ARGV; ++$cnt) {
- $relent = 0;
- diff -Nur uClibc-0.9.33.2/extra/scripts/unifdef.c uClibc/extra/scripts/unifdef.c
- --- uClibc-0.9.33.2/extra/scripts/unifdef.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/extra/scripts/unifdef.c 2014-02-03 12:32:56.000000000 +0100
- @@ -1,13 +1,5 @@
- /*
- - * Copyright (c) 2002 - 2005 Tony Finch <dot@dotat.at>. All rights reserved.
- - *
- - * This code is derived from software contributed to Berkeley by Dave Yost.
- - * It was rewritten to support ANSI C by Tony Finch. The original version of
- - * unifdef carried the following copyright notice. None of its code remains
- - * in this version (though some of the names remain).
- - *
- - * Copyright (c) 1985, 1993
- - * The Regents of the University of California. All rights reserved.
- + * Copyright (c) 2002 - 2014 Tony Finch <dot@dotat.at>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- @@ -31,27 +23,15 @@
- * SUCH DAMAGE.
- */
-
- -#include <sys/cdefs.h>
- -
- -#ifndef lint
- -#if 0
- -static const char copyright[] =
- -"@(#) Copyright (c) 1985, 1993\n\
- - The Regents of the University of California. All rights reserved.\n";
- -#endif
- -#ifdef __IDSTRING
- -__IDSTRING(Berkeley, "@(#)unifdef.c 8.1 (Berkeley) 6/6/93");
- -__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.8 2000/07/03 02:51:36 matt Exp $");
- -__IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.171 2005/03/08 12:38:48 fanf2 Exp $");
- -#endif
- -#endif /* not lint */
- -#ifdef __FBSDID
- -__FBSDID("$FreeBSD: /repoman/r/ncvs/src/usr.bin/unifdef/unifdef.c,v 1.20 2005/05/21 09:55:09 ru Exp $");
- -#endif
- -
- /*
- * unifdef - remove ifdef'ed lines
- *
- + * This code was derived from software contributed to Berkeley by Dave Yost.
- + * It was rewritten to support ANSI C by Tony Finch. The original version
- + * of unifdef carried the 4-clause BSD copyright licence. None of its code
- + * remains in this version (though some of the names remain) so it now
- + * carries a more liberal licence.
- + *
- * Wishlist:
- * provide an option which will append the name of the
- * appropriate symbol after #else's and #endif's
- @@ -59,26 +39,17 @@
- * #else's and #endif's to see that they match their
- * corresponding #ifdef or #ifndef
- *
- - * The first two items above require better buffer handling, which would
- - * also make it possible to handle all "dodgy" directives correctly.
- + * These require better buffer handling, which would also make
- + * it possible to handle all "dodgy" directives correctly.
- */
-
- -#include <errno.h>
- -#include <ctype.h>
- -#include <stdarg.h>
- -#include <stdbool.h>
- -#include <stdio.h>
- -#include <stdlib.h>
- -#include <string.h>
- -#include <unistd.h>
- -
- -/* Avoid err.h since uClibc can disable these things */
- -#define vwarnx(fmt, args) ({ fprintf(stderr, "unifdef: "); vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); })
- -#define warnx(fmt, args...) fprintf(stderr, "unifdef: " fmt "\n", ## args)
- -#define errx(exit_code, fmt, args...) ({ warnx(fmt, ## args); exit(exit_code); })
- -#define err(exit_code, fmt, args...) errx(exit_code, fmt ": %s", ## args, strerror(errno))
- +#include "unifdef.h"
-
- -size_t strlcpy(char *dst, const char *src, size_t siz);
- +static const char copyright[] =
- + #include "version.h"
- + "@(#) $Author: Tony Finch (dot@dotat.at) $\n"
- + "@(#) $URL: http://dotat.at/prog/unifdef $\n"
- +;
-
- /* types of input lines: */
- typedef enum {
- @@ -96,6 +67,7 @@
- LT_DODGY_LAST = LT_DODGY + LT_ENDIF,
- LT_PLAIN, /* ordinary line */
- LT_EOF, /* end of file */
- + LT_ERROR, /* unevaluable #if */
- LT_COUNT
- } Linetype;
-
- @@ -106,9 +78,12 @@
- "DODGY IF", "DODGY TRUE", "DODGY FALSE",
- "DODGY ELIF", "DODGY ELTRUE", "DODGY ELFALSE",
- "DODGY ELSE", "DODGY ENDIF",
- - "PLAIN", "EOF"
- + "PLAIN", "EOF", "ERROR"
- };
-
- +#define linetype_if2elif(lt) ((Linetype)(lt - LT_IF + LT_ELIF))
- +#define linetype_2dodgy(lt) ((Linetype)(lt + LT_DODGY))
- +
- /* state of #if processing */
- typedef enum {
- IS_OUTSIDE,
- @@ -162,7 +137,7 @@
- */
- #define MAXDEPTH 64 /* maximum #if nesting */
- #define MAXLINE 4096 /* maximum length of line */
- -#define MAXSYMS 4096 /* maximum number of symbols */
- +#define MAXSYMS 16384 /* maximum number of symbols */
-
- /*
- * Sometimes when editing a keyword the replacement text is longer, so
- @@ -174,13 +149,17 @@
- * Globals.
- */
-
- +static bool compblank; /* -B: compress blank lines */
- +static bool lnblank; /* -b: blank deleted lines */
- static bool complement; /* -c: do the complement */
- static bool debugging; /* -d: debugging reports */
- +static bool inplace; /* -m: modify in place */
- static bool iocccok; /* -e: fewer IOCCC errors */
- +static bool strictlogic; /* -K: keep ambiguous #ifs */
- static bool killconsts; /* -k: eval constant #ifs */
- -static bool lnblank; /* -l: blank deleted lines */
- static bool lnnum; /* -n: add #line directives */
- static bool symlist; /* -s: output symbol list */
- +static bool symdepth; /* -S: output symbol depth */
- static bool text; /* -t: this is a text file */
-
- static const char *symname[MAXSYMS]; /* symbol name */
- @@ -191,10 +170,28 @@
- static FILE *input; /* input file pointer */
- static const char *filename; /* input file name */
- static int linenum; /* current line number */
- +static const char *linefile; /* file name for #line */
- +static FILE *output; /* output file pointer */
- +static const char *ofilename; /* output file name */
- +static const char *backext; /* backup extension */
- +static char *tempname; /* avoid splatting input */
-
- static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */
- static char *keyword; /* used for editing #elif's */
-
- +/*
- + * When processing a file, the output's newline style will match the
- + * input's, and unifdef correctly handles CRLF or LF endings whatever
- + * the platform's native style. The stdio streams are opened in binary
- + * mode to accommodate platforms whose native newline style is CRLF.
- + * When the output isn't a processed input file (when it is error /
- + * debug / diagnostic messages) then unifdef uses native line endings.
- + */
- +
- +static const char *newline; /* input file format */
- +static const char newline_unix[] = "\n";
- +static const char newline_crlf[] = "\r\n";
- +
- static Comment_state incomment; /* comment parser state */
- static Line_state linestate; /* #if line parser state */
- static Ifstate ifstate[MAXDEPTH]; /* #if processor state */
- @@ -202,31 +199,53 @@
- static int stifline[MAXDEPTH]; /* start of current #if */
- static int depth; /* current #if nesting */
- static int delcount; /* count of deleted lines */
- -static bool keepthis; /* don't delete constant #if */
- +static unsigned blankcount; /* count of blank lines */
- +static unsigned blankmax; /* maximum recent blankcount */
- +static bool constexpr; /* constant #if expression */
- +static bool zerosyms; /* to format symdepth output */
- +static bool firstsym; /* ditto */
-
- +static int exitmode; /* exit status mode */
- static int exitstat; /* program exit status */
- +static bool altered; /* was this file modified? */
-
- -static void addsym(bool, bool, char *);
- +static void addsym1(bool, bool, char *);
- +static void addsym2(bool, const char *, const char *);
- +static char *astrcat(const char *, const char *);
- +static void cleantemp(void);
- +static void closeio(void);
- static void debug(const char *, ...);
- +static void debugsym(const char *, int);
- +static bool defundef(void);
- +static void defundefile(const char *);
- static void done(void);
- static void error(const char *);
- -static int findsym(const char *);
- +static int findsym(const char **);
- static void flushline(bool);
- -static Linetype get_line(void);
- +static void hashline(void);
- +static void help(void);
- static Linetype ifeval(const char **);
- static void ignoreoff(void);
- static void ignoreon(void);
- +static void indirectsym(void);
- static void keywordedit(const char *);
- +static const char *matchsym(const char *, const char *);
- static void nest(void);
- +static Linetype parseline(void);
- static void process(void);
- +static void processinout(const char *, const char *);
- +static const char *skipargs(const char *);
- static const char *skipcomment(const char *);
- +static const char *skiphash(void);
- +static const char *skipline(const char *);
- static const char *skipsym(const char *);
- static void state(Ifstate);
- -static int strlcmp(const char *, const char *, size_t);
- static void unnest(void);
- static void usage(void);
- +static void version(void);
- +static const char *xstrdup(const char *, const char *);
-
- -#define endsym(c) (!isalpha((unsigned char)c) && !isdigit((unsigned char)c) && c != '_')
- +#define endsym(c) (!isalnum((unsigned char)c) && c != '_')
-
- /*
- * The main program.
- @@ -236,7 +255,7 @@
- {
- int opt;
-
- - while ((opt = getopt(argc, argv, "i:D:U:I:cdeklnst")) != -1)
- + while ((opt = getopt(argc, argv, "i:D:U:f:I:M:o:x:bBcdehKklmnsStV")) != -1)
- switch (opt) {
- case 'i': /* treat stuff controlled by these symbols as text */
- /*
- @@ -246,20 +265,26 @@
- */
- opt = *optarg++;
- if (opt == 'D')
- - addsym(true, true, optarg);
- + addsym1(true, true, optarg);
- else if (opt == 'U')
- - addsym(true, false, optarg);
- + addsym1(true, false, optarg);
- else
- usage();
- break;
- case 'D': /* define a symbol */
- - addsym(false, true, optarg);
- + addsym1(false, true, optarg);
- break;
- case 'U': /* undef a symbol */
- - addsym(false, false, optarg);
- + addsym1(false, false, optarg);
- break;
- - case 'I':
- - /* no-op for compatibility with cpp */
- + case 'I': /* no-op for compatibility with cpp */
- + break;
- + case 'b': /* blank deleted lines instead of omitting them */
- + case 'l': /* backwards compatibility */
- + lnblank = true;
- + break;
- + case 'B': /* compress blank lines around removed section */
- + compblank = true;
- break;
- case 'c': /* treat -D as -U and vice versa */
- complement = true;
- @@ -270,50 +295,214 @@
- case 'e': /* fewer errors from dodgy lines */
- iocccok = true;
- break;
- + case 'f': /* definitions file */
- + defundefile(optarg);
- + break;
- + case 'h':
- + help();
- + break;
- + case 'K': /* keep ambiguous #ifs */
- + strictlogic = true;
- + break;
- case 'k': /* process constant #ifs */
- killconsts = true;
- break;
- - case 'l': /* blank deleted lines instead of omitting them */
- - lnblank = true;
- + case 'm': /* modify in place */
- + inplace = true;
- + break;
- + case 'M': /* modify in place and keep backup */
- + inplace = true;
- + backext = optarg;
- break;
- case 'n': /* add #line directive after deleted lines */
- lnnum = true;
- break;
- + case 'o': /* output to a file */
- + ofilename = optarg;
- + break;
- case 's': /* only output list of symbols that control #ifs */
- symlist = true;
- break;
- + case 'S': /* list symbols with their nesting depth */
- + symlist = symdepth = true;
- + break;
- case 't': /* don't parse C comments */
- text = true;
- break;
- + case 'V':
- + version();
- + break;
- + case 'x':
- + exitmode = atoi(optarg);
- + if(exitmode < 0 || exitmode > 2)
- + usage();
- + break;
- default:
- usage();
- }
- argc -= optind;
- argv += optind;
- - if (argc > 1) {
- - errx(2, "can only do one file");
- - } else if (argc == 1 && strcmp(*argv, "-") != 0) {
- - filename = *argv;
- - input = fopen(filename, "r");
- - if (input == NULL)
- - err(2, "can't open %s", filename);
- - } else {
- + if (compblank && lnblank)
- + errx(2, "-B and -b are mutually exclusive");
- + if (symlist && (ofilename != NULL || inplace || argc > 1))
- + errx(2, "-s only works with one input file");
- + if (argc > 1 && ofilename != NULL)
- + errx(2, "-o cannot be used with multiple input files");
- + if (argc > 1 && !inplace)
- + errx(2, "multiple input files require -m or -M");
- + if (argc == 0)
- + argc = 1;
- + if (argc == 1 && !inplace && ofilename == NULL)
- + ofilename = "-";
- + indirectsym();
- +
- + atexit(cleantemp);
- + if (ofilename != NULL)
- + processinout(*argv, ofilename);
- + else while (argc-- > 0) {
- + processinout(*argv, *argv);
- + argv++;
- + }
- + switch(exitmode) {
- + case(0): exit(exitstat);
- + case(1): exit(!exitstat);
- + case(2): exit(0);
- + default: abort(); /* bug */
- + }
- +}
- +
- +/*
- + * File logistics.
- + */
- +static void
- +processinout(const char *ifn, const char *ofn)
- +{
- + struct stat st;
- +
- + if (ifn == NULL || strcmp(ifn, "-") == 0) {
- filename = "[stdin]";
- - input = stdin;
- + linefile = NULL;
- + input = fbinmode(stdin);
- + } else {
- + filename = ifn;
- + linefile = ifn;
- + input = fopen(ifn, "rb");
- + if (input == NULL)
- + err(2, "can't open %s", ifn);
- + }
- + if (strcmp(ofn, "-") == 0) {
- + output = fbinmode(stdout);
- + process();
- + return;
- }
- + if (stat(ofn, &st) < 0) {
- + output = fopen(ofn, "wb");
- + if (output == NULL)
- + err(2, "can't create %s", ofn);
- + process();
- + return;
- + }
- +
- + tempname = astrcat(ofn, ".XXXXXX");
- + output = mktempmode(tempname, st.st_mode);
- + if (output == NULL)
- + err(2, "can't create %s", tempname);
- +
- process();
- - debug("bug at line %d", __LINE__);
- - abort(); /* bug */
- +
- + if (backext != NULL) {
- + char *backname = astrcat(ofn, backext);
- + if (rename(ofn, backname) < 0)
- + err(2, "can't rename \"%s\" to \"%s\"", ofn, backname);
- + free(backname);
- + }
- + /* leave file unmodified if unifdef made no changes */
- + if (!altered && backext == NULL) {
- + if (remove(tempname) < 0)
- + warn("can't remove \"%s\"", tempname);
- + } else if (replace(tempname, ofn) < 0)
- + err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn);
- + free(tempname);
- + tempname = NULL;
- +}
- +
- +/*
- + * For cleaning up if there is an error.
- + */
- +static void
- +cleantemp(void)
- +{
- + if (tempname != NULL)
- + remove(tempname);
- +}
- +
- +/*
- + * Self-identification functions.
- + */
- +
- +static void
- +version(void)
- +{
- + const char *c = copyright;
- + for (;;) {
- + while (*++c != '$')
- + if (*c == '\0')
- + exit(0);
- + while (*++c != '$')
- + putc(*c, stderr);
- + putc('\n', stderr);
- + }
- +}
- +
- +static void
- +synopsis(FILE *fp)
- +{
- + fprintf(fp,
- + "usage: unifdef [-bBcdehKkmnsStV] [-x{012}] [-Mext] [-opath] \\\n"
- + " [-[i]Dsym[=val]] [-[i]Usym] [-fpath] ... [file] ...\n");
- }
-
- static void
- usage(void)
- {
- - fprintf(stderr, "usage: unifdef [-cdeklnst] [-Ipath]"
- - " [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [file]\n");
- + synopsis(stderr);
- exit(2);
- }
-
- +static void
- +help(void)
- +{
- + synopsis(stdout);
- + printf(
- + " -Dsym=val define preprocessor symbol with given value\n"
- + " -Dsym define preprocessor symbol with value 1\n"
- + " -Usym preprocessor symbol is undefined\n"
- + " -iDsym=val \\ ignore C strings and comments\n"
- + " -iDsym ) in sections controlled by these\n"
- + " -iUsym / preprocessor symbols\n"
- + " -fpath file containing #define and #undef directives\n"
- + " -b blank lines instead of deleting them\n"
- + " -B compress blank lines around deleted section\n"
- + " -c complement (invert) keep vs. delete\n"
- + " -d debugging mode\n"
- + " -e ignore multiline preprocessor directives\n"
- + " -h print help\n"
- + " -Ipath extra include file path (ignored)\n"
- + " -K disable && and || short-circuiting\n"
- + " -k process constant #if expressions\n"
- + " -Mext modify in place and keep backups\n"
- + " -m modify input files in place\n"
- + " -n add #line directives to output\n"
- + " -opath output file name\n"
- + " -S list #if control symbols with nesting\n"
- + " -s list #if control symbols\n"
- + " -t ignore C strings and comments\n"
- + " -V print version\n"
- + " -x{012} exit status mode\n"
- + );
- + exit(0);
- +}
- +
- /*
- * A state transition function alters the global #if processing state
- * in a particular way. The table below is indexed by the current
- @@ -327,7 +516,8 @@
- * When we have processed a group that starts off with a known-false
- * #if/#elif sequence (which has therefore been deleted) followed by a
- * #elif that we don't understand and therefore must keep, we edit the
- - * latter into a #if to keep the nesting correct.
- + * latter into a #if to keep the nesting correct. We use memcpy() to
- + * overwrite the 4 byte token "elif" with "if " without a '\0' byte.
- *
- * When we find a true #elif in a group, the following block will
- * always be kept and the rest of the sequence after the next #elif or
- @@ -380,75 +570,66 @@
- static void Idrop (void) { Fdrop(); ignoreon(); }
- static void Itrue (void) { Ftrue(); ignoreon(); }
- static void Ifalse(void) { Ffalse(); ignoreon(); }
- -/* edit this line */
- -static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); }
- -static void Mtrue (void) { keywordedit("else\n"); state(IS_TRUE_MIDDLE); }
- -static void Melif (void) { keywordedit("endif\n"); state(IS_FALSE_TRAILER); }
- -static void Melse (void) { keywordedit("endif\n"); state(IS_FALSE_ELSE); }
- +/* modify this line */
- +static void Mpass (void) { memcpy(keyword, "if ", 4); Pelif(); }
- +static void Mtrue (void) { keywordedit("else"); state(IS_TRUE_MIDDLE); }
- +static void Melif (void) { keywordedit("endif"); state(IS_FALSE_TRAILER); }
- +static void Melse (void) { keywordedit("endif"); state(IS_FALSE_ELSE); }
-
- static state_fn * const trans_table[IS_COUNT][LT_COUNT] = {
- /* IS_OUTSIDE */
- { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Eendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eendif,
- - print, done },
- + print, done, abort },
- /* IS_FALSE_PREFIX */
- { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Strue, Sfalse,Selse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Eioccc,Eioccc,Eioccc,Eioccc,
- - drop, Eeof },
- + drop, Eeof, abort },
- /* IS_TRUE_PREFIX */
- { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Dfalse,Dfalse,Dfalse,Delse, Dendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
- - print, Eeof },
- + print, Eeof, abort },
- /* IS_PASS_MIDDLE */
- { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Pelif, Mtrue, Delif, Pelse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Pelif, Oelif, Oelif, Pelse, Pendif,
- - print, Eeof },
- + print, Eeof, abort },
- /* IS_FALSE_MIDDLE */
- { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Pelif, Mtrue, Delif, Pelse, Pendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
- - drop, Eeof },
- + drop, Eeof, abort },
- /* IS_TRUE_MIDDLE */
- { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Melif, Melif, Melif, Melse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Pendif,
- - print, Eeof },
- + print, Eeof, abort },
- /* IS_PASS_ELSE */
- { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Pendif,
- - print, Eeof },
- + print, Eeof, abort },
- /* IS_FALSE_ELSE */
- { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Eioccc,
- - drop, Eeof },
- + drop, Eeof, abort },
- /* IS_TRUE_ELSE */
- { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Dendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eioccc,
- - print, Eeof },
- + print, Eeof, abort },
- /* IS_FALSE_TRAILER */
- { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Eioccc,
- - drop, Eeof }
- + drop, Eeof, abort }
- /*TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF
- TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF (DODGY)
- - PLAIN EOF */
- + PLAIN EOF ERROR */
- };
-
- /*
- * State machine utility functions
- */
- static void
- -done(void)
- -{
- - if (incomment)
- - error("EOF in comment");
- - exit(exitstat);
- -}
- -static void
- ignoreoff(void)
- {
- - if (depth == 0) {
- - debug("bug at line %d", __LINE__);
- + if (depth == 0)
- abort(); /* bug */
- - }
- ignoring[depth] = ignoring[depth-1];
- }
- static void
- @@ -459,31 +640,26 @@
- static void
- keywordedit(const char *replacement)
- {
- - size_t size = tline + sizeof(tline) - keyword;
- - char *dst = keyword;
- - const char *src = replacement;
- - if (size != 0) {
- - while ((--size != 0) && (*src != '\0'))
- - *dst++ = *src++;
- - *dst = '\0';
- - }
- + snprintf(keyword, tline + sizeof(tline) - keyword,
- + "%s%s", replacement, newline);
- + altered = true;
- print();
- }
- static void
- nest(void)
- {
- - depth += 1;
- - if (depth >= MAXDEPTH)
- + if (depth > MAXDEPTH-1)
- + abort(); /* bug */
- + if (depth == MAXDEPTH-1)
- error("Too many levels of nesting");
- + depth += 1;
- stifline[depth] = linenum;
- }
- static void
- unnest(void)
- {
- - if (depth == 0) {
- - debug("bug at line %d", __LINE__);
- + if (depth == 0)
- abort(); /* bug */
- - }
- depth -= 1;
- }
- static void
- @@ -493,7 +669,20 @@
- }
-
- /*
- + * The last state transition function. When this is called,
- + * lineval == LT_EOF, so the process() loop will terminate.
- + */
- +static void
- +done(void)
- +{
- + if (incomment)
- + error("EOF in comment");
- + closeio();
- +}
- +
- +/*
- * Write a line to the output or not, according to command line options.
- + * If writing fails, closeio() will print the error and exit.
- */
- static void
- flushline(bool keep)
- @@ -501,16 +690,58 @@
- if (symlist)
- return;
- if (keep ^ complement) {
- - if (lnnum && delcount > 0)
- - printf("#line %d\n", linenum);
- - fputs(tline, stdout);
- - delcount = 0;
- + bool blankline = tline[strspn(tline, " \t\r\n")] == '\0';
- + if (blankline && compblank && blankcount != blankmax) {
- + delcount += 1;
- + blankcount += 1;
- + } else {
- + if (lnnum && delcount > 0)
- + hashline();
- + if (fputs(tline, output) == EOF)
- + closeio();
- + delcount = 0;
- + blankmax = blankcount = blankline ? blankcount + 1 : 0;
- + }
- } else {
- - if (lnblank)
- - putc('\n', stdout);
- - exitstat = 1;
- + if (lnblank && fputs(newline, output) == EOF)
- + closeio();
- + altered = true;
- delcount += 1;
- + blankcount = 0;
- }
- + if (debugging && fflush(output) == EOF)
- + closeio();
- +}
- +
- +/*
- + * Format of #line directives depends on whether we know the input filename.
- + */
- +static void
- +hashline(void)
- +{
- + int e;
- +
- + if (linefile == NULL)
- + e = fprintf(output, "#line %d%s", linenum, newline);
- + else
- + e = fprintf(output, "#line %d \"%s\"%s",
- + linenum, linefile, newline);
- + if (e < 0)
- + closeio();
- +}
- +
- +/*
- + * Flush the output and handle errors.
- + */
- +static void
- +closeio(void)
- +{
- + /* Tidy up after findsym(). */
- + if (symdepth && !zerosyms)
- + printf("\n");
- + if (output != NULL && (ferror(output) || fclose(output) == EOF))
- + err(2, "%s: can't write to output", filename);
- + fclose(input);
- }
-
- /*
- @@ -519,16 +750,22 @@
- static void
- process(void)
- {
- - Linetype lineval;
- -
- - for (;;) {
- - linenum++;
- - lineval = get_line();
- + Linetype lineval = LT_PLAIN;
- + /* When compressing blank lines, act as if the file
- + is preceded by a large number of blank lines. */
- + blankmax = blankcount = 1000;
- + zerosyms = true;
- + newline = NULL;
- + linenum = 0;
- + altered = false;
- + while (lineval != LT_EOF) {
- + lineval = parseline();
- trans_table[ifstate[depth]][lineval]();
- - debug("process %s -> %s depth %d",
- - linetype_name[lineval],
- + debug("process line %d %s -> %s depth %d",
- + linenum, linetype_name[lineval],
- ifstate_name[ifstate[depth]], depth);
- }
- + exitstat |= altered;
- }
-
- /*
- @@ -537,104 +774,131 @@
- * help from skipcomment().
- */
- static Linetype
- -get_line(void)
- +parseline(void)
- {
- const char *cp;
- int cursym;
- - int kwlen;
- Linetype retval;
- Comment_state wascomment;
-
- - if (fgets(tline, MAXLINE, input) == NULL)
- - return (LT_EOF);
- - retval = LT_PLAIN;
- wascomment = incomment;
- - cp = skipcomment(tline);
- - if (linestate == LS_START) {
- - if (*cp == '#') {
- - linestate = LS_HASH;
- - cp = skipcomment(cp + 1);
- - } else if (*cp != '\0')
- - linestate = LS_DIRTY;
- + cp = skiphash();
- + if (cp == NULL)
- + return (LT_EOF);
- + if (newline == NULL) {
- + if (strrchr(tline, '\n') == strrchr(tline, '\r') + 1)
- + newline = newline_crlf;
- + else
- + newline = newline_unix;
- }
- - if (!incomment && linestate == LS_HASH) {
- - keyword = tline + (cp - tline);
- - cp = skipsym(cp);
- - kwlen = cp - keyword;
- - /* no way can we deal with a continuation inside a keyword */
- - if (strncmp(cp, "\\\n", 2) == 0)
- - Eioccc();
- - if (strlcmp("ifdef", keyword, kwlen) == 0 ||
- - strlcmp("ifndef", keyword, kwlen) == 0) {
- - cp = skipcomment(cp);
- - if ((cursym = findsym(cp)) < 0)
- - retval = LT_IF;
- - else {
- - retval = (keyword[2] == 'n')
- - ? LT_FALSE : LT_TRUE;
- - if (value[cursym] == NULL)
- - retval = (retval == LT_TRUE)
- - ? LT_FALSE : LT_TRUE;
- - if (ignore[cursym])
- - retval = (retval == LT_TRUE)
- - ? LT_TRUEI : LT_FALSEI;
- - }
- - cp = skipsym(cp);
- - } else if (strlcmp("if", keyword, kwlen) == 0)
- - retval = ifeval(&cp);
- - else if (strlcmp("elif", keyword, kwlen) == 0)
- - retval = ifeval(&cp) - LT_IF + LT_ELIF;
- - else if (strlcmp("else", keyword, kwlen) == 0)
- - retval = LT_ELSE;
- - else if (strlcmp("endif", keyword, kwlen) == 0)
- - retval = LT_ENDIF;
- + if (*cp == '\0') {
- + retval = LT_PLAIN;
- + goto done;
- + }
- + keyword = tline + (cp - tline);
- + if ((cp = matchsym("ifdef", keyword)) != NULL ||
- + (cp = matchsym("ifndef", keyword)) != NULL) {
- + cp = skipcomment(cp);
- + if ((cursym = findsym(&cp)) < 0)
- + retval = LT_IF;
- else {
- - linestate = LS_DIRTY;
- - retval = LT_PLAIN;
- + retval = (keyword[2] == 'n')
- + ? LT_FALSE : LT_TRUE;
- + if (value[cursym] == NULL)
- + retval = (retval == LT_TRUE)
- + ? LT_FALSE : LT_TRUE;
- + if (ignore[cursym])
- + retval = (retval == LT_TRUE)
- + ? LT_TRUEI : LT_FALSEI;
- }
- - cp = skipcomment(cp);
- - if (*cp != '\0') {
- + } else if ((cp = matchsym("if", keyword)) != NULL)
- + retval = ifeval(&cp);
- + else if ((cp = matchsym("elif", keyword)) != NULL)
- + retval = linetype_if2elif(ifeval(&cp));
- + else if ((cp = matchsym("else", keyword)) != NULL)
- + retval = LT_ELSE;
- + else if ((cp = matchsym("endif", keyword)) != NULL)
- + retval = LT_ENDIF;
- + else {
- + cp = skipsym(keyword);
- + /* no way can we deal with a continuation inside a keyword */
- + if (strncmp(cp, "\\\r\n", 3) == 0 ||
- + strncmp(cp, "\\\n", 2) == 0)
- + Eioccc();
- + cp = skipline(cp);
- + retval = LT_PLAIN;
- + goto done;
- + }
- + cp = skipcomment(cp);
- + if (*cp != '\0') {
- + cp = skipline(cp);
- + if (retval == LT_TRUE || retval == LT_FALSE ||
- + retval == LT_TRUEI || retval == LT_FALSEI)
- + retval = LT_IF;
- + if (retval == LT_ELTRUE || retval == LT_ELFALSE)
- + retval = LT_ELIF;
- + }
- + /* the following can happen if the last line of the file lacks a
- + newline or if there is too much whitespace in a directive */
- + if (linestate == LS_HASH) {
- + long len = cp - tline;
- + if (fgets(tline + len, MAXLINE - len, input) == NULL) {
- + if (ferror(input))
- + err(2, "can't read %s", filename);
- + /* append the missing newline at eof */
- + strcpy(tline + len, newline);
- + cp += strlen(newline);
- + linestate = LS_START;
- + } else {
- linestate = LS_DIRTY;
- - if (retval == LT_TRUE || retval == LT_FALSE ||
- - retval == LT_TRUEI || retval == LT_FALSEI)
- - retval = LT_IF;
- - if (retval == LT_ELTRUE || retval == LT_ELFALSE)
- - retval = LT_ELIF;
- - }
- - if (retval != LT_PLAIN && (wascomment || incomment)) {
- - retval += LT_DODGY;
- - if (incomment)
- - linestate = LS_DIRTY;
- }
- - /* skipcomment should have changed the state */
- -// Hmm hppens sometimes on valid files
- -// if (linestate == LS_HASH) {
- -// debug("bug at line %d", __LINE__);
- -// abort(); /* bug */
- -// }
- - }
- - if (linestate == LS_DIRTY) {
- - while (*cp != '\0')
- - cp = skipcomment(cp + 1);
- }
- - debug("parser %s comment %s line",
- + if (retval != LT_PLAIN && (wascomment || linestate != LS_START)) {
- + retval = linetype_2dodgy(retval);
- + linestate = LS_DIRTY;
- + }
- +done:
- + debug("parser line %d state %s comment %s line", linenum,
- comment_name[incomment], linestate_name[linestate]);
- return (retval);
- }
-
- /*
- * These are the binary operators that are supported by the expression
- - * evaluator. Note that if support for division is added then we also
- - * need short-circuiting booleans because of divide-by-zero.
- + * evaluator.
- */
- -static int op_lt(int a, int b) { return (a < b); }
- -static int op_gt(int a, int b) { return (a > b); }
- -static int op_le(int a, int b) { return (a <= b); }
- -static int op_ge(int a, int b) { return (a >= b); }
- -static int op_eq(int a, int b) { return (a == b); }
- -static int op_ne(int a, int b) { return (a != b); }
- -static int op_or(int a, int b) { return (a || b); }
- -static int op_and(int a, int b) { return (a && b); }
- +static Linetype op_strict(long *p, long v, Linetype at, Linetype bt) {
- + if(at == LT_IF || bt == LT_IF) return (LT_IF);
- + return (*p = v, v ? LT_TRUE : LT_FALSE);
- +}
- +static Linetype op_lt(long *p, Linetype at, long a, Linetype bt, long b) {
- + return op_strict(p, a < b, at, bt);
- +}
- +static Linetype op_gt(long *p, Linetype at, long a, Linetype bt, long b) {
- + return op_strict(p, a > b, at, bt);
- +}
- +static Linetype op_le(long *p, Linetype at, long a, Linetype bt, long b) {
- + return op_strict(p, a <= b, at, bt);
- +}
- +static Linetype op_ge(long *p, Linetype at, long a, Linetype bt, long b) {
- + return op_strict(p, a >= b, at, bt);
- +}
- +static Linetype op_eq(long *p, Linetype at, long a, Linetype bt, long b) {
- + return op_strict(p, a == b, at, bt);
- +}
- +static Linetype op_ne(long *p, Linetype at, long a, Linetype bt, long b) {
- + return op_strict(p, a != b, at, bt);
- +}
- +static Linetype op_or(long *p, Linetype at, long a, Linetype bt, long b) {
- + if (!strictlogic && (at == LT_TRUE || bt == LT_TRUE))
- + return (*p = 1, LT_TRUE);
- + return op_strict(p, a || b, at, bt);
- +}
- +static Linetype op_and(long *p, Linetype at, long a, Linetype bt, long b) {
- + if (!strictlogic && (at == LT_FALSE || bt == LT_FALSE))
- + return (*p = 0, LT_FALSE);
- + return op_strict(p, a && b, at, bt);
- +}
-
- /*
- * An evaluation function takes three arguments, as follows: (1) a pointer to
- @@ -643,12 +907,12 @@
- * value of the expression; and (3) a pointer to a char* that points to the
- * expression to be evaluated and that is updated to the end of the expression
- * when evaluation is complete. The function returns LT_FALSE if the value of
- - * the expression is zero, LT_TRUE if it is non-zero, or LT_IF if the
- - * expression could not be evaluated.
- + * the expression is zero, LT_TRUE if it is non-zero, LT_IF if the expression
- + * depends on an unknown symbol, or LT_ERROR if there is a parse failure.
- */
- struct ops;
-
- -typedef Linetype eval_fn(const struct ops *, int *, const char **);
- +typedef Linetype eval_fn(const struct ops *, long *, const char **);
-
- static eval_fn eval_table, eval_unary;
-
- @@ -659,139 +923,139 @@
- * element of the table. Innermost expressions have special non-table-driven
- * handling.
- */
- -static const struct ops {
- +struct op {
- + const char *str;
- + Linetype (*fn)(long *, Linetype, long, Linetype, long);
- +};
- +struct ops {
- eval_fn *inner;
- - struct op {
- - const char *str;
- - int short_circuit_val;
- - int (*fn)(int, int);
- - } op[5];
- -} eval_ops[] = {
- - { eval_table, { { "||", 1, op_or } } },
- - { eval_table, { { "&&", 0, op_and } } },
- - { eval_table, { { "==", -1, op_eq },
- - { "!=", -1, op_ne } } },
- - { eval_unary, { { "<=", -1, op_le },
- - { ">=", -1, op_ge },
- - { "<", -1, op_lt },
- - { ">", -1, op_gt } } }
- + struct op op[5];
- +};
- +static const struct ops eval_ops[] = {
- + { eval_table, { { "||", op_or } } },
- + { eval_table, { { "&&", op_and } } },
- + { eval_table, { { "==", op_eq },
- + { "!=", op_ne } } },
- + { eval_unary, { { "<=", op_le },
- + { ">=", op_ge },
- + { "<", op_lt },
- + { ">", op_gt } } }
- };
-
- +/* Current operator precedence level */
- +static long prec(const struct ops *ops)
- +{
- + return (ops - eval_ops);
- +}
- +
- /*
- - * Function for evaluating the innermost parts of expressions, viz.
- - * "!expr", "(expr)", "defined(symbol)", "defined symbol", "symbol", "number".
- - * We reset the keepthis flag when we find a non-constant subexpression.
- - */
- -// TODO: we use LT_IF both as "I don't know whether it's false or true"
- -// (example: "#if defined FOO") and when we see syntax error
- -// (example: "#if (1 || 2" - no closing paren!), but this is wrong.
- -// Binary && and || need to distinguish these cases in order to handle this:
- -// "#if defined KNOWN_UNDEFINED && FOO" - discard
- -// "#if defined KNOWN_UNDEFINED && (syntax_error_here" - do not discard!
- + * Function for evaluating the innermost parts of expressions,
- + * viz. !expr (expr) number defined(symbol) symbol
- + * We reset the constexpr flag in the last two cases.
- + */
- static Linetype
- -eval_unary(const struct ops *ops, int *valp, const char **cpp)
- +eval_unary(const struct ops *ops, long *valp, const char **cpp)
- {
- const char *cp;
- char *ep;
- int sym;
- + bool defparen;
- + Linetype lt;
-
- cp = skipcomment(*cpp);
- if (*cp == '!') {
- - debug("eval%d !", ops - eval_ops);
- + debug("eval%d !", prec(ops));
- cp++;
- - if (eval_unary(ops, valp, &cp) == LT_IF) {
- - *cpp = cp;
- - return (LT_IF);
- + lt = eval_unary(ops, valp, &cp);
- + if (lt == LT_ERROR)
- + return (LT_ERROR);
- + if (lt != LT_IF) {
- + *valp = !*valp;
- + lt = *valp ? LT_TRUE : LT_FALSE;
- }
- - *valp = !*valp;
- -
- } else if (*cp == '(') {
- - Linetype expr_res;
- -
- cp++;
- - debug("eval%d (%s", ops - eval_ops, cp);
- - expr_res = eval_table(eval_ops, valp, &cp);
- + debug("eval%d (", prec(ops));
- + lt = eval_table(eval_ops, valp, &cp);
- + if (lt == LT_ERROR)
- + return (LT_ERROR);
- cp = skipcomment(cp);
- - *cpp = cp;
- if (*cp++ != ')')
- - return (LT_IF);
- - *cpp = cp;
- - if (expr_res == LT_IF)
- - return (LT_IF);
- -
- + return (LT_ERROR);
- } else if (isdigit((unsigned char)*cp)) {
- - debug("eval%d number", ops - eval_ops);
- + debug("eval%d number", prec(ops));
- *valp = strtol(cp, &ep, 0);
- - cp = skipsym(cp);
- -
- - } else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) {
- - bool parens;
- -
- + if (ep == cp)
- + return (LT_ERROR);
- + lt = *valp ? LT_TRUE : LT_FALSE;
- + cp = ep;
- + } else if (matchsym("defined", cp) != NULL) {
- cp = skipcomment(cp+7);
- - debug("eval%d defined '%s'", ops - eval_ops, cp);
- - parens = (*cp == '(');
- - if (parens)
- + if (*cp == '(') {
- cp = skipcomment(cp+1);
- - sym = findsym(cp);
- - cp = skipsym(cp);
- + defparen = true;
- + } else {
- + defparen = false;
- + }
- + sym = findsym(&cp);
- cp = skipcomment(cp);
- - if (parens) {
- - if (*cp != ')')
- - return (LT_IF);
- - cp = skipcomment(cp+1);
- + if (defparen && *cp++ != ')') {
- + debug("eval%d defined missing ')'", prec(ops));
- + return (LT_ERROR);
- }
- - *cpp = cp;
- if (sym < 0) {
- - debug("sym not found, returning LT_IF");
- - return (LT_IF);
- + debug("eval%d defined unknown", prec(ops));
- + lt = LT_IF;
- + } else {
- + debug("eval%d defined %s", prec(ops), symname[sym]);
- + *valp = (value[sym] != NULL);
- + lt = *valp ? LT_TRUE : LT_FALSE;
- }
- - *valp = (value[sym] != NULL);
- - keepthis = false;
- -
- + constexpr = false;
- } else if (!endsym(*cp)) {
- - debug("eval%d symbol", ops - eval_ops);
- - sym = findsym(cp);
- - cp = skipsym(cp);
- - *cpp = cp;
- - if (sym < 0)
- - return (LT_IF);
- - if (value[sym] == NULL)
- + debug("eval%d symbol", prec(ops));
- + sym = findsym(&cp);
- + if (sym < 0) {
- + lt = LT_IF;
- + cp = skipargs(cp);
- + } else if (value[sym] == NULL) {
- *valp = 0;
- - else {
- + lt = LT_FALSE;
- + } else {
- *valp = strtol(value[sym], &ep, 0);
- if (*ep != '\0' || ep == value[sym])
- - return (LT_IF);
- + return (LT_ERROR);
- + lt = *valp ? LT_TRUE : LT_FALSE;
- + cp = skipargs(cp);
- }
- - keepthis = false;
- -
- + constexpr = false;
- } else {
- - debug("eval%d bad expr", ops - eval_ops);
- - return (LT_IF);
- + debug("eval%d bad expr", prec(ops));
- + return (LT_ERROR);
- }
-
- *cpp = cp;
- - debug("eval%d = %d", ops - eval_ops, *valp);
- - return (*valp ? LT_TRUE : LT_FALSE);
- + debug("eval%d = %d", prec(ops), *valp);
- + return (lt);
- }
-
- /*
- * Table-driven evaluation of binary operators.
- */
- static Linetype
- -eval_table(const struct ops *ops, int *valp, const char **cpp)
- +eval_table(const struct ops *ops, long *valp, const char **cpp)
- {
- - Linetype left_side;
- const struct op *op;
- const char *cp;
- - int val;
- + long val;
- + Linetype lt, rt;
-
- - debug("eval%d '%s'", ops - eval_ops, *cpp);
- - left_side = ops->inner(ops+1, valp, cpp);
- + debug("eval%d", prec(ops));
- cp = *cpp;
- -
- + lt = ops->inner(ops+1, valp, &cp);
- + if (lt == LT_ERROR)
- + return (LT_ERROR);
- for (;;) {
- - Linetype right_side;
- -
- cp = skipcomment(cp);
- for (op = ops->op; op->str != NULL; op++)
- if (strncmp(cp, op->str, strlen(op->str)) == 0)
- @@ -799,38 +1063,17 @@
- if (op->str == NULL)
- break;
- cp += strlen(op->str);
- - debug("eval%d '%s'", ops - eval_ops, op->str);
- - right_side = ops->inner(ops+1, &val, &cp);
- - *cpp = cp;
- -
- - /* If short_circuit_val is 0 or 1, we can ignore
- - * right side if left size is known, and its value
- - * (i.e., *valp) is 0 or !0, respectively */
- - if (left_side != LT_IF && op->short_circuit_val == !!*valp) {
- - debug("op->short_circuit_val:%d *valp:%d cp:'%s'",
- - op->short_circuit_val, *valp, cp);
- - *valp = !!*valp;
- - break;
- - }
- - /* Same for the right side */
- - if (right_side != LT_IF && op->short_circuit_val == !!val) {
- - debug("op->short_circuit_val:%d val:%d cp:'%s'",
- - op->short_circuit_val, val, cp);
- - left_side = right_side;
- - *valp = !!val;
- - break;
- - }
- -
- - if (left_side == LT_IF || right_side == LT_IF)
- - return (LT_IF);
- - *valp = op->fn(*valp, val);
- - left_side = right_side;
- + debug("eval%d %s", prec(ops), op->str);
- + rt = ops->inner(ops+1, &val, &cp);
- + if (rt == LT_ERROR)
- + return (LT_ERROR);
- + lt = op->fn(valp, lt, *valp, rt, val);
- }
-
- - debug("eval%d = %d LT_IF:%d", ops - eval_ops, *valp, (left_side == LT_IF));
- - if (left_side == LT_IF)
- - return (LT_IF);
- - return (*valp ? LT_TRUE : LT_FALSE);
- + *cpp = cp;
- + debug("eval%d = %d", prec(ops), *valp);
- + debug("eval%d lt = %s", prec(ops), linetype_name[lt]);
- + return (lt);
- }
-
- /*
- @@ -841,14 +1084,57 @@
- static Linetype
- ifeval(const char **cpp)
- {
- - int ret;
- - int val;
- + Linetype ret;
- + long val = 0;
-
- debug("eval %s", *cpp);
- - keepthis = killconsts ? false : true;
- + constexpr = killconsts ? false : true;
- ret = eval_table(eval_ops, &val, cpp);
- - debug("val:%d ret:%d keepthis:%d", val, ret, keepthis);
- - return (keepthis ? LT_IF : ret);
- + debug("eval = %d", val);
- + return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret);
- +}
- +
- +/*
- + * Read a line and examine its initial part to determine if it is a
- + * preprocessor directive. Returns NULL on EOF, or a pointer to a
- + * preprocessor directive name, or a pointer to the zero byte at the
- + * end of the line.
- + */
- +static const char *
- +skiphash(void)
- +{
- + const char *cp;
- +
- + linenum++;
- + if (fgets(tline, MAXLINE, input) == NULL) {
- + if (ferror(input))
- + err(2, "can't read %s", filename);
- + else
- + return (NULL);
- + }
- + cp = skipcomment(tline);
- + if (linestate == LS_START && *cp == '#') {
- + linestate = LS_HASH;
- + return (skipcomment(cp + 1));
- + } else if (*cp == '\0') {
- + return (cp);
- + } else {
- + return (skipline(cp));
- + }
- +}
- +
- +/*
- + * Mark a line dirty and consume the rest of it, keeping track of the
- + * lexical state.
- + */
- +static const char *
- +skipline(const char *cp)
- +{
- + if (*cp != '\0')
- + linestate = LS_DIRTY;
- + while (*cp != '\0')
- + cp = skipcomment(cp + 1);
- + return (cp);
- }
-
- /*
- @@ -869,11 +1155,16 @@
- }
- while (*cp != '\0')
- /* don't reset to LS_START after a line continuation */
- - if (strncmp(cp, "\\\n", 2) == 0)
- + if (strncmp(cp, "\\\r\n", 3) == 0)
- + cp += 3;
- + else if (strncmp(cp, "\\\n", 2) == 0)
- cp += 2;
- else switch (incomment) {
- case NO_COMMENT:
- - if (strncmp(cp, "/\\\n", 3) == 0) {
- + if (strncmp(cp, "/\\\r\n", 4) == 0) {
- + incomment = STARTING_COMMENT;
- + cp += 4;
- + } else if (strncmp(cp, "/\\\n", 3) == 0) {
- incomment = STARTING_COMMENT;
- cp += 3;
- } else if (strncmp(cp, "/*", 2) == 0) {
- @@ -893,7 +1184,7 @@
- } else if (strncmp(cp, "\n", 1) == 0) {
- linestate = LS_START;
- cp += 1;
- - } else if (strchr(" \t", *cp) != NULL) {
- + } else if (strchr(" \r\t", *cp) != NULL) {
- cp += 1;
- } else
- return (cp);
- @@ -925,7 +1216,10 @@
- cp += 1;
- continue;
- case C_COMMENT:
- - if (strncmp(cp, "*\\\n", 3) == 0) {
- + if (strncmp(cp, "*\\\r\n", 4) == 0) {
- + incomment = FINISHING_COMMENT;
- + cp += 4;
- + } else if (strncmp(cp, "*\\\n", 3) == 0) {
- incomment = FINISHING_COMMENT;
- cp += 3;
- } else if (strncmp(cp, "*/", 2) == 0) {
- @@ -954,13 +1248,37 @@
- incomment = C_COMMENT;
- continue;
- default:
- - debug("bug at line %d", __LINE__);
- abort(); /* bug */
- }
- return (cp);
- }
-
- /*
- + * Skip macro arguments.
- + */
- +static const char *
- +skipargs(const char *cp)
- +{
- + const char *ocp = cp;
- + int level = 0;
- + cp = skipcomment(cp);
- + if (*cp != '(')
- + return (cp);
- + do {
- + if (*cp == '(')
- + level++;
- + if (*cp == ')')
- + level--;
- + cp = skipcomment(cp+1);
- + } while (level != 0 && *cp != '\0');
- + if (level == 0)
- + return (cp);
- + else
- + /* Rewind and re-detect the syntax error later. */
- + return (ocp);
- +}
- +
- +/*
- * Skip over an identifier.
- */
- static const char *
- @@ -972,27 +1290,69 @@
- }
-
- /*
- - * Look for the symbol in the symbol table. If is is found, we return
- + * Skip whitespace and take a copy of any following identifier.
- + */
- +static const char *
- +getsym(const char **cpp)
- +{
- + const char *cp = *cpp, *sym;
- +
- + cp = skipcomment(cp);
- + cp = skipsym(sym = cp);
- + if (cp == sym)
- + return NULL;
- + *cpp = cp;
- + return (xstrdup(sym, cp));
- +}
- +
- +/*
- + * Check that s (a symbol) matches the start of t, and that the
- + * following character in t is not a symbol character. Returns a
- + * pointer to the following character in t if there is a match,
- + * otherwise NULL.
- + */
- +static const char *
- +matchsym(const char *s, const char *t)
- +{
- + while (*s != '\0' && *t != '\0')
- + if (*s != *t)
- + return (NULL);
- + else
- + ++s, ++t;
- + if (*s == '\0' && endsym(*t))
- + return(t);
- + else
- + return(NULL);
- +}
- +
- +/*
- + * Look for the symbol in the symbol table. If it is found, we return
- * the symbol table index, else we return -1.
- */
- static int
- -findsym(const char *str)
- +findsym(const char **strp)
- {
- - const char *cp;
- + const char *str;
- int symind;
-
- - cp = skipsym(str);
- - if (cp == str)
- - return (-1);
- + str = *strp;
- + *strp = skipsym(str);
- if (symlist) {
- - printf("%.*s\n", (int)(cp-str), str);
- + if (*strp == str)
- + return (-1);
- + if (symdepth && firstsym)
- + printf("%s%3d", zerosyms ? "" : "\n", depth);
- + firstsym = zerosyms = false;
- + printf("%s%.*s%s",
- + symdepth ? " " : "",
- + (int)(*strp-str), str,
- + symdepth ? "" : "\n");
- /* we don't care about the value of the symbol */
- return (0);
- }
- for (symind = 0; symind < nsyms; ++symind) {
- - if (strlcmp(symname[symind], str, cp-str) == 0) {
- - debug("findsym %s %s", symname[symind],
- - value[symind] ? value[symind] : "");
- + if (matchsym(symname[symind], str) != NULL) {
- + debugsym("findsym", symind);
- return (symind);
- }
- }
- @@ -1000,51 +1360,194 @@
- }
-
- /*
- + * Resolve indirect symbol values to their final definitions.
- + */
- +static void
- +indirectsym(void)
- +{
- + const char *cp;
- + int changed, sym, ind;
- +
- + do {
- + changed = 0;
- + for (sym = 0; sym < nsyms; ++sym) {
- + if (value[sym] == NULL)
- + continue;
- + cp = value[sym];
- + ind = findsym(&cp);
- + if (ind == -1 || ind == sym ||
- + *cp != '\0' ||
- + value[ind] == NULL ||
- + value[ind] == value[sym])
- + continue;
- + debugsym("indir...", sym);
- + value[sym] = value[ind];
- + debugsym("...ectsym", sym);
- + changed++;
- + }
- + } while (changed);
- +}
- +
- +/*
- + * Add a symbol to the symbol table, specified with the format sym=val
- + */
- +static void
- +addsym1(bool ignorethis, bool definethis, char *symval)
- +{
- + const char *sym, *val;
- +
- + sym = symval;
- + val = skipsym(sym);
- + if (definethis && *val == '=') {
- + symval[val - sym] = '\0';
- + val = val + 1;
- + } else if (*val == '\0') {
- + val = definethis ? "1" : NULL;
- + } else {
- + usage();
- + }
- + addsym2(ignorethis, sym, val);
- +}
- +
- +/*
- * Add a symbol to the symbol table.
- */
- static void
- -addsym(bool ignorethis, bool definethis, char *sym)
- +addsym2(bool ignorethis, const char *sym, const char *val)
- {
- + const char *cp = sym;
- int symind;
- - char *val;
-
- - symind = findsym(sym);
- + symind = findsym(&cp);
- if (symind < 0) {
- if (nsyms >= MAXSYMS)
- errx(2, "too many symbols");
- symind = nsyms++;
- }
- - symname[symind] = sym;
- ignore[symind] = ignorethis;
- - val = sym + (skipsym(sym) - sym);
- - if (definethis) {
- - if (*val == '=') {
- - value[symind] = val+1;
- - *val = '\0';
- - } else if (*val == '\0')
- - value[symind] = "";
- - else
- - usage();
- + symname[symind] = sym;
- + value[symind] = val;
- + debugsym("addsym", symind);
- +}
- +
- +static void
- +debugsym(const char *why, int symind)
- +{
- + debug("%s %s%c%s", why, symname[symind],
- + value[symind] ? '=' : ' ',
- + value[symind] ? value[symind] : "undef");
- +}
- +
- +/*
- + * Add symbols to the symbol table from a file containing
- + * #define and #undef preprocessor directives.
- + */
- +static void
- +defundefile(const char *fn)
- +{
- + filename = fn;
- + input = fopen(fn, "rb");
- + if (input == NULL)
- + err(2, "can't open %s", fn);
- + linenum = 0;
- + while (defundef())
- + ;
- + if (ferror(input))
- + err(2, "can't read %s", filename);
- + else
- + fclose(input);
- + if (incomment)
- + error("EOF in comment");
- +}
- +
- +/*
- + * Read and process one #define or #undef directive
- + */
- +static bool
- +defundef(void)
- +{
- + const char *cp, *kw, *sym, *val, *end;
- +
- + cp = skiphash();
- + if (cp == NULL)
- + return (false);
- + if (*cp == '\0')
- + goto done;
- + /* strip trailing whitespace, and do a fairly rough check to
- + avoid unsupported multi-line preprocessor directives */
- + end = cp + strlen(cp);
- + while (end > tline && strchr(" \t\n\r", end[-1]) != NULL)
- + --end;
- + if (end > tline && end[-1] == '\\')
- + Eioccc();
- +
- + kw = cp;
- + if ((cp = matchsym("define", kw)) != NULL) {
- + sym = getsym(&cp);
- + if (sym == NULL)
- + error("missing macro name in #define");
- + if (*cp == '(') {
- + val = "1";
- + } else {
- + cp = skipcomment(cp);
- + val = (cp < end) ? xstrdup(cp, end) : "";
- + }
- + debug("#define");
- + addsym2(false, sym, val);
- + } else if ((cp = matchsym("undef", kw)) != NULL) {
- + sym = getsym(&cp);
- + if (sym == NULL)
- + error("missing macro name in #undef");
- + cp = skipcomment(cp);
- + debug("#undef");
- + addsym2(false, sym, NULL);
- } else {
- - if (*val != '\0')
- - usage();
- - value[symind] = NULL;
- + error("unrecognized preprocessor directive");
- }
- + skipline(cp);
- +done:
- + debug("parser line %d state %s comment %s line", linenum,
- + comment_name[incomment], linestate_name[linestate]);
- + return (true);
- }
-
- /*
- - * Compare s with n characters of t.
- - * The same as strncmp() except that it checks that s[n] == '\0'.
- + * Concatenate two strings into new memory, checking for failure.
- */
- -static int
- -strlcmp(const char *s, const char *t, size_t n)
- +static char *
- +astrcat(const char *s1, const char *s2)
- {
- - while (n-- && *t != '\0')
- - if (*s != *t)
- - return ((unsigned char)*s - (unsigned char)*t);
- - else
- - ++s, ++t;
- - return ((unsigned char)*s);
- + char *s;
- + int len;
- + size_t size;
- +
- + len = snprintf(NULL, 0, "%s%s", s1, s2);
- + if (len < 0)
- + err(2, "snprintf");
- + size = (size_t)len + 1;
- + s = (char *)malloc(size);
- + if (s == NULL)
- + err(2, "malloc");
- + snprintf(s, size, "%s%s", s1, s2);
- + return (s);
- +}
- +
- +/*
- + * Duplicate a segment of a string, checking for failure.
- + */
- +static const char *
- +xstrdup(const char *start, const char *end)
- +{
- + size_t n;
- + char *s;
- +
- + if (end < start) abort(); /* bug */
- + n = (size_t)(end - start) + 1;
- + s = malloc(n);
- + if (s == NULL)
- + err(2, "malloc");
- + snprintf(s, n, "%s", start);
- + return (s);
- }
-
- /*
- @@ -1070,5 +1573,6 @@
- else
- warnx("%s: %d: %s (#if line %d depth %d)",
- filename, linenum, msg, stifline[depth], depth);
- + closeio();
- errx(2, "output may be truncated");
- }
- diff -Nur uClibc-0.9.33.2/extra/scripts/unifdef.h uClibc/extra/scripts/unifdef.h
- --- uClibc-0.9.33.2/extra/scripts/unifdef.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/scripts/unifdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,57 @@
- +/*
- + * Copyright (c) 2012 - 2013 Tony Finch <dot@dotat.at>
- + *
- + * Redistribution and use in source and binary forms, with or without
- + * modification, are permitted provided that the following conditions
- + * are met:
- + * 1. Redistributions of source code must retain the above copyright
- + * notice, this list of conditions and the following disclaimer.
- + * 2. Redistributions in binary form must reproduce the above copyright
- + * notice, this list of conditions and the following disclaimer in the
- + * documentation and/or other materials provided with the distribution.
- + *
- + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- + * SUCH DAMAGE.
- + */
- +
- +#include <sys/stat.h>
- +
- +#include <ctype.h>
- +#include <errno.h>
- +#include <stdarg.h>
- +#include <stdbool.h>
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include <string.h>
- +#include <unistd.h>
- +
- +/* Avoid err.h since this are non-standard BSD extensions */
- +#define vwarnx(fmt, args) ({ fprintf(stderr, "unifdef: "); vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); })
- +#define warnx(fmt, args...) fprintf(stderr, "unifdef: " fmt "\n", ## args)
- +#define warn(fmt, args...) warnx(fmt ": %s", ## args, strerror(errno))
- +#define errx(exit_code, fmt, args...) ({ warnx(fmt, ## args); exit(exit_code); })
- +#define err(exit_code, fmt, args...) errx(exit_code, fmt ": %s", ## args, strerror(errno))
- +
- +/* portability stubs */
- +
- +#define fbinmode(fp) (fp)
- +
- +#define replace(old,new) rename(old,new)
- +
- +static FILE *
- +mktempmode(char *tmp, int mode)
- +{
- + int fd = mkstemp(tmp);
- + if (fd < 0) return (NULL);
- + fchmod(fd, mode & (S_IRWXU|S_IRWXG|S_IRWXO));
- + return (fdopen(fd, "wb"));
- +}
- diff -Nur uClibc-0.9.33.2/extra/scripts/version.h uClibc/extra/scripts/version.h
- --- uClibc-0.9.33.2/extra/scripts/version.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/extra/scripts/version.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,2 @@
- +"@(#) $Version: unifdef-2.10.4.1542ea4 $\n"
- +"@(#) $Date: 2014-01-07 22:32:21 +0000 $\n"
- diff -Nur uClibc-0.9.33.2/.git/config uClibc/.git/config
- --- uClibc-0.9.33.2/.git/config 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/config 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +[core]
- + repositoryformatversion = 0
- + filemode = true
- + bare = false
- + logallrefupdates = true
- +[remote "origin"]
- + fetch = +refs/heads/*:refs/remotes/origin/*
- + url = git://git.busybox.net/uClibc
- +[branch "master"]
- + remote = origin
- + merge = refs/heads/master
- diff -Nur uClibc-0.9.33.2/.git/description uClibc/.git/description
- --- uClibc-0.9.33.2/.git/description 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/description 2014-02-03 12:32:33.000000000 +0100
- @@ -0,0 +1 @@
- +Unnamed repository; edit this file 'description' to name the repository.
- diff -Nur uClibc-0.9.33.2/.git/FETCH_HEAD uClibc/.git/FETCH_HEAD
- --- uClibc-0.9.33.2/.git/FETCH_HEAD 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/FETCH_HEAD 2014-02-15 14:18:14.000000000 +0100
- @@ -0,0 +1,11 @@
- +79c0857a828abb3f7ec9582a01d706e0ce81f84c branch 'master' of git://git.busybox.net/uClibc
- +80a6c6d96c6201146c4c9d988d16e14243c5664f not-for-merge branch '0.9.31' of git://git.busybox.net/uClibc
- +c408f8f42a9bb5d765432e8cbfd686ccfb70a2c2 not-for-merge branch '0.9.32' of git://git.busybox.net/uClibc
- +7706cd4737ddb89e9b4937936e614d87d1abbd49 not-for-merge branch '0.9.33' of git://git.busybox.net/uClibc
- +a6dfcd03425656208fc548c75f955016c26e8f71 not-for-merge branch '0_9_28' of git://git.busybox.net/uClibc
- +560de2b96857bc26540eb31de44d0e653ad5a4e6 not-for-merge branch '0_9_29' of git://git.busybox.net/uClibc
- +1555437358f20102bc4c2d17a3f6ad361acde5ed not-for-merge branch '0_9_30' of git://git.busybox.net/uClibc
- +5c2f94e7b4223939524cee0f40057a155704127c not-for-merge branch 'future' of git://git.busybox.net/uClibc
- +099ecfb6536497eed33a30307b0ba52daab3ccef not-for-merge branch 'ldso-future' of git://git.busybox.net/uClibc
- +1c1391e6e507337103f2c7ce4da768b2842a8aa1 not-for-merge branch 'prelink' of git://git.busybox.net/uClibc
- +dd4643de1c22376872e7504926ef020f04098898 not-for-merge branch 'superh_fdpic' of git://git.busybox.net/uClibc
- diff -Nur uClibc-0.9.33.2/.git/HEAD uClibc/.git/HEAD
- --- uClibc-0.9.33.2/.git/HEAD 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/HEAD 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1 @@
- +ref: refs/heads/master
- diff -Nur uClibc-0.9.33.2/.git/hooks/applypatch-msg.sample uClibc/.git/hooks/applypatch-msg.sample
- --- uClibc-0.9.33.2/.git/hooks/applypatch-msg.sample 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/hooks/applypatch-msg.sample 2014-02-03 12:32:33.000000000 +0100
- @@ -0,0 +1,15 @@
- +#!/bin/sh
- +#
- +# An example hook script to check the commit log message taken by
- +# applypatch from an e-mail message.
- +#
- +# The hook should exit with non-zero status after issuing an
- +# appropriate message if it wants to stop the commit. The hook is
- +# allowed to edit the commit message file.
- +#
- +# To enable this hook, rename this file to "applypatch-msg".
- +
- +. git-sh-setup
- +test -x "$GIT_DIR/hooks/commit-msg" &&
- + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
- +:
- diff -Nur uClibc-0.9.33.2/.git/hooks/commit-msg.sample uClibc/.git/hooks/commit-msg.sample
- --- uClibc-0.9.33.2/.git/hooks/commit-msg.sample 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/hooks/commit-msg.sample 2014-02-03 12:32:33.000000000 +0100
- @@ -0,0 +1,24 @@
- +#!/bin/sh
- +#
- +# An example hook script to check the commit log message.
- +# Called by "git commit" with one argument, the name of the file
- +# that has the commit message. The hook should exit with non-zero
- +# status after issuing an appropriate message if it wants to stop the
- +# commit. The hook is allowed to edit the commit message file.
- +#
- +# To enable this hook, rename this file to "commit-msg".
- +
- +# Uncomment the below to add a Signed-off-by line to the message.
- +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
- +# hook is more suited to it.
- +#
- +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
- +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
- +
- +# This example catches duplicate Signed-off-by lines.
- +
- +test "" = "$(grep '^Signed-off-by: ' "$1" |
- + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
- + echo >&2 Duplicate Signed-off-by lines.
- + exit 1
- +}
- diff -Nur uClibc-0.9.33.2/.git/hooks/post-update.sample uClibc/.git/hooks/post-update.sample
- --- uClibc-0.9.33.2/.git/hooks/post-update.sample 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/hooks/post-update.sample 2014-02-03 12:32:33.000000000 +0100
- @@ -0,0 +1,8 @@
- +#!/bin/sh
- +#
- +# An example hook script to prepare a packed repository for use over
- +# dumb transports.
- +#
- +# To enable this hook, rename this file to "post-update".
- +
- +exec git update-server-info
- diff -Nur uClibc-0.9.33.2/.git/hooks/pre-applypatch.sample uClibc/.git/hooks/pre-applypatch.sample
- --- uClibc-0.9.33.2/.git/hooks/pre-applypatch.sample 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/hooks/pre-applypatch.sample 2014-02-03 12:32:33.000000000 +0100
- @@ -0,0 +1,14 @@
- +#!/bin/sh
- +#
- +# An example hook script to verify what is about to be committed
- +# by applypatch from an e-mail message.
- +#
- +# The hook should exit with non-zero status after issuing an
- +# appropriate message if it wants to stop the commit.
- +#
- +# To enable this hook, rename this file to "pre-applypatch".
- +
- +. git-sh-setup
- +test -x "$GIT_DIR/hooks/pre-commit" &&
- + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
- +:
- diff -Nur uClibc-0.9.33.2/.git/hooks/pre-commit.sample uClibc/.git/hooks/pre-commit.sample
- --- uClibc-0.9.33.2/.git/hooks/pre-commit.sample 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/hooks/pre-commit.sample 2014-02-03 12:32:33.000000000 +0100
- @@ -0,0 +1,50 @@
- +#!/bin/sh
- +#
- +# An example hook script to verify what is about to be committed.
- +# Called by "git commit" with no arguments. The hook should
- +# exit with non-zero status after issuing an appropriate message if
- +# it wants to stop the commit.
- +#
- +# To enable this hook, rename this file to "pre-commit".
- +
- +if git rev-parse --verify HEAD >/dev/null 2>&1
- +then
- + against=HEAD
- +else
- + # Initial commit: diff against an empty tree object
- + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
- +fi
- +
- +# If you want to allow non-ascii filenames set this variable to true.
- +allownonascii=$(git config hooks.allownonascii)
- +
- +# Redirect output to stderr.
- +exec 1>&2
- +
- +# Cross platform projects tend to avoid non-ascii filenames; prevent
- +# them from being added to the repository. We exploit the fact that the
- +# printable range starts at the space character and ends with tilde.
- +if [ "$allownonascii" != "true" ] &&
- + # Note that the use of brackets around a tr range is ok here, (it's
- + # even required, for portability to Solaris 10's /usr/bin/tr), since
- + # the square bracket bytes happen to fall in the designated range.
- + test $(git diff --cached --name-only --diff-filter=A -z $against |
- + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
- +then
- + echo "Error: Attempt to add a non-ascii file name."
- + echo
- + echo "This can cause problems if you want to work"
- + echo "with people on other platforms."
- + echo
- + echo "To be portable it is advisable to rename the file ..."
- + echo
- + echo "If you know what you are doing you can disable this"
- + echo "check using:"
- + echo
- + echo " git config hooks.allownonascii true"
- + echo
- + exit 1
- +fi
- +
- +# If there are whitespace errors, print the offending file names and fail.
- +exec git diff-index --check --cached $against --
- diff -Nur uClibc-0.9.33.2/.git/hooks/prepare-commit-msg.sample uClibc/.git/hooks/prepare-commit-msg.sample
- --- uClibc-0.9.33.2/.git/hooks/prepare-commit-msg.sample 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/hooks/prepare-commit-msg.sample 2014-02-03 12:32:33.000000000 +0100
- @@ -0,0 +1,36 @@
- +#!/bin/sh
- +#
- +# An example hook script to prepare the commit log message.
- +# Called by "git commit" with the name of the file that has the
- +# commit message, followed by the description of the commit
- +# message's source. The hook's purpose is to edit the commit
- +# message file. If the hook fails with a non-zero status,
- +# the commit is aborted.
- +#
- +# To enable this hook, rename this file to "prepare-commit-msg".
- +
- +# This hook includes three examples. The first comments out the
- +# "Conflicts:" part of a merge commit.
- +#
- +# The second includes the output of "git diff --name-status -r"
- +# into the message, just before the "git status" output. It is
- +# commented because it doesn't cope with --amend or with squashed
- +# commits.
- +#
- +# The third example adds a Signed-off-by line to the message, that can
- +# still be edited. This is rarely a good idea.
- +
- +case "$2,$3" in
- + merge,)
- + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
- +
- +# ,|template,)
- +# /usr/bin/perl -i.bak -pe '
- +# print "\n" . `git diff --cached --name-status -r`
- +# if /^#/ && $first++ == 0' "$1" ;;
- +
- + *) ;;
- +esac
- +
- +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
- +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
- diff -Nur uClibc-0.9.33.2/.git/hooks/pre-rebase.sample uClibc/.git/hooks/pre-rebase.sample
- --- uClibc-0.9.33.2/.git/hooks/pre-rebase.sample 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/hooks/pre-rebase.sample 2014-02-03 12:32:33.000000000 +0100
- @@ -0,0 +1,169 @@
- +#!/bin/sh
- +#
- +# Copyright (c) 2006, 2008 Junio C Hamano
- +#
- +# The "pre-rebase" hook is run just before "git rebase" starts doing
- +# its job, and can prevent the command from running by exiting with
- +# non-zero status.
- +#
- +# The hook is called with the following parameters:
- +#
- +# $1 -- the upstream the series was forked from.
- +# $2 -- the branch being rebased (or empty when rebasing the current branch).
- +#
- +# This sample shows how to prevent topic branches that are already
- +# merged to 'next' branch from getting rebased, because allowing it
- +# would result in rebasing already published history.
- +
- +publish=next
- +basebranch="$1"
- +if test "$#" = 2
- +then
- + topic="refs/heads/$2"
- +else
- + topic=`git symbolic-ref HEAD` ||
- + exit 0 ;# we do not interrupt rebasing detached HEAD
- +fi
- +
- +case "$topic" in
- +refs/heads/??/*)
- + ;;
- +*)
- + exit 0 ;# we do not interrupt others.
- + ;;
- +esac
- +
- +# Now we are dealing with a topic branch being rebased
- +# on top of master. Is it OK to rebase it?
- +
- +# Does the topic really exist?
- +git show-ref -q "$topic" || {
- + echo >&2 "No such branch $topic"
- + exit 1
- +}
- +
- +# Is topic fully merged to master?
- +not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
- +if test -z "$not_in_master"
- +then
- + echo >&2 "$topic is fully merged to master; better remove it."
- + exit 1 ;# we could allow it, but there is no point.
- +fi
- +
- +# Is topic ever merged to next? If so you should not be rebasing it.
- +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
- +only_next_2=`git rev-list ^master ${publish} | sort`
- +if test "$only_next_1" = "$only_next_2"
- +then
- + not_in_topic=`git rev-list "^$topic" master`
- + if test -z "$not_in_topic"
- + then
- + echo >&2 "$topic is already up-to-date with master"
- + exit 1 ;# we could allow it, but there is no point.
- + else
- + exit 0
- + fi
- +else
- + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
- + /usr/bin/perl -e '
- + my $topic = $ARGV[0];
- + my $msg = "* $topic has commits already merged to public branch:\n";
- + my (%not_in_next) = map {
- + /^([0-9a-f]+) /;
- + ($1 => 1);
- + } split(/\n/, $ARGV[1]);
- + for my $elem (map {
- + /^([0-9a-f]+) (.*)$/;
- + [$1 => $2];
- + } split(/\n/, $ARGV[2])) {
- + if (!exists $not_in_next{$elem->[0]}) {
- + if ($msg) {
- + print STDERR $msg;
- + undef $msg;
- + }
- + print STDERR " $elem->[1]\n";
- + }
- + }
- + ' "$topic" "$not_in_next" "$not_in_master"
- + exit 1
- +fi
- +
- +<<\DOC_END
- +
- +This sample hook safeguards topic branches that have been
- +published from being rewound.
- +
- +The workflow assumed here is:
- +
- + * Once a topic branch forks from "master", "master" is never
- + merged into it again (either directly or indirectly).
- +
- + * Once a topic branch is fully cooked and merged into "master",
- + it is deleted. If you need to build on top of it to correct
- + earlier mistakes, a new topic branch is created by forking at
- + the tip of the "master". This is not strictly necessary, but
- + it makes it easier to keep your history simple.
- +
- + * Whenever you need to test or publish your changes to topic
- + branches, merge them into "next" branch.
- +
- +The script, being an example, hardcodes the publish branch name
- +to be "next", but it is trivial to make it configurable via
- +$GIT_DIR/config mechanism.
- +
- +With this workflow, you would want to know:
- +
- +(1) ... if a topic branch has ever been merged to "next". Young
- + topic branches can have stupid mistakes you would rather
- + clean up before publishing, and things that have not been
- + merged into other branches can be easily rebased without
- + affecting other people. But once it is published, you would
- + not want to rewind it.
- +
- +(2) ... if a topic branch has been fully merged to "master".
- + Then you can delete it. More importantly, you should not
- + build on top of it -- other people may already want to
- + change things related to the topic as patches against your
- + "master", so if you need further changes, it is better to
- + fork the topic (perhaps with the same name) afresh from the
- + tip of "master".
- +
- +Let's look at this example:
- +
- + o---o---o---o---o---o---o---o---o---o "next"
- + / / / /
- + / a---a---b A / /
- + / / / /
- + / / c---c---c---c B /
- + / / / \ /
- + / / / b---b C \ /
- + / / / / \ /
- + ---o---o---o---o---o---o---o---o---o---o---o "master"
- +
- +
- +A, B and C are topic branches.
- +
- + * A has one fix since it was merged up to "next".
- +
- + * B has finished. It has been fully merged up to "master" and "next",
- + and is ready to be deleted.
- +
- + * C has not merged to "next" at all.
- +
- +We would want to allow C to be rebased, refuse A, and encourage
- +B to be deleted.
- +
- +To compute (1):
- +
- + git rev-list ^master ^topic next
- + git rev-list ^master next
- +
- + if these match, topic has not merged in next at all.
- +
- +To compute (2):
- +
- + git rev-list master..topic
- +
- + if this is empty, it is fully merged to "master".
- +
- +DOC_END
- diff -Nur uClibc-0.9.33.2/.git/hooks/update.sample uClibc/.git/hooks/update.sample
- --- uClibc-0.9.33.2/.git/hooks/update.sample 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/hooks/update.sample 2014-02-03 12:32:33.000000000 +0100
- @@ -0,0 +1,128 @@
- +#!/bin/sh
- +#
- +# An example hook script to blocks unannotated tags from entering.
- +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
- +#
- +# To enable this hook, rename this file to "update".
- +#
- +# Config
- +# ------
- +# hooks.allowunannotated
- +# This boolean sets whether unannotated tags will be allowed into the
- +# repository. By default they won't be.
- +# hooks.allowdeletetag
- +# This boolean sets whether deleting tags will be allowed in the
- +# repository. By default they won't be.
- +# hooks.allowmodifytag
- +# This boolean sets whether a tag may be modified after creation. By default
- +# it won't be.
- +# hooks.allowdeletebranch
- +# This boolean sets whether deleting branches will be allowed in the
- +# repository. By default they won't be.
- +# hooks.denycreatebranch
- +# This boolean sets whether remotely creating branches will be denied
- +# in the repository. By default this is allowed.
- +#
- +
- +# --- Command line
- +refname="$1"
- +oldrev="$2"
- +newrev="$3"
- +
- +# --- Safety check
- +if [ -z "$GIT_DIR" ]; then
- + echo "Don't run this script from the command line." >&2
- + echo " (if you want, you could supply GIT_DIR then run" >&2
- + echo " $0 <ref> <oldrev> <newrev>)" >&2
- + exit 1
- +fi
- +
- +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
- + echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
- + exit 1
- +fi
- +
- +# --- Config
- +allowunannotated=$(git config --bool hooks.allowunannotated)
- +allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
- +denycreatebranch=$(git config --bool hooks.denycreatebranch)
- +allowdeletetag=$(git config --bool hooks.allowdeletetag)
- +allowmodifytag=$(git config --bool hooks.allowmodifytag)
- +
- +# check for no description
- +projectdesc=$(sed -e '1q' "$GIT_DIR/description")
- +case "$projectdesc" in
- +"Unnamed repository"* | "")
- + echo "*** Project description file hasn't been set" >&2
- + exit 1
- + ;;
- +esac
- +
- +# --- Check types
- +# if $newrev is 0000...0000, it's a commit to delete a ref.
- +zero="0000000000000000000000000000000000000000"
- +if [ "$newrev" = "$zero" ]; then
- + newrev_type=delete
- +else
- + newrev_type=$(git cat-file -t $newrev)
- +fi
- +
- +case "$refname","$newrev_type" in
- + refs/tags/*,commit)
- + # un-annotated tag
- + short_refname=${refname##refs/tags/}
- + if [ "$allowunannotated" != "true" ]; then
- + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
- + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
- + exit 1
- + fi
- + ;;
- + refs/tags/*,delete)
- + # delete tag
- + if [ "$allowdeletetag" != "true" ]; then
- + echo "*** Deleting a tag is not allowed in this repository" >&2
- + exit 1
- + fi
- + ;;
- + refs/tags/*,tag)
- + # annotated tag
- + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
- + then
- + echo "*** Tag '$refname' already exists." >&2
- + echo "*** Modifying a tag is not allowed in this repository." >&2
- + exit 1
- + fi
- + ;;
- + refs/heads/*,commit)
- + # branch
- + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
- + echo "*** Creating a branch is not allowed in this repository" >&2
- + exit 1
- + fi
- + ;;
- + refs/heads/*,delete)
- + # delete branch
- + if [ "$allowdeletebranch" != "true" ]; then
- + echo "*** Deleting a branch is not allowed in this repository" >&2
- + exit 1
- + fi
- + ;;
- + refs/remotes/*,commit)
- + # tracking branch
- + ;;
- + refs/remotes/*,delete)
- + # delete tracking branch
- + if [ "$allowdeletebranch" != "true" ]; then
- + echo "*** Deleting a tracking branch is not allowed in this repository" >&2
- + exit 1
- + fi
- + ;;
- + *)
- + # Anything else (is there anything else?)
- + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
- + exit 1
- + ;;
- +esac
- +
- +# --- Finished
- +exit 0
- Binary files uClibc-0.9.33.2/.git/index and uClibc/.git/index differ
- diff -Nur uClibc-0.9.33.2/.git/info/exclude uClibc/.git/info/exclude
- --- uClibc-0.9.33.2/.git/info/exclude 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/info/exclude 2014-02-03 12:32:33.000000000 +0100
- @@ -0,0 +1,6 @@
- +# git ls-files --others --exclude-from=.git/info/exclude
- +# Lines that start with '#' are comments.
- +# For a project mostly in C, the following would be a good set of
- +# exclude patterns (uncomment them if you want to use them):
- +# *.[oa]
- +# *~
- diff -Nur uClibc-0.9.33.2/.git/logs/HEAD uClibc/.git/logs/HEAD
- --- uClibc-0.9.33.2/.git/logs/HEAD 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/logs/HEAD 2014-02-15 14:18:15.000000000 +0100
- @@ -0,0 +1,2 @@
- +0000000000000000000000000000000000000000 70a04a287a2875c82e6822c36e071afba5b63a62 Waldemar Brodkorb <wbx@openadk.org> 1391427176 +0100 clone: from git://git.busybox.net/uClibc
- +70a04a287a2875c82e6822c36e071afba5b63a62 79c0857a828abb3f7ec9582a01d706e0ce81f84c Waldemar Brodkorb <wbx@openadk.org> 1392470295 +0100 pull: Fast-forward
- diff -Nur uClibc-0.9.33.2/.git/logs/refs/heads/master uClibc/.git/logs/refs/heads/master
- --- uClibc-0.9.33.2/.git/logs/refs/heads/master 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/logs/refs/heads/master 2014-02-15 14:18:15.000000000 +0100
- @@ -0,0 +1,2 @@
- +0000000000000000000000000000000000000000 70a04a287a2875c82e6822c36e071afba5b63a62 Waldemar Brodkorb <wbx@openadk.org> 1391427176 +0100 clone: from git://git.busybox.net/uClibc
- +70a04a287a2875c82e6822c36e071afba5b63a62 79c0857a828abb3f7ec9582a01d706e0ce81f84c Waldemar Brodkorb <wbx@openadk.org> 1392470295 +0100 pull: Fast-forward
- diff -Nur uClibc-0.9.33.2/.git/logs/refs/remotes/origin/HEAD uClibc/.git/logs/refs/remotes/origin/HEAD
- --- uClibc-0.9.33.2/.git/logs/refs/remotes/origin/HEAD 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/logs/refs/remotes/origin/HEAD 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1 @@
- +0000000000000000000000000000000000000000 70a04a287a2875c82e6822c36e071afba5b63a62 Waldemar Brodkorb <wbx@openadk.org> 1391427176 +0100 clone: from git://git.busybox.net/uClibc
- diff -Nur uClibc-0.9.33.2/.git/logs/refs/remotes/origin/master uClibc/.git/logs/refs/remotes/origin/master
- --- uClibc-0.9.33.2/.git/logs/refs/remotes/origin/master 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/logs/refs/remotes/origin/master 2014-02-15 14:18:14.000000000 +0100
- @@ -0,0 +1 @@
- +70a04a287a2875c82e6822c36e071afba5b63a62 79c0857a828abb3f7ec9582a01d706e0ce81f84c Waldemar Brodkorb <wbx@openadk.org> 1392470294 +0100 pull: fast-forward
- Binary files uClibc-0.9.33.2/.git/objects/0e/bc50737b3e6b5e1cfc2575cdb5856bc3a7b9cb and uClibc/.git/objects/0e/bc50737b3e6b5e1cfc2575cdb5856bc3a7b9cb differ
- Binary files uClibc-0.9.33.2/.git/objects/14/0de438ef68ec111ad506f27518f89b5da59b7a and uClibc/.git/objects/14/0de438ef68ec111ad506f27518f89b5da59b7a differ
- Binary files uClibc-0.9.33.2/.git/objects/18/e77de12f0a42964be8fa35bdef982e54a72937 and uClibc/.git/objects/18/e77de12f0a42964be8fa35bdef982e54a72937 differ
- Binary files uClibc-0.9.33.2/.git/objects/24/62d12b78c0ed968bd0ce893291c18072e41709 and uClibc/.git/objects/24/62d12b78c0ed968bd0ce893291c18072e41709 differ
- Binary files uClibc-0.9.33.2/.git/objects/28/d75113146200df1aebe56bbcd41672d2425e02 and uClibc/.git/objects/28/d75113146200df1aebe56bbcd41672d2425e02 differ
- Binary files uClibc-0.9.33.2/.git/objects/29/fc346a393a9c2a66bc3d7ae61cfa67697bde3a and uClibc/.git/objects/29/fc346a393a9c2a66bc3d7ae61cfa67697bde3a differ
- Binary files uClibc-0.9.33.2/.git/objects/2d/de9afa493506e18ae4378edd211f399c2368d1 and uClibc/.git/objects/2d/de9afa493506e18ae4378edd211f399c2368d1 differ
- Binary files uClibc-0.9.33.2/.git/objects/3c/80ed54465c0dba407787a161ff493a7698372f and uClibc/.git/objects/3c/80ed54465c0dba407787a161ff493a7698372f differ
- Binary files uClibc-0.9.33.2/.git/objects/42/6946ea54469a07735f90ca2a0cc4b2f263fe8f and uClibc/.git/objects/42/6946ea54469a07735f90ca2a0cc4b2f263fe8f differ
- Binary files uClibc-0.9.33.2/.git/objects/47/21ac5f837481ef9bfec853a2326c0aa1948011 and uClibc/.git/objects/47/21ac5f837481ef9bfec853a2326c0aa1948011 differ
- Binary files uClibc-0.9.33.2/.git/objects/4d/30d31d252aeea81b1fe63ac25094a0cf18870e and uClibc/.git/objects/4d/30d31d252aeea81b1fe63ac25094a0cf18870e differ
- Binary files uClibc-0.9.33.2/.git/objects/65/a55a7742dc7fee21749c7f3ed443f81a8afce9 and uClibc/.git/objects/65/a55a7742dc7fee21749c7f3ed443f81a8afce9 differ
- Binary files uClibc-0.9.33.2/.git/objects/66/405aba800d98baf78b6e3bd2c59a37e1941124 and uClibc/.git/objects/66/405aba800d98baf78b6e3bd2c59a37e1941124 differ
- Binary files uClibc-0.9.33.2/.git/objects/6c/b02cc14f2b02594dfd189904cb828d9c54330a and uClibc/.git/objects/6c/b02cc14f2b02594dfd189904cb828d9c54330a differ
- Binary files uClibc-0.9.33.2/.git/objects/6f/f1feb249f602ca057b91808e575feb3f2028e1 and uClibc/.git/objects/6f/f1feb249f602ca057b91808e575feb3f2028e1 differ
- diff -Nur uClibc-0.9.33.2/.git/objects/79/c0857a828abb3f7ec9582a01d706e0ce81f84c uClibc/.git/objects/79/c0857a828abb3f7ec9582a01d706e0ce81f84c
- --- uClibc-0.9.33.2/.git/objects/79/c0857a828abb3f7ec9582a01d706e0ce81f84c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/objects/79/c0857a828abb3f7ec9582a01d706e0ce81f84c 2014-02-15 14:18:13.000000000 +0100
- @@ -0,0 +1,5 @@
- +x•‘ÑJå0†½ÎSÌ¥¢§¤iÚ´"¢Â
- +^,,çøifÒÛ´$©Ð·ßÙEðF¼þù柟³Ì³KP—ê""([R
- +©–k)ºFöÔZ]Õ=’íZAµÔJt•b«äPm�õœP¡ídÙXĆ+®-W¦•²5JèŠ3½¥q pJôNðkšípé£x˜Ý³Ì÷PV�µ�‚o9gYÍx¢àGŽ´%Oáðì¢sã.ÐZà’
- +¿¬Ã¬Ýôé%ë¶ë*¸æeöbýæ&Œ{¼…GDøýòçÔÈ£€¸ëc¯ÙŽÀÅÿ
- +Øù®‘—¡¼=Ò¸ƒó°™ÉõæÒ˜q3j?hÄø‚õûYp~È}.3‹·n€wœî§<ä1Ï“y;“ùÙû¸M‹Y¿Œ�Üà ‹µ‡~¿ýî~_ñŸÞŒý§”¬¨
- \ No newline at end of file
- diff -Nur uClibc-0.9.33.2/.git/objects/7b/797aa69e836cba4f4ca9ce88811dfaf6538bec uClibc/.git/objects/7b/797aa69e836cba4f4ca9ce88811dfaf6538bec
- --- uClibc-0.9.33.2/.git/objects/7b/797aa69e836cba4f4ca9ce88811dfaf6538bec 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/objects/7b/797aa69e836cba4f4ca9ce88811dfaf6538bec 2014-02-15 14:18:13.000000000 +0100
- @@ -0,0 +1,4 @@
- +x•Ž»NÄ0E©ýîQ²~$~¬VhE±ô Ñ
- +Çžd-mâÈž ò÷˜†‚
- +Š«+ÝÑŸæ9"•¦¿Ã@E§DàbÐÆ3V™!0ÆJa¹ç†i×Ì’ÕeX�ž+;%¹ì‚Ѓ•ï<ŒÂ2í¹ó=@Yâ6¼¦L_ã€ôi[ÑÑÓÇôÝç²/i-{i}š(—–+SÃé=ë%#uŽ™>B^®.ú.�›K,þZ§k¶tžfo?,ÑõÆp]Yœ1B
- +ðVX°©ý¦ó~¤—øI‡-Þ…œS.„¼Äi�Фql†ýøñßÿ•%_4²€8
- \ No newline at end of file
- Binary files uClibc-0.9.33.2/.git/objects/7c/70e0e8c2e16b94b13c8f97bfe23cbd0cf88d0d and uClibc/.git/objects/7c/70e0e8c2e16b94b13c8f97bfe23cbd0cf88d0d differ
- Binary files uClibc-0.9.33.2/.git/objects/7d/c67683b172b61c3c3419654010d25776213bfe and uClibc/.git/objects/7d/c67683b172b61c3c3419654010d25776213bfe differ
- Binary files uClibc-0.9.33.2/.git/objects/86/873ac7b282033ba9719a6c6fda6a3145a27c3e and uClibc/.git/objects/86/873ac7b282033ba9719a6c6fda6a3145a27c3e differ
- Binary files uClibc-0.9.33.2/.git/objects/87/4d5790aee0846cd389284be69708849aeb09e7 and uClibc/.git/objects/87/4d5790aee0846cd389284be69708849aeb09e7 differ
- Binary files uClibc-0.9.33.2/.git/objects/8d/4ed92109fa22093e19c7f042a80630fc63240a and uClibc/.git/objects/8d/4ed92109fa22093e19c7f042a80630fc63240a differ
- Binary files uClibc-0.9.33.2/.git/objects/96/f12aea29db0aa1f5216e517df356c9060d59b1 and uClibc/.git/objects/96/f12aea29db0aa1f5216e517df356c9060d59b1 differ
- Binary files uClibc-0.9.33.2/.git/objects/99/66de808330544a0f52aae5a75293d41d694e07 and uClibc/.git/objects/99/66de808330544a0f52aae5a75293d41d694e07 differ
- Binary files uClibc-0.9.33.2/.git/objects/b4/0d2947a232e86355c3730024a9bdab749c74ab and uClibc/.git/objects/b4/0d2947a232e86355c3730024a9bdab749c74ab differ
- Binary files uClibc-0.9.33.2/.git/objects/b9/68d3c76d43e4e7fad72c6b399b054d5a9d1a90 and uClibc/.git/objects/b9/68d3c76d43e4e7fad72c6b399b054d5a9d1a90 differ
- Binary files uClibc-0.9.33.2/.git/objects/ce/0a147b0c57618fdb6c9dd975d8d26075f0cc44 and uClibc/.git/objects/ce/0a147b0c57618fdb6c9dd975d8d26075f0cc44 differ
- Binary files uClibc-0.9.33.2/.git/objects/d5/01d7c80b92ea4aff6164f442ec528ac2eadbda and uClibc/.git/objects/d5/01d7c80b92ea4aff6164f442ec528ac2eadbda differ
- Binary files uClibc-0.9.33.2/.git/objects/da/5dfbb5c874b58d8ea701ce861f5303cdd7fae9 and uClibc/.git/objects/da/5dfbb5c874b58d8ea701ce861f5303cdd7fae9 differ
- diff -Nur uClibc-0.9.33.2/.git/objects/da/ec1677463134d27b3f6c4cef2907c1ac51be69 uClibc/.git/objects/da/ec1677463134d27b3f6c4cef2907c1ac51be69
- --- uClibc-0.9.33.2/.git/objects/da/ec1677463134d27b3f6c4cef2907c1ac51be69 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/objects/da/ec1677463134d27b3f6c4cef2907c1ac51be69 2014-02-15 14:18:13.000000000 +0100
- @@ -0,0 +1,2 @@
- +x¥PKnÄ ëšS¼}›ˆÂg4ªª.z€öxI�D„¨êí›9BÕ…½°d˶/)Å£ÖO�Ñ2LÚr$âF*Fc…‘Ž”ÕÜi‘·¤ÙŽ•rÍ‘KF?0y#H!ü¨ˆëg‡“S#*Áðlk©ðN5¯X|ÒÙ2Õî#~¥
- +÷J{JësÙß–„që}I¯0ŒVÈIiià™œ³K½·Ëòÿ,¶EçopÄ�²'øÆšc^ f˜ÛÁ˜Tk.„| ôrqJ�é×mål=c_qɺ2Ï�û¹ý¹û²{{í
- \ No newline at end of file
- Binary files uClibc-0.9.33.2/.git/objects/e5/cde2eb0ed7df9416fdd6070af07c8448c72a30 and uClibc/.git/objects/e5/cde2eb0ed7df9416fdd6070af07c8448c72a30 differ
- Binary files uClibc-0.9.33.2/.git/objects/e6/3736205fad3f7303cac1ea5469989c645de9cf and uClibc/.git/objects/e6/3736205fad3f7303cac1ea5469989c645de9cf differ
- Binary files uClibc-0.9.33.2/.git/objects/f4/42a777057435a87f6d634b6bfbc6c6401e5ace and uClibc/.git/objects/f4/42a777057435a87f6d634b6bfbc6c6401e5ace differ
- Binary files uClibc-0.9.33.2/.git/objects/pack/pack-41402b140fd3c43322337664fd03e7b208708616.idx and uClibc/.git/objects/pack/pack-41402b140fd3c43322337664fd03e7b208708616.idx differ
- Binary files uClibc-0.9.33.2/.git/objects/pack/pack-41402b140fd3c43322337664fd03e7b208708616.pack and uClibc/.git/objects/pack/pack-41402b140fd3c43322337664fd03e7b208708616.pack differ
- diff -Nur uClibc-0.9.33.2/.git/ORIG_HEAD uClibc/.git/ORIG_HEAD
- --- uClibc-0.9.33.2/.git/ORIG_HEAD 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/ORIG_HEAD 2014-02-12 15:30:21.000000000 +0100
- @@ -0,0 +1 @@
- +70a04a287a2875c82e6822c36e071afba5b63a62
- diff -Nur uClibc-0.9.33.2/.git/packed-refs uClibc/.git/packed-refs
- --- uClibc-0.9.33.2/.git/packed-refs 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/packed-refs 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,105 @@
- +# pack-refs with: peeled
- +80a6c6d96c6201146c4c9d988d16e14243c5664f refs/remotes/origin/0.9.31
- +c408f8f42a9bb5d765432e8cbfd686ccfb70a2c2 refs/remotes/origin/0.9.32
- +7706cd4737ddb89e9b4937936e614d87d1abbd49 refs/remotes/origin/0.9.33
- +a6dfcd03425656208fc548c75f955016c26e8f71 refs/remotes/origin/0_9_28
- +560de2b96857bc26540eb31de44d0e653ad5a4e6 refs/remotes/origin/0_9_29
- +1555437358f20102bc4c2d17a3f6ad361acde5ed refs/remotes/origin/0_9_30
- +5c2f94e7b4223939524cee0f40057a155704127c refs/remotes/origin/future
- +099ecfb6536497eed33a30307b0ba52daab3ccef refs/remotes/origin/ldso-future
- +70a04a287a2875c82e6822c36e071afba5b63a62 refs/remotes/origin/master
- +1c1391e6e507337103f2c7ce4da768b2842a8aa1 refs/remotes/origin/prelink
- +dd4643de1c22376872e7504926ef020f04098898 refs/remotes/origin/superh_fdpic
- +ef2b7af8f296fa089cc3d3823d51cee29b4e2514 refs/tags/0.9.31
- +2b06a997780c53d52a457d40d5dc9fd04ba405c0 refs/tags/0.9.31-rc1
- +0f3059f9a2e27383f14c5fb621cc8c50be45d6d1 refs/tags/0_9_1
- +^64bc6412188b141c010ac3b8e813b837dd991e80
- +207cd42ed7e1635bc37df68d8e319a050bcdf855 refs/tags/0_9_10
- +^6105b44d65f7f1fed172e557bc161883d9f6db5d
- +2f2cde90678e741cb84e41a1b857ec44c97b7f90 refs/tags/0_9_11
- +^f1fc9dcae4beb6f37cb4e1450f5efa3f8b71e848
- +1070020616152a545fc31760c9a7f7e00037e2be refs/tags/0_9_12
- +^10b154404baf8ab8e16f9bce6bf0371f8f5f2ad6
- +4840761c2da4971b2e1e5ec2cac8f2b4e987e00e refs/tags/0_9_13
- +^61a6fc697a9ebb0893895ee06fade5303647171d
- +aa81c2ac206ee3dcbc2baa565d4d1fa3875ae043 refs/tags/0_9_14
- +^66ec482f2f57460e796b82e570bd143f5db04b1d
- +5115bb268509cb675924bd10aa38cb47cff1dc47 refs/tags/0_9_15
- +^e891326e495ff3258e1b331c61131aec54be5fed
- +99a670e91ae78e91539ba02c284239c4e0cba8cd refs/tags/0_9_16
- +^c159d8fb27d14f3e1fa8d743a30c652a6158eff2
- +4bb159c8df7dc19645bc8a3808d026f95c2ac814 refs/tags/0_9_17
- +^aa1a0cd1cf9b9795fda883dae9ac0873644be7ae
- +32256fdbe92642ecfa961ca4772bf9c20f02b8f6 refs/tags/0_9_18
- +^7d7d0766d2b4950c0b82b646ddc9bed3bfd04f63
- +08b067f3c26079955ef0288ebad12603859fbc11 refs/tags/0_9_19
- +^2229d0fa131387b9b8ad16ac88347350a080aeb5
- +8d810986bbd565a31b76e6146c071d5b576985f1 refs/tags/0_9_1a
- +^e9efa23ae121c8976e5dc2bbcf29e029b5087e76
- +c9362f57d817d92c8417154e7716015a3dc5a80f refs/tags/0_9_20
- +^db2863760e4ccb921b9944078c99d80cc293f3ed
- +76ffcf2b1e9fb9c0ae9205be402e9482236772c6 refs/tags/0_9_21
- +^83d06c569c280324874460374f5b2ca3ebe63263
- +f40db7c4bbd5e86a16540df64ed0206ca767607a refs/tags/0_9_22
- +^52214b70d834ce2408da3084865565fcb81ec4f2
- +93e3e0133ac127e9c0f7a8cbe60b6b4b95faca05 refs/tags/0_9_23
- +^85bfb82ad8457167b83c1f5788c30407fbf2c9a7
- +ecdc2c1f8102fe1182e70f04f52abf3ad9334c8b refs/tags/0_9_24
- +^50a55e30e36a5571522e35146ff583c18fc9137d
- +c3988caefac98b0d9b82de36c6f1dacca207bac6 refs/tags/0_9_25
- +^cf0dfb8e9c3968cfcc045092993eb9fffbfca1bd
- +2a2520ea685c2c54417ea6e6370501664fe6c3e8 refs/tags/0_9_26
- +^10b3e8a6a34ef514e39b273ca70e0428ef066446
- +f84f641b3ae98fc073dfb77c8610219a8d14fc84 refs/tags/0_9_27
- +^9acf46c0c74008440f6dfc4d09d82934a56ecd18
- +79d214ff786d3c080f24ec905acdc4ea8e3f4ee3 refs/tags/0_9_27_1
- +^2e6ce6501cd684f4d429b208c411d0d911209076
- +f9400c75addd3d906ea801d72a01c2e9e7fd3f5c refs/tags/0_9_28
- +^19d7c347f8405875e9dcd9ff532eb4942d3702a1
- +d88d365ff0999d33122fb95298176a744f25ca15 refs/tags/0_9_28_1
- +^eb2db570c102e6b90a096baa228a6ec00881753d
- +bce26a6b7556e4c1fe5782f0e06edc2b6faf8ea6 refs/tags/0_9_29
- +^d7afbd04ac00d81bed7da49f0a412081fe4288a1
- +37e8d8164fe3d516ee5d491165784eefad01d91f refs/tags/0_9_29_rc1
- +^f8dbd3102f98716ae0801ca540ab0867d7c90b1b
- +d41499b167b68d79d886be5eb768a4efd9450e54 refs/tags/0_9_30
- +^534e76b4096704ef8c2abe6f39d58ce464b24bde
- +b23e96c8c461b9f494f8f8aac129ffe8b915881f refs/tags/0_9_30_1
- +^57dded090d6bf7f0cf18f27d8b5d86084c5cfd4c
- +aa319dcdbb0a14ec6d392c0dabf0aed873d26a46 refs/tags/0_9_30_2
- +0c4bc968f88206effc215db62859f81671e94afb refs/tags/0_9_30_3
- +d817b1697a4b36d0c0a82114febb4305939afcd4 refs/tags/0_9_30_rc1
- +^c50c578d813fd9424489cc1c30b178baf4482576
- +7e779e91d23ad0d864bfdbd90acf322ee04334db refs/tags/0_9_30_rc2
- +^c50c578d813fd9424489cc1c30b178baf4482576
- +3b0e15fc76dd075a16fde1545592be7d64f4d99c refs/tags/0_9_30_rc3
- +^61d8b174aae08e0cecc71a333c6fea3bc5d7dcd5
- +74e5505940fb4ca2c8198f4020ec9978b99e73dc refs/tags/0_9_8
- +^aa6ece7553a806b57d88ae27be62d69c32aabc4e
- +ad4dc0c21b4545f572bc21da171ca81c828ee1f0 refs/tags/0_9_9
- +^1a88f482efbd802fdb17a12280fd4484d127270f
- +993d096fb31fc2802ed86a82739eac152ee183dc refs/tags/2001_11_23_mdad
- +^c62ed90c4c01a3068ab8fbe3a950200e82525ef6
- +af5fbf7bde16896335eb21d353392c1176f746b2 refs/tags/nptl_merge
- +^a63e523a5ee5599ce83fe7a964fa69d25d5d04ac
- +9bd43a50fea3a12355d400fccf2328a2b492c526 refs/tags/svn_nptl
- +^8a40b252bbaa91fffae6c9ebd88dbb90867a7e2f
- +ef2b7af8f296fa089cc3d3823d51cee29b4e2514 refs/tags/v0.9.31
- +2b06a997780c53d52a457d40d5dc9fd04ba405c0 refs/tags/v0.9.31-rc1
- +132257ad713476c3bcb1afa75da5e64ac1b9e6ce refs/tags/v0.9.31.1
- +^7f7f3e240f5f51976ffed2f1aa11f8a83771ec2a
- +7072abfd63d4f3ddd8b9b0519f61af6a9b21e61a refs/tags/v0.9.32
- +^22e153b5c94c10bd10120bd34a936686514a2299
- +18e751d0d4cafb0d38b04346ce44da1960d14904 refs/tags/v0.9.32-rc1
- +^f7222d84d3d5ae5d5efbf320ce9959020ec07993
- +253baa84a3a340b733fcc645049defed43ce9c6a refs/tags/v0.9.32-rc2
- +^541f53cf24819079242079c5da79d9c5df9a27a8
- +3473ffa4f4c8842a591679c05f6c30aaa24ce455 refs/tags/v0.9.32-rc3
- +^e172884f39f960ed3cf879fb66c6f4fc1846c42d
- +ea7390660d2522d153d073686be48b12c2f7c2c1 refs/tags/v0.9.32.1
- +8c0b2c2886479b39cb345491fc0fa279d6d4b4bb refs/tags/v0.9.33
- +8b443d4425d36ad458633a830ceafeb550a26a43 refs/tags/v0.9.33-rc1
- +3863b7947698c38a025a889c6083913f381049a3 refs/tags/v0.9.33.1
- +^71873086975c1a7af5a5b94e9c3d77dcde556788
- +8bb52c73b5889e3f8af83aacfb4f05a4fac17e80 refs/tags/v0.9.33.2
- +^e12ceeed5a1af59e6b0fc7debf4bb0a90e0acde6
- diff -Nur uClibc-0.9.33.2/.git/refs/heads/master uClibc/.git/refs/heads/master
- --- uClibc-0.9.33.2/.git/refs/heads/master 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/refs/heads/master 2014-02-15 14:18:15.000000000 +0100
- @@ -0,0 +1 @@
- +79c0857a828abb3f7ec9582a01d706e0ce81f84c
- diff -Nur uClibc-0.9.33.2/.git/refs/remotes/origin/HEAD uClibc/.git/refs/remotes/origin/HEAD
- --- uClibc-0.9.33.2/.git/refs/remotes/origin/HEAD 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/refs/remotes/origin/HEAD 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1 @@
- +ref: refs/remotes/origin/master
- diff -Nur uClibc-0.9.33.2/.git/refs/remotes/origin/master uClibc/.git/refs/remotes/origin/master
- --- uClibc-0.9.33.2/.git/refs/remotes/origin/master 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/.git/refs/remotes/origin/master 2014-02-15 14:18:14.000000000 +0100
- @@ -0,0 +1 @@
- +79c0857a828abb3f7ec9582a01d706e0ce81f84c
- diff -Nur uClibc-0.9.33.2/.gitignore uClibc/.gitignore
- --- uClibc-0.9.33.2/.gitignore 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/.gitignore 2014-02-03 12:32:56.000000000 +0100
- @@ -25,6 +25,7 @@
- .gdb_history
- .gdbinit
- core
- +*.c.[0-9][0-9][0-9]t.*
-
- #
- # Backups / patches
- diff -Nur uClibc-0.9.33.2/include/alloca.h uClibc/include/alloca.h
- --- uClibc-0.9.33.2/include/alloca.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/alloca.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ALLOCA_H
- #define _ALLOCA_H 1
- diff -Nur uClibc-0.9.33.2/include/ar.h uClibc/include/ar.h
- --- uClibc-0.9.33.2/include/ar.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/ar.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _AR_H
- #define _AR_H 1
- diff -Nur uClibc-0.9.33.2/include/arpa/inet.h uClibc/include/arpa/inet.h
- --- uClibc-0.9.33.2/include/arpa/inet.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/arpa/inet.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ARPA_INET_H
- #define _ARPA_INET_H 1
- @@ -32,7 +31,7 @@
-
- /* Convert Internet host address from numbers-and-dots notation in CP
- into binary data in network byte order. */
- -extern in_addr_t inet_addr (__const char *__cp) __THROW;
- +extern in_addr_t inet_addr (const char *__cp) __THROW;
- libc_hidden_proto(inet_addr)
-
- /* Return the local host address part of the Internet address in IN. */
- @@ -50,7 +49,7 @@
-
- /* Extract the network number in network byte order from the address
- in numbers-and-dots natation starting at CP. */
- -extern in_addr_t inet_network (__const char *__cp) __THROW;
- +extern in_addr_t inet_network (const char *__cp) __THROW;
- libc_hidden_proto(inet_network)
-
- /* Convert Internet number in IN to ASCII representation. The return value
- @@ -60,20 +59,19 @@
- #ifdef __UCLIBC__
- /* Recursion-safe flavor */
- extern char *inet_ntoa_r (struct in_addr __in, char *__buf) __THROW;
- -libc_hidden_proto(inet_ntoa_r)
- #endif
-
- /* Convert from presentation format of an Internet number in buffer
- starting at CP to the binary network format and store result for
- interface type AF in buffer starting at BUF. */
- -extern int inet_pton (int __af, __const char *__restrict __cp,
- +extern int inet_pton (int __af, const char *__restrict __cp,
- void *__restrict __buf) __THROW;
- libc_hidden_proto(inet_pton)
-
- /* Convert a Internet address in binary network format for interface
- type AF in buffer starting at CP to presentation form and place
- result in buffer of length LEN astarting at BUF. */
- -extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
- +extern const char *inet_ntop (int __af, const void *__restrict __cp,
- char *__restrict __buf, socklen_t __len)
- __THROW;
- libc_hidden_proto(inet_ntop)
- @@ -83,7 +81,7 @@
- #ifdef __USE_MISC
- /* Convert Internet host address from numbers-and-dots notation in CP
- into binary data and store the result in the structure INP. */
- -extern int inet_aton (__const char *__cp, struct in_addr *__inp) __THROW;
- +extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;
- libc_hidden_proto(inet_aton)
-
- #if 0
- @@ -94,24 +92,24 @@
- /* Convert network number for interface type AF in buffer starting at
- CP to presentation format. The result will specifiy BITS bits of
- the number. */
- -extern char *inet_net_ntop (int __af, __const void *__cp, int __bits,
- +extern char *inet_net_ntop (int __af, const void *__cp, int __bits,
- char *__buf, size_t __len) __THROW;
-
- /* Convert network number for interface type AF from presentation in
- buffer starting at CP to network format and store result int
- buffer starting at BUF of size LEN. */
- -extern int inet_net_pton (int __af, __const char *__cp,
- +extern int inet_net_pton (int __af, const char *__cp,
- void *__buf, size_t __len) __THROW;
-
- /* Convert ASCII representation in hexadecimal form of the Internet
- address to binary form and place result in buffer of length LEN
- starting at BUF. */
- -extern unsigned int inet_nsap_addr (__const char *__cp,
- +extern unsigned int inet_nsap_addr (const char *__cp,
- unsigned char *__buf, int __len) __THROW;
-
- /* Convert internet address in binary form in LEN bytes starting at CP
- a presentation form and place result in BUF. */
- -extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp,
- +extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp,
- char *__buf) __THROW;
- #endif
- #endif
- diff -Nur uClibc-0.9.33.2/include/assert.h uClibc/include/assert.h
- --- uClibc-0.9.33.2/include/assert.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/assert.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.2 Diagnostics <assert.h>
- @@ -72,7 +71,7 @@
- # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
- # define __ASSERT_FUNCTION __func__
- # else
- -# define __ASSERT_FUNCTION ((__const char *) 0)
- +# define __ASSERT_FUNCTION ((const char *) 0)
- # endif
- # endif
-
- diff -Nur uClibc-0.9.33.2/include/atomic.h uClibc/include/atomic.h
- --- uClibc-0.9.33.2/include/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ATOMIC_H
- #define _ATOMIC_H 1
- diff -Nur uClibc-0.9.33.2/include/byteswap.h uClibc/include/byteswap.h
- --- uClibc-0.9.33.2/include/byteswap.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/byteswap.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BYTESWAP_H
- #define _BYTESWAP_H 1
- diff -Nur uClibc-0.9.33.2/include/cancel.h uClibc/include/cancel.h
- --- uClibc-0.9.33.2/include/cancel.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/include/cancel.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,101 @@
- +/* vi: set sw=4 ts=4: */
- +/*
- + * Copyright (C) 2000-2011 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _CANCEL_H
- +#define _CANCEL_H
- +
- +/*
- + * Usage of this header:
- + * 1. define a static or hidden function __NC(NAME) - expands to __NAME_nocancel
- + * 2. if it is hidden, add the prototype to the appropiate header where NAME has
- + * it's prototype (guarded by _LIBC)
- + * 3. add a CANCELLABLE_SYSCALL(...) line at the end, this will create the function
- + * NAME (as weak) with enabled cancellation for NPTL (and later for new LT), for
- + * LT_OLD it will also create a strong_alias to __libc_NAME to be used in libpthread
- + * 4. if you need libc_hidden_(weak|def) line, use instead lt_libc_hidden, this will
- + * take care of the correct type, weak or strong depending on the THREADS type
- + * 5. If the implementation can't be done using CANCELLABLE_SYSCALL (like for fcntl)
- + * you need to manually add lt_strong_alias() line too, to optionally create the
- + * __libc_NAME alias
- + * 6. if functions are needed to implement __NC(NAME), that themselves are cancellable,
- + * decide how the cancellation should be solved, two variants are possible:
- + * a. use the other function as __NC(FUNC), this way you access the non-cancellable
- + * variant and provide by CANCELLABLE_SYSCALL(...) the dedicated cancellation for NAME.
- + * be aware, that for this case __NC(FUNC) has to be hidden (not static)
- + * b. use the other function with it's name (FUNC) and add LIBC_CANCEL_HANDLED(); at
- + * the end of file with a comment telling us which function took care of the cancellation
- + * Note: LIBC_CANCEL_HANDLED() is noop on uClibc, glibc uses it only for tests, we use
- + * it only for "documentation".
- + *
- + * For now the use of this file is limited to libc, will expand later to support libpthread
- + * and librt as well.
- + */
- +
- +#include <features.h>
- +
- +#ifndef NOT_IN_libc
- +
- +#define __NC(name) _NC(name)
- +#define _NC(name) __##name##_nocancel
- +
- +#define __NC_OLD(name) _NC_OLD(name)
- +#define _NC_OLD(name) __libc_##name
- +
- +#define __NC_PROTO(name) extern __typeof(name) __NC(name) attribute_hidden;
- +#define __NC_OLD_PROTO(name) extern __typeof(name) __NC_OLD(name);
- +
- +#if defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__
- +# define __NEW_THREADS 1
- +#else
- +# define SINGLE_THREAD_P 1
- +#endif
- +
- +#ifdef __NEW_THREADS
- +# include <sysdep-cancel.h>
- +
- +# define CANCELLABLE_SYSCALL(res_type, name, param_list, params) \
- +res_type weak_function name param_list \
- +{ \
- + if (SINGLE_THREAD_P) \
- + return __NC(name) params; \
- + int oldtype = LIBC_CANCEL_ASYNC(); \
- + res_type result = __NC(name) params; \
- + LIBC_CANCEL_RESET(oldtype); \
- + return result; \
- +}
- +
- +# define lt_strong_alias(name)
- +# define lt_libc_hidden(name) libc_hidden_def(name)
- +
- +#elif defined __LINUXTHREADS_OLD__
- +
- +# define CANCELLABLE_SYSCALL(res_type, name, param_list, params) \
- +weak_alias(__NC(name),name) \
- +lt_strong_alias(name)
- +
- +# define lt_strong_alias(name) \
- +__NC_OLD_PROTO(name) \
- +strong_alias(name,__NC_OLD(name))
- +# define lt_libc_hidden(name) libc_hidden_weak(name)
- +
- +#else
- +
- +# define CANCELLABLE_SYSCALL(res_type, name, param_list, params) \
- +strong_alias(__NC(name),name)
- +
- +# define lt_strong_alias(name)
- +# define lt_libc_hidden(name) libc_hidden_def(name)
- +
- +#endif
- +
- +/* disable it, useless, glibc uses it only for tests */
- +# undef LIBC_CANCEL_HANDLED
- +# define LIBC_CANCEL_HANDLED()
- +
- +#endif /* NOT_IN_libc */
- +
- +#endif
- diff -Nur uClibc-0.9.33.2/include/complex.h uClibc/include/complex.h
- --- uClibc-0.9.33.2/include/complex.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/complex.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- +/* Copyright (C) 1997, 1998, 1999, 2000, 2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99: 7.3 Complex arithmetic <complex.h>
- @@ -84,7 +83,8 @@
-
- /* And the long double versions. It is non-critical to define them
- here unconditionally since `long double' is required in ISO C99. */
- -#if __STDC__ - 0 || __GNUC__ - 0 && defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
- +#if (__STDC__ - 0 || __GNUC__ - 0) \
- + && defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
- # ifndef _Mlong_double_
- # define _Mlong_double_ long double
- # endif
- diff -Nur uClibc-0.9.33.2/include/cpio.h uClibc/include/cpio.h
- --- uClibc-0.9.33.2/include/cpio.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/cpio.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _CPIO_H
- #define _CPIO_H 1
- diff -Nur uClibc-0.9.33.2/include/crypt.h uClibc/include/crypt.h
- --- uClibc-0.9.33.2/include/crypt.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/crypt.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,10 +12,8 @@
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- - *
- + * License along with the GNU C Library; see the file COPYING.LIB. If
- + * not, see <http://www.gnu.org/licenses/>.
- */
-
- #ifndef _CRYPT_H
- diff -Nur uClibc-0.9.33.2/include/ctype.h uClibc/include/ctype.h
- --- uClibc-0.9.33.2/include/ctype.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/ctype.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard 7.4: Character handling <ctype.h>
- diff -Nur uClibc-0.9.33.2/include/dirent.h uClibc/include/dirent.h
- --- uClibc-0.9.33.2/include/dirent.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/dirent.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1991-2000, 2003-2005, 2009 Free Software Foundation, Inc.
- +/* Copyright (C) 1991-2000,2003-2005,2009,2010 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 5.1.2 Directory Operations <dirent.h>
- @@ -132,7 +131,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern DIR *opendir (__const char *__name) __nonnull ((1));
- +extern DIR *opendir (const char *__name) __nonnull ((1));
- libc_hidden_proto(opendir)
-
- #ifdef __USE_XOPEN2K8
- @@ -224,7 +223,7 @@
- extern long int telldir (DIR *__dirp) __THROW __nonnull ((1));
- #endif
-
- -#if defined __USE_BSD || defined __USE_MISC || defined __XOPEN_2K8
- +#if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN2K8
-
- /* Return the file descriptor used by DIRP. */
- extern int dirfd (DIR *__dirp) __THROW __nonnull ((1));
- @@ -256,20 +255,20 @@
- sorted using qsort with CMP, and collected in a malloc'd array in
- *NAMELIST. Returns the number of entries selected, or -1 on error. */
- # ifndef __USE_FILE_OFFSET64
- -extern int scandir (__const char *__restrict __dir,
- +extern int scandir (const char *__restrict __dir,
- struct dirent ***__restrict __namelist,
- - int (*__selector) (__const struct dirent *),
- - int (*__cmp) (__const struct dirent **,
- - __const struct dirent **))
- + int (*__selector) (const struct dirent *),
- + int (*__cmp) (const struct dirent **,
- + const struct dirent **))
- __nonnull ((1, 2));
- # else
- # ifdef __REDIRECT
- extern int __REDIRECT (scandir,
- - (__const char *__restrict __dir,
- + (const char *__restrict __dir,
- struct dirent ***__restrict __namelist,
- - int (*__selector) (__const struct dirent *),
- - int (*__cmp) (__const struct dirent **,
- - __const struct dirent **)),
- + int (*__selector) (const struct dirent *),
- + int (*__cmp) (const struct dirent **,
- + const struct dirent **)),
- scandir64) __nonnull ((1, 2));
- # else
- # define scandir scandir64
- @@ -279,24 +278,24 @@
- # if defined __USE_GNU && defined __USE_LARGEFILE64
- /* This function is like `scandir' but it uses the 64bit dirent structure.
- Please note that the CMP function must now work with struct dirent64 **. */
- -extern int scandir64 (__const char *__restrict __dir,
- +extern int scandir64 (const char *__restrict __dir,
- struct dirent64 ***__restrict __namelist,
- - int (*__selector) (__const struct dirent64 *),
- - int (*__cmp) (__const struct dirent64 **,
- - __const struct dirent64 **))
- + int (*__selector) (const struct dirent64 *),
- + int (*__cmp) (const struct dirent64 **,
- + const struct dirent64 **))
- __nonnull ((1, 2));
- # endif
-
- /* Function to compare two `struct dirent's alphabetically. */
- # ifndef __USE_FILE_OFFSET64
- -extern int alphasort (__const struct dirent **__e1,
- - __const struct dirent **__e2)
- +extern int alphasort (const struct dirent **__e1,
- + const struct dirent **__e2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- # else
- # ifdef __REDIRECT
- extern int __REDIRECT_NTH (alphasort,
- - (__const struct dirent **__e1,
- - __const struct dirent **__e2),
- + (const struct dirent **__e1,
- + const struct dirent **__e2),
- alphasort64) __attribute_pure__ __nonnull ((1, 2));
- # else
- # define alphasort alphasort64
- @@ -304,14 +303,14 @@
- # endif
-
- # if defined __USE_GNU && defined __USE_LARGEFILE64
- -extern int alphasort64 (__const struct dirent64 **__e1,
- - __const struct dirent64 **__e2)
- +extern int alphasort64 (const struct dirent64 **__e1,
- + const struct dirent64 **__e2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- # endif
- #endif /* Use BSD or misc or XPG7. */
-
-
- -#if defined __USE_BSD || defined __USE_MISC
- +#if 0 /* defined __USE_BSD || defined __USE_MISC */
- /* Read directory entries from FD into BUF, reading at most NBYTES.
- Reading starts at offset *BASEP, and *BASEP is updated with the new
- position after reading. Returns the number of bytes read; zero when at
- @@ -344,14 +343,14 @@
- #ifdef __USE_GNU
- /* Function to compare two `struct dirent's by name & version. */
- # ifndef __USE_FILE_OFFSET64
- -extern int versionsort (__const struct dirent **__e1,
- - __const struct dirent **__e2)
- +extern int versionsort (const struct dirent **__e1,
- + const struct dirent **__e2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- # else
- # ifdef __REDIRECT
- extern int __REDIRECT_NTH (versionsort,
- - (__const struct dirent **__e1,
- - __const struct dirent **__e2),
- + (const struct dirent **__e1,
- + const struct dirent **__e2),
- versionsort64)
- __attribute_pure__ __nonnull ((1, 2));
- # else
- @@ -360,12 +359,19 @@
- # endif
-
- # ifdef __USE_LARGEFILE64
- -extern int versionsort64 (__const struct dirent64 **__e1,
- - __const struct dirent64 **__e2)
- +extern int versionsort64 (const struct dirent64 **__e1,
- + const struct dirent64 **__e2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- # endif
- #endif /* Use GNU. */
-
- __END_DECLS
-
- +#ifdef _LIBC
- +extern __ssize_t __getdents(int fd, char *buf, size_t count) attribute_hidden;
- +# ifdef __UCLIBC_HAS_LFS__
- +extern __ssize_t __getdents64 (int fd, char *buf, size_t count) attribute_hidden;
- +# endif
- +#endif
- +
- #endif /* dirent.h */
- diff -Nur uClibc-0.9.33.2/include/dlfcn.h uClibc/include/dlfcn.h
- --- uClibc-0.9.33.2/include/dlfcn.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/dlfcn.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,6 +1,5 @@
- /* User functions for run-time dynamic loading.
- - Copyright (C) 1995-1999,2000,2001,2003,2004,2006
- - Free Software Foundation, Inc.
- + Copyright (C) 1995-2001,2003,2004,2006,2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -14,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _DLFCN_H
- #define _DLFCN_H 1
- @@ -52,11 +50,12 @@
- # endif
- #endif
-
- +
- __BEGIN_DECLS
-
- /* Open the shared object FILE and map it in; return a handle that can be
- passed to `dlsym' to get symbol values from it. */
- -extern void *dlopen (__const char *__file, int __mode) __THROW;
- +extern void *dlopen (const char *__file, int __mode) __THROW;
-
- /* Unmap and close a shared object opened by `dlopen'.
- The handle cannot be used again after calling `dlclose'. */
- @@ -65,17 +64,17 @@
- /* Find the run-time address in the shared object HANDLE refers to
- of the symbol called NAME. */
- extern void *dlsym (void *__restrict __handle,
- - __const char *__restrict __name) __THROW __nonnull ((2));
- + const char *__restrict __name) __THROW __nonnull ((2));
-
- #if 0 /*def __USE_GNU*/
- /* Like `dlopen', but request object to be allocated in a new namespace. */
- -extern void *dlmopen (Lmid_t __nsid, __const char *__file, int __mode) __THROW;
- +extern void *dlmopen (Lmid_t __nsid, const char *__file, int __mode) __THROW;
-
- /* Find the run-time address in the shared object HANDLE refers to
- of the symbol called NAME with VERSION. */
- extern void *dlvsym (void *__restrict __handle,
- - __const char *__restrict __name,
- - __const char *__restrict __version)
- + const char *__restrict __name,
- + const char *__restrict __version)
- __THROW __nonnull ((2, 3));
- #endif
-
- @@ -90,20 +89,20 @@
- `dladdr'. */
- typedef struct
- {
- - __const char *dli_fname; /* File name of defining object. */
- + const char *dli_fname; /* File name of defining object. */
- void *dli_fbase; /* Load address of that object. */
- - __const char *dli_sname; /* Name of nearest symbol. */
- + const char *dli_sname; /* Name of nearest symbol. */
- void *dli_saddr; /* Exact value of nearest symbol. */
- } Dl_info;
-
- /* Fill in *INFO with the following information about ADDRESS.
- Returns 0 iff no shared object's segments contain that address. */
- -extern int dladdr (__const void *__address, Dl_info *__info)
- +extern int dladdr (const void *__address, Dl_info *__info)
- __THROW __nonnull ((2));
-
- #if 0 /* not supported by uClibc */
- /* Same as `dladdr', but additionally sets *EXTRA_INFO according to FLAGS. */
- -extern int dladdr1 (__const void *__address, Dl_info *__info,
- +extern int dladdr1 (const void *__address, Dl_info *__info,
- void **__extra_info, int __flags) __THROW __nonnull ((2));
-
- /* These are the possible values for the FLAGS argument to `dladdr1'.
- @@ -166,7 +165,7 @@
- segment, or if the calling thread has not allocated a block for it. */
- RTLD_DI_TLS_DATA = 10,
-
- - RTLD_DI_MAX = 10,
- + RTLD_DI_MAX = 10
- };
-
-
- @@ -186,12 +185,6 @@
- unsigned int dls_cnt; /* Number of elements in `dls_serpath'. */
- Dl_serpath dls_serpath[1]; /* Actually longer, dls_cnt elements. */
- } Dl_serinfo;
- -
- -#else
- -
- -/* Get information about the shared objects currently loaded */
- -extern int dlinfo (void);
- -
- #endif
- #endif /* __USE_GNU */
-
- diff -Nur uClibc-0.9.33.2/include/elf.h uClibc/include/elf.h
- --- uClibc-0.9.33.2/include/elf.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/elf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ELF_H
- #define _ELF_H 1
- @@ -148,8 +147,8 @@
- #define ELFOSABI_SYSV 0 /* Alias. */
- #define ELFOSABI_HPUX 1 /* HP-UX */
- #define ELFOSABI_NETBSD 2 /* NetBSD. */
- -#define ELFOSABI_LINUX 3 /* Linux. */
- -#define ELFOSABI_HURD 4 /* GNU/Hurd */
- +#define ELFOSABI_GNU 3 /* Object uses GNU ELF extensions. */
- +#define ELFOSABI_LINUX ELFOSABI_GNU /* Compatibility alias. */
- #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
- #define ELFOSABI_AIX 7 /* IBM AIX. */
- #define ELFOSABI_IRIX 8 /* SGI Irix. */
- @@ -260,6 +259,7 @@
- #define EM_PJ 91 /* picoJava */
- #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
- #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
- +#define EM_ARCOMPACT 93 /* ARCompact ISA based Cores: ARC 700 */
- #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
- #define EM_IP2K 101 /* Ubicom IP2022 micro controller */
- #define EM_CR 103 /* National Semiconductor CompactRISC */
- @@ -282,6 +282,9 @@
- unofficial e_machine number should eventually ask registry@caldera.com for
- an officially blessed number to be added to the list above. */
-
- +/* Imagination Technologies Meta */
- +#define EM_METAG 174
- +
- /* picoJava */
- #define EM_PJ_OLD 99
-
- @@ -3141,6 +3144,110 @@
- #define R_MICROBLAZE_COPY 21 /* runtime copy */
- #define R_MICROBLAZE_NUM 22
-
- +/* Meta relocations */
- +#define R_METAG_HIADDR16 0
- +#define R_METAG_LOADDR16 1
- +#define R_METAG_ADDR32 2
- +#define R_METAG_NONE 3
- +#define R_METAG_RELBRANCH 4
- +#define R_METAG_GETSETOFF 5
- +
- +/* Backward compatability */
- +#define R_METAG_REG32OP1 6
- +#define R_METAG_REG32OP2 7
- +#define R_METAG_REG32OP3 8
- +#define R_METAG_REG16OP1 9
- +#define R_METAG_REG16OP2 10
- +#define R_METAG_REG16OP3 11
- +#define R_METAG_REG32OP4 12
- +
- +#define R_METAG_HIOG 13
- +#define R_METAG_LOOG 14
- +
- +/* GNU */
- +#define R_METAG_GNU_VTINHERIT 30
- +#define R_METAG_GNU_VTENTRY 31
- +
- +/* PIC relocations */
- +#define R_METAG_HI16_GOTOFF 32
- +#define R_METAG_LO16_GOTOFF 33
- +#define R_METAG_GETSET_GOTOFF 34
- +#define R_METAG_GETSET_GOT 35
- +#define R_METAG_HI16_GOTPC 36
- +#define R_METAG_LO16_GOTPC 37
- +#define R_METAG_HI16_PLT 38
- +#define R_METAG_LO16_PLT 39
- +#define R_METAG_RELBRANCH_PLT 40
- +#define R_METAG_GOTOFF 41
- +#define R_METAG_PLT 42
- +#define R_METAG_COPY 43
- +#define R_METAG_JMP_SLOT 44
- +#define R_METAG_RELATIVE 45
- +#define R_METAG_GLOB_DAT 46
- +
- +/* TLS relocations */
- +#define R_METAG_TLS_TPOFF 56
- +#define R_METAG_TLS_DTPMOD 57
- +#define R_METAG_TLS_DTPOFF 58
- +
- +/* ARCompact specific relocs */
- +#define R_ARC_NONE 0x0
- +#define R_ARC_8 0x1
- +#define R_ARC_16 0x2
- +#define R_ARC_24 0x3
- +#define R_ARC_32 0x4
- +#define R_ARC_B26 0x5
- +#define R_ARC_B22_PCREL 0x6
- +#define R_ARC_H30 0x7
- +#define R_ARC_N8 0x8
- +#define R_ARC_N16 0x9
- +#define R_ARC_N24 0xA
- +#define R_ARC_N32 0xB
- +#define R_ARC_SDA 0xC
- +#define R_ARC_SECTOFF 0xD
- +#define R_ARC_S21H_PCREL 0xE
- +#define R_ARC_S21W_PCREL 0xF
- +#define R_ARC_S25H_PCREL 0x10
- +#define R_ARC_S25W_PCREL 0x11
- +#define R_ARC_SDA32 0x12
- +#define R_ARC_SDA_LDST 0x13
- +#define R_ARC_SDA_LDST1 0x14
- +#define R_ARC_SDA_LDST2 0x15
- +#define R_ARC_SDA16_LD 0x16
- +#define R_ARC_SDA16_LD1 0x17
- +#define R_ARC_SDA16_LD2 0x18
- +#define R_ARC_S13_PCREL 0x19
- +#define R_ARC_W 0x1A
- +#define R_ARC_32_ME 0x1B
- +#define R_ARC_N32_ME 0x1C
- +#define R_ARC_SECTOFF_ME 0x1D
- +#define R_ARC_SDA32_ME 0x1E
- +#define R_ARC_W_ME 0x1F
- +#define R_ARC_H30_ME 0x20
- +#define R_ARC_SECTOFF_U8 0x21
- +#define R_ARC_SECTOFF_S9 0x22
- +#define R_AC_SECTOFF_U8 0x23
- +#define R_AC_SECTOFF_U8_1 0x24
- +#define R_AC_SECTOFF_U8_2 0x25
- +#define R_AC_SECTOFF_S9 0x26
- +#define R_AC_SECTOFF_S9_1 0x27
- +#define R_AC_SECTOFF_S9_2 0x28
- +#define R_ARC_SECTOFF_ME_1 0x29
- +#define R_ARC_SECTOFF_ME_2 0x2A
- +#define R_ARC_SECTOFF_1 0x2B
- +#define R_ARC_SECTOFF_2 0x2C
- +#define R_ARC_PC32 0x32
- +#define R_ARC_GOTPC32 0x33
- +#define R_ARC_PLT32 0x34
- +#define R_ARC_COPY 0x35
- +#define R_ARC_GLOB_DAT 0x36
- +#define R_ARC_JMP_SLOT 0x37
- +#define R_ARC_RELATIVE 0x38
- +#define R_ARC_GOTOFF 0x39
- +#define R_ARC_GOTPC 0x3A
- +#define R_ARC_GOT32 0x3B
- +#define R_ARC_NUM 0x3C
- +
- #ifdef __cplusplus
- }
- #endif
- diff -Nur uClibc-0.9.33.2/include/endian.h uClibc/include/endian.h
- --- uClibc-0.9.33.2/include/endian.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/endian.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ENDIAN_H
- #define _ENDIAN_H 1
- @@ -55,6 +54,17 @@
- # define __LONG_LONG_PAIR(HI, LO) HI, LO
- #endif
-
- +#ifdef _LIBC
- +# ifndef __ASSEMBLER__
- +# include <stdint.h>
- +# define OFF_HI(offset) (offset >> 31)
- +# define OFF_LO(offset) (offset)
- +# define OFF64_HI(offset) (uint32_t)(offset >> 32)
- +# define OFF64_LO(offset) (uint32_t)(offset & 0xffffffff)
- +# define OFF_HI_LO(offset) __LONG_LONG_PAIR(OFF_HI(offset), OFF_LO(offset))
- +# define OFF64_HI_LO(offset) __LONG_LONG_PAIR(OFF64_HI(offset), OFF64_LO(offset))
- +# endif
- +#endif
-
- #ifdef __USE_BSD
- /* Conversion interfaces. */
- diff -Nur uClibc-0.9.33.2/include/err.h uClibc/include/err.h
- --- uClibc-0.9.33.2/include/err.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/err.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ERR_H
- #define _ERR_H 1
- @@ -32,30 +31,26 @@
-
- /* Print "program: ", FORMAT, ": ", the standard error string for errno,
- and a newline, on stderr. */
- -extern void warn (__const char *__format, ...)
- +extern void warn (const char *__format, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
- -extern void vwarn (__const char *__format, __gnuc_va_list)
- +extern void vwarn (const char *__format, __gnuc_va_list)
- __attribute__ ((__format__ (__printf__, 1, 0)));
- -libc_hidden_proto(vwarn)
-
- /* Likewise, but without ": " and the standard error string. */
- -extern void warnx (__const char *__format, ...)
- +extern void warnx (const char *__format, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
- -extern void vwarnx (__const char *__format, __gnuc_va_list)
- +extern void vwarnx (const char *__format, __gnuc_va_list)
- __attribute__ ((__format__ (__printf__, 1, 0)));
- -libc_hidden_proto(vwarnx)
-
- /* Likewise, and then exit with STATUS. */
- -extern void err (int __status, __const char *__format, ...)
- +extern void err (int __status, const char *__format, ...)
- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
- -extern void verr (int __status, __const char *__format, __gnuc_va_list)
- +extern void verr (int __status, const char *__format, __gnuc_va_list)
- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
- -libc_hidden_proto(verr)
- -extern void errx (int __status, __const char *__format, ...)
- +extern void errx (int __status, const char *__format, ...)
- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
- -extern void verrx (int __status, __const char *, __gnuc_va_list)
- +extern void verrx (int __status, const char *, __gnuc_va_list)
- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
- -libc_hidden_proto(verrx)
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/errno.h uClibc/include/errno.h
- --- uClibc-0.9.33.2/include/errno.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/errno.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.5 Errors <errno.h>
- @@ -47,6 +46,9 @@
- extern int errno;
- #endif
-
- +#ifdef _LIBC
- +extern const char *__progname, *__progname_full;
- +#endif
- #if defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
-
- /* The full and simple forms of the name with which the program was
- diff -Nur uClibc-0.9.33.2/include/error.h uClibc/include/error.h
- --- uClibc-0.9.33.2/include/error.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/error.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ERROR_H
- #define _ERROR_H 1
- diff -Nur uClibc-0.9.33.2/include/execinfo.h uClibc/include/execinfo.h
- --- uClibc-0.9.33.2/include/execinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/execinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _EXECINFO_H
- #define _EXECINFO_H 1
- @@ -30,13 +29,13 @@
-
- /* Return names of functions from the backtrace list in ARRAY in a newly
- malloc()ed memory block. */
- -extern char **backtrace_symbols (void *__const *__array, int __size)
- +extern char **backtrace_symbols (void *const *__array, int __size)
- __THROW __nonnull ((1));
-
-
- /* This function is similar to backtrace_symbols() but it writes the result
- immediately to a file. */
- -extern void backtrace_symbols_fd (void *__const *__array, int __size, int __fd)
- +extern void backtrace_symbols_fd (void *const *__array, int __size, int __fd)
- __THROW __nonnull ((1));
-
- __END_DECLS
- diff -Nur uClibc-0.9.33.2/include/fcntl.h uClibc/include/fcntl.h
- --- uClibc-0.9.33.2/include/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 6.5 File Control Operations <fcntl.h>
- @@ -75,7 +74,10 @@
- __THROW. */
- #if !defined(__USE_FILE_OFFSET64) || defined(__LP64__)
- extern int fcntl (int __fd, int __cmd, ...);
- +# ifdef _LIBC
- +extern int __fcntl_nocancel(int, int, long) attribute_hidden;
- libc_hidden_proto(fcntl)
- +# endif
- #else
- # ifdef __REDIRECT
- extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
- @@ -85,7 +87,10 @@
- #endif
- #if defined(__USE_LARGEFILE64) && !defined(__LP64__)
- extern int fcntl64 (int __fd, int __cmd, ...);
- +# ifdef _LIBC
- +extern int __fcntl64_nocancel(int, int, long) attribute_hidden;
- libc_hidden_proto(fcntl64)
- +# endif
- #endif
-
- /* Open FILE and return a new file descriptor for it, or -1 on error.
- @@ -95,18 +100,22 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- #ifndef __USE_FILE_OFFSET64
- -extern int open (__const char *__file, int __oflag, ...) __nonnull ((1));
- +extern int open (const char *__file, int __oflag, ...) __nonnull ((1));
- libc_hidden_proto(open)
- +# ifdef _LIBC
- +extern int __open2_nocancel(const char *, int) __nonnull ((1)) attribute_hidden;
- +extern int __open_nocancel(const char *, int, mode_t) __nonnull ((1)) attribute_hidden;
- +# endif
- #else
- # ifdef __REDIRECT
- -extern int __REDIRECT (open, (__const char *__file, int __oflag, ...), open64)
- +extern int __REDIRECT (open, (const char *__file, int __oflag, ...), open64)
- __nonnull ((1));
- # else
- # define open open64
- # endif
- #endif
- #ifdef __USE_LARGEFILE64
- -extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1));
- +extern int open64 (const char *__file, int __oflag, ...) __nonnull ((1));
- libc_hidden_proto(open64)
- #endif
-
- @@ -121,21 +130,20 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- # ifndef __USE_FILE_OFFSET64
- -extern int openat (int __fd, __const char *__file, int __oflag, ...)
- +extern int openat (int __fd, const char *__file, int __oflag, ...)
- __nonnull ((2));
- libc_hidden_proto(openat)
- # else
- # ifdef __REDIRECT
- -extern int __REDIRECT (openat, (int __fd, __const char *__file, int __oflag,
- +extern int __REDIRECT (openat, (int __fd, const char *__file, int __oflag,
- ...), openat64) __nonnull ((2));
- # else
- # define openat openat64
- # endif
- # endif
-
- -extern int openat64 (int __fd, __const char *__file, int __oflag, ...)
- +extern int openat64 (int __fd, const char *__file, int __oflag, ...)
- __nonnull ((2));
- -libc_hidden_proto(openat64)
- #endif
-
- /* Create and open FILE, with mode MODE. This takes an `int' MODE
- @@ -144,17 +152,17 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- #ifndef __USE_FILE_OFFSET64
- -extern int creat (__const char *__file, __mode_t __mode) __nonnull ((1));
- +extern int creat (const char *__file, __mode_t __mode) __nonnull ((1));
- #else
- # ifdef __REDIRECT
- -extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode),
- +extern int __REDIRECT (creat, (const char *__file, __mode_t __mode),
- creat64) __nonnull ((1));
- # else
- # define creat creat64
- # endif
- #endif
- #ifdef __USE_LARGEFILE64
- -extern int creat64 (__const char *__file, __mode_t __mode) __nonnull ((1));
- +extern int creat64 (const char *__file, __mode_t __mode) __nonnull ((1));
- #endif
-
- #if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
- @@ -184,7 +192,6 @@
- # endif
- # ifdef __USE_LARGEFILE64
- extern int lockf64 (int __fd, int __cmd, __off64_t __len);
- -libc_hidden_proto(lockf64)
- # endif
- #endif
-
- @@ -210,9 +217,7 @@
-
- #endif
-
- -#if 0 /* && defined __UCLIBC_HAS_ADVANCED_REALTIME__ */
- -
- -/* FIXME -- uClibc should probably implement these... */
- +#if defined __UCLIBC_HAS_ADVANCED_REALTIME__
-
- /* Reserve storage for the data of the file associated with FD.
-
- @@ -234,11 +239,6 @@
- # endif
- #endif
-
- -#ifdef _LIBC
- -extern int __fcntl_nocancel (int fd, int cmd, ...);
- -libc_hidden_proto(__fcntl_nocancel)
- -#endif
- -
- __END_DECLS
-
- #endif /* fcntl.h */
- diff -Nur uClibc-0.9.33.2/include/features.h uClibc/include/features.h
- --- uClibc-0.9.33.2/include/features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FEATURES_H
- #define _FEATURES_H 1
- diff -Nur uClibc-0.9.33.2/include/fenv.h uClibc/include/fenv.h
- --- uClibc-0.9.33.2/include/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 7.6: Floating-point environment <fenv.h>
- @@ -73,7 +72,7 @@
-
- /* Set complete status for exceptions indicated by EXCEPTS according to
- the representation in the object pointed to by FLAGP. */
- -extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) __THROW;
- +extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
-
- /* Determine which of subset of the exceptions specified by EXCEPTS are
- currently set. */
- @@ -102,12 +101,12 @@
-
- /* Establish the floating-point environment represented by the object
- pointed to by ENVP. */
- -extern int fesetenv (__const fenv_t *__envp) __THROW;
- +extern int fesetenv (const fenv_t *__envp) __THROW;
-
- /* Save current exceptions in temporary storage, install environment
- represented by object pointed to by ENVP and raise exceptions
- according to saved exceptions. */
- -extern int feupdateenv (__const fenv_t *__envp) __THROW;
- +extern int feupdateenv (const fenv_t *__envp) __THROW;
-
-
- /* Include optimization. */
- diff -Nur uClibc-0.9.33.2/include/fnmatch.h uClibc/include/fnmatch.h
- --- uClibc-0.9.33.2/include/fnmatch.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/fnmatch.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FNMATCH_H
- #define _FNMATCH_H 1
- @@ -23,14 +22,6 @@
- extern "C" {
- #endif
-
- -#ifndef const
- -# if (defined __STDC__ && __STDC__) || defined __cplusplus
- -# define __const const
- -# else
- -# define __const
- -# endif
- -#endif
- -
- /* We #undef these before defining them because some losing systems
- (HP-UX A.08.07 for example) define these in <unistd.h>. */
- #undef FNM_PATHNAME
- @@ -62,7 +53,7 @@
-
- /* Match NAME against the filename pattern PATTERN,
- returning zero if it matches, FNM_NOMATCH if not. */
- -extern int fnmatch (__const char *__pattern, __const char *__name,
- +extern int fnmatch (const char *__pattern, const char *__name,
- int __flags);
- libc_hidden_proto(fnmatch)
-
- diff -Nur uClibc-0.9.33.2/include/ftw.h uClibc/include/ftw.h
- --- uClibc-0.9.33.2/include/ftw.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/ftw.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * X/Open Portability Guide 4.2: ftw.h
- @@ -112,19 +111,19 @@
-
-
- /* Convenient types for callback functions. */
- -typedef int (*__ftw_func_t) (__const char *__filename,
- - __const struct stat *__status, int __flag);
- +typedef int (*__ftw_func_t) (const char *__filename,
- + const struct stat *__status, int __flag);
- #ifdef __USE_LARGEFILE64
- -typedef int (*__ftw64_func_t) (__const char *__filename,
- - __const struct stat64 *__status, int __flag);
- +typedef int (*__ftw64_func_t) (const char *__filename,
- + const struct stat64 *__status, int __flag);
- #endif
- #ifdef __USE_XOPEN_EXTENDED
- -typedef int (*__nftw_func_t) (__const char *__filename,
- - __const struct stat *__status, int __flag,
- +typedef int (*__nftw_func_t) (const char *__filename,
- + const struct stat *__status, int __flag,
- struct FTW *__info);
- # ifdef __USE_LARGEFILE64
- -typedef int (*__nftw64_func_t) (__const char *__filename,
- - __const struct stat64 *__status,
- +typedef int (*__nftw64_func_t) (const char *__filename,
- + const struct stat64 *__status,
- int __flag, struct FTW *__info);
- # endif
- #endif
- @@ -135,18 +134,18 @@
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- # ifndef __USE_FILE_OFFSET64
- -extern int ftw (__const char *__dir, __ftw_func_t __func, int __descriptors)
- +extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors)
- __nonnull ((1, 2));
- # else
- # ifdef __REDIRECT
- -extern int __REDIRECT (ftw, (__const char *__dir, __ftw_func_t __func,
- +extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
- int __descriptors), ftw64) __nonnull ((1, 2));
- # else
- # define ftw ftw64
- # endif
- # endif
- # ifdef __USE_LARGEFILE64
- -extern int ftw64 (__const char *__dir, __ftw64_func_t __func,
- +extern int ftw64 (const char *__dir, __ftw64_func_t __func,
- int __descriptors) __nonnull ((1, 2));
- # endif
- #endif
- @@ -158,11 +157,11 @@
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- # ifndef __USE_FILE_OFFSET64
- -extern int nftw (__const char *__dir, __nftw_func_t __func, int __descriptors,
- +extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors,
- int __flag) __nonnull ((1, 2));
- # else
- # ifdef __REDIRECT
- -extern int __REDIRECT (nftw, (__const char *__dir, __nftw_func_t __func,
- +extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
- int __descriptors, int __flag), nftw64)
- __nonnull ((1, 2));
- # else
- @@ -170,7 +169,7 @@
- # endif
- # endif
- # ifdef __USE_LARGEFILE64
- -extern int nftw64 (__const char *__dir, __nftw64_func_t __func,
- +extern int nftw64 (const char *__dir, __nftw64_func_t __func,
- int __descriptors, int __flag) __nonnull ((1, 2));
- # endif
- #endif
- diff -Nur uClibc-0.9.33.2/include/.gitignore uClibc/include/.gitignore
- --- uClibc-0.9.33.2/include/.gitignore 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/.gitignore 2014-02-03 12:32:56.000000000 +0100
- @@ -8,6 +8,7 @@
- #
- /bits/
- /config/
- +/generated/
-
- /bfin_fixed_code.h
- /bfin_l1layout.h
- @@ -15,6 +16,9 @@
- /dl-osinfo.h
- /fpu_control.h
- /hp-timing.h
- +/jmpbuf-offsets.h
- +/jmpbuf-unwind.h
- +/not-cancel.h
- /pthread.h
- /semaphore.h
- /thread_db.h
- diff -Nur uClibc-0.9.33.2/include/glob.h uClibc/include/glob.h
- --- uClibc-0.9.33.2/include/glob.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/glob.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _GLOB_H
- #define _GLOB_H 1
- @@ -110,13 +109,13 @@
- #else
- void *(*gl_readdir) (void *);
- #endif
- - void *(*gl_opendir) (__const char *);
- + void *(*gl_opendir) (const char *);
- #ifdef __USE_GNU
- - int (*gl_lstat) (__const char *__restrict, struct stat *__restrict);
- - int (*gl_stat) (__const char *__restrict, struct stat *__restrict);
- + int (*gl_lstat) (const char *__restrict, struct stat *__restrict);
- + int (*gl_stat) (const char *__restrict, struct stat *__restrict);
- #else
- - int (*gl_lstat) (__const char *__restrict, void *__restrict);
- - int (*gl_stat) (__const char *__restrict, void *__restrict);
- + int (*gl_lstat) (const char *__restrict, void *__restrict);
- + int (*gl_stat) (const char *__restrict, void *__restrict);
- #endif
- #endif
- #endif /* __UCLIBC_HAS_GNU_GLOB__ */
- @@ -143,13 +142,13 @@
- # else
- void *(*gl_readdir) (void *);
- # endif
- - void *(*gl_opendir) (__const char *);
- + void *(*gl_opendir) (const char *);
- # ifdef __USE_GNU
- - int (*gl_lstat) (__const char *__restrict, struct stat64 *__restrict);
- - int (*gl_stat) (__const char *__restrict, struct stat64 *__restrict);
- + int (*gl_lstat) (const char *__restrict, struct stat64 *__restrict);
- + int (*gl_stat) (const char *__restrict, struct stat64 *__restrict);
- # else
- - int (*gl_lstat) (__const char *__restrict, void *__restrict);
- - int (*gl_stat) (__const char *__restrict, void *__restrict);
- + int (*gl_lstat) (const char *__restrict, void *__restrict);
- + int (*gl_stat) (const char *__restrict, void *__restrict);
- # endif
- #endif
- #endif /* __UCLIBC_HAS_GNU_GLOB__ */
- @@ -170,8 +169,8 @@
- If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
- Otherwise, `glob' returns zero. */
- #if !defined __USE_FILE_OFFSET64 || __GNUC__ < 2
- -extern int glob (__const char *__restrict __pattern, int __flags,
- - int (*__errfunc) (__const char *, int),
- +extern int glob (const char *__restrict __pattern, int __flags,
- + int (*__errfunc) (const char *, int),
- glob_t *__restrict __pglob) __THROW;
- libc_hidden_proto(glob)
-
- @@ -179,17 +178,17 @@
- extern void globfree (glob_t *__pglob) __THROW;
- libc_hidden_proto(globfree)
- #else
- -extern int __REDIRECT_NTH (glob, (__const char *__restrict __pattern,
- +extern int __REDIRECT_NTH (glob, (const char *__restrict __pattern,
- int __flags,
- - int (*__errfunc) (__const char *, int),
- + int (*__errfunc) (const char *, int),
- glob_t *__restrict __pglob), glob64);
-
- extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
- #endif
-
- #ifdef __USE_LARGEFILE64
- -extern int glob64 (__const char *__restrict __pattern, int __flags,
- - int (*__errfunc) (__const char *, int),
- +extern int glob64 (const char *__restrict __pattern, int __flags,
- + int (*__errfunc) (const char *, int),
- glob64_t *__restrict __pglob) __THROW;
- libc_hidden_proto(glob64)
-
- @@ -204,7 +203,7 @@
-
- This function is not part of the interface specified by POSIX.2
- but several programs want to use it. */
- -extern int glob_pattern_p (__const char *__pattern, int __quote) __THROW;
- +extern int glob_pattern_p (const char *__pattern, int __quote) __THROW;
- libc_hidden_proto(glob_pattern_p)
- #endif
-
- diff -Nur uClibc-0.9.33.2/include/gnu-versions.h uClibc/include/gnu-versions.h
- --- uClibc-0.9.33.2/include/gnu-versions.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/gnu-versions.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _GNU_VERSIONS_H
- #define _GNU_VERSIONS_H 1
- diff -Nur uClibc-0.9.33.2/include/grp.h uClibc/include/grp.h
- --- uClibc-0.9.33.2/include/grp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/grp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 9.2.1 Group Database Access <grp.h>
- @@ -92,7 +91,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int putgrent (__const struct group *__restrict __p,
- +extern int putgrent (const struct group *__restrict __p,
- FILE *__restrict __f);
- #endif
-
- @@ -106,7 +105,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct group *getgrnam (__const char *__name);
- +extern struct group *getgrnam (const char *__name);
-
- #if defined __USE_POSIX || defined __USE_MISC
-
- @@ -149,7 +148,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int getgrnam_r (__const char *__restrict __name,
- +extern int getgrnam_r (const char *__restrict __name,
- struct group *__restrict __resultbuf,
- char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result);
- @@ -187,7 +186,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int getgrouplist (__const char *__user, __gid_t __group,
- +extern int getgrouplist (const char *__user, __gid_t __group,
- __gid_t *__groups, int *__ngroups);
-
- #endif
- @@ -195,7 +194,7 @@
- #if defined __USE_BSD
-
- /* Set the group set for the current user to GROUPS (N of them). */
- -extern int setgroups (size_t __n, __const __gid_t *__groups) __THROW;
- +extern int setgroups (size_t __n, const __gid_t *__groups) __THROW;
- libc_hidden_proto(setgroups)
-
- /* Initialize the group set for the current user
- @@ -206,7 +205,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int initgroups (__const char *__user, __gid_t __group);
- +extern int initgroups (const char *__user, __gid_t __group);
-
- #endif /* Use BSD. */
-
- diff -Nur uClibc-0.9.33.2/include/iconv.h uClibc/include/iconv.h
- --- uClibc-0.9.33.2/include/iconv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/iconv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ICONV_H
- #define _ICONV_H 1
- @@ -39,7 +38,7 @@
-
- This function is a possible cancellation points and therefore not
- marked with __THROW. */
- -extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
- +extern iconv_t iconv_open (const char *__tocode, const char *__fromcode);
-
- /* Convert at most *INBYTESLEFT bytes from *INBUF according to the
- code conversion algorithm specified by CD and place up to
- diff -Nur uClibc-0.9.33.2/include/ieee754.h uClibc/include/ieee754.h
- --- uClibc-0.9.33.2/include/ieee754.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/ieee754.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _IEEE754_H
-
- diff -Nur uClibc-0.9.33.2/include/ifaddrs.h uClibc/include/ifaddrs.h
- --- uClibc-0.9.33.2/include/ifaddrs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/ifaddrs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _IFADDRS_H
- #define _IFADDRS_H 1
- diff -Nur uClibc-0.9.33.2/include/inttypes.h uClibc/include/inttypes.h
- --- uClibc-0.9.33.2/include/inttypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/inttypes.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99: 7.8 Format conversion of integer types <inttypes.h>
- @@ -304,21 +303,21 @@
- __THROW __attribute__ ((__const__));
-
- /* Like `strtol' but convert to `intmax_t'. */
- -extern intmax_t strtoimax (__const char *__restrict __nptr,
- +extern intmax_t strtoimax (const char *__restrict __nptr,
- char **__restrict __endptr, int __base) __THROW;
-
- /* Like `strtoul' but convert to `uintmax_t'. */
- -extern uintmax_t strtoumax (__const char *__restrict __nptr,
- +extern uintmax_t strtoumax (const char *__restrict __nptr,
- char ** __restrict __endptr, int __base) __THROW;
-
- #ifdef __UCLIBC_HAS_WCHAR__
- /* Like `wcstol' but convert to `intmax_t'. */
- -extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr,
- +extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
- __gwchar_t **__restrict __endptr, int __base)
- __THROW;
-
- /* Like `wcstoul' but convert to `uintmax_t'. */
- -extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr,
- +extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
- __gwchar_t ** __restrict __endptr, int __base)
- __THROW;
- #endif
- @@ -327,44 +326,44 @@
-
- # if __WORDSIZE == 64
-
- -extern long int __strtol_internal (__const char *__restrict __nptr,
- +extern long int __strtol_internal (const char *__restrict __nptr,
- char **__restrict __endptr,
- int __base, int __group)
- __THROW __nonnull ((1)) __wur;
- /* Like `strtol' but convert to `intmax_t'. */
- __extern_inline intmax_t
- -__NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr,
- +__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr,
- int base))
- {
- return __strtol_internal (nptr, endptr, base, 0);
- }
-
- -extern unsigned long int __strtoul_internal (__const char *
- +extern unsigned long int __strtoul_internal (const char *
- __restrict __nptr,
- char ** __restrict __endptr,
- int __base, int __group)
- __THROW __nonnull ((1)) __wur;
- /* Like `strtoul' but convert to `uintmax_t'. */
- __extern_inline uintmax_t
- -__NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr,
- +__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr,
- int base))
- {
- return __strtoul_internal (nptr, endptr, base, 0);
- }
-
- -extern long int __wcstol_internal (__const __gwchar_t * __restrict __nptr,
- +extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,
- __gwchar_t **__restrict __endptr,
- int __base, int __group)
- __THROW __nonnull ((1)) __wur;
- /* Like `wcstol' but convert to `intmax_t'. */
- __extern_inline intmax_t
- -__NTH (wcstoimax (__const __gwchar_t *__restrict nptr,
- +__NTH (wcstoimax (const __gwchar_t *__restrict nptr,
- __gwchar_t **__restrict endptr, int base))
- {
- return __wcstol_internal (nptr, endptr, base, 0);
- }
-
- -extern unsigned long int __wcstoul_internal (__const __gwchar_t *
- +extern unsigned long int __wcstoul_internal (const __gwchar_t *
- __restrict __nptr,
- __gwchar_t **
- __restrict __endptr,
- @@ -372,7 +371,7 @@
- __THROW __nonnull ((1)) __wur;
- /* Like `wcstoul' but convert to `uintmax_t'. */
- __extern_inline uintmax_t
- -__NTH (wcstoumax (__const __gwchar_t *__restrict nptr,
- +__NTH (wcstoumax (const __gwchar_t *__restrict nptr,
- __gwchar_t **__restrict endptr, int base))
- {
- return __wcstoul_internal (nptr, endptr, base, 0);
- @@ -381,20 +380,20 @@
- # else /* __WORDSIZE == 32 */
-
- __extension__
- -extern long long int __strtoll_internal (__const char *__restrict __nptr,
- +extern long long int __strtoll_internal (const char *__restrict __nptr,
- char **__restrict __endptr,
- int __base, int __group)
- __THROW __nonnull ((1)) __wur;
- /* Like `strtol' but convert to `intmax_t'. */
- __extern_inline intmax_t
- -__NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr,
- +__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr,
- int base))
- {
- return __strtoll_internal (nptr, endptr, base, 0);
- }
-
- __extension__
- -extern unsigned long long int __strtoull_internal (__const char *
- +extern unsigned long long int __strtoull_internal (const char *
- __restrict __nptr,
- char **
- __restrict __endptr,
- @@ -403,21 +402,21 @@
- __THROW __nonnull ((1)) __wur;
- /* Like `strtoul' but convert to `uintmax_t'. */
- __extern_inline uintmax_t
- -__NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr,
- +__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr,
- int base))
- {
- return __strtoull_internal (nptr, endptr, base, 0);
- }
-
- __extension__
- -extern long long int __wcstoll_internal (__const __gwchar_t *
- +extern long long int __wcstoll_internal (const __gwchar_t *
- __restrict __nptr,
- __gwchar_t **__restrict __endptr,
- int __base, int __group)
- __THROW __nonnull ((1)) __wur;
- /* Like `wcstol' but convert to `intmax_t'. */
- __extern_inline intmax_t
- -__NTH (wcstoimax (__const __gwchar_t *__restrict nptr,
- +__NTH (wcstoimax (const __gwchar_t *__restrict nptr,
- __gwchar_t **__restrict endptr, int base))
- {
- return __wcstoll_internal (nptr, endptr, base, 0);
- @@ -425,7 +424,7 @@
-
-
- __extension__
- -extern unsigned long long int __wcstoull_internal (__const __gwchar_t *
- +extern unsigned long long int __wcstoull_internal (const __gwchar_t *
- __restrict __nptr,
- __gwchar_t **
- __restrict __endptr,
- @@ -434,7 +433,7 @@
- __THROW __nonnull ((1)) __wur;
- /* Like `wcstoul' but convert to `uintmax_t'. */
- __extern_inline uintmax_t
- -__NTH (wcstoumax (__const __gwchar_t *__restrict nptr,
- +__NTH (wcstoumax (const __gwchar_t *__restrict nptr,
- __gwchar_t **__restrict endptr, int base))
- {
- return __wcstoull_internal (nptr, endptr, base, 0);
- diff -Nur uClibc-0.9.33.2/include/langinfo.h uClibc/include/langinfo.h
- --- uClibc-0.9.33.2/include/langinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/langinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LANGINFO_H
- #define _LANGINFO_H 1
- diff -Nur uClibc-0.9.33.2/include/libc-internal.h uClibc/include/libc-internal.h
- --- uClibc-0.9.33.2/include/libc-internal.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/libc-internal.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LIBC_INTERNAL_H
- #define _LIBC_INTERNAL_H 1
- @@ -29,6 +28,9 @@
-
- #ifdef __UCLIBC_HAS_TLS__
- # define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec")))
- +#else
- +# define attribute_tls_model_ie
- +# define __thread
- #endif
-
- /* Pull in things like __attribute_used__ */
- @@ -44,12 +46,12 @@
- # include <stddef.h>
-
- /* sources are built w/ _GNU_SOURCE, this gets undefined */
- -#ifdef __USE_GNU
- -extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen);
- -libc_hidden_proto(__xpg_strerror_r)
- -#else
- +#if defined __USE_XOPEN2K && !defined __USE_GNU
- extern char *__glibc_strerror_r (int __errnum, char *__buf, size_t __buflen);
- libc_hidden_proto(__glibc_strerror_r)
- +#else
- +extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen);
- +libc_hidden_proto(__xpg_strerror_r)
- #endif
-
- /* #include <pthread.h> */
- @@ -70,6 +72,10 @@
- libc_hidden_proto(__chk_fail)
- # endif
-
- +# ifdef __UCLIBC_HAS_SSP__
- +extern void __stack_chk_fail(void) attribute_noreturn __cold;
- +# endif
- +
- # endif /* IS_IN_libc */
-
- #endif /* __ASSEMBLER__ */
- diff -Nur uClibc-0.9.33.2/include/libc-symbols.h uClibc/include/libc-symbols.h
- --- uClibc-0.9.33.2/include/libc-symbols.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/libc-symbols.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LIBC_SYMBOLS_H
- #define _LIBC_SYMBOLS_H 1
- @@ -196,12 +195,12 @@
- # define _strong_alias_untyped(name, aliasname) \
- extern __typeof (aliasname) aliasname __attribute__ ((alias (#name)));
-
- +# ifdef HAVE_WEAK_SYMBOLS
- +
- /* This comes between the return type and function name in
- a function definition to make that definition weak. */
- -# define weak_function __attribute__ ((weak))
- -# define weak_const_function __attribute__ ((weak, __const__))
- -
- -# ifdef HAVE_WEAK_SYMBOLS
- +# define weak_function __attribute__ ((weak))
- +# define weak_const_function __attribute__ ((weak, __const__))
-
- /* Define ALIASNAME as a weak alias for NAME.
- If weak aliases are not available, this defines a strong alias. */
- @@ -215,6 +214,9 @@
-
- # else
-
- +# define weak_function /* empty */
- +# define weak_const_function __attribute__ ((__const__))
- +
- # define weak_alias(name, aliasname) strong_alias(name, aliasname)
- # define weak_extern(symbol) /* Nothing. */
-
- diff -Nur uClibc-0.9.33.2/include/libgen.h uClibc/include/libgen.h
- --- uClibc-0.9.33.2/include/libgen.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/libgen.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LIBGEN_H
- #define _LIBGEN_H 1
- diff -Nur uClibc-0.9.33.2/include/libintl.h uClibc/include/libintl.h
- --- uClibc-0.9.33.2/include/libintl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/libintl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,15 +14,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LIBINTL_H
- #define _LIBINTL_H 1
-
- #include <features.h>
-
- +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
- +
- /* We define an additional symbol to signal that we use the GNU
- implementation of gettext. */
- #define __USE_GNU_GETTEXT 1
- @@ -37,46 +38,46 @@
- /* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
- -extern char *gettext (__const char *__msgid)
- +extern char *gettext (const char *__msgid)
- __THROW __attribute_format_arg__ (1);
-
- /* Look up MSGID in the DOMAINNAME message catalog for the current
- LC_MESSAGES locale. */
- -extern char *dgettext (__const char *__domainname, __const char *__msgid)
- +extern char *dgettext (const char *__domainname, const char *__msgid)
- __THROW __attribute_format_arg__ (2);
- #if 0 /* uClibc: disabled */
- -extern char *__dgettext (__const char *__domainname, __const char *__msgid)
- +extern char *__dgettext (const char *__domainname, const char *__msgid)
- __THROW __attribute_format_arg__ (2);
- #endif
-
- /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
- -extern char *dcgettext (__const char *__domainname,
- - __const char *__msgid, int __category)
- +extern char *dcgettext (const char *__domainname,
- + const char *__msgid, int __category)
- __THROW __attribute_format_arg__ (2);
- #if 0 /* uClibc: disabled */
- -extern char *__dcgettext (__const char *__domainname,
- - __const char *__msgid, int __category)
- +extern char *__dcgettext (const char *__domainname,
- + const char *__msgid, int __category)
- __THROW __attribute_format_arg__ (2);
- #endif
-
-
- /* Similar to `gettext' but select the plural form corresponding to the
- number N. */
- -extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
- +extern char *ngettext (const char *__msgid1, const char *__msgid2,
- unsigned long int __n)
- __THROW __attribute_format_arg__ (1) __attribute_format_arg__ (2);
-
- /* Similar to `dgettext' but select the plural form corresponding to the
- number N. */
- -extern char *dngettext (__const char *__domainname, __const char *__msgid1,
- - __const char *__msgid2, unsigned long int __n)
- +extern char *dngettext (const char *__domainname, const char *__msgid1,
- + const char *__msgid2, unsigned long int __n)
- __THROW __attribute_format_arg__ (2) __attribute_format_arg__ (3);
-
- /* Similar to `dcgettext' but select the plural form corresponding to the
- number N. */
- -extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
- - __const char *__msgid2, unsigned long int __n,
- +extern char *dcngettext (const char *__domainname, const char *__msgid1,
- + const char *__msgid2, unsigned long int __n,
- int __category)
- __THROW __attribute_format_arg__ (2) __attribute_format_arg__ (3);
-
- @@ -84,17 +85,17 @@
- /* Set the current default message catalog to DOMAINNAME.
- If DOMAINNAME is null, return the current default.
- If DOMAINNAME is "", reset to the default of "messages". */
- -extern char *textdomain (__const char *__domainname) __THROW;
- +extern char *textdomain (const char *__domainname) __THROW;
-
- /* Specify that the DOMAINNAME message catalog will be found
- in DIRNAME rather than in the system locale data base. */
- -extern char *bindtextdomain (__const char *__domainname,
- - __const char *__dirname) __THROW;
- +extern char *bindtextdomain (const char *__domainname,
- + const char *__dirname) __THROW;
-
- /* Specify the character encoding in which the messages from the
- DOMAINNAME message catalog will be returned. */
- -extern char *bind_textdomain_codeset (__const char *__domainname,
- - __const char *__codeset) __THROW;
- +extern char *bind_textdomain_codeset (const char *__domainname,
- + const char *__codeset) __THROW;
-
-
- /* Optimized version of the function above. */
- @@ -125,4 +126,15 @@
-
- __END_DECLS
-
- +#else
- +
- +#define gettext(msgid) ((const char *) (msgid))
- +
- +#endif /* __UCLIBC_HAS_GETTEXT_AWARENESS__ */
- +
- +#ifdef _LIBC
- +# define _(x) gettext(x)
- +# define N_(x) x
- +#endif
- +
- #endif /* libintl.h */
- diff -Nur uClibc-0.9.33.2/include/limits.h uClibc/include/limits.h
- --- uClibc-0.9.33.2/include/limits.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/limits.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h>
- diff -Nur uClibc-0.9.33.2/include/link.h uClibc/include/link.h
- --- uClibc-0.9.33.2/include/link.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/link.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LINK_H
- #define _LINK_H 1
- @@ -110,7 +109,7 @@
- char *l_name; /* Absolute file name object was found in. */
- ElfW(Dyn) *l_ld; /* Dynamic section of the shared object. */
- struct link_map *l_next, *l_prev; /* Chain of loaded objects. */
- -
- +#ifdef _LIBC
- #if defined(USE_TLS) && USE_TLS
- /* Thread-local storage related info. */
-
- @@ -134,6 +133,7 @@
- /* Nonzero if _dl_init_static_tls should be called for this module */
- unsigned int l_need_tls_init:1;
- #endif
- +#endif
- };
-
- #ifdef __USE_GNU
- diff -Nur uClibc-0.9.33.2/include/locale.h uClibc/include/locale.h
- --- uClibc-0.9.33.2/include/locale.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/locale.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.11 Localization <locale.h>
- @@ -124,7 +123,7 @@
-
-
- /* Set and/or return the current locale. */
- -extern char *setlocale (int __category, __const char *__locale) __THROW;
- +extern char *setlocale (int __category, const char *__locale) __THROW;
-
- /* Return the numeric/monetary information for the current locale. */
- extern struct lconv *localeconv (void) __THROW;
- @@ -133,7 +132,7 @@
- __END_NAMESPACE_STD
-
-
- -#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_LOCALE__
- +#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__
- /* The concept of one static locale per category is not very well
- thought out. Many applications will need to process its data using
- information from several different locales. Another application is
- @@ -145,19 +144,14 @@
- Attention: all these functions are *not* standardized in any form.
- This is a proof-of-concept implementation. */
-
- -#ifdef __UCLIBC_HAS_XLOCALE__
- /* Get locale datatype definition. */
- # include <xlocale.h>
- -#endif
- -
- -/* POSIX 2008 makes locale_t official. */
- -typedef __locale_t locale_t;
-
- /* Return a reference to a data structure representing a set of locale
- datasets. Unlike for the CATEGORY parameter for `setlocale' the
- CATEGORY_MASK parameter here uses a single bit for each category,
- made by OR'ing together LC_*_MASK bits above. */
- -extern __locale_t newlocale (int __category_mask, __const char *__locale,
- +extern __locale_t newlocale (int __category_mask, const char *__locale,
- __locale_t __base) __THROW;
- libc_hidden_proto(newlocale)
-
- diff -Nur uClibc-0.9.33.2/include/malloc.h uClibc/include/malloc.h
- --- uClibc-0.9.33.2/include/malloc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/malloc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MALLOC_H
- #define _MALLOC_H 1
- @@ -124,9 +123,12 @@
-
- /* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
- extern __malloc_ptr_t memalign __MALLOC_P ((size_t __alignment, size_t __size));
- +libc_hidden_proto(memalign)
-
- +#ifdef __UCLIBC_SUSV2_LEGACY__
- /* Allocate SIZE bytes on a page boundary. */
- extern __malloc_ptr_t valloc __MALLOC_P ((size_t __size)) __attribute_malloc__;
- +#endif
-
- #ifdef __MALLOC_STANDARD__
-
- diff -Nur uClibc-0.9.33.2/include/math.h uClibc/include/math.h
- --- uClibc-0.9.33.2/include/math.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/math.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.12 Mathematics <math.h>
- diff -Nur uClibc-0.9.33.2/include/memory.h uClibc/include/memory.h
- --- uClibc-0.9.33.2/include/memory.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/memory.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * SVID
- diff -Nur uClibc-0.9.33.2/include/mntent.h uClibc/include/mntent.h
- --- uClibc-0.9.33.2/include/mntent.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/mntent.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MNTENT_H
- #define _MNTENT_H 1
- @@ -64,7 +63,7 @@
-
- /* Prepare to begin reading and/or writing mount table entries from the
- beginning of FILE. MODE is as for `fopen'. */
- -extern FILE *setmntent (__const char *__file, __const char *__mode) __THROW;
- +extern FILE *setmntent (const char *__file, const char *__mode) __THROW;
- libc_hidden_proto(setmntent)
-
- /* Read one mount table entry from STREAM. Returns a pointer to storage
- @@ -84,7 +83,7 @@
- /* Write the mount table entry described by MNT to STREAM.
- Return zero on success, nonzero on failure. */
- extern int addmntent (FILE *__restrict __stream,
- - __const struct mntent *__restrict __mnt) __THROW;
- + const struct mntent *__restrict __mnt) __THROW;
-
- /* Close a stream opened with `setmntent'. */
- extern int endmntent (FILE *__stream) __THROW;
- @@ -92,8 +91,8 @@
-
- /* Search MNT->mnt_opts for an option matching OPT.
- Returns the address of the substring, or null if none found. */
- -extern char *hasmntopt (__const struct mntent *__mnt,
- - __const char *__opt) __THROW;
- +extern char *hasmntopt (const struct mntent *__mnt,
- + const char *__opt) __THROW;
-
-
- __END_DECLS
- diff -Nur uClibc-0.9.33.2/include/mqueue.h uClibc/include/mqueue.h
- --- uClibc-0.9.33.2/include/mqueue.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/mqueue.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MQUEUE_H
- #define _MQUEUE_H 1
- diff -Nur uClibc-0.9.33.2/include/net/ethernet.h uClibc/include/net/ethernet.h
- --- uClibc-0.9.33.2/include/net/ethernet.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/net/ethernet.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Based on the FreeBSD version of this file. Curiously, that file
- lacks a copyright in the header. */
- diff -Nur uClibc-0.9.33.2/include/net/if_arp.h uClibc/include/net/if_arp.h
- --- uClibc-0.9.33.2/include/net/if_arp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/net/if_arp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Based on the 4.4BSD and Linux version of this file. */
-
- diff -Nur uClibc-0.9.33.2/include/net/if.h uClibc/include/net/if.h
- --- uClibc-0.9.33.2/include/net/if.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/net/if.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NET_IF_H
- #define _NET_IF_H 1
- @@ -191,7 +190,7 @@
- __BEGIN_DECLS
-
- /* Convert an interface name to an index, and vice versa. */
- -extern unsigned int if_nametoindex (__const char *__ifname) __THROW;
- +extern unsigned int if_nametoindex (const char *__ifname) __THROW;
- libc_hidden_proto(if_nametoindex)
- extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW;
-
- diff -Nur uClibc-0.9.33.2/include/net/if_packet.h uClibc/include/net/if_packet.h
- --- uClibc-0.9.33.2/include/net/if_packet.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/net/if_packet.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef __IF_PACKET_H
- #define __IF_PACKET_H
- diff -Nur uClibc-0.9.33.2/include/net/if_shaper.h uClibc/include/net/if_shaper.h
- --- uClibc-0.9.33.2/include/net/if_shaper.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/net/if_shaper.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NET_IF_SHAPER_H
- #define _NET_IF_SHAPER_H 1
- diff -Nur uClibc-0.9.33.2/include/net/if_slip.h uClibc/include/net/if_slip.h
- --- uClibc-0.9.33.2/include/net/if_slip.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/net/if_slip.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NET_IF_SLIP_H
- #define _NET_IF_SLIP_H 1
- diff -Nur uClibc-0.9.33.2/include/net/route.h uClibc/include/net/route.h
- --- uClibc-0.9.33.2/include/net/route.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/net/route.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Based on the 4.4BSD and Linux version of this file. */
-
- diff -Nur uClibc-0.9.33.2/include/netax25/ax25.h uClibc/include/netax25/ax25.h
- --- uClibc-0.9.33.2/include/netax25/ax25.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netax25/ax25.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETAX25_AX25_H
- #define _NETAX25_AX25_H 1
- diff -Nur uClibc-0.9.33.2/include/netdb.h uClibc/include/netdb.h
- --- uClibc-0.9.33.2/include/netdb.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netdb.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
- +/* Copyright (C) 1996-2002, 2003, 2004, 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* All data returned by the network data base library are supplied in
- host order and returned in network order (suitable for use in
- @@ -59,6 +58,11 @@
-
- /* Function to get address of global `h_errno' variable. */
- extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
- +#ifdef _LIBC
- +# if !defined(__UCLIBC_HAS_TLS__) && !defined(__UCLIBC_HAS_THREADS__)
- +extern int weak_const_function *__h_errno_location(void);
- +# endif
- +#endif
- libc_hidden_proto(__h_errno_location)
-
- /* Macros for accessing h_errno from inside libc. */
- @@ -88,8 +92,6 @@
- #endif /* _LIBC */
-
- /* Possible values left in `h_errno'. */
- -#define NETDB_INTERNAL -1 /* See errno. */
- -#define NETDB_SUCCESS 0 /* No problem. */
- #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found. */
- #define TRY_AGAIN 2 /* Non-Authoritative Host not found,
- or SERVERFAIL. */
- @@ -97,7 +99,11 @@
- NOTIMP. */
- #define NO_DATA 4 /* Valid name, no data record of requested
- type. */
- -#define NO_ADDRESS NO_DATA /* No address, look for MX record. */
- +#if defined __USE_MISC || defined __USE_GNU
- +# define NETDB_INTERNAL -1 /* See errno. */
- +# define NETDB_SUCCESS 0 /* No problem. */
- +# define NO_ADDRESS NO_DATA /* No address, look for MX record. */
- +#endif
-
- #ifdef __USE_XOPEN2K
- /* Highest reserved Internet port number. */
- @@ -109,13 +115,15 @@
- # define SCOPE_DELIMITER '%'
- #endif
-
- +#if defined __USE_MISC || defined __USE_GNU
- /* Print error indicated by `h_errno' variable on standard error. STR
- if non-null is printed before the error string. */
- -extern void herror (__const char *__str) __THROW;
- +extern void herror (const char *__str) __THROW;
- libc_hidden_proto(herror)
-
- /* Return string associated with error ERR_NUM. */
- -extern __const char *hstrerror (int __err_num) __THROW;
- +extern const char *hstrerror (int __err_num) __THROW;
- +#endif
-
-
- /* Description of data base entry for a single host. */
- @@ -126,7 +134,9 @@
- int h_addrtype; /* Host address type. */
- int h_length; /* Length of address. */
- char **h_addr_list; /* List of addresses from name server. */
- -#define h_addr h_addr_list[0] /* Address, for backward compatibility. */
- +#if defined __USE_MISC || defined __USE_GNU
- +# define h_addr h_addr_list[0] /* Address, for backward compatibility.*/
- +#endif
- };
-
- /* Open host data base files and mark them as staying open even after
- @@ -154,7 +164,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct hostent *gethostbyaddr (__const void *__addr, __socklen_t __len,
- +extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len,
- int __type);
- libc_hidden_proto(gethostbyaddr)
-
- @@ -162,7 +172,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct hostent *gethostbyname (__const char *__name);
- +extern struct hostent *gethostbyname (const char *__name);
- libc_hidden_proto(gethostbyname)
-
- #ifdef __USE_MISC
- @@ -174,7 +184,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern struct hostent *gethostbyname2 (__const char *__name, int __af);
- +extern struct hostent *gethostbyname2 (const char *__name, int __af);
- libc_hidden_proto(gethostbyname2)
-
- /* Reentrant versions of the functions above. The additional
- @@ -193,7 +203,7 @@
- int *__restrict __h_errnop);
- libc_hidden_proto(gethostent_r)
-
- -extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len,
- +extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len,
- int __type,
- struct hostent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- @@ -201,14 +211,14 @@
- int *__restrict __h_errnop);
- libc_hidden_proto(gethostbyaddr_r)
-
- -extern int gethostbyname_r (__const char *__restrict __name,
- +extern int gethostbyname_r (const char *__restrict __name,
- struct hostent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct hostent **__restrict __result,
- int *__restrict __h_errnop);
- libc_hidden_proto(gethostbyname_r)
-
- -extern int gethostbyname2_r (__const char *__restrict __name, int __af,
- +extern int gethostbyname2_r (const char *__restrict __name, int __af,
- struct hostent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct hostent **__restrict __result,
- @@ -250,7 +260,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct netent *getnetbyname (__const char *__name);
- +extern struct netent *getnetbyname (const char *__name);
-
- #ifdef __USE_MISC
- /* Reentrant versions of the functions above. The additional
- @@ -268,13 +278,15 @@
- struct netent **__restrict __result,
- int *__restrict __h_errnop);
- libc_hidden_proto(getnetent_r)
- +
- extern int getnetbyaddr_r (uint32_t __net, int __type,
- struct netent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct netent **__restrict __result,
- int *__restrict __h_errnop);
- libc_hidden_proto(getnetbyaddr_r)
- -extern int getnetbyname_r (__const char *__restrict __name,
- +
- +extern int getnetbyname_r (const char *__restrict __name,
- struct netent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct netent **__restrict __result,
- @@ -319,15 +331,15 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct servent *getservbyname (__const char *__name,
- - __const char *__proto);
- +extern struct servent *getservbyname (const char *__name,
- + const char *__proto);
-
- /* Return entry from service data base which matches port PORT and
- protocol PROTO.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct servent *getservbyport (int __port, __const char *__proto);
- +extern struct servent *getservbyport (int __port, const char *__proto);
- libc_hidden_proto(getservbyport)
-
-
- @@ -344,14 +356,14 @@
- struct servent **__restrict __result);
- libc_hidden_proto(getservent_r)
-
- -extern int getservbyname_r (__const char *__restrict __name,
- - __const char *__restrict __proto,
- +extern int getservbyname_r (const char *__restrict __name,
- + const char *__restrict __proto,
- struct servent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct servent **__restrict __result);
- libc_hidden_proto(getservbyname_r)
-
- -extern int getservbyport_r (int __port, __const char *__restrict __proto,
- +extern int getservbyport_r (int __port, const char *__restrict __proto,
- struct servent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct servent **__restrict __result);
- @@ -393,7 +405,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct protoent *getprotobyname (__const char *__name);
- +extern struct protoent *getprotobyname (const char *__name);
-
- /* Return entry from protocol data base which number is PROTO.
-
- @@ -415,7 +427,7 @@
- struct protoent **__restrict __result);
- libc_hidden_proto(getprotoent_r)
-
- -extern int getprotobyname_r (__const char *__restrict __name,
- +extern int getprotobyname_r (const char *__restrict __name,
- struct protoent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct protoent **__restrict __result);
- @@ -435,7 +447,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int setnetgrent (__const char *__netgroup);
- +extern int setnetgrent (const char *__netgroup);
-
- /* Free all space allocated by previous `setnetgrent' call.
-
- @@ -463,8 +475,8 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int innetgr (__const char *__netgroup, __const char *__host,
- - __const char *__user, __const char *domain);
- +extern int innetgr (const char *__netgroup, const char *__host,
- + const char *__user, const char *__domain);
-
- /* Reentrant version of `getnetgrent' where result is placed in BUFFER.
-
- @@ -479,12 +491,12 @@
- #endif /* UCLIBC_HAS_NETGROUP */
- #endif /* misc */
-
- -
- +#ifdef __UCLIBC__
- /* ruserpass - remote password check.
- This function also exists in glibc but is undocumented */
- extern int ruserpass(const char *host, const char **aname, const char **apass);
- libc_hidden_proto(ruserpass)
- -
- +#endif
-
- #ifdef __USE_BSD
- /* Call `rshd' at port RPORT on remote machine *AHOST to execute CMD.
- @@ -499,9 +511,9 @@
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
- - __const char *__restrict __locuser,
- - __const char *__restrict __remuser,
- - __const char *__restrict __cmd, int *__restrict __fd2p);
- + const char *__restrict __locuser,
- + const char *__restrict __remuser,
- + const char *__restrict __cmd, int *__restrict __fd2p);
-
- #if 0
- /* FIXME */
- @@ -513,9 +525,9 @@
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
- - __const char *__restrict __locuser,
- - __const char *__restrict __remuser,
- - __const char *__restrict __cmd, int *__restrict __fd2p,
- + const char *__restrict __locuser,
- + const char *__restrict __remuser,
- + const char *__restrict __cmd, int *__restrict __fd2p,
- sa_family_t __af);
- #endif
-
- @@ -530,9 +542,9 @@
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- extern int rexec (char **__restrict __ahost, int __rport,
- - __const char *__restrict __name,
- - __const char *__restrict __pass,
- - __const char *__restrict __cmd, int *__restrict __fd2p);
- + const char *__restrict __name,
- + const char *__restrict __pass,
- + const char *__restrict __cmd, int *__restrict __fd2p);
-
- /* This is the equivalent function where the protocol can be selected
- and which therefore can be used for IPv6.
- @@ -542,9 +554,9 @@
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- extern int rexec_af (char **__restrict __ahost, int __rport,
- - __const char *__restrict __name,
- - __const char *__restrict __pass,
- - __const char *__restrict __cmd, int *__restrict __fd2p,
- + const char *__restrict __name,
- + const char *__restrict __pass,
- + const char *__restrict __cmd, int *__restrict __fd2p,
- sa_family_t __af);
- libc_hidden_proto(rexec_af)
-
- @@ -556,8 +568,8 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int ruserok (__const char *__rhost, int __suser,
- - __const char *__remuser, __const char *__locuser);
- +extern int ruserok (const char *__rhost, int __suser,
- + const char *__remuser, const char *__locuser);
-
- #if 0
- /* FIXME */
- @@ -568,8 +580,8 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int ruserok_af (__const char *__rhost, int __suser,
- - __const char *__remuser, __const char *__locuser,
- +extern int ruserok_af (const char *__rhost, int __suser,
- + const char *__remuser, const char *__locuser,
- sa_family_t __af);
- #endif
-
- @@ -638,15 +650,15 @@
- # define EAI_NONAME -2 /* NAME or SERVICE is unknown. */
- # define EAI_AGAIN -3 /* Temporary failure in name resolution. */
- # define EAI_FAIL -4 /* Non-recoverable failure in name res. */
- -# define EAI_NODATA -5 /* No address associated with NAME. */
- # define EAI_FAMILY -6 /* `ai_family' not supported. */
- # define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */
- # define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */
- -# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */
- # define EAI_MEMORY -10 /* Memory allocation failure. */
- # define EAI_SYSTEM -11 /* System error returned in `errno'. */
- # define EAI_OVERFLOW -12 /* Argument buffer overflow. */
- # ifdef __USE_GNU
- +# define EAI_NODATA -5 /* No address associated with NAME. */
- +# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */
- # define EAI_INPROGRESS -100 /* Processing request in progress. */
- # define EAI_CANCELED -101 /* Request canceled. */
- # define EAI_NOTCANCELED -102 /* Request not canceled. */
- @@ -655,8 +667,10 @@
- # define EAI_IDN_ENCODE -105 /* IDN encoding failed. */
- # endif
-
- -# define NI_MAXHOST 1025
- -# define NI_MAXSERV 32
- +# ifdef __USE_MISC
- +# define NI_MAXHOST 1025
- +# define NI_MAXSERV 32
- +# endif
-
- # define NI_NUMERICHOST 1 /* Don't try to look up hostname. */
- # define NI_NUMERICSERV 2 /* Don't convert port number to name. */
- @@ -676,9 +690,9 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int getaddrinfo (__const char *__restrict __name,
- - __const char *__restrict __service,
- - __const struct addrinfo *__restrict __req,
- +extern int getaddrinfo (const char *__restrict __name,
- + const char *__restrict __service,
- + const struct addrinfo *__restrict __req,
- struct addrinfo **__restrict __pai);
- libc_hidden_proto(getaddrinfo)
-
- @@ -687,13 +701,13 @@
- libc_hidden_proto(freeaddrinfo)
-
- /* Convert error return from getaddrinfo() to a string. */
- -extern __const char *gai_strerror (int __ecode) __THROW;
- +extern const char *gai_strerror (int __ecode) __THROW;
-
- /* Translate a socket address to a location and service name.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int getnameinfo (__const struct sockaddr *__restrict __sa,
- +extern int getnameinfo (const struct sockaddr *__restrict __sa,
- socklen_t __salen, char *__restrict __host,
- socklen_t __hostlen, char *__restrict __serv,
- socklen_t __servlen, unsigned int __flags);
- diff -Nur uClibc-0.9.33.2/include/neteconet/ec.h uClibc/include/neteconet/ec.h
- --- uClibc-0.9.33.2/include/neteconet/ec.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/neteconet/ec.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETECONET_EC_H
- #define _NETECONET_EC_H 1
- diff -Nur uClibc-0.9.33.2/include/netinet/ether.h uClibc/include/netinet/ether.h
- --- uClibc-0.9.33.2/include/netinet/ether.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/ether.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETINET_ETHER_H
- #define _NETINET_ETHER_H 1
- @@ -34,27 +33,27 @@
- #if defined __UCLIBC_HAS_SOCKET__ || defined __UCLIBC_HAS_IPV4__ || \
- defined __UCLIBC_HAS_IPV6__
- /* Convert 48 bit Ethernet ADDRess to ASCII. */
- -extern char *ether_ntoa (__const struct ether_addr *__addr) __THROW;
- -extern char *ether_ntoa_r (__const struct ether_addr *__addr, char *__buf)
- +extern char *ether_ntoa (const struct ether_addr *__addr) __THROW;
- +extern char *ether_ntoa_r (const struct ether_addr *__addr, char *__buf)
- __THROW;
- libc_hidden_proto(ether_ntoa_r)
-
- /* Convert ASCII string S to 48 bit Ethernet address. */
- -extern struct ether_addr *ether_aton (__const char *__asc) __THROW;
- -extern struct ether_addr *ether_aton_r (__const char *__asc,
- +extern struct ether_addr *ether_aton (const char *__asc) __THROW;
- +extern struct ether_addr *ether_aton_r (const char *__asc,
- struct ether_addr *__addr) __THROW;
- libc_hidden_proto(ether_aton_r)
-
- /* Map 48 bit Ethernet number ADDR to HOSTNAME. */
- -extern int ether_ntohost (char *__hostname, __const struct ether_addr *__addr)
- +extern int ether_ntohost (char *__hostname, const struct ether_addr *__addr)
- __THROW;
-
- /* Map HOSTNAME to 48 bit Ethernet address. */
- -extern int ether_hostton (__const char *__hostname, struct ether_addr *__addr)
- +extern int ether_hostton (const char *__hostname, struct ether_addr *__addr)
- __THROW;
-
- /* Scan LINE and set ADDR and HOSTNAME. */
- -extern int ether_line (__const char *__line, struct ether_addr *__addr,
- +extern int ether_line (const char *__line, struct ether_addr *__addr,
- char *__hostname) __THROW;
- #endif
-
- diff -Nur uClibc-0.9.33.2/include/netinet/icmp6.h uClibc/include/netinet/icmp6.h
- --- uClibc-0.9.33.2/include/netinet/icmp6.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/icmp6.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETINET_ICMP6_H
- #define _NETINET_ICMP6_H 1
- diff -Nur uClibc-0.9.33.2/include/netinet/if_ether.h uClibc/include/netinet/if_ether.h
- --- uClibc-0.9.33.2/include/netinet/if_ether.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/if_ether.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef __NETINET_IF_ETHER_H
-
- diff -Nur uClibc-0.9.33.2/include/netinet/if_fddi.h uClibc/include/netinet/if_fddi.h
- --- uClibc-0.9.33.2/include/netinet/if_fddi.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/if_fddi.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETINET_IF_FDDI_H
- #define _NETINET_IF_FDDI_H 1
- diff -Nur uClibc-0.9.33.2/include/netinet/if_tr.h uClibc/include/netinet/if_tr.h
- --- uClibc-0.9.33.2/include/netinet/if_tr.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/if_tr.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETINET_IF_TR_H
- #define _NETINET_IF_TR_H 1
- diff -Nur uClibc-0.9.33.2/include/netinet/igmp.h uClibc/include/netinet/igmp.h
- --- uClibc-0.9.33.2/include/netinet/igmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/igmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETINET_IGMP_H
- #define _NETINET_IGMP_H 1
- diff -Nur uClibc-0.9.33.2/include/netinet/in.h uClibc/include/netinet/in.h
- --- uClibc-0.9.33.2/include/netinet/in.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/in.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETINET_IN_H
- #define _NETINET_IN_H 1
- @@ -415,43 +414,43 @@
-
- #if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__
- #define IN6_IS_ADDR_UNSPECIFIED(a) \
- - (((__const uint32_t *) (a))[0] == 0 \
- - && ((__const uint32_t *) (a))[1] == 0 \
- - && ((__const uint32_t *) (a))[2] == 0 \
- - && ((__const uint32_t *) (a))[3] == 0)
- + (((const uint32_t *) (a))[0] == 0 \
- + && ((const uint32_t *) (a))[1] == 0 \
- + && ((const uint32_t *) (a))[2] == 0 \
- + && ((const uint32_t *) (a))[3] == 0)
-
- #define IN6_IS_ADDR_LOOPBACK(a) \
- - (((__const uint32_t *) (a))[0] == 0 \
- - && ((__const uint32_t *) (a))[1] == 0 \
- - && ((__const uint32_t *) (a))[2] == 0 \
- - && ((__const uint32_t *) (a))[3] == htonl (1))
- + (((const uint32_t *) (a))[0] == 0 \
- + && ((const uint32_t *) (a))[1] == 0 \
- + && ((const uint32_t *) (a))[2] == 0 \
- + && ((const uint32_t *) (a))[3] == htonl (1))
-
- -#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff)
- +#define IN6_IS_ADDR_MULTICAST(a) (((const uint8_t *) (a))[0] == 0xff)
-
- #define IN6_IS_ADDR_LINKLOCAL(a) \
- - ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \
- + ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \
- == htonl (0xfe800000))
-
- #define IN6_IS_ADDR_SITELOCAL(a) \
- - ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \
- + ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \
- == htonl (0xfec00000))
-
- #define IN6_IS_ADDR_V4MAPPED(a) \
- - ((((__const uint32_t *) (a))[0] == 0) \
- - && (((__const uint32_t *) (a))[1] == 0) \
- - && (((__const uint32_t *) (a))[2] == htonl (0xffff)))
- + ((((const uint32_t *) (a))[0] == 0) \
- + && (((const uint32_t *) (a))[1] == 0) \
- + && (((const uint32_t *) (a))[2] == htonl (0xffff)))
-
- #define IN6_IS_ADDR_V4COMPAT(a) \
- - ((((__const uint32_t *) (a))[0] == 0) \
- - && (((__const uint32_t *) (a))[1] == 0) \
- - && (((__const uint32_t *) (a))[2] == 0) \
- - && (ntohl (((__const uint32_t *) (a))[3]) > 1))
- + ((((const uint32_t *) (a))[0] == 0) \
- + && (((const uint32_t *) (a))[1] == 0) \
- + && (((const uint32_t *) (a))[2] == 0) \
- + && (ntohl (((const uint32_t *) (a))[3]) > 1))
-
- #define IN6_ARE_ADDR_EQUAL(a,b) \
- - ((((__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0]) \
- - && (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \
- - && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \
- - && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3]))
- + ((((const uint32_t *) (a))[0] == ((const uint32_t *) (b))[0]) \
- + && (((const uint32_t *) (a))[1] == ((const uint32_t *) (b))[1]) \
- + && (((const uint32_t *) (a))[2] == ((const uint32_t *) (b))[2]) \
- + && (((const uint32_t *) (a))[3] == ((const uint32_t *) (b))[3]))
- #endif
-
- #if defined __USE_MISC || defined __USE_GNU
- @@ -470,23 +469,23 @@
- #if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__
- #define IN6_IS_ADDR_MC_NODELOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) \
- - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x1))
- + && ((((const uint8_t *) (a))[1] & 0xf) == 0x1))
-
- #define IN6_IS_ADDR_MC_LINKLOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) \
- - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x2))
- + && ((((const uint8_t *) (a))[1] & 0xf) == 0x2))
-
- #define IN6_IS_ADDR_MC_SITELOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) \
- - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x5))
- + && ((((const uint8_t *) (a))[1] & 0xf) == 0x5))
-
- #define IN6_IS_ADDR_MC_ORGLOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) \
- - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x8))
- + && ((((const uint8_t *) (a))[1] & 0xf) == 0x8))
-
- #define IN6_IS_ADDR_MC_GLOBAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) \
- - && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe))
- + && ((((const uint8_t *) (a))[1] & 0xf) == 0xe))
- #endif
-
-
- @@ -514,15 +513,15 @@
- extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp,
- int __type) __THROW __attribute_deprecated__;
- extern int inet6_option_append (struct cmsghdr *__cmsg,
- - __const uint8_t *__typep, int __multx,
- + const uint8_t *__typep, int __multx,
- int __plusy) __THROW __attribute_deprecated__;
- extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen,
- int __multx, int __plusy)
- __THROW __attribute_deprecated__;
- -extern int inet6_option_next (__const struct cmsghdr *__cmsg,
- +extern int inet6_option_next (const struct cmsghdr *__cmsg,
- uint8_t **__tptrp)
- __THROW __attribute_deprecated__;
- -extern int inet6_option_find (__const struct cmsghdr *__cmsg,
- +extern int inet6_option_find (const struct cmsghdr *__cmsg,
- uint8_t **__tptrp, int __type)
- __THROW __attribute_deprecated__;
-
- @@ -550,10 +549,10 @@
- extern socklen_t inet6_rth_space (int __type, int __segments) __THROW;
- extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type,
- int __segments) __THROW;
- -extern int inet6_rth_add (void *__bp, __const struct in6_addr *__addr) __THROW;
- -extern int inet6_rth_reverse (__const void *__in, void *__out) __THROW;
- -extern int inet6_rth_segments (__const void *__bp) __THROW;
- -extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index)
- +extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) __THROW;
- +extern int inet6_rth_reverse (const void *__in, void *__out) __THROW;
- +extern int inet6_rth_segments (const void *__bp) __THROW;
- +extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index)
- __THROW;
- # endif
- # endif
- @@ -572,23 +571,23 @@
- extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr,
- struct in_addr __group, uint32_t __fmode,
- uint32_t __numsrc,
- - __const struct in_addr *__slist)
- + const struct in_addr *__slist)
- __THROW;
-
-
- /* Get source filter. */
- extern int getsourcefilter (int __s, uint32_t __interface_addr,
- - __const struct sockaddr *__group,
- + const struct sockaddr *__group,
- socklen_t __grouplen, uint32_t *__fmode,
- uint32_t *__numsrc,
- struct sockaddr_storage *__slist) __THROW;
-
- /* Set source filter. */
- extern int setsourcefilter (int __s, uint32_t __interface_addr,
- - __const struct sockaddr *__group,
- + const struct sockaddr *__group,
- socklen_t __grouplen, uint32_t __fmode,
- uint32_t __numsrc,
- - __const struct sockaddr_storage *__slist) __THROW;
- + const struct sockaddr_storage *__slist) __THROW;
- # endif
- #endif /* use GNU */
-
- diff -Nur uClibc-0.9.33.2/include/netinet/in_systm.h uClibc/include/netinet/in_systm.h
- --- uClibc-0.9.33.2/include/netinet/in_systm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/in_systm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETINET_IN_SYSTM_H
- #define _NETINET_IN_SYSTM_H 1
- diff -Nur uClibc-0.9.33.2/include/netinet/ip6.h uClibc/include/netinet/ip6.h
- --- uClibc-0.9.33.2/include/netinet/ip6.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/ip6.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETINET_IP6_H
- #define _NETINET_IP6_H 1
- diff -Nur uClibc-0.9.33.2/include/netinet/ip.h uClibc/include/netinet/ip.h
- --- uClibc-0.9.33.2/include/netinet/ip.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/ip.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef __NETINET_IP_H
- #define __NETINET_IP_H 1
- diff -Nur uClibc-0.9.33.2/include/netinet/ip_icmp.h uClibc/include/netinet/ip_icmp.h
- --- uClibc-0.9.33.2/include/netinet/ip_icmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/ip_icmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef __NETINET_IP_ICMP_H
- #define __NETINET_IP_ICMP_H 1
- diff -Nur uClibc-0.9.33.2/include/netinet/udp.h uClibc/include/netinet/udp.h
- --- uClibc-0.9.33.2/include/netinet/udp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netinet/udp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * Copyright (C) 1982, 1986 Regents of the University of California.
- diff -Nur uClibc-0.9.33.2/include/netipx/ipx.h uClibc/include/netipx/ipx.h
- --- uClibc-0.9.33.2/include/netipx/ipx.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netipx/ipx.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef __NETIPX_IPX_H
- #define __NETIPX_IPX_H 1
- diff -Nur uClibc-0.9.33.2/include/netpacket/packet.h uClibc/include/netpacket/packet.h
- --- uClibc-0.9.33.2/include/netpacket/packet.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/netpacket/packet.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef __NETPACKET_PACKET_H
- #define __NETPACKET_PACKET_H 1
- diff -Nur uClibc-0.9.33.2/include/nl_types.h uClibc/include/nl_types.h
- --- uClibc-0.9.33.2/include/nl_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/nl_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NL_TYPES_H
- #define _NL_TYPES_H 1
- @@ -49,12 +48,12 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern nl_catd catopen (__const char *__cat_name, int __flag) __nonnull ((1));
- +extern nl_catd catopen (const char *__cat_name, int __flag) __nonnull ((1));
-
- /* Return translation with NUMBER in SET of CATALOG; if not found
- return STRING. */
- extern char *catgets (nl_catd __catalog, int __set, int __number,
- - __const char *__string) __THROW __nonnull ((1));
- + const char *__string) __THROW __nonnull ((1));
-
- /* Close message CATALOG. */
- extern int catclose (nl_catd __catalog) __THROW __nonnull ((1));
- diff -Nur uClibc-0.9.33.2/include/obstack.h uClibc/include/obstack.h
- --- uClibc-0.9.33.2/include/obstack.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/obstack.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Summary:
-
- @@ -180,6 +179,7 @@
- /* Declare the external functions we use; they are in obstack.c. */
-
- extern void _obstack_newchunk (struct obstack *, int);
- +libc_hidden_proto(_obstack_newchunk)
- extern int _obstack_begin (struct obstack *, int, int,
- void *(*) (long), void (*) (void *));
- extern int _obstack_begin_1 (struct obstack *, int, int,
- diff -Nur uClibc-0.9.33.2/include/printf.h uClibc/include/printf.h
- --- uClibc-0.9.33.2/include/printf.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/printf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* March 11, 2001 Manuel Novoa III
- *
- @@ -143,14 +142,14 @@
-
- #ifdef __UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__
- typedef int (*printf_function) (FILE *__stream,
- - __const struct printf_info *__info,
- - __const void *__const *__args);
- + const struct printf_info *__info,
- + const void *const *__args);
-
- /* Type of a printf specifier-arginfo function.
- INFO gives information about the format specification.
- N, ARGTYPES, and return value are as for parse_printf_format. */
-
- -typedef int printf_arginfo_function (__const struct printf_info *__info,
- +typedef int printf_arginfo_function (const struct printf_info *__info,
- size_t __n, int *__argtypes);
-
-
- @@ -174,7 +173,7 @@
- array it is passed with the types of the arguments it wants, and return
- the number of arguments it wants. */
-
- -extern size_t parse_printf_format (__const char *__restrict __fmt, size_t __n,
- +extern size_t parse_printf_format (const char *__restrict __fmt, size_t __n,
- int *__restrict __argtypes) __THROW;
-
-
- @@ -222,11 +221,11 @@
- the format specifier is a uppercase character powers of 1000 are
- used. Otherwise powers of 1024. */
- extern int printf_size (FILE *__restrict __fp,
- - __const struct printf_info *__info,
- - __const void *__const *__restrict __args) __THROW;
- + const struct printf_info *__info,
- + const void *const *__restrict __args) __THROW;
-
- /* This is the appropriate argument information function for `printf_size'. */
- -extern int printf_size_info (__const struct printf_info *__restrict
- +extern int printf_size_info (const struct printf_info *__restrict
- __info, size_t __n, int *__restrict __argtypes)
- __THROW;
-
- diff -Nur uClibc-0.9.33.2/include/pty.h uClibc/include/pty.h
- --- uClibc-0.9.33.2/include/pty.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/pty.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _PTY_H
- #define _PTY_H 1
- diff -Nur uClibc-0.9.33.2/include/pwd.h uClibc/include/pwd.h
- --- uClibc-0.9.33.2/include/pwd.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/pwd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 9.2.2 User Database Access <pwd.h>
- @@ -100,7 +99,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int putpwent (__const struct passwd *__restrict __p,
- +extern int putpwent (const struct passwd *__restrict __p,
- FILE *__restrict __f);
- #endif
-
- @@ -114,7 +113,8 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct passwd *getpwnam (__const char *__name);
- +extern struct passwd *getpwnam (const char *__name);
- +libc_hidden_proto(getpwnam)
-
- #if defined __USE_POSIX || defined __USE_MISC
-
- @@ -149,7 +149,7 @@
- struct passwd **__restrict __result);
- libc_hidden_proto(getpwuid_r)
-
- -extern int getpwnam_r (__const char *__restrict __name,
- +extern int getpwnam_r (const char *__restrict __name,
- struct passwd *__restrict __resultbuf,
- char *__restrict __buffer, size_t __buflen,
- struct passwd **__restrict __result);
- diff -Nur uClibc-0.9.33.2/include/regex.h uClibc/include/regex.h
- --- uClibc-0.9.33.2/include/regex.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/regex.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,6 +1,6 @@
- /* Definitions for data structures and routines for the regular
- expression library.
- - Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005
- + Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- @@ -15,28 +15,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _REGEX_H
- #define _REGEX_H 1
-
- -#include <features.h>
- -
- #include <sys/types.h>
-
- __BEGIN_DECLS
-
- -/* POSIX says that <sys/types.h> must be included (by the caller) before
- - <regex.h>. */
- -
- -#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
- -/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
- - should be there. */
- -# include <stddef.h>
- -#endif
- -
- /* The following two types have to be signed and unsigned integer type
- wide enough to hold a value of a pointer. For most ANSI compilers
- ptrdiff_t and size_t should be likely OK. Still size of these two
- @@ -51,20 +39,21 @@
- add or remove a bit, only one other definition need change. */
- typedef unsigned long int reg_syntax_t;
-
- +#ifdef __USE_GNU
- /* If this bit is not set, then \ inside a bracket expression is literal.
- If set, then such a \ quotes the following character. */
- -#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
- +# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
-
- /* If this bit is not set, then + and ? are operators, and \+ and \? are
- literals.
- If set, then \+ and \? are operators and + and ? are literals. */
- -#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
- +# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
-
- /* If this bit is set, then character classes are supported. They are:
- [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
- [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
- If not set, then character classes are not supported. */
- -#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
- +# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
-
- /* If this bit is set, then ^ and $ are always anchors (outside bracket
- expressions, of course).
- @@ -78,7 +67,7 @@
- POSIX draft 11.2 says that * etc. in leading positions is undefined.
- We already implemented a previous draft which made those constructs
- invalid, though, so we haven't changed the code back. */
- -#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
- +# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
-
- /* If this bit is set, then special characters are always special
- regardless of where they are in the pattern.
- @@ -86,71 +75,71 @@
- some contexts; otherwise they are ordinary. Specifically,
- * + ? and intervals are only special when not after the beginning,
- open-group, or alternation operator. */
- -#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
- +# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
-
- /* If this bit is set, then *, +, ?, and { cannot be first in an re or
- immediately after an alternation or begin-group operator. */
- -#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
- +# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
-
- /* If this bit is set, then . matches newline.
- If not set, then it doesn't. */
- -#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
- +# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
-
- /* If this bit is set, then . doesn't match NUL.
- If not set, then it does. */
- -#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
- +# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
-
- /* If this bit is set, nonmatching lists [^...] do not match newline.
- If not set, they do. */
- -#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
- +# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
-
- /* If this bit is set, either \{...\} or {...} defines an
- interval, depending on RE_NO_BK_BRACES.
- If not set, \{, \}, {, and } are literals. */
- -#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
- +# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
-
- /* If this bit is set, +, ? and | aren't recognized as operators.
- If not set, they are. */
- -#define RE_LIMITED_OPS (RE_INTERVALS << 1)
- +# define RE_LIMITED_OPS (RE_INTERVALS << 1)
-
- /* If this bit is set, newline is an alternation operator.
- If not set, newline is literal. */
- -#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
- +# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
-
- /* If this bit is set, then `{...}' defines an interval, and \{ and \}
- are literals.
- If not set, then `\{...\}' defines an interval. */
- -#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
- +# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
-
- /* If this bit is set, (...) defines a group, and \( and \) are literals.
- If not set, \(...\) defines a group, and ( and ) are literals. */
- -#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
- +# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
-
- /* If this bit is set, then \<digit> matches <digit>.
- If not set, then \<digit> is a back-reference. */
- -#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
- +# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
-
- /* If this bit is set, then | is an alternation operator, and \| is literal.
- If not set, then \| is an alternation operator, and | is literal. */
- -#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
- +# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
-
- /* If this bit is set, then an ending range point collating higher
- than the starting range point, as in [z-a], is invalid.
- If not set, then when ending range point collates higher than the
- starting range point, the range is ignored. */
- -#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
- +# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
-
- /* If this bit is set, then an unmatched ) is ordinary.
- If not set, then an unmatched ) is invalid. */
- -#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
- +# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
-
- /* If this bit is set, succeed as soon as we match the whole pattern,
- without further backtracking. */
- -#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
- +# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
-
- /* If this bit is set, do not process the GNU regex operators.
- If not set, then the GNU regex operators are recognized. */
- -#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
- +# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
-
- /* If this bit is set, turn on internal regex debugging.
- If not set, and debugging was on, turn it off.
- @@ -158,29 +147,30 @@
- We define this bit always, so that all that's needed to turn on
- debugging is to recompile regex.c; the calling code can always have
- this bit set, and it won't affect anything in the normal case. */
- -#define RE_DEBUG (RE_NO_GNU_OPS << 1)
- +# define RE_DEBUG (RE_NO_GNU_OPS << 1)
-
- /* If this bit is set, a syntactically invalid interval is treated as
- a string of ordinary characters. For example, the ERE 'a{1' is
- treated as 'a\{1'. */
- -#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
- +# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
-
- /* If this bit is set, then ignore case when matching.
- If not set, then case is significant. */
- -#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
- +# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
-
- /* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only
- for ^, because it is difficult to scan the regex backwards to find
- whether ^ should be special. */
- -#define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
- +# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
-
- /* If this bit is set, then \{ cannot be first in an bre or
- immediately after an alternation or begin-group operator. */
- -#define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
- +# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
-
- /* If this bit is set, then no_sub will be set to 1 during
- re_compile_pattern. */
- -#define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
- +# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
- +#endif
-
- /* This global variable defines the particular regexp syntax to use (for
- some interfaces). When a regexp is compiled, the syntax used is
- @@ -188,6 +178,7 @@
- already-compiled regexps. */
- extern reg_syntax_t re_syntax_options;
-
- +#ifdef __USE_GNU
- /* Define combinations of the above bits for the standard possibilities.
- (The [[[ comments delimit what gets put into the Texinfo file, so
- don't delete them!) */
- @@ -262,11 +253,12 @@
- /* Maximum number of duplicates an interval can allow. Some systems
- (erroneously) define this in other header files, but we want our
- value, so remove any previous define. */
- -#ifdef RE_DUP_MAX
- -# undef RE_DUP_MAX
- -#endif
- +# ifdef RE_DUP_MAX
- +# undef RE_DUP_MAX
- +# endif
- /* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
- -#define RE_DUP_MAX (0x7fff)
- +# define RE_DUP_MAX (0x7fff)
- +#endif
-
-
- /* POSIX `cflags' bits (i.e., information for `regcomp'). */
- @@ -310,7 +302,7 @@
- `re_error_msg' table in regex.c. */
- typedef enum
- {
- -#ifdef _XOPEN_SOURCE
- +#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K
- REG_ENOSYS = -1, /* This will never happen for this implementation. */
- #endif
-
- @@ -345,7 +337,16 @@
- private to the regex routines. */
-
- #ifndef RE_TRANSLATE_TYPE
- -# define RE_TRANSLATE_TYPE unsigned char *
- +# define __RE_TRANSLATE_TYPE unsigned char *
- +# ifdef __USE_GNU
- +# define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE
- +# endif
- +#endif
- +
- +#ifdef __USE_GNU
- +# define __REPB_PREFIX(name) name
- +#else
- +# define __REPB_PREFIX(name) __##name
- #endif
-
- struct re_pattern_buffer
- @@ -353,27 +354,27 @@
- /* Space that holds the compiled pattern. It is declared as
- `unsigned char *' because its elements are sometimes used as
- array indexes. */
- - unsigned char *buffer;
- + unsigned char *__REPB_PREFIX(buffer);
-
- /* Number of bytes to which `buffer' points. */
- - unsigned long int allocated;
- + unsigned long int __REPB_PREFIX(allocated);
-
- /* Number of bytes actually used in `buffer'. */
- - unsigned long int used;
- + unsigned long int __REPB_PREFIX(used);
-
- /* Syntax setting with which the pattern was compiled. */
- - reg_syntax_t syntax;
- + reg_syntax_t __REPB_PREFIX(syntax);
-
- /* Pointer to a fastmap, if any, otherwise zero. re_search uses the
- fastmap, if there is one, to skip over impossible starting points
- for matches. */
- - char *fastmap;
- + char *__REPB_PREFIX(fastmap);
-
- /* Either a translate table to apply to all characters before
- comparing them, or zero for no translation. The translation is
- applied to a pattern when it is compiled and to a string when it
- is matched. */
- - RE_TRANSLATE_TYPE translate;
- + __RE_TRANSLATE_TYPE __REPB_PREFIX(translate);
-
- /* Number of subexpressions found by the compiler. */
- size_t re_nsub;
- @@ -382,34 +383,36 @@
- Well, in truth it's used only in `re_search_2', to see whether or
- not we should use the fastmap, so we don't set this absolutely
- perfectly; see `re_compile_fastmap' (the `duplicate' case). */
- - unsigned can_be_null : 1;
- + unsigned __REPB_PREFIX(can_be_null) : 1;
-
- /* If REGS_UNALLOCATED, allocate space in the `regs' structure
- for `max (RE_NREGS, re_nsub + 1)' groups.
- If REGS_REALLOCATE, reallocate space if necessary.
- If REGS_FIXED, use what's there. */
- -#define REGS_UNALLOCATED 0
- -#define REGS_REALLOCATE 1
- -#define REGS_FIXED 2
- - unsigned regs_allocated : 2;
- +#ifdef __USE_GNU
- +# define REGS_UNALLOCATED 0
- +# define REGS_REALLOCATE 1
- +# define REGS_FIXED 2
- +#endif
- + unsigned __REPB_PREFIX(regs_allocated) : 2;
-
- /* Set to zero when `regex_compile' compiles a pattern; set to one
- by `re_compile_fastmap' if it updates the fastmap. */
- - unsigned fastmap_accurate : 1;
- + unsigned __REPB_PREFIX(fastmap_accurate) : 1;
-
- /* If set, `re_match_2' does not return information about
- subexpressions. */
- - unsigned no_sub : 1;
- + unsigned __REPB_PREFIX(no_sub) : 1;
-
- /* If set, a beginning-of-line anchor doesn't match at the beginning
- of the string. */
- - unsigned not_bol : 1;
- + unsigned __REPB_PREFIX(not_bol) : 1;
-
- /* Similarly for an end-of-line anchor. */
- - unsigned not_eol : 1;
- + unsigned __REPB_PREFIX(not_eol) : 1;
-
- /* If true, an anchor at a newline matches. */
- - unsigned newline_anchor : 1;
- + unsigned __REPB_PREFIX(newline_anchor) : 1;
- };
-
- typedef struct re_pattern_buffer regex_t;
- @@ -418,6 +421,7 @@
- typedef int regoff_t;
-
-
- +#ifdef __USE_GNU
- /* This is the structure we store register match data in. See
- regex.texinfo for a full description of what registers match. */
- struct re_registers
- @@ -431,8 +435,9 @@
- /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
- `re_match_2' returns information about at least this many registers
- the first time a `regs' structure is passed. */
- -#ifndef RE_NREGS
- -# define RE_NREGS 30
- +# ifndef RE_NREGS
- +# define RE_NREGS 30
- +# endif
- #endif
-
-
- @@ -447,7 +452,7 @@
-
- /* Declarations for routines. */
-
- -
- +#ifdef __USE_GNU
- /* Sets the current default syntax to SYNTAX, and return the old syntax.
- You can also simply assign to the `re_syntax_options' variable. */
- extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
- @@ -515,8 +520,9 @@
- struct re_registers *__regs,
- unsigned int __num_regs,
- regoff_t *__starts, regoff_t *__ends);
- +#endif /* Use GNU */
-
- -#if defined _REGEX_RE_COMP || defined _LIBC
- +#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD)
- # ifndef _CRAY
- /* 4.2 bsd compatibility. */
- extern char *re_comp (const char *);
- @@ -537,7 +543,8 @@
- #endif
- /* gcc 3.1 and up support the [restrict] syntax. */
- #ifndef __restrict_arr
- -# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
- +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) \
- + && !defined __GNUG__
- # define __restrict_arr __restrict
- # else
- # define __restrict_arr
- diff -Nur uClibc-0.9.33.2/include/regexp.h uClibc/include/regexp.h
- --- uClibc-0.9.33.2/include/regexp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/regexp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _REGEXP_H
- #define _REGEXP_H 1
- @@ -103,7 +102,7 @@
- on the macros. */
- char *
- compile (char *__restrict instring, char *__restrict expbuf,
- - __const char *__restrict endbuf, int eof)
- + const char *__restrict endbuf, int eof)
- {
- char *__input_buffer = NULL;
- size_t __input_size = 0;
- @@ -216,14 +215,14 @@
- found in the buffer starting at EXPBUF. `loc1' will return the
- first character matched and `loc2' points to the next unmatched
- character. */
- -extern int step (__const char *__restrict __string,
- - __const char *__restrict __expbuf) __THROW;
- +extern int step (const char *__restrict __string,
- + const char *__restrict __expbuf) __THROW;
-
- /* Match the beginning of STRING with the compiled regular expression
- in EXPBUF. If the match is successful `loc2' will contain the
- position of the first unmatched character. */
- -extern int advance (__const char *__restrict __string,
- - __const char *__restrict __expbuf) __THROW;
- +extern int advance (const char *__restrict __string,
- + const char *__restrict __expbuf) __THROW;
- #endif
-
-
- diff -Nur uClibc-0.9.33.2/include/rpc/auth_des.h uClibc/include/rpc/auth_des.h
- --- uClibc-0.9.33.2/include/rpc/auth_des.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/rpc/auth_des.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _RPC_AUTH_DES_H
- #define _RPC_AUTH_DES_H 1
- @@ -89,27 +88,26 @@
- #define adv_nickname adv_int_u
-
- /* Map a des credential into a unix cred. */
- -extern int authdes_getucred (__const struct authdes_cred * __adc,
- +extern int authdes_getucred (const struct authdes_cred * __adc,
- uid_t * __uid, gid_t * __gid,
- short *__grouplen, gid_t * __groups) __THROW;
-
- /* Get the public key for NAME and place it in KEY. NAME can only be
- up to MAXNETNAMELEN bytes long and the destination buffer KEY should
- have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */
- -extern int getpublickey (__const char *__name, char *__key) __THROW;
- +extern int getpublickey (const char *__name, char *__key) __THROW;
-
- /* Get the secret key for NAME and place it in KEY. PASSWD is used to
- decrypt the encrypted key stored in the database. NAME can only be
- up to MAXNETNAMELEN bytes long and the destination buffer KEY
- should have HEXKEYBYTES + 1 bytes long to fit all characters from
- the key. */
- -extern int getsecretkey (__const char *__name, char *__key,
- - __const char *__passwd) __THROW;
- +extern int getsecretkey (const char *__name, char *__key,
- + const char *__passwd) __THROW;
- #endif
-
- extern int rtime (struct sockaddr_in *__addrp, struct rpc_timeval *__timep,
- struct rpc_timeval *__timeout) __THROW;
- -libc_hidden_proto(rtime)
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/rpc/auth.h uClibc/include/rpc/auth.h
- --- uClibc-0.9.33.2/include/rpc/auth.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/rpc/auth.h 2014-02-03 12:32:56.000000000 +0100
- @@ -41,17 +41,6 @@
- #ifndef _RPC_AUTH_H
-
- #define _RPC_AUTH_H 1
- -#ifdef _LIBC
- -/* Some adjustments to make the libc source from glibc
- - * compile more easily with uClibc... */
- -#ifndef __FORCE_GLIBC
- -#define __FORCE_GLIBC
- -#endif
- -#ifndef _GNU_SOURCE
- -#define _GNU_SOURCE
- -#endif
- -#define _(X) X
- -#endif
- #include <features.h>
- #include <rpc/xdr.h>
-
- @@ -107,6 +96,10 @@
- struct opaque_auth ah_cred;
- struct opaque_auth ah_verf;
- union des_block ah_key;
- + /* not sure whether non-const-ness is a part of the spec... if it is,
- + * enclose "const" in #ifdef _LIBC / #endif
- + * to make it effective only for libc compile */
- + const
- struct auth_ops {
- void (*ah_nextverf) (AUTH *);
- int (*ah_marshal) (AUTH *, XDR *); /* nextverf & serialize */
- @@ -200,11 +193,11 @@
- *
- */
- extern int getnetname (char *) __THROW;
- -extern int host2netname (char *, __const char *, __const char *) __THROW;
- -extern int user2netname (char *, __const uid_t, __const char *) __THROW;
- -extern int netname2user (__const char *, uid_t *, gid_t *, int *, gid_t *)
- +extern int host2netname (char *, const char *, const char *) __THROW;
- +extern int user2netname (char *, const uid_t, const char *) __THROW;
- +extern int netname2user (const char *, uid_t *, gid_t *, int *, gid_t *)
- __THROW;
- -extern int netname2host (__const char *, char *, __const int) __THROW;
- +extern int netname2host (const char *, char *, const int) __THROW;
-
- /*
- *
- diff -Nur uClibc-0.9.33.2/include/rpc/clnt.h uClibc/include/rpc/clnt.h
- --- uClibc-0.9.33.2/include/rpc/clnt.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/rpc/clnt.h 2014-02-03 12:32:56.000000000 +0100
- @@ -281,7 +281,7 @@
- * u_long prog;
- * u_long vers;
- */
- -extern CLIENT *clntraw_create (__const u_long __prog, __const u_long __vers)
- +extern CLIENT *clntraw_create (const u_long __prog, const u_long __vers)
- __THROW;
-
-
- @@ -295,8 +295,8 @@
- * u_ong vers; -- version number
- * char *prot; -- protocol
- */
- -extern CLIENT *clnt_create (__const char *__host, __const u_long __prog,
- - __const u_long __vers, __const char *__prot)
- +extern CLIENT *clnt_create (const char *__host, const u_long __prog,
- + const u_long __vers, const char *__prot)
- __THROW;
-
-
- @@ -365,18 +365,18 @@
- libc_hidden_proto(clntunix_create)
-
-
- -extern int callrpc (__const char *__host, __const u_long __prognum,
- - __const u_long __versnum, __const u_long __procnum,
- - __const xdrproc_t __inproc, __const char *__in,
- - __const xdrproc_t __outproc, char *__out) __THROW;
- +extern int callrpc (const char *__host, const u_long __prognum,
- + const u_long __versnum, const u_long __procnum,
- + const xdrproc_t __inproc, const char *__in,
- + const xdrproc_t __outproc, char *__out) __THROW;
- extern int _rpc_dtablesize (void) __THROW;
- libc_hidden_proto(_rpc_dtablesize)
-
- /*
- * Print why creation failed
- */
- -extern void clnt_pcreateerror (__const char *__msg); /* stderr */
- -extern char *clnt_spcreateerror(__const char *__msg) __THROW; /* string */
- +extern void clnt_pcreateerror (const char *__msg); /* stderr */
- +extern char *clnt_spcreateerror(const char *__msg) __THROW; /* string */
- libc_hidden_proto(clnt_spcreateerror)
-
- /*
- @@ -387,10 +387,10 @@
- /*
- * Print an English error message, given the client error code
- */
- -extern void clnt_perror (CLIENT *__clnt, __const char *__msg);
- +extern void clnt_perror (CLIENT *__clnt, const char *__msg);
- /* stderr */
- libc_hidden_proto(clnt_perror)
- -extern char *clnt_sperror (CLIENT *__clnt, __const char *__msg) __THROW;
- +extern char *clnt_sperror (CLIENT *__clnt, const char *__msg) __THROW;
- /* string */
- libc_hidden_proto(clnt_sperror)
-
- @@ -416,7 +416,7 @@
- /*
- * get the port number on the host for the rpc program,version and proto
- */
- -extern int getrpcport (__const char * __host, u_long __prognum,
- +extern int getrpcport (const char * __host, u_long __prognum,
- u_long __versnum, u_int proto) __THROW;
-
- /*
- diff -Nur uClibc-0.9.33.2/include/rpc/netdb.h uClibc/include/rpc/netdb.h
- --- uClibc-0.9.33.2/include/rpc/netdb.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/rpc/netdb.h 2014-02-03 12:32:56.000000000 +0100
- @@ -54,7 +54,7 @@
- libc_hidden_proto(setrpcent)
- extern void endrpcent (void) __THROW;
- libc_hidden_proto(endrpcent)
- -extern struct rpcent *getrpcbyname (__const char *__name) __THROW;
- +extern struct rpcent *getrpcbyname (const char *__name) __THROW;
- libc_hidden_proto(getrpcbyname)
- extern struct rpcent *getrpcbynumber (int __number) __THROW;
- libc_hidden_proto(getrpcbynumber)
- @@ -62,7 +62,7 @@
- libc_hidden_proto(getrpcent)
-
- #if defined __USE_MISC && defined __UCLIBC_HAS_REENTRANT_RPC__
- -extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf,
- +extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf,
- char *__buffer, size_t __buflen,
- struct rpcent **__result) __THROW;
-
- diff -Nur uClibc-0.9.33.2/include/rpc/pmap_clnt.h uClibc/include/rpc/pmap_clnt.h
- --- uClibc-0.9.33.2/include/rpc/pmap_clnt.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/rpc/pmap_clnt.h 2014-02-03 12:32:56.000000000 +0100
- @@ -69,30 +69,30 @@
- * address if the responder to the broadcast.
- */
-
- -extern bool_t pmap_set (__const u_long __program, __const u_long __vers,
- +extern bool_t pmap_set (const u_long __program, const u_long __vers,
- int __protocol, u_short __port) __THROW;
- libc_hidden_proto(pmap_set)
- -extern bool_t pmap_unset (__const u_long __program, __const u_long __vers)
- +extern bool_t pmap_unset (const u_long __program, const u_long __vers)
- __THROW;
- libc_hidden_proto(pmap_unset)
- extern struct pmaplist *pmap_getmaps (struct sockaddr_in *__address) __THROW;
- extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr,
- - __const u_long __prog,
- - __const u_long __vers,
- - __const u_long __proc,
- + const u_long __prog,
- + const u_long __vers,
- + const u_long __proc,
- xdrproc_t __xdrargs,
- caddr_t __argsp, xdrproc_t __xdrres,
- caddr_t __resp, struct timeval __tout,
- u_long *__port_ptr) __THROW;
- -extern enum clnt_stat clnt_broadcast (__const u_long __prog,
- - __const u_long __vers,
- - __const u_long __proc, xdrproc_t __xargs,
- +extern enum clnt_stat clnt_broadcast (const u_long __prog,
- + const u_long __vers,
- + const u_long __proc, xdrproc_t __xargs,
- caddr_t __argsp, xdrproc_t __xresults,
- caddr_t __resultsp,
- resultproc_t __eachresult) __THROW;
- extern u_short pmap_getport (struct sockaddr_in *__address,
- - __const u_long __program,
- - __const u_long __version, u_int __protocol)
- + const u_long __program,
- + const u_long __version, u_int __protocol)
- __THROW;
- libc_hidden_proto(pmap_getport)
-
- diff -Nur uClibc-0.9.33.2/include/rpc/rpc.h uClibc/include/rpc/rpc.h
- --- uClibc-0.9.33.2/include/rpc/rpc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/rpc/rpc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -38,19 +38,6 @@
- #ifndef _RPC_RPC_H
- #define _RPC_RPC_H 1
-
- -#ifdef _LIBC
- -/* Some adjustments to make the libc source from glibc
- - * compile more easily with uClibc... */
- -#ifndef __FORCE_GLIBC
- -#define __FORCE_GLIBC
- -#endif
- -#ifndef _GNU_SOURCE
- -#define _GNU_SOURCE
- -#endif
- -#define _(X) X
- -#include <features.h>
- -#endif
- -
- #include <rpc/types.h> /* some typedefs */
- #include <netinet/in.h>
-
- @@ -109,11 +96,6 @@
- libc_hidden_proto(__rpc_thread_svc_max_pollfd)
- #define svc_max_pollfd (*__rpc_thread_svc_max_pollfd ())
-
- -extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar);
- -libc_hidden_proto(xdr_accepted_reply)
- -extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr);
- -libc_hidden_proto(xdr_rejected_reply)
- -
- __END_DECLS
-
- #endif /* rpc/rpc.h */
- diff -Nur uClibc-0.9.33.2/include/rpc/rpc_msg.h uClibc/include/rpc/rpc_msg.h
- --- uClibc-0.9.33.2/include/rpc/rpc_msg.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/rpc/rpc_msg.h 2014-02-03 12:32:56.000000000 +0100
- @@ -201,6 +201,26 @@
- __THROW;
- libc_hidden_proto(_seterr_reply)
-
- +#ifdef __UCLIBC__
- +/*
- + * XDR routine to handle an accepted rpc reply.
- + * xdr_accepted_reply(xdrs, rej)
- + * XDR *xdrs;
- + * struct accepted_reply *rej;
- + */
- +extern bool_t xdr_accepted_reply(XDR *__xdrs, struct accepted_reply *__ar);
- +libc_hidden_proto(xdr_accepted_reply)
- +
- +/*
- + * XDR routine to handle a rejected rpc reply.
- + * xdr_rejected_reply(xdrs, rej)
- + * XDR *xdrs;
- + * struct rejected_reply *rej;
- + */
- +extern bool_t xdr_rejected_reply(XDR *__xdrs, struct rejected_reply *__rr);
- +libc_hidden_proto(xdr_rejected_reply)
- +#endif
- +
- __END_DECLS
-
- #endif /* rpc/rpc_msg.h */
- diff -Nur uClibc-0.9.33.2/include/rpc/types.h uClibc/include/rpc/types.h
- --- uClibc-0.9.33.2/include/rpc/types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/rpc/types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -33,19 +33,6 @@
- #ifndef _RPC_TYPES_H
- #define _RPC_TYPES_H 1
-
- -#ifdef _LIBC
- -/* Some adjustments to make the libc source from glibc
- - * compile more easily with uClibc... */
- -#ifndef __FORCE_GLIBC
- -#define __FORCE_GLIBC
- -#endif
- -#ifndef _GNU_SOURCE
- -#define _GNU_SOURCE
- -#endif
- -#define _(X) X
- -#endif
- -#include <features.h>
- -
- typedef int bool_t;
- typedef int enum_t;
- /* This needs to be changed to uint32_t in the future */
- diff -Nur uClibc-0.9.33.2/include/rpc/xdr.h uClibc/include/rpc/xdr.h
- --- uClibc-0.9.33.2/include/rpc/xdr.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/rpc/xdr.h 2014-02-03 12:32:56.000000000 +0100
- @@ -36,14 +36,6 @@
- #ifndef _RPC_XDR_H
- #define _RPC_XDR_H 1
-
- -#ifdef _LIBC
- -/* Some adjustments to make the libc source from glibc
- - * compile more easily with uClibc... */
- -# ifndef __FORCE_GLIBC
- -# define __FORCE_GLIBC
- -# endif
- -# define _(X) X
- -#endif
- #include <features.h>
- #include <sys/types.h>
- #include <rpc/types.h>
- @@ -120,17 +112,21 @@
- struct XDR
- {
- enum xdr_op x_op; /* operation; fast additional param */
- + /* not sure whether non-const-ness is a part of the spec... if it is,
- + * enclose "const" in #ifdef _LIBC / #endif
- + * to make it effective only for libc compile */
- + const
- struct xdr_ops
- {
- bool_t (*x_getlong) (XDR *__xdrs, long *__lp);
- /* get a long from underlying stream */
- - bool_t (*x_putlong) (XDR *__xdrs, __const long *__lp);
- + bool_t (*x_putlong) (XDR *__xdrs, const long *__lp);
- /* put a long to " */
- bool_t (*x_getbytes) (XDR *__xdrs, caddr_t __addr, u_int __len);
- /* get some bytes from " */
- - bool_t (*x_putbytes) (XDR *__xdrs, __const char *__addr, u_int __len);
- + bool_t (*x_putbytes) (XDR *__xdrs, const char *__addr, u_int __len);
- /* put some bytes to " */
- - u_int (*x_getpostn) (__const XDR *__xdrs);
- + u_int (*x_getpostn) (const XDR *__xdrs);
- /* returns bytes off from beginning */
- bool_t (*x_setpostn) (XDR *__xdrs, u_int __pos);
- /* lets you reposition the stream */
- @@ -140,7 +136,7 @@
- /* free privates of this xdr_stream */
- bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip);
- /* get a int from underlying stream */
- - bool_t (*x_putint32) (XDR *__xdrs, __const int32_t *__ip);
- + bool_t (*x_putint32) (XDR *__xdrs, const int32_t *__ip);
- /* put a int to " */
- }
- *x_ops;
- @@ -320,6 +316,8 @@
- extern bool_t xdr_uint32_t (XDR *__xdrs, uint32_t *__up) __THROW;
- extern bool_t xdr_int64_t (XDR *__xdrs, int64_t *__ip) __THROW;
- extern bool_t xdr_uint64_t (XDR *__xdrs, uint64_t *__up) __THROW;
- +extern bool_t xdr_quad_t (XDR *__xdrs, quad_t *__ip) __THROW;
- +extern bool_t xdr_u_quad_t (XDR *__xdrs, u_quad_t *__up) __THROW;
- extern bool_t xdr_bool (XDR *__xdrs, bool_t *__bp) __THROW;
- libc_hidden_proto(xdr_bool)
- extern bool_t xdr_enum (XDR *__xdrs, enum_t *__ep) __THROW;
- @@ -336,7 +334,7 @@
- extern bool_t xdr_string (XDR *__xdrs, char **__cpp, u_int __maxsize) __THROW;
- libc_hidden_proto(xdr_string)
- extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp,
- - __const struct xdr_discrim *__choices,
- + const struct xdr_discrim *__choices,
- xdrproc_t dfault) __THROW;
- libc_hidden_proto(xdr_union)
- extern bool_t xdr_char (XDR *__xdrs, char *__cp) __THROW;
- @@ -372,7 +370,7 @@
- */
-
- /* XDR using memory buffers */
- -extern void xdrmem_create (XDR *__xdrs, __const caddr_t __addr,
- +extern void xdrmem_create (XDR *__xdrs, const caddr_t __addr,
- u_int __size, enum xdr_op __xop) __THROW;
- libc_hidden_proto(xdrmem_create)
-
- diff -Nur uClibc-0.9.33.2/include/sched.h uClibc/include/sched.h
- --- uClibc-0.9.33.2/include/sched.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sched.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SCHED_H
- #define _SCHED_H 1
- @@ -40,7 +39,7 @@
- __BEGIN_DECLS
-
- /* Set scheduling parameters for a process. */
- -extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
- +extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
- __THROW;
-
- /* Retrieve scheduling parameters for a particular process. */
- @@ -48,7 +47,7 @@
-
- /* Set scheduling algorithm and/or parameters for a process. */
- extern int sched_setscheduler (__pid_t __pid, int __policy,
- - __const struct sched_param *__param) __THROW;
- + const struct sched_param *__param) __THROW;
-
- /* Retrieve scheduling algorithm for a particular purpose. */
- extern int sched_getscheduler (__pid_t __pid) __THROW;
- @@ -108,11 +107,19 @@
-
- /* Set the CPU affinity for a task */
- extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
- - __const cpu_set_t *__cpuset) __THROW;
- + const cpu_set_t *__cpuset) __THROW;
-
- /* Get the CPU affinity for a task */
- extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
- cpu_set_t *__cpuset) __THROW;
- +
- +# ifdef _LIBC
- +extern int __clone (int (*__fn) (void *__arg), void *__child_stack,
- + int __flags, void *__arg, ...);
- +extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base,
- + size_t __child_stack_size, int __flags, void *__arg, ...);
- +# endif
- +
- #endif
-
- __END_DECLS
- diff -Nur uClibc-0.9.33.2/include/scsi/scsi.h uClibc/include/scsi/scsi.h
- --- uClibc-0.9.33.2/include/scsi/scsi.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/scsi/scsi.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * This header file contains public constants and structures used by
- diff -Nur uClibc-0.9.33.2/include/scsi/scsi_ioctl.h uClibc/include/scsi/scsi_ioctl.h
- --- uClibc-0.9.33.2/include/scsi/scsi_ioctl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/scsi/scsi_ioctl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SCSI_IOCTL_H
- #define _SCSI_IOCTL_H
- diff -Nur uClibc-0.9.33.2/include/scsi/sg.h uClibc/include/scsi/sg.h
- --- uClibc-0.9.33.2/include/scsi/sg.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/scsi/sg.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- History:
- diff -Nur uClibc-0.9.33.2/include/search.h uClibc/include/search.h
- --- uClibc-0.9.33.2/include/search.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/search.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SEARCH_H
- #define _SEARCH_H 1
- @@ -52,7 +51,7 @@
- /* For use with hsearch(3). */
- #ifndef __COMPAR_FN_T
- # define __COMPAR_FN_T
- -typedef int (*__compar_fn_t) (__const void *, __const void *);
- +typedef int (*__compar_fn_t) (const void *, const void *);
-
- # ifdef __USE_GNU
- typedef __compar_fn_t comparison_fn_t;
- @@ -130,30 +129,30 @@
-
- /* Search for an entry matching the given KEY in the tree pointed to
- by *ROOTP and insert a new element if not found. */
- -extern void *tsearch (__const void *__key, void **__rootp,
- +extern void *tsearch (const void *__key, void **__rootp,
- __compar_fn_t __compar);
- libc_hidden_proto(tsearch)
-
- /* Search for an entry matching the given KEY in the tree pointed to
- by *ROOTP. If no matching entry is available return NULL. */
- -extern void *tfind (__const void *__key, void *__const *__rootp,
- +extern void *tfind (const void *__key, void *const *__rootp,
- __compar_fn_t __compar);
- libc_hidden_proto(tfind)
-
- /* Remove the element matching KEY from the tree pointed to by *ROOTP. */
- -extern void *tdelete (__const void *__restrict __key,
- +extern void *tdelete (const void *__restrict __key,
- void **__restrict __rootp,
- __compar_fn_t __compar);
-
- #ifndef __ACTION_FN_T
- # define __ACTION_FN_T
- -typedef void (*__action_fn_t) (__const void *__nodep, VISIT __value,
- +typedef void (*__action_fn_t) (const void *__nodep, VISIT __value,
- int __level);
- #endif
-
- /* Walk through the whole tree and call the ACTION callback for every node
- or leaf. */
- -extern void twalk (__const void *__root, __action_fn_t __action);
- +extern void twalk (const void *__root, __action_fn_t __action);
-
- #ifdef __USE_GNU
- /* Callback type for function to free a tree node. If the keys are atomic
- @@ -168,13 +167,13 @@
-
- /* Perform linear search for KEY by comparing by COMPAR in an array
- [BASE,BASE+NMEMB*SIZE). */
- -extern void *lfind (__const void *__key, __const void *__base,
- +extern void *lfind (const void *__key, const void *__base,
- size_t *__nmemb, size_t __size, __compar_fn_t __compar);
- libc_hidden_proto(lfind)
-
- /* Perform linear search for KEY by comparing by COMPAR function in
- array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */
- -extern void *lsearch (__const void *__key, void *__base,
- +extern void *lsearch (const void *__key, void *__base,
- size_t *__nmemb, size_t __size, __compar_fn_t __compar);
-
- __END_DECLS
- diff -Nur uClibc-0.9.33.2/include/setjmp.h uClibc/include/setjmp.h
- --- uClibc-0.9.33.2/include/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1991-1999, 2001 Free Software Foundation, Inc.
- +/* Copyright (C) 1991-1999,2001,2002,2007,2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.13 Nonlocal jumps <setjmp.h>
- @@ -30,8 +29,9 @@
- #include <bits/setjmp.h> /* Get `__jmp_buf'. */
- #include <bits/sigset.h> /* Get `__sigset_t'. */
-
- +
- /* Calling environment, plus possibly a saved signal mask. */
- -typedef struct __jmp_buf_tag /* C++ doesn't like tagless structs. */
- +struct __jmp_buf_tag
- {
- /* NOTE: The machine-dependent definitions of `__sigsetjmp'
- assume that a `jmp_buf' begins with a `__jmp_buf' and that
- @@ -40,23 +40,29 @@
- __jmp_buf __jmpbuf; /* Calling environment. */
- int __mask_was_saved; /* Saved the signal mask? */
- __sigset_t __saved_mask; /* Saved signal mask. */
- - } jmp_buf[1];
- + };
- +
-
- +__BEGIN_NAMESPACE_STD
- +
- +typedef struct __jmp_buf_tag jmp_buf[1];
-
- /* Store the calling environment in ENV, also saving the signal mask.
- Return 0. */
- extern int setjmp (jmp_buf __env) __THROW;
-
- -/* Store the calling environment in ENV, not saving the signal mask.
- - Return 0. */
- -extern int _setjmp (jmp_buf __env) __THROW;
- +__END_NAMESPACE_STD
-
- /* Store the calling environment in ENV, also saving the
- signal mask if SAVEMASK is nonzero. Return 0.
- This is the internal name for `sigsetjmp'. */
- -extern int __sigsetjmp (jmp_buf __env, int __savemask) __THROW;
- +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROW;
-
- #ifndef __FAVOR_BSD
- +/* Store the calling environment in ENV, not saving the signal mask.
- + Return 0. */
- +extern int _setjmp (struct __jmp_buf_tag __env[1]) __THROW;
- +
- /* Do not save the signal mask. This is equivalent to the `_setjmp'
- BSD function. */
- # define setjmp(env) _setjmp (env)
- @@ -68,15 +74,20 @@
- #endif /* Favor BSD. */
-
-
- +__BEGIN_NAMESPACE_STD
- +
- /* Jump to the environment saved in ENV, making the
- `setjmp' call there return VAL, or 1 if VAL is 0. */
- -extern void longjmp (jmp_buf __env, int __val)
- +extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
- __THROW __attribute__ ((__noreturn__));
- +
- +__END_NAMESPACE_STD
- +
- #if defined __USE_BSD || defined __USE_XOPEN
- /* Same. Usually `_longjmp' is used with `_setjmp', which does not save
- the signal mask. But it is how ENV was saved that determines whether
- `longjmp' restores the mask; `_longjmp' is just an alias. */
- -extern void _longjmp (jmp_buf __env, int __val)
- +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
- __THROW __attribute__ ((__noreturn__));
- #endif
-
- @@ -85,7 +96,7 @@
- /* Use the same type for `jmp_buf' and `sigjmp_buf'.
- The `__mask_was_saved' flag determines whether
- or not `longjmp' will restore the signal mask. */
- -typedef jmp_buf sigjmp_buf;
- +typedef struct __jmp_buf_tag sigjmp_buf[1];
-
- /* Store the calling environment in ENV, also saving the
- signal mask if SAVEMASK is nonzero. Return 0. */
- @@ -101,4 +112,16 @@
-
- __END_DECLS
-
- +#ifdef _LIBC
- +extern void __longjmp(__jmp_buf __env, int __val) attribute_noreturn;
- +libc_hidden_proto(__longjmp)
- +extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
- +extern __typeof(siglongjmp) __libc_siglongjmp attribute_noreturn;
- +extern void _longjmp_unwind(jmp_buf __env, int __val);
- +libc_hidden_proto(_longjmp_unwind)
- +extern int __sigjmp_save(sigjmp_buf __env, int __savemask) attribute_hidden;
- +/* We use the normal longjmp for unwinding */
- +# define __libc_unwind_longjmp(buf, val) __libc_longjmp(buf, val)
- +#endif
- +
- #endif /* setjmp.h */
- diff -Nur uClibc-0.9.33.2/include/sgtty.h uClibc/include/sgtty.h
- --- uClibc-0.9.33.2/include/sgtty.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sgtty.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SGTTY_H
- #define _SGTTY_H 1
- @@ -38,7 +37,7 @@
- extern int gtty (int __fd, struct sgttyb *__params) __THROW;
-
- /* Set the terminal parameters associated with FD to *PARAMS. */
- -extern int stty (int __fd, __const struct sgttyb *__params) __THROW;
- +extern int stty (int __fd, const struct sgttyb *__params) __THROW;
- #endif
-
-
- diff -Nur uClibc-0.9.33.2/include/shadow.h uClibc/include/shadow.h
- --- uClibc-0.9.33.2/include/shadow.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/shadow.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Declaration of types and functions for shadow password suite. */
-
- @@ -84,7 +83,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern struct spwd *getspnam (__const char *__name);
- +extern struct spwd *getspnam (const char *__name);
-
- /* Read shadow entry from STRING.
-
- @@ -92,7 +91,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern struct spwd *sgetspent (__const char *__string);
- +extern struct spwd *sgetspent (const char *__string);
-
- /* Read next shadow entry from STREAM.
-
- @@ -108,7 +107,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int putspent (__const struct spwd *__p, FILE *__stream);
- +extern int putspent (const struct spwd *__p, FILE *__stream);
-
-
- #ifdef __USE_MISC
- @@ -122,12 +121,12 @@
- size_t __buflen, struct spwd **__result);
- libc_hidden_proto(getspent_r)
-
- -extern int getspnam_r (__const char *__name, struct spwd *__result_buf,
- +extern int getspnam_r (const char *__name, struct spwd *__result_buf,
- char *__buffer, size_t __buflen,
- struct spwd **__result);
- libc_hidden_proto(getspnam_r)
-
- -extern int sgetspent_r (__const char *__string, struct spwd *__result_buf,
- +extern int sgetspent_r (const char *__string, struct spwd *__result_buf,
- char *__buffer, size_t __buflen,
- struct spwd **__result);
- libc_hidden_proto(sgetspent_r)
- diff -Nur uClibc-0.9.33.2/include/signal.h uClibc/include/signal.h
- --- uClibc-0.9.33.2/include/signal.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/signal.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1991-2003, 2004 Free Software Foundation, Inc.
- +/* Copyright (C) 1991-2003, 2004, 2007, 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.14 Signal handling <signal.h>
- @@ -87,15 +86,27 @@
- typedef __pid_t pid_t;
- # define __pid_t_defined
- # endif
- +#endif
- +#ifdef __USE_XOPEN
- # ifndef __uid_t_defined
- typedef __uid_t uid_t;
- # define __uid_t_defined
- # endif
- #endif /* Unix98 */
-
- +#if defined __USE_POSIX199309 && defined __UCLIBC_HAS_REALTIME__
- +/* We need `struct timespec' later on. */
- +# define __need_timespec
- +# include <time.h>
- +
- +/* Get the `siginfo_t' type plus the needed symbols. */
- +# include <bits/siginfo.h>
- +#endif
- +
-
- /* Type of a signal handler. */
- typedef void (*__sighandler_t) (int);
- +
- #if defined __UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL__
- /* The X/Open definition of `signal' specifies the SVID semantic. Use
- the additional function `sysv_signal' when X/Open compatibility is
- @@ -156,17 +167,23 @@
- libc_hidden_proto(raise)
- __END_NAMESPACE_STD
-
- -#ifdef __USE_SVID
- +#if 0 /*def __USE_SVID*/
- /* SVID names for the same things. */
- extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
- __THROW;
- extern int gsignal (int __sig) __THROW;
- #endif /* Use SVID. */
-
- -#ifdef __USE_MISC
- +/* glibc guards the next two wrong with __USE_XOPEN2K */
- +#if defined __USE_MISC || defined __USE_XOPEN2K8
- /* Print a message describing the meaning of the given signal number. */
- -extern void psignal (int __sig, __const char *__s);
- -#endif /* Use misc. */
- +extern void psignal (int __sig, const char *__s);
- +#endif /* Use misc or POSIX 2008. */
- +
- +#if 0 /*def __USE_XOPEN2K8*/
- +/* Print a message describing the meaning of the given signal information. */
- +extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
- +#endif /* POSIX 2008. */
-
- #ifdef __UCLIBC_SUSV4_LEGACY__
- /* The `sigpause' function has two different interfaces. The original
- @@ -177,23 +194,25 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern int __sigpause (int __sig_or_mask, int __is_sig);
- -libc_hidden_proto(__sigpause)
- +/*extern int __sigpause (int __sig_or_mask, int __is_sig);*/
-
- #ifdef __FAVOR_BSD
- /* Set the mask of blocked signals to MASK,
- wait for a signal to arrive, and then restore the mask. */
- -extern int sigpause (int __mask) __THROW __attribute_deprecated__;
- -# define sigpause(mask) __sigpause ((mask), 0)
- +/*extern int sigpause (int __mask) __THROW __attribute_deprecated__;
- +# define sigpause(mask) __sigpause ((mask), 0)*/
- +/* uClibc note: BSD sigpause is available as __bsd_sigpause.
- + * It is intentionally not prototyped */
- #else
- # ifdef __USE_XOPEN
- /* Remove a signal from the signal mask and suspend the process. */
- -# define sigpause(sig) __sigpause ((sig), 1)
- +extern int sigpause(int __sig);
- +/*# define sigpause(sig) __sigpause ((sig), 1)*/
- # endif
- #endif
- #endif /* __UCLIBC_SUSV4_LEGACY__ */
-
- -#ifdef __USE_BSD
- +#if 0 /*def __USE_BSD*/
- /* None of the following functions should be used anymore. They are here
- only for compatibility. A single word (`int') is not guaranteed to be
- enough to hold a complete signal mask and therefore these functions
- @@ -203,14 +222,10 @@
- # define sigmask(sig) __sigmask(sig)
-
- /* Block signals in MASK, returning the old mask. */
- -extern int sigblock (int __mask) __THROW;
- -/* collides with libc_hidden_proto: __attribute_deprecated__; */
- -libc_hidden_proto(sigblock)
- +extern int sigblock (int __mask) __THROW __attribute_deprecated__;
-
- /* Set the mask of blocked signals to MASK, returning the old mask. */
- -extern int sigsetmask (int __mask) __THROW;
- -/* collides with libc_hidden_proto: __attribute_deprecated__; */
- -libc_hidden_proto(sigsetmask)
- +extern int sigsetmask (int __mask) __THROW __attribute_deprecated__;
-
- /* Return currently selected signal mask. */
- extern int siggetmask (void) __THROW __attribute_deprecated__;
- @@ -228,22 +243,11 @@
-
- #ifdef __USE_POSIX
-
- -# ifdef __USE_POSIX199309
- -/* We need `struct timespec' later on. */
- -# define __need_timespec
- -# include <time.h>
- -
- -/* Get the `siginfo_t' type plus the needed symbols. */
- -# include <bits/siginfo.h>
- -# endif
- -
- /* Clear all signals from SET. */
- extern int sigemptyset (sigset_t *__set) __THROW __nonnull ((1));
- -libc_hidden_proto(sigemptyset)
-
- /* Set all signals in SET. */
- extern int sigfillset (sigset_t *__set) __THROW __nonnull ((1));
- -libc_hidden_proto(sigfillset)
-
- /* Add SIGNO to SET. */
- extern int sigaddset (sigset_t *__set, int __signo) __THROW __nonnull ((1));
- @@ -254,20 +258,20 @@
- libc_hidden_proto(sigdelset)
-
- /* Return 1 if SIGNO is in SET, 0 if not. */
- -extern int sigismember (__const sigset_t *__set, int __signo)
- +extern int sigismember (const sigset_t *__set, int __signo)
- __THROW __nonnull ((1));
-
- # ifdef __USE_GNU
- /* Return non-empty value is SET is not empty. */
- -extern int sigisemptyset (__const sigset_t *__set) __THROW __nonnull ((1));
- +extern int sigisemptyset (const sigset_t *__set) __THROW __nonnull ((1));
-
- /* Build new signal set by combining the two inputs set using logical AND. */
- -extern int sigandset (sigset_t *__set, __const sigset_t *__left,
- - __const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
- +extern int sigandset (sigset_t *__set, const sigset_t *__left,
- + const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
-
- /* Build new signal set by combining the two inputs set using logical OR. */
- -extern int sigorset (sigset_t *__set, __const sigset_t *__left,
- - __const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
- +extern int sigorset (sigset_t *__set, const sigset_t *__left,
- + const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
- # endif /* GNU */
-
- /* Get the system-specific definitions of `struct sigaction'
- @@ -275,7 +279,7 @@
- # include <bits/sigaction.h>
-
- /* Get and/or change the set of blocked signals. */
- -extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
- +extern int sigprocmask (int __how, const sigset_t *__restrict __set,
- sigset_t *__restrict __oset) __THROW;
- libc_hidden_proto(sigprocmask)
-
- @@ -284,14 +288,50 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern int sigsuspend (__const sigset_t *__set) __nonnull ((1));
- +extern int sigsuspend (const sigset_t *__set) __nonnull ((1));
- +#ifdef _LIBC
- +extern __typeof(sigsuspend) __sigsuspend_nocancel attribute_hidden;
- libc_hidden_proto(sigsuspend)
- +#endif
-
- /* Get and/or set the action for signal SIG. */
- -extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
- +extern int sigaction (int __sig, const struct sigaction *__restrict __act,
- struct sigaction *__restrict __oact) __THROW;
- +#ifdef _LIBC
- +# if 0 /* this is in headers */
- +/* In uclibc, userspace struct sigaction is identical to
- + * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
- + * See sigaction.h
- + */
- +struct old_kernel_sigaction;
- +extern int __syscall_sigaction(int, const struct old_kernel_sigaction *,
- + struct old_kernel_sigaction *) attribute_hidden;
- +# else /* this is how the function is built */
- +extern __typeof(sigaction) __syscall_sigaction attribute_hidden;
- +# endif
- +# define __need_size_t
- +# include <stddef.h>
- +/* candidate for attribute_hidden, if NPTL would behave */
- +extern int __syscall_rt_sigaction(int, const struct sigaction *,
- + struct sigaction *, size_t)
- +# ifndef __UCLIBC_HAS_THREADS_NATIVE__
- + attribute_hidden
- +# endif
- + ;
- +extern __typeof(sigaction) __libc_sigaction;
- libc_hidden_proto(sigaction)
-
- +# ifdef __mips__
- +# define _KERNEL_NSIG_WORDS (_NSIG / _MIPS_SZLONG)
- +typedef struct {
- + unsigned long sig[_KERNEL_NSIG_WORDS];
- +} kernel_sigset_t;
- +# define __SYSCALL_SIGSET_T_SIZE (sizeof(kernel_sigset_t))
- +# else
- +# define __SYSCALL_SIGSET_T_SIZE (_NSIG / 8)
- +# endif
- +#endif
- +
- /* Put in SET all signals that are blocked and waiting to be delivered. */
- extern int sigpending (sigset_t *__set) __THROW __nonnull ((1));
-
- @@ -300,7 +340,7 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
- +extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
- __nonnull ((1, 2));
-
- # if defined __USE_POSIX199309 && defined __UCLIBC_HAS_REALTIME__
- @@ -308,30 +348,29 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern int sigwaitinfo (__const sigset_t *__restrict __set,
- +extern int sigwaitinfo (const sigset_t *__restrict __set,
- siginfo_t *__restrict __info) __nonnull ((1));
- #ifdef _LIBC
- extern __typeof(sigwaitinfo) __sigwaitinfo attribute_hidden;
- #endif
- -libc_hidden_proto(sigwaitinfo)
-
- /* Select any of pending signals from SET and place information in INFO.
- Wait the time specified by TIMEOUT if no signal is pending.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern int sigtimedwait (__const sigset_t *__restrict __set,
- +extern int sigtimedwait (const sigset_t *__restrict __set,
- siginfo_t *__restrict __info,
- - __const struct timespec *__restrict __timeout)
- + const struct timespec *__restrict __timeout)
- __nonnull ((1));
- #ifdef _LIBC
- -extern __typeof(sigtimedwait) __sigtimedwait attribute_hidden;
- -#endif
- +extern __typeof(sigtimedwait) __sigtimedwait_nocancel attribute_hidden;
- libc_hidden_proto(sigtimedwait)
- +#endif
-
- /* Send signal SIG to the process PID. Associate data in VAL with the
- signal. */
- -extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
- +extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
- __THROW;
- # endif /* Use POSIX 199306. */
-
- @@ -343,9 +382,10 @@
- /* Names of the signals. This variable exists only for compatibility.
- Use `strsignal' instead (see <string.h>). */
- # define _sys_siglist sys_siglist
- -extern __const char *__const sys_siglist[_NSIG];
- +extern const char *const sys_siglist[_NSIG];
- # endif
-
- +#ifndef __UCLIBC_STRICT_HEADERS__
- /* Structure passed to `sigvec'. */
- struct sigvec
- {
- @@ -360,27 +400,34 @@
- # define SV_ONSTACK (1 << 0)/* Take the signal on the signal stack. */
- # define SV_INTERRUPT (1 << 1)/* Do not restart system calls. */
- # define SV_RESETHAND (1 << 2)/* Reset handler to SIG_DFL on receipt. */
- +#endif
-
-
- +#if 0
- /* If VEC is non-NULL, set the handler for SIG to the `sv_handler' member
- of VEC. The signals in `sv_mask' will be blocked while the handler runs.
- If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be
- reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL,
- it is filled in with the old information for SIG. */
- -extern int sigvec (int __sig, __const struct sigvec *__vec,
- +extern int sigvec (int __sig, const struct sigvec *__vec,
- struct sigvec *__ovec) __THROW;
- +#endif
-
-
- /* Get machine-dependent `struct sigcontext' and signal subcodes. */
- # include <bits/sigcontext.h>
-
- +#if 0
- /* Restore the state saved in SCP. */
- extern int sigreturn (struct sigcontext *__scp) __THROW;
- +#endif
-
- #endif /* use BSD. */
-
-
- #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- +# define __need_size_t
- +# include <stddef.h>
-
- # ifdef __UCLIBC_SUSV4_LEGACY__
- /* If INTERRUPT is nonzero, make signal SIG interrupt system calls
- @@ -406,7 +453,7 @@
-
- /* Alternate signal handler stack interface.
- This interface should always be preferred over `sigstack'. */
- -extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
- +extern int sigaltstack (const struct sigaltstack *__restrict __ss,
- struct sigaltstack *__restrict __oss) __THROW;
-
- #endif /* use BSD or X/Open Unix. */
- @@ -442,6 +489,13 @@
- /* Return number of available real-time signal with lowest priority. */
- extern int __libc_current_sigrtmax (void) __THROW;
-
- +#ifdef _LIBC
- +extern sigset_t _sigintr attribute_hidden;
- +/* simplified version without parameter checking */
- +# include <string.h>
- +# undef __sigemptyset
- +# define __sigemptyset(ss) (memset(ss, '\0', sizeof(sigset_t)), 0)
- +#endif
- #endif /* signal.h */
-
- __END_DECLS
- diff -Nur uClibc-0.9.33.2/include/spawn.h uClibc/include/spawn.h
- --- uClibc-0.9.33.2/include/spawn.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/include/spawn.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,289 @@
- +/* Definitions for POSIX spawn interface.
- + Copyright (C) 2000,2003,2004,2009,2011,2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SPAWN_H
- +#define _SPAWN_H 1
- +
- +#include <features.h>
- +#include <sched.h>
- +#define __need_sigset_t
- +#include <signal.h>
- +#include <sys/types.h>
- +
- +/* For the tiny inlines (errno/free/memset). */
- +#include <errno.h>
- +#include <string.h>
- +#include <stdlib.h>
- +
- +
- +/* Data structure to contain attributes for thread creation. */
- +typedef struct
- +{
- + short int __flags;
- + pid_t __pgrp;
- + sigset_t __sd;
- + sigset_t __ss;
- + struct sched_param __sp;
- + int __policy;
- + int __pad[16];
- +} posix_spawnattr_t;
- +
- +
- +/* Data structure to contain information about the actions to be
- + performed in the new process with respect to file descriptors. */
- +typedef struct
- +{
- + int __allocated;
- + int __used;
- + struct __spawn_action *__actions;
- + int __pad[16];
- +} posix_spawn_file_actions_t;
- +
- +
- +/* Flags to be set in the `posix_spawnattr_t'. */
- +#define POSIX_SPAWN_RESETIDS 0x01
- +#define POSIX_SPAWN_SETPGROUP 0x02
- +#define POSIX_SPAWN_SETSIGDEF 0x04
- +#define POSIX_SPAWN_SETSIGMASK 0x08
- +#define POSIX_SPAWN_SETSCHEDPARAM 0x10
- +#define POSIX_SPAWN_SETSCHEDULER 0x20
- +#ifdef __USE_GNU
- +# define POSIX_SPAWN_USEVFORK 0x40
- +#endif
- +
- +
- +#define __POSIX_SPAWN_MASK (POSIX_SPAWN_RESETIDS \
- + | POSIX_SPAWN_SETPGROUP \
- + | POSIX_SPAWN_SETSIGDEF \
- + | POSIX_SPAWN_SETSIGMASK \
- + | POSIX_SPAWN_SETSCHEDPARAM \
- + | POSIX_SPAWN_SETSCHEDULER \
- + | POSIX_SPAWN_USEVFORK)
- +
- +__BEGIN_DECLS
- +
- +/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
- + Before running the process perform the actions described in FILE-ACTIONS.
- +
- + This function is a possible cancellation point and therefore not
- + marked with __THROW. */
- +extern int posix_spawn (pid_t *__restrict __pid,
- + const char *__restrict __path,
- + const posix_spawn_file_actions_t *__restrict
- + __file_actions,
- + const posix_spawnattr_t *__restrict __attrp,
- + char *const __argv[__restrict_arr],
- + char *const __envp[__restrict_arr]);
- +
- +/* Similar to `posix_spawn' but search for FILE in the PATH.
- +
- + This function is a possible cancellation point and therefore not
- + marked with __THROW. */
- +extern int posix_spawnp (pid_t *__pid, const char *__file,
- + const posix_spawn_file_actions_t *__file_actions,
- + const posix_spawnattr_t *__attrp,
- + char *const __argv[], char *const __envp[]);
- +
- +
- +/* Initialize data structure with attributes for `spawn' to default values. */
- +static inline
- +int posix_spawnattr_init (posix_spawnattr_t *__attr)
- +{
- + memset (__attr, 0, sizeof (*__attr));
- + return 0;
- +}
- +
- +/* Free resources associated with ATTR. */
- +static inline
- +int posix_spawnattr_destroy (posix_spawnattr_t *__attr)
- +{
- + return 0;
- +}
- +
- +/* Store signal mask for signals with default handling from ATTR in
- + SIGDEFAULT. */
- +static inline
- +int posix_spawnattr_getsigdefault (const posix_spawnattr_t *
- + __restrict __attr,
- + sigset_t *__restrict __sigdefault)
- +{
- + memcpy (__sigdefault, &__attr->__sd, sizeof (sigset_t));
- + return 0;
- +}
- +
- +/* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */
- +static inline
- +int posix_spawnattr_setsigdefault (posix_spawnattr_t *__restrict __attr,
- + const sigset_t *__restrict
- + __sigdefault)
- +{
- + memcpy (&__attr->__sd, __sigdefault, sizeof (sigset_t));
- + return 0;
- +}
- +
- +/* Store signal mask for the new process from ATTR in SIGMASK. */
- +static inline
- +int posix_spawnattr_getsigmask (const posix_spawnattr_t *__restrict
- + __attr,
- + sigset_t *__restrict __sigmask)
- +{
- + memcpy (__sigmask, &__attr->__ss, sizeof (sigset_t));
- + return 0;
- +}
- +
- +/* Set signal mask for the new process in ATTR to SIGMASK. */
- +static inline
- +int posix_spawnattr_setsigmask (posix_spawnattr_t *__restrict __attr,
- + const sigset_t *__restrict __sigmask)
- +{
- + memcpy (&__attr->__ss, __sigmask, sizeof (sigset_t));
- + return 0;
- +}
- +
- +/* Get flag word from the attribute structure. */
- +static inline
- +int posix_spawnattr_getflags (const posix_spawnattr_t *__restrict
- + __attr,
- + short int *__restrict __flags)
- +{
- + *__flags = __attr->__flags;
- + return 0;
- +}
- +
- +/* Store flags in the attribute structure. */
- +static inline
- +int posix_spawnattr_setflags (posix_spawnattr_t *_attr,
- + short int __flags)
- +{
- + /* Check no invalid bits are set. */
- + if (__flags & ~__POSIX_SPAWN_MASK)
- + return EINVAL;
- +
- + _attr->__flags = __flags;
- + return 0;
- +}
- +
- +/* Get process group ID from the attribute structure. */
- +static inline
- +int posix_spawnattr_getpgroup (const posix_spawnattr_t *__restrict
- + __attr, pid_t *__restrict __pgroup)
- +{
- + *__pgroup = __attr->__pgrp;
- + return 0;
- +}
- +
- +/* Store process group ID in the attribute structure. */
- +static inline
- +int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr,
- + pid_t __pgroup)
- +{
- + __attr->__pgrp = __pgroup;
- + return 0;
- +}
- +
- +/* Get scheduling policy from the attribute structure. */
- +static inline
- +int posix_spawnattr_getschedpolicy (const posix_spawnattr_t *
- + __restrict __attr,
- + int *__restrict __schedpolicy)
- +{
- + *__schedpolicy = __attr->__policy;
- + return 0;
- +}
- +
- +/* Store scheduling policy in the attribute structure. */
- +static inline
- +int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr,
- + int __schedpolicy)
- +{
- + switch (__schedpolicy) {
- + case SCHED_OTHER:
- + case SCHED_FIFO:
- + case SCHED_RR:
- + break;
- + default:
- + return EINVAL;
- + }
- +
- + __attr->__policy = __schedpolicy;
- + return 0;
- +}
- +
- +/* Get scheduling parameters from the attribute structure. */
- +static inline
- +int posix_spawnattr_getschedparam (const posix_spawnattr_t *
- + __restrict __attr,
- + struct sched_param *__restrict
- + __schedparam)
- +{
- + memcpy (__schedparam, &__attr->__sp, sizeof (__attr->__sp));
- + return 0;
- +}
- +
- +/* Store scheduling parameters in the attribute structure. */
- +static inline
- +int posix_spawnattr_setschedparam (posix_spawnattr_t *__restrict __attr,
- + const struct sched_param *
- + __restrict __schedparam)
- +{
- + __attr->__sp = *__schedparam;
- + return 0;
- +}
- +
- +/* Initialize data structure for file attribute for `spawn' call. */
- +static inline
- +int posix_spawn_file_actions_init (posix_spawn_file_actions_t *
- + __file_actions)
- +{
- + memset (__file_actions, 0, sizeof (*__file_actions));
- + return 0;
- +}
- +
- +/* Free resources associated with FILE-ACTIONS. */
- +static inline
- +int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *
- + __file_actions)
- +{
- + free (__file_actions->__actions);
- + return 0;
- +}
- +
- +/* Add an action to FILE-ACTIONS which tells the implementation to call
- + `open' for the given file during the `spawn' call. */
- +extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *
- + __restrict __file_actions,
- + int __fd,
- + const char *__restrict __path,
- + int __oflag, mode_t __mode)
- + __THROW;
- +
- +/* Add an action to FILE-ACTIONS which tells the implementation to call
- + `close' for the given file descriptor during the `spawn' call. */
- +extern int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *
- + __file_actions, int __fd)
- + __THROW;
- +
- +/* Add an action to FILE-ACTIONS which tells the implementation to call
- + `dup2' for the given file descriptors during the `spawn' call. */
- +extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *
- + __file_actions,
- + int __fd, int __newfd) __THROW;
- +
- +__END_DECLS
- +
- +#endif /* spawn.h */
- diff -Nur uClibc-0.9.33.2/include/stdint.h uClibc/include/stdint.h
- --- uClibc-0.9.33.2/include/stdint.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/stdint.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99: 7.18 Integer types <stdint.h>
- diff -Nur uClibc-0.9.33.2/include/stdio_ext.h uClibc/include/stdio_ext.h
- --- uClibc-0.9.33.2/include/stdio_ext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/stdio_ext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This header contains the same definitions as the header of the same name
- on Sun's Solaris OS. */
- diff -Nur uClibc-0.9.33.2/include/stdio.h uClibc/include/stdio.h
- --- uClibc-0.9.33.2/include/stdio.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/stdio.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.19 Input/output <stdio.h>
- @@ -142,16 +141,17 @@
-
- __BEGIN_NAMESPACE_STD
- /* Remove file FILENAME. */
- -extern int remove (__const char *__filename) __THROW;
- +extern int remove (const char *__filename) __THROW;
- libc_hidden_proto(remove)
- /* Rename file OLD to NEW. */
- -extern int rename (__const char *__old, __const char *__new) __THROW;
- +extern int rename (const char *__old, const char *__new) __THROW;
- __END_NAMESPACE_STD
-
- #ifdef __USE_ATFILE
- /* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */
- -extern int renameat (int __oldfd, __const char *__old, int __newfd,
- - __const char *__new) __THROW;
- +extern int renameat (int __oldfd, const char *__old, int __newfd,
- + const char *__new) __THROW;
- +libc_hidden_proto(renameat)
- #endif
-
- __BEGIN_NAMESPACE_STD
- @@ -194,7 +194,7 @@
- If not and if DIR is not NULL, that value is checked. If that fails,
- P_tmpdir is tried and finally "/tmp". The storage for the filename
- is allocated by `malloc'. */
- -extern char *tempnam (__const char *__dir, __const char *__pfx)
- +extern char *tempnam (const char *__dir, const char *__pfx)
- __THROW __attribute_malloc__ __wur;
- #endif
-
- @@ -242,23 +242,23 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern FILE *fopen (__const char *__restrict __filename,
- - __const char *__restrict __modes) __wur;
- +extern FILE *fopen (const char *__restrict __filename,
- + const char *__restrict __modes) __wur;
- libc_hidden_proto(fopen)
- /* Open a file, replacing an existing stream with it.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern FILE *freopen (__const char *__restrict __filename,
- - __const char *__restrict __modes,
- +extern FILE *freopen (const char *__restrict __filename,
- + const char *__restrict __modes,
- FILE *__restrict __stream) __wur;
- #else
- # ifdef __REDIRECT
- -extern FILE *__REDIRECT (fopen, (__const char *__restrict __filename,
- - __const char *__restrict __modes), fopen64)
- +extern FILE *__REDIRECT (fopen, (const char *__restrict __filename,
- + const char *__restrict __modes), fopen64)
- __wur;
- -extern FILE *__REDIRECT (freopen, (__const char *__restrict __filename,
- - __const char *__restrict __modes,
- +extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
- + const char *__restrict __modes,
- FILE *__restrict __stream), freopen64)
- __wur;
- # else
- @@ -268,38 +268,39 @@
- #endif
- __END_NAMESPACE_STD
- #ifdef __USE_LARGEFILE64
- -extern FILE *fopen64 (__const char *__restrict __filename,
- - __const char *__restrict __modes) __wur;
- +extern FILE *fopen64 (const char *__restrict __filename,
- + const char *__restrict __modes) __wur;
- libc_hidden_proto(fopen64)
- -extern FILE *freopen64 (__const char *__restrict __filename,
- - __const char *__restrict __modes,
- +extern FILE *freopen64 (const char *__restrict __filename,
- + const char *__restrict __modes,
- FILE *__restrict __stream) __wur;
- #endif
-
- #ifdef __USE_POSIX
- /* Create a new stream that refers to an existing system file descriptor. */
- -extern FILE *fdopen (int __fd, __const char *__modes) __THROW __wur;
- +extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;
- libc_hidden_proto(fdopen)
- #endif
-
- -#ifdef __USE_GNU
- #ifdef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
- +#ifdef __USE_GNU
- /* Create a new stream that refers to the given magic cookie,
- and uses the given functions for input and output. */
- extern FILE *fopencookie (void *__restrict __magic_cookie,
- - __const char *__restrict __modes,
- + const char *__restrict __modes,
- _IO_cookie_io_functions_t __io_funcs) __THROW __wur;
- libc_hidden_proto(fopencookie)
- +#endif
-
- +#ifdef __USE_XOPEN2K8
- /* Create a new stream that refers to a memory buffer. */
- -extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
- +extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
- __THROW __wur;
-
- /* Open a stream that writes into a malloc'd buffer that is expanded as
- necessary. *BUFLOC and *SIZELOC are updated with the buffer's location
- and the number of characters written on fflush or fclose. */
- -extern FILE *open_memstream (char **__restrict __bufloc,
- - size_t *__restrict __sizeloc) __THROW __wur;
- +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur;
- libc_hidden_proto(open_memstream)
- #endif
- #endif
- @@ -334,17 +335,17 @@
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- extern int fprintf (FILE *__restrict __stream,
- - __const char *__restrict __format, ...);
- + const char *__restrict __format, ...);
- libc_hidden_proto(fprintf)
- /* Write formatted output to stdout.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int printf (__const char *__restrict __format, ...);
- +extern int printf (const char *__restrict __format, ...);
- libc_hidden_proto(printf)
- /* Write formatted output to S. */
- extern int sprintf (char *__restrict __s,
- - __const char *__restrict __format, ...)
- + const char *__restrict __format, ...)
- __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
- libc_hidden_proto(sprintf)
-
- @@ -352,16 +353,16 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
- +extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
- __gnuc_va_list __arg);
- libc_hidden_proto(vfprintf)
- /* Write formatted output to stdout from argument list ARG.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
- +extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
- /* Write formatted output to S from argument list ARG. */
- -extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
- +extern int vsprintf (char *__restrict __s, const char *__restrict __format,
- __gnuc_va_list __arg)
- __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
- __END_NAMESPACE_STD
- @@ -370,12 +371,12 @@
- __BEGIN_NAMESPACE_C99
- /* Maximum chars of output to write in MAXLEN. */
- extern int snprintf (char *__restrict __s, size_t __maxlen,
- - __const char *__restrict __format, ...)
- + const char *__restrict __format, ...)
- __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
- libc_hidden_proto(snprintf)
-
- extern int vsnprintf (char *__restrict __s, size_t __maxlen,
- - __const char *__restrict __format, __gnuc_va_list __arg)
- + const char *__restrict __format, __gnuc_va_list __arg)
- __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
- libc_hidden_proto(vsnprintf)
- __END_NAMESPACE_C99
- @@ -384,31 +385,33 @@
- #ifdef __USE_GNU
- /* Write formatted output to a string dynamically allocated with `malloc'.
- Store the address of the string in *PTR. */
- -extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
- +extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
- __gnuc_va_list __arg)
- __THROW __attribute__ ((__format__ (__printf__, 2, 0))) __wur;
- libc_hidden_proto(vasprintf)
- #if 0 /* uClibc: disabled */
- extern int __asprintf (char **__restrict __ptr,
- - __const char *__restrict __fmt, ...)
- + const char *__restrict __fmt, ...)
- __THROW __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
- #endif
- extern int asprintf (char **__restrict __ptr,
- - __const char *__restrict __fmt, ...)
- + const char *__restrict __fmt, ...)
- __THROW __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
- libc_hidden_proto(asprintf)
- +#endif
-
- +#ifdef __USE_XOPEN2K8
- /* Write formatted output to a file descriptor.
-
- These functions are not part of POSIX and therefore no official
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation they are cancellation points and
- therefore not marked with __THROW. */
- -extern int vdprintf (int __fd, __const char *__restrict __fmt,
- +extern int vdprintf (int __fd, const char *__restrict __fmt,
- __gnuc_va_list __arg)
- __attribute__ ((__format__ (__printf__, 2, 0)));
- libc_hidden_proto(vdprintf)
- -extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
- +extern int dprintf (int __fd, const char *__restrict __fmt, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
- #endif
-
- @@ -419,18 +422,18 @@
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- extern int fscanf (FILE *__restrict __stream,
- - __const char *__restrict __format, ...)
- + const char *__restrict __format, ...)
- __attribute__ ((__format__ (__scanf__, 2, 3))) __wur;
- libc_hidden_proto(fscanf)
- /* Read formatted input from stdin.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int scanf (__const char *__restrict __format, ...)
- +extern int scanf (const char *__restrict __format, ...)
- __attribute__ ((__format__ (__scanf__, 1, 2))) __wur;
- /* Read formatted input from S. */
- -extern int sscanf (__const char *__restrict __s,
- - __const char *__restrict __format, ...)
- +extern int sscanf (const char *__restrict __s,
- + const char *__restrict __format, ...)
- __THROW __attribute__ ((__format__ (__scanf__, 2, 3)));
- libc_hidden_proto(sscanf)
- __END_NAMESPACE_STD
- @@ -441,7 +444,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
- +extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
- __gnuc_va_list __arg)
- __attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
- libc_hidden_proto(vfscanf)
- @@ -450,12 +453,12 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
- +extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
- __attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
-
- /* Read formatted input from S into argument list ARG. */
- -extern int vsscanf (__const char *__restrict __s,
- - __const char *__restrict __format, __gnuc_va_list __arg)
- +extern int vsscanf (const char *__restrict __s,
- + const char *__restrict __format, __gnuc_va_list __arg)
- __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
- libc_hidden_proto(vsscanf)
- __END_NAMESPACE_C99
- @@ -491,9 +494,6 @@
- libc_hidden_proto(getc_unlocked)
- extern int getchar_unlocked (void);
- libc_hidden_proto(getchar_unlocked)
- -
- -/* SUSv3 allows getc_unlocked to be a macro */
- -#define getc_unlocked(_fp) __GETC_UNLOCKED(_fp)
- #endif /* Use POSIX or MISC. */
-
- #ifdef __USE_MISC
- @@ -519,7 +519,6 @@
- extern int fputc (int __c, FILE *__stream);
- libc_hidden_proto(fputc)
- extern int putc (int __c, FILE *__stream);
- -libc_hidden_proto(putc)
-
- /* Write a character to stdout.
-
- @@ -540,7 +539,6 @@
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- extern int fputc_unlocked (int __c, FILE *__stream);
- -libc_hidden_proto(fputc_unlocked)
- #endif /* Use MISC. */
-
- #if defined __USE_POSIX || defined __USE_MISC
- @@ -549,11 +547,7 @@
- These functions are possible cancellation points and therefore not
- marked with __THROW. */
- extern int putc_unlocked (int __c, FILE *__stream);
- -libc_hidden_proto(putc_unlocked)
- extern int putchar_unlocked (int __c);
- -
- -/* SUSv3 allows putc_unlocked to be a macro */
- -#define putc_unlocked(_ch, _fp) __PUTC_UNLOCKED(_ch, _fp)
- #endif /* Use POSIX or MISC. */
-
-
- @@ -597,7 +591,7 @@
- #endif
-
-
- -#ifdef __USE_GNU
- +#ifdef __USE_XOPEN2K8
- /* Read up to (and including) a DELIMITER from STREAM into *LINEPTR
- (and null-terminate it). *LINEPTR is a pointer returned from malloc (or
- NULL), pointing to *N characters of space. It is realloc'd as
- @@ -636,14 +630,14 @@
-
- This function is a possible cancellation points and therefore not
- marked with __THROW. */
- -extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
- +extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
- libc_hidden_proto(fputs)
-
- /* Write a string, followed by a newline, to stdout.
-
- This function is a possible cancellation points and therefore not
- marked with __THROW. */
- -extern int puts (__const char *__s);
- +extern int puts (const char *__s);
-
-
- /* Push a character back onto the input buffer of STREAM.
- @@ -665,7 +659,7 @@
-
- This function is a possible cancellation points and therefore not
- marked with __THROW. */
- -extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
- +extern size_t fwrite (const void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __s) __wur;
- libc_hidden_proto(fwrite)
- __END_NAMESPACE_STD
- @@ -677,7 +671,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int fputs_unlocked (__const char *__restrict __s,
- +extern int fputs_unlocked (const char *__restrict __s,
- FILE *__restrict __stream);
- libc_hidden_proto(fputs_unlocked)
- #endif
- @@ -692,7 +686,7 @@
- extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __stream) __wur;
- libc_hidden_proto(fread_unlocked)
- -extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
- +extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __stream) __wur;
- libc_hidden_proto(fwrite_unlocked)
- #endif
- @@ -760,13 +754,13 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
- +extern int fsetpos (FILE *__stream, const fpos_t *__pos);
- #else
- # ifdef __REDIRECT
- extern int __REDIRECT (fgetpos, (FILE *__restrict __stream,
- fpos_t *__restrict __pos), fgetpos64);
- extern int __REDIRECT (fsetpos,
- - (FILE *__stream, __const fpos_t *__pos), fsetpos64);
- + (FILE *__stream, const fpos_t *__pos), fsetpos64);
- # else
- # define fgetpos fgetpos64
- # define fsetpos fsetpos64
- @@ -780,7 +774,7 @@
- extern __off64_t ftello64 (FILE *__stream) __wur;
- libc_hidden_proto(ftello64)
- extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
- -extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
- +extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
- #endif
-
- __BEGIN_NAMESPACE_STD
- @@ -805,7 +799,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern void perror (__const char *__s);
- +extern void perror (const char *__s);
- libc_hidden_proto(perror)
- __END_NAMESPACE_STD
-
- @@ -814,7 +808,7 @@
- function provides all the needed functionality. */
- #ifdef __USE_BSD
- extern int sys_nerr;
- -extern __const char *__const sys_errlist[];
- +extern const char *const sys_errlist[];
- #endif
- #endif /* __UCLIBC_HAS_SYS_ERRLIST__ */
-
- @@ -838,7 +832,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern FILE *popen (__const char *__command, __const char *__modes) __wur;
- +extern FILE *popen (const char *__command, const char *__modes) __wur;
-
- /* Close a stream opened by popen and return the status of its child.
-
- @@ -860,18 +854,19 @@
- #endif /* Use X/Open, but not issue 6. */
-
-
- -#if 0 /* def __USE_GNU uClibc note: not supported */
- +#if defined __USE_GNU && defined __UCLIBC_HAS_OBSTACK__
- struct obstack; /* See <obstack.h>. */
-
- /* Write formatted output to an obstack. */
- extern int obstack_printf (struct obstack *__restrict __obstack,
- - __const char *__restrict __format, ...)
- + const char *__restrict __format, ...)
- __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
- extern int obstack_vprintf (struct obstack *__restrict __obstack,
- - __const char *__restrict __format,
- + const char *__restrict __format,
- __gnuc_va_list __args)
- __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
- -#endif /* Use GNU. */
- +libc_hidden_proto(obstack_vprintf)
- +#endif /* USE_GNU && UCLIBC_HAS_OBSTACK. */
-
-
- #if defined __USE_POSIX || defined __USE_MISC
- @@ -893,27 +888,31 @@
- declared here which do not belong into this header. But we have to
- follow. In GNU mode we don't do this nonsense. */
- # define __need_getopt
- +/* keep this on uClibc in bits/, we need it when GNU_GETOPT is disabled */
- # include <bits/getopt.h>
- #endif /* X/Open, but not issue 6 and not for GNU. */
-
- /* If we are compiling with optimizing read this file. It contains
- several optimizing inline functions and macros. */
- +
- +#ifdef __UCLIBC__
- +
- #define fgetc(_fp) __FGETC(_fp)
- #define fputc(_ch, _fp) __FPUTC(_ch, _fp)
-
- +#if defined __USE_POSIX || defined __USE_MISC
- +/* SUSv3 allows getc_unlocked to be a macro */
- +#define getc_unlocked(_fp) __GETC_UNLOCKED(_fp)
- +/* SUSv3 allows putc_unlocked to be a macro */
- +#define putc_unlocked(_ch, _fp) __PUTC_UNLOCKED(_ch, _fp)
- +#endif
- +
- #ifdef __USE_MISC
- #define fgetc_unlocked(_fp) __FGETC_UNLOCKED(_fp)
- #define fputc_unlocked(_ch, _fp) __FPUTC_UNLOCKED(_ch, _fp)
- #endif
-
- -#ifndef __STDIO_GETC_MACRO
- -#define __stdin stdin
- -#endif
- #define getchar() __GETC(__stdin)
- -
- -#ifndef __STDIO_PUTC_MACRO
- -#define __stdout stdout
- -#endif
- #define putchar(_ch) __PUTC((_ch), __stdout)
-
- #if defined __USE_POSIX || defined __USE_MISC
- @@ -932,6 +931,8 @@
- #define ferror_unlocked(_fp) __FERROR_UNLOCKED(_fp)
- #endif
-
- +#endif
- +
- __END_DECLS
-
- #endif /* <stdio.h> included. */
- diff -Nur uClibc-0.9.33.2/include/stdlib.h uClibc/include/stdlib.h
- --- uClibc-0.9.33.2/include/stdlib.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/stdlib.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.20 General utilities <stdlib.h>
- @@ -155,22 +154,22 @@
- __BEGIN_NAMESPACE_STD
- #ifdef __UCLIBC_HAS_FLOATS__
- /* Convert a string to a floating-point number. */
- -extern double atof (__const char *__nptr)
- +extern double atof (const char *__nptr)
- __THROW __attribute_pure__ __nonnull ((1)) __wur;
- #endif /* __UCLIBC_HAS_FLOATS__ */
- /* Convert a string to an integer. */
- -extern int atoi (__const char *__nptr)
- +extern int atoi (const char *__nptr)
- __THROW __attribute_pure__ __nonnull ((1)) __wur;
- libc_hidden_proto(atoi)
- /* Convert a string to a long integer. */
- -extern long int atol (__const char *__nptr)
- +extern long int atol (const char *__nptr)
- __THROW __attribute_pure__ __nonnull ((1)) __wur;
- __END_NAMESPACE_STD
-
- #if defined __USE_ISOC99 || defined __USE_MISC
- __BEGIN_NAMESPACE_C99
- /* Convert a string to a long long integer. */
- -__extension__ extern long long int atoll (__const char *__nptr)
- +__extension__ extern long long int atoll (const char *__nptr)
- __THROW __attribute_pure__ __nonnull ((1)) __wur;
- __END_NAMESPACE_C99
- #endif
- @@ -178,7 +177,7 @@
- #ifdef __UCLIBC_HAS_FLOATS__
- __BEGIN_NAMESPACE_STD
- /* Convert a string to a floating-point number. */
- -extern double strtod (__const char *__restrict __nptr,
- +extern double strtod (const char *__restrict __nptr,
- char **__restrict __endptr)
- __THROW __nonnull ((1)) __wur;
- libc_hidden_proto(strtod)
- @@ -187,10 +186,10 @@
- #ifdef __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* Likewise for `float' and `long double' sizes of floating-point numbers. */
- -extern float strtof (__const char *__restrict __nptr,
- +extern float strtof (const char *__restrict __nptr,
- char **__restrict __endptr) __THROW __nonnull ((1)) __wur;
-
- -extern long double strtold (__const char *__restrict __nptr,
- +extern long double strtold (const char *__restrict __nptr,
- char **__restrict __endptr)
- __THROW __nonnull ((1)) __wur;
- __END_NAMESPACE_C99
- @@ -199,12 +198,12 @@
-
- __BEGIN_NAMESPACE_STD
- /* Convert a string to a long integer. */
- -extern long int strtol (__const char *__restrict __nptr,
- +extern long int strtol (const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __THROW __nonnull ((1)) __wur;
- libc_hidden_proto(strtol)
- /* Convert a string to an unsigned long integer. */
- -extern unsigned long int strtoul (__const char *__restrict __nptr,
- +extern unsigned long int strtoul (const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __THROW __nonnull ((1)) __wur;
- libc_hidden_proto(strtoul)
- @@ -215,12 +214,12 @@
-
- /* Convert a string to a quadword integer. */
- __extension__
- -extern quad_t strtoq (__const char *__restrict __nptr,
- +extern quad_t strtoq (const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __THROW __nonnull ((1)) __wur;
- /* Convert a string to an unsigned quadword integer. */
- __extension__
- -extern u_quad_t strtouq (__const char *__restrict __nptr,
- +extern u_quad_t strtouq (const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __THROW __nonnull ((1)) __wur;
- #endif /* GCC and use BSD. */
- @@ -229,13 +228,13 @@
- __BEGIN_NAMESPACE_C99
- /* Convert a string to a quadword integer. */
- __extension__
- -extern long long int strtoll (__const char *__restrict __nptr,
- +extern long long int strtoll (const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __THROW __nonnull ((1)) __wur;
- libc_hidden_proto(strtoll)
- /* Convert a string to an unsigned quadword integer. */
- __extension__
- -extern unsigned long long int strtoull (__const char *__restrict __nptr,
- +extern unsigned long long int strtoull (const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __THROW __nonnull ((1)) __wur;
- __END_NAMESPACE_C99
- @@ -260,39 +259,39 @@
-
- /* Special versions of the functions above which take the locale to
- use as an additional parameter. */
- -extern long int strtol_l (__const char *__restrict __nptr,
- +extern long int strtol_l (const char *__restrict __nptr,
- char **__restrict __endptr, int __base,
- __locale_t __loc) __THROW __nonnull ((1, 4)) __wur;
- libc_hidden_proto(strtol_l)
-
- -extern unsigned long int strtoul_l (__const char *__restrict __nptr,
- +extern unsigned long int strtoul_l (const char *__restrict __nptr,
- char **__restrict __endptr,
- int __base, __locale_t __loc)
- __THROW __nonnull ((1, 4)) __wur;
- libc_hidden_proto(strtoul_l)
-
- __extension__
- -extern long long int strtoll_l (__const char *__restrict __nptr,
- +extern long long int strtoll_l (const char *__restrict __nptr,
- char **__restrict __endptr, int __base,
- __locale_t __loc)
- __THROW __nonnull ((1, 4)) __wur;
-
- __extension__
- -extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
- +extern unsigned long long int strtoull_l (const char *__restrict __nptr,
- char **__restrict __endptr,
- int __base, __locale_t __loc)
- __THROW __nonnull ((1, 4)) __wur;
-
- #ifdef __UCLIBC_HAS_FLOATS__
- -extern double strtod_l (__const char *__restrict __nptr,
- +extern double strtod_l (const char *__restrict __nptr,
- char **__restrict __endptr, __locale_t __loc)
- __THROW __nonnull ((1, 3)) __wur;
-
- -extern float strtof_l (__const char *__restrict __nptr,
- +extern float strtof_l (const char *__restrict __nptr,
- char **__restrict __endptr, __locale_t __loc)
- __THROW __nonnull ((1, 3)) __wur;
-
- -extern long double strtold_l (__const char *__restrict __nptr,
- +extern long double strtold_l (const char *__restrict __nptr,
- char **__restrict __endptr,
- __locale_t __loc)
- __THROW __nonnull ((1, 3)) __wur;
- @@ -307,7 +306,7 @@
- extern char *l64a (long int __n) __THROW __wur;
-
- /* Read a number from a string S in base 64 as above. */
- -extern long int a64l (__const char *__s)
- +extern long int a64l (const char *__s)
- __THROW __attribute_pure__ __nonnull ((1)) __wur;
-
- #endif /* Use SVID || extended X/Open. */
- @@ -564,14 +563,14 @@
-
- __BEGIN_NAMESPACE_STD
- /* Return the value of envariable NAME, or NULL if it doesn't exist. */
- -extern char *getenv (__const char *__name) __THROW __nonnull ((1)) __wur;
- +extern char *getenv (const char *__name) __THROW __nonnull ((1)) __wur;
- libc_hidden_proto(getenv)
- __END_NAMESPACE_STD
-
- #if 0
- /* This function is similar to the above but returns NULL if the
- programs is running with SUID or SGID enabled. */
- -extern char *__secure_getenv (__const char *__name)
- +extern char *__secure_getenv (const char *__name)
- __THROW __nonnull ((1)) __wur;
- #endif
-
- @@ -585,12 +584,12 @@
- #if defined __USE_BSD || defined __USE_XOPEN2K
- /* Set NAME to VALUE in the environment.
- If REPLACE is nonzero, overwrite an existing value. */
- -extern int setenv (__const char *__name, __const char *__value, int __replace)
- +extern int setenv (const char *__name, const char *__value, int __replace)
- __THROW __nonnull ((2));
- libc_hidden_proto(setenv)
-
- /* Remove the variable NAME from the environment. */
- -extern int unsetenv (__const char *__name) __THROW;
- +extern int unsetenv (const char *__name) __THROW;
- libc_hidden_proto(unsetenv)
- #endif
-
- @@ -652,20 +651,43 @@
- extern char *mkdtemp (char *__template) __THROW __nonnull ((1)) __wur;
- #endif
-
- +#ifdef __USE_GNU
- +/* Generate a unique temporary file name from TEMPLATE similar to
- + mkstemp. But allow the caller to pass additional flags which are
- + used in the open call to create the file..
- +
- + This function is a possible cancellation point and therefore not
- + marked with __THROW. */
- +# ifndef __USE_FILE_OFFSET64
- +extern int mkostemp (char *__template, int __flags) __nonnull ((1)) __wur;
- +# else
- +# ifdef __REDIRECT
- +extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64)
- + __nonnull ((1)) __wur;
- +# else
- +# define mkostemp mkostemp64
- +# endif
- +# endif
- +# ifdef __USE_LARGEFILE64
- +extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur;
- +# endif
- +
- +#endif
- +
-
- __BEGIN_NAMESPACE_STD
- /* Execute the given line as a shell command.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern int system (__const char *__command) __wur;
- +extern int system (const char *__command) __wur;
- __END_NAMESPACE_STD
-
-
- #ifdef __USE_GNU
- /* Return a malloc'd string containing the canonical absolute name of the
- existing named file. */
- -extern char *canonicalize_file_name (__const char *__name)
- +extern char *canonicalize_file_name (const char *__name)
- __THROW __nonnull ((1)) __wur;
- #endif
-
- @@ -675,7 +697,7 @@
- PATH_MAX chars or more, returns null with `errno' set to
- ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
- returns the name in RESOLVED. */
- -extern char *realpath (__const char *__restrict __name,
- +extern char *realpath (const char *__restrict __name,
- char *__restrict __resolved) __THROW __wur;
- libc_hidden_proto(realpath)
- #endif
- @@ -684,20 +706,20 @@
- /* Shorthand for type of comparison functions. */
- #ifndef __COMPAR_FN_T
- # define __COMPAR_FN_T
- -typedef int (*__compar_fn_t) (__const void *, __const void *);
- +typedef int (*__compar_fn_t) (const void *, const void *);
-
- # ifdef __USE_GNU
- typedef __compar_fn_t comparison_fn_t;
- # endif
- #endif
- #ifdef __USE_GNU
- -typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *);
- +typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
- #endif
-
- __BEGIN_NAMESPACE_STD
- /* Do a binary search for KEY in BASE, which consists of NMEMB elements
- of SIZE bytes each, using COMPAR to perform the comparisons. */
- -extern void *bsearch (__const void *__key, __const void *__base,
- +extern void *bsearch (const void *__key, const void *__base,
- size_t __nmemb, size_t __size, __compar_fn_t __compar)
- __nonnull ((1, 2, 5)) __wur;
-
- @@ -807,11 +829,11 @@
- __BEGIN_NAMESPACE_STD
- /* Return the length of the multibyte character
- in S, which is no longer than N. */
- -extern int mblen (__const char *__s, size_t __n) __THROW __wur;
- +extern int mblen (const char *__s, size_t __n) __THROW __wur;
- /* Return the length of the given multibyte character,
- putting its `wchar_t' representation in *PWC. */
- extern int mbtowc (wchar_t *__restrict __pwc,
- - __const char *__restrict __s, size_t __n) __THROW __wur;
- + const char *__restrict __s, size_t __n) __THROW __wur;
- /* Put the multibyte character represented
- by WCHAR in S, returning its length. */
- extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur;
- @@ -819,21 +841,21 @@
-
- /* Convert a multibyte string to a wide char string. */
- extern size_t mbstowcs (wchar_t *__restrict __pwcs,
- - __const char *__restrict __s, size_t __n) __THROW;
- + const char *__restrict __s, size_t __n) __THROW;
- /* Convert a wide char string to multibyte string. */
- extern size_t wcstombs (char *__restrict __s,
- - __const wchar_t *__restrict __pwcs, size_t __n)
- + const wchar_t *__restrict __pwcs, size_t __n)
- __THROW;
- __END_NAMESPACE_STD
- #endif /* __UCLIBC_HAS_WCHAR__ */
-
-
- -#if 0 /*def __USE_SVID*/
- +#ifdef __USE_SVID
- /* Determine whether the string value of RESPONSE matches the affirmation
- or negative response expression as specified by the LC_MESSAGES category
- in the program's current locale. Returns 1 if affirmative, 0 if
- negative, and -1 if not matching. */
- -extern int rpmatch (__const char *__response) __THROW __nonnull ((1)) __wur;
- +extern int rpmatch (const char *__response) __THROW __nonnull ((1)) __wur;
- #endif
-
-
- @@ -845,7 +867,7 @@
- suboption. On exit *OPTIONP is set to the beginning of the next
- token or at the terminating NUL character. */
- extern int getsubopt (char **__restrict __optionp,
- - char *__const *__restrict __tokens,
- + char *const *__restrict __tokens,
- char **__restrict __valuep)
- __THROW __nonnull ((1, 2, 3)) __wur;
- #endif
- @@ -854,7 +876,7 @@
- #ifdef __USE_XOPEN
- # if defined __UCLIBC_HAS_CRYPT__
- /* Setup DES tables according KEY. */
- -extern void setkey (__const char *__key) __THROW __nonnull ((1));
- +extern void setkey (const char *__key) __THROW __nonnull ((1));
- # endif /* __UCLIBC_HAS_CRYPT__ */
- #endif
-
- @@ -864,7 +886,6 @@
- #ifdef __USE_XOPEN2K
- /* Return a master pseudo-terminal handle. */
- extern int posix_openpt (int __oflag) __wur;
- -libc_hidden_proto(posix_openpt)
- #endif
-
- #ifdef __USE_XOPEN
- @@ -910,8 +931,8 @@
- #endif
-
- #ifdef __UCLIBC_HAS_ARC4RANDOM__
- -#include <stdint.h>
- -extern uint32_t arc4random(void);
- +# include <sys/types.h>
- +extern u_int32_t arc4random(void);
- extern void arc4random_stir(void);
- extern void arc4random_addrandom(unsigned char *, int);
- #endif
- diff -Nur uClibc-0.9.33.2/include/string.h uClibc/include/string.h
- --- uClibc-0.9.33.2/include/string.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/string.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1991-1993, 1995-2003, 2004 Free Software Foundation, Inc.
- +/* Copyright (C) 1991-1993,1995-2004,2007,2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.21 String handling <string.h>
- @@ -36,12 +35,12 @@
- __BEGIN_NAMESPACE_STD
- /* Copy N bytes of SRC to DEST. */
- extern void *memcpy (void *__restrict __dest,
- - __const void *__restrict __src, size_t __n)
- + const void *__restrict __src, size_t __n)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(memcpy)
- /* Copy N bytes of SRC to DEST, guaranteeing
- correct behavior for overlapping strings. */
- -extern void *memmove (void *__dest, __const void *__src, size_t __n)
- +extern void *memmove (void *__dest, const void *__src, size_t __n)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(memmove)
- __END_NAMESPACE_STD
- @@ -50,7 +49,7 @@
- Return the position in DEST one byte past where C was copied,
- or NULL if C was not found in the first N bytes of SRC. */
- #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN
- -extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
- +extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
- int __c, size_t __n)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(memccpy)
- @@ -63,12 +62,12 @@
- libc_hidden_proto(memset)
-
- /* Compare N bytes of S1 and S2. */
- -extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
- +extern int memcmp (const void *__s1, const void *__s2, size_t __n)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(memcmp)
-
- /* Search N bytes of S for C. */
- -extern void *memchr (__const void *__s, int __c, size_t __n)
- +extern void *memchr (const void *__s, int __c, size_t __n)
- __THROW __attribute_pure__ __nonnull ((1));
- libc_hidden_proto(memchr)
- __END_NAMESPACE_STD
- @@ -76,12 +75,12 @@
- #ifdef __USE_GNU
- /* Search in S for C. This is similar to `memchr' but there is no
- length limit. */
- -extern void *rawmemchr (__const void *__s, int __c)
- +extern void *rawmemchr (const void *__s, int __c)
- __THROW __attribute_pure__ __nonnull ((1));
- libc_hidden_proto(rawmemchr)
-
- /* Search N bytes of S for the final occurrence of C. */
- -extern void *memrchr (__const void *__s, int __c, size_t __n)
- +extern void *memrchr (const void *__s, int __c, size_t __n)
- __THROW __attribute_pure__ __nonnull ((1));
- libc_hidden_proto(memrchr)
- #endif
- @@ -89,62 +88,62 @@
-
- __BEGIN_NAMESPACE_STD
- /* Copy SRC to DEST. */
- -extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
- +extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(strcpy)
- /* Copy no more than N characters of SRC to DEST. */
- extern char *strncpy (char *__restrict __dest,
- - __const char *__restrict __src, size_t __n)
- + const char *__restrict __src, size_t __n)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(strncpy)
-
- /* Append SRC onto DEST. */
- -extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
- +extern char *strcat (char *__restrict __dest, const char *__restrict __src)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(strcat)
- /* Append no more than N characters from SRC onto DEST. */
- -extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
- +extern char *strncat (char *__restrict __dest, const char *__restrict __src,
- size_t __n) __THROW __nonnull ((1, 2));
- libc_hidden_proto(strncat)
-
- /* Compare S1 and S2. */
- -extern int strcmp (__const char *__s1, __const char *__s2)
- +extern int strcmp (const char *__s1, const char *__s2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strcmp)
- /* Compare N characters of S1 and S2. */
- -extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
- +extern int strncmp (const char *__s1, const char *__s2, size_t __n)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strncmp)
-
- /* Compare the collated forms of S1 and S2. */
- -extern int strcoll (__const char *__s1, __const char *__s2)
- +extern int strcoll (const char *__s1, const char *__s2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strcoll)
- /* Put a transformation of SRC into no more than N bytes of DEST. */
- extern size_t strxfrm (char *__restrict __dest,
- - __const char *__restrict __src, size_t __n)
- + const char *__restrict __src, size_t __n)
- __THROW __nonnull ((2));
- __END_NAMESPACE_STD
-
- -#if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__
- +#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__
- /* The following functions are equivalent to the both above but they
- take the locale they use for the collation as an extra argument.
- This is not standardsized but something like will come. */
- # include <xlocale.h>
-
- /* Compare the collated forms of S1 and S2 using rules from L. */
- -extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
- +extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l)
- __THROW __attribute_pure__ __nonnull ((1, 2, 3));
- libc_hidden_proto(strcoll_l)
- /* Put a transformation of SRC into no more than N bytes of DEST. */
- -extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
- +extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
- __locale_t __l) __THROW __nonnull ((2, 4));
- libc_hidden_proto(strxfrm_l)
- #endif
-
- #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- /* Duplicate S, returning an identical malloc'd string. */
- -extern char *strdup (__const char *__s)
- +extern char *strdup (const char *__s)
- __THROW __attribute_malloc__ __nonnull ((1));
- libc_hidden_proto(strdup)
- #endif
- @@ -152,8 +151,8 @@
- /* Return a malloc'd copy of at most N bytes of STRING. The
- resultant string is terminated even if no null terminator
- appears before STRING[N]. */
- -#if defined __USE_GNU
- -extern char *strndup (__const char *__string, size_t __n)
- +#if defined __USE_XOPEN2K8
- +extern char *strndup (const char *__string, size_t __n)
- __THROW __attribute_malloc__ __nonnull ((1));
- libc_hidden_proto(strndup)
- #endif
- @@ -163,7 +162,7 @@
- # define strdupa(s) \
- (__extension__ \
- ({ \
- - __const char *__old = (s); \
- + const char *__old = (s); \
- size_t __len = strlen (__old) + 1; \
- char *__new = (char *) __builtin_alloca (__len); \
- (char *) memcpy (__new, __old, __len); \
- @@ -173,7 +172,7 @@
- # define strndupa(s, n) \
- (__extension__ \
- ({ \
- - __const char *__old = (s); \
- + const char *__old = (s); \
- size_t __len = strnlen (__old, (n)); \
- char *__new = (char *) __builtin_alloca (__len + 1); \
- __new[__len] = '\0'; \
- @@ -183,11 +182,11 @@
-
- __BEGIN_NAMESPACE_STD
- /* Find the first occurrence of C in S. */
- -extern char *strchr (__const char *__s, int __c)
- +extern char *strchr (const char *__s, int __c)
- __THROW __attribute_pure__ __nonnull ((1));
- libc_hidden_proto(strchr)
- /* Find the last occurrence of C in S. */
- -extern char *strrchr (__const char *__s, int __c)
- +extern char *strrchr (const char *__s, int __c)
- __THROW __attribute_pure__ __nonnull ((1));
- libc_hidden_proto(strrchr)
- __END_NAMESPACE_STD
- @@ -195,7 +194,7 @@
- #ifdef __USE_GNU
- /* This function is similar to `strchr'. But it returns a pointer to
- the closing NUL byte in case C is not found in S. */
- -extern char *strchrnul (__const char *__s, int __c)
- +extern char *strchrnul (const char *__s, int __c)
- __THROW __attribute_pure__ __nonnull ((1));
- libc_hidden_proto(strchrnul)
- #endif
- @@ -203,26 +202,26 @@
- __BEGIN_NAMESPACE_STD
- /* Return the length of the initial segment of S which
- consists entirely of characters not in REJECT. */
- -extern size_t strcspn (__const char *__s, __const char *__reject)
- +extern size_t strcspn (const char *__s, const char *__reject)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strcspn)
- /* Return the length of the initial segment of S which
- consists entirely of characters in ACCEPT. */
- -extern size_t strspn (__const char *__s, __const char *__accept)
- +extern size_t strspn (const char *__s, const char *__accept)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strspn)
- /* Find the first occurrence in S of any character in ACCEPT. */
- -extern char *strpbrk (__const char *__s, __const char *__accept)
- +extern char *strpbrk (const char *__s, const char *__accept)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strpbrk)
- /* Find the first occurrence of NEEDLE in HAYSTACK. */
- -extern char *strstr (__const char *__haystack, __const char *__needle)
- +extern char *strstr (const char *__haystack, const char *__needle)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strstr)
-
-
- /* Divide S into tokens separated by characters in DELIM. */
- -extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
- +extern char *strtok (char *__restrict __s, const char *__restrict __delim)
- __THROW __nonnull ((2));
- libc_hidden_proto(strtok)
- __END_NAMESPACE_STD
- @@ -231,12 +230,12 @@
- passed between calls are stored in SAVE_PTR. */
- #if 0 /* uClibc: disabled */
- extern char *__strtok_r (char *__restrict __s,
- - __const char *__restrict __delim,
- + const char *__restrict __delim,
- char **__restrict __save_ptr)
- __THROW __nonnull ((2, 3));
- #endif
- #if defined __USE_POSIX || defined __USE_MISC
- -extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
- +extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
- char **__restrict __save_ptr)
- __THROW __nonnull ((2, 3));
- libc_hidden_proto(strtok_r)
- @@ -244,7 +243,7 @@
-
- #ifdef __USE_GNU
- /* Similar to `strstr' but this function ignores the case of both strings. */
- -extern char *strcasestr (__const char *__haystack, __const char *__needle)
- +extern char *strcasestr (const char *__haystack, const char *__needle)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strcasestr)
- #endif
- @@ -253,19 +252,19 @@
- /* Find the first occurrence of NEEDLE in HAYSTACK.
- NEEDLE is NEEDLELEN bytes long;
- HAYSTACK is HAYSTACKLEN bytes long. */
- -extern void *memmem (__const void *__haystack, size_t __haystacklen,
- - __const void *__needle, size_t __needlelen)
- +extern void *memmem (const void *__haystack, size_t __haystacklen,
- + const void *__needle, size_t __needlelen)
- __THROW __attribute_pure__ __nonnull ((1, 3));
-
- /* Copy N bytes of SRC to DEST, return pointer to bytes after the
- last written byte. */
- #if 0 /* uClibc: disabled */
- extern void *__mempcpy (void *__restrict __dest,
- - __const void *__restrict __src, size_t __n)
- + const void *__restrict __src, size_t __n)
- __THROW __nonnull ((1, 2));
- #endif
- extern void *mempcpy (void *__restrict __dest,
- - __const void *__restrict __src, size_t __n)
- + const void *__restrict __src, size_t __n)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(mempcpy)
- #endif
- @@ -273,15 +272,15 @@
-
- __BEGIN_NAMESPACE_STD
- /* Return the length of S. */
- -extern size_t strlen (__const char *__s)
- +extern size_t strlen (const char *__s)
- __THROW __attribute_pure__ __nonnull ((1));
- libc_hidden_proto(strlen)
- __END_NAMESPACE_STD
-
- -#ifdef __USE_GNU
- +#ifdef __USE_XOPEN2K8
- /* Find the length of STRING, but scan at most MAXLEN characters.
- If no '\0' terminator is found in that many characters, return MAXLEN. */
- -extern size_t strnlen (__const char *__string, size_t __maxlen)
- +extern size_t strnlen (const char *__string, size_t __maxlen)
- __THROW __attribute_pure__ __nonnull ((1));
- libc_hidden_proto(strnlen)
- #endif
- @@ -329,6 +328,12 @@
- # endif
- #endif
-
- +#if 0 /*defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__*/
- +/* Translate error number to string according to the locale L. */
- +extern char *strerror_l (int __errnum, __locale_t __l) __THROW;
- +#endif
- +
- +
- /* We define this function always since `bzero' is sometimes needed when
- the namespace rules does not allow this. */
- #if 0 /* uClibc: disabled */
- @@ -338,22 +343,22 @@
- #ifdef __USE_BSD
- # ifdef __UCLIBC_SUSV3_LEGACY__
- /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
- -extern void bcopy (__const void *__src, void *__dest, size_t __n)
- +extern void bcopy (const void *__src, void *__dest, size_t __n)
- __THROW __nonnull ((1, 2));
-
- /* Set N bytes of S to 0. */
- extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1));
-
- /* Compare N bytes of S1 and S2 (same as memcmp). */
- -extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
- +extern int bcmp (const void *__s1, const void *__s2, size_t __n)
- __THROW __attribute_pure__ __nonnull ((1, 2));
-
- /* Find the first occurrence of C in S (same as strchr). */
- -extern char *index (__const char *__s, int __c)
- +extern char *index (const char *__s, int __c)
- __THROW __attribute_pure__ __nonnull ((1));
-
- /* Find the last occurrence of C in S (same as strrchr). */
- -extern char *rindex (__const char *__s, int __c)
- +extern char *rindex (const char *__s, int __c)
- __THROW __attribute_pure__ __nonnull ((1));
- # else
- # ifdef __UCLIBC_SUSV3_LEGACY_MACROS__
- @@ -385,25 +390,25 @@
- # endif
-
- /* Compare S1 and S2, ignoring case. */
- -extern int strcasecmp (__const char *__s1, __const char *__s2)
- +extern int strcasecmp (const char *__s1, const char *__s2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strcasecmp)
-
- /* Compare no more than N chars of S1 and S2, ignoring case. */
- -extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
- +extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strncasecmp)
- #endif /* Use BSD. */
-
- -#if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__
- +#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__
- /* Again versions of a few functions which use the given locale instead
- of the global one. */
- -extern int strcasecmp_l (__const char *__s1, __const char *__s2,
- +extern int strcasecmp_l (const char *__s1, const char *__s2,
- __locale_t __loc)
- __THROW __attribute_pure__ __nonnull ((1, 2, 3));
- libc_hidden_proto(strcasecmp_l)
-
- -extern int strncasecmp_l (__const char *__s1, __const char *__s2,
- +extern int strncasecmp_l (const char *__s1, const char *__s2,
- size_t __n, __locale_t __loc)
- __THROW __attribute_pure__ __nonnull ((1, 2, 4));
- libc_hidden_proto(strncasecmp_l)
- @@ -413,27 +418,22 @@
- /* Return the next DELIM-delimited token from *STRINGP,
- terminating it with a '\0', and update *STRINGP to point past it. */
- extern char *strsep (char **__restrict __stringp,
- - __const char *__restrict __delim)
- + const char *__restrict __delim)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(strsep)
- #endif
-
- -#ifdef __USE_GNU
- -/* Compare S1 and S2 as strings holding name & indices/version numbers. */
- -extern int strverscmp (__const char *__s1, __const char *__s2)
- - __THROW __attribute_pure__ __nonnull ((1, 2));
- -libc_hidden_proto(strverscmp)
- -
- +#ifdef __USE_XOPEN2K8
- /* Return a string describing the meaning of the signal number in SIG. */
- extern char *strsignal (int __sig) __THROW;
- libc_hidden_proto(strsignal)
-
- /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
- # if 0 /* uClibc: disabled */
- -extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
- +extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
- __THROW __nonnull ((1, 2));
- # endif
- -extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
- +extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(stpcpy)
-
- @@ -441,12 +441,19 @@
- the last character written into DEST. */
- # if 0 /* uClibc: disabled */
- extern char *__stpncpy (char *__restrict __dest,
- - __const char *__restrict __src, size_t __n)
- + const char *__restrict __src, size_t __n)
- __THROW __nonnull ((1, 2));
- # endif
- extern char *stpncpy (char *__restrict __dest,
- - __const char *__restrict __src, size_t __n)
- + const char *__restrict __src, size_t __n)
- __THROW __nonnull ((1, 2));
- +#endif
- +
- +#ifdef __USE_GNU
- +/* Compare S1 and S2 as strings holding name & indices/version numbers. */
- +extern int strverscmp (const char *__s1, const char *__s2)
- + __THROW __attribute_pure__ __nonnull ((1, 2));
- +libc_hidden_proto(strverscmp)
-
- # if 0 /* uClibc does not support strfry or memfrob. */
- /* Sautee STRING briskly. */
- @@ -461,8 +468,7 @@
- declare the function if the `basename' macro is available (defined
- in <libgen.h>) which makes the XPG version of this function
- available. */
- -extern char *basename (__const char *__filename) __THROW __nonnull ((1));
- -libc_hidden_proto(basename)
- +extern char *basename (const char *__filename) __THROW __nonnull ((1));
- # endif
- #endif /* __USE_GNU */
-
- diff -Nur uClibc-0.9.33.2/include/strings.h uClibc/include/strings.h
- --- uClibc-0.9.33.2/include/strings.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/strings.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1991,92,96,97,99,2000,2001 Free Software Foundation, Inc.
- +/* Copyright (C) 1991,92,96,97,99,2000,2001,2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _STRINGS_H
- #define _STRINGS_H 1
- @@ -35,22 +34,22 @@
-
- # ifdef __UCLIBC_SUSV3_LEGACY__
- /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
- -extern void bcopy (__const void *__src, void *__dest, size_t __n)
- +extern void bcopy (const void *__src, void *__dest, size_t __n)
- __THROW __nonnull ((1, 2));
-
- /* Set N bytes of S to 0. */
- extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1));
-
- /* Compare N bytes of S1 and S2 (same as memcmp). */
- -extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
- +extern int bcmp (const void *__s1, const void *__s2, size_t __n)
- __THROW __attribute_pure__ __nonnull ((1, 2));
-
- /* Find the first occurrence of C in S (same as strchr). */
- -extern char *index (__const char *__s, int __c)
- +extern char *index (const char *__s, int __c)
- __THROW __attribute_pure__ __nonnull ((1));
-
- /* Find the last occurrence of C in S (same as strrchr). */
- -extern char *rindex (__const char *__s, int __c)
- +extern char *rindex (const char *__s, int __c)
- __THROW __attribute_pure__ __nonnull ((1));
- # else
- # ifdef __UCLIBC_SUSV3_LEGACY_MACROS__
- @@ -69,10 +68,11 @@
- /* Return the position of the first bit set in I, or 0 if none are set.
- The least-significant bit is position 1, the most-significant 32. */
- extern int ffs (int __i) __THROW __attribute__ ((__const__));
- +libc_hidden_proto(ffs)
-
- /* The following two functions are non-standard but necessary for non-32 bit
- platforms. */
- -#if 0 /*def __USE_GNU*/
- +# ifdef __USE_GNU
- extern int ffsl (long int __l) __THROW __attribute__ ((__const__));
- # ifdef __GNUC__
- __extension__ extern int ffsll (long long int __ll)
- @@ -81,17 +81,39 @@
- # endif
-
- /* Compare S1 and S2, ignoring case. */
- -extern int strcasecmp (__const char *__s1, __const char *__s2)
- +extern int strcasecmp (const char *__s1, const char *__s2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- +libc_hidden_proto(strcasecmp)
-
- /* Compare no more than N chars of S1 and S2, ignoring case. */
- -extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
- +extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- +libc_hidden_proto(strncasecmp)
-
- +#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__
- +/* The following functions are equivalent to the both above but they
- + take the locale they use for the collation as an extra argument.
- + This is not standardsized but something like will come. */
- +# include <xlocale.h>
- +
- +/* Again versions of a few functions which use the given locale instead
- + of the global one. */
- +extern int strcasecmp_l (const char *__s1, const char *__s2,
- + __locale_t __loc)
- + __THROW __attribute_pure__ __nonnull ((1, 2, 3));
- +libc_hidden_proto(strcasecmp_l)
- +
- +extern int strncasecmp_l (const char *__s1, const char *__s2,
- + size_t __n, __locale_t __loc)
- + __THROW __attribute_pure__ __nonnull ((1, 2, 4));
- +libc_hidden_proto(strncasecmp_l)
- +#endif
- __END_DECLS
-
-
- #ifdef _LIBC
- +/* comment is wrong and will face this, when HAS_GNU option will be added
- + * header is SuSv standard */
- #error "<strings.h> should not be included from libc."
- #endif
-
- diff -Nur uClibc-0.9.33.2/include/sys/cdefs.h uClibc/include/sys/cdefs.h
- --- uClibc-0.9.33.2/include/sys/cdefs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/cdefs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_CDEFS_H
- #define _SYS_CDEFS_H 1
- @@ -63,10 +62,6 @@
- # define __THROW
- # define __NTH(fct) fct
-
- -# define __const const
- -# define __signed signed
- -# define __volatile volatile
- -
- #endif /* GCC. */
-
- /* These two macros are not used in glibc anymore. They are kept here
- diff -Nur uClibc-0.9.33.2/include/sys/dir.h uClibc/include/sys/dir.h
- --- uClibc-0.9.33.2/include/sys/dir.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/dir.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_DIR_H
- #define _SYS_DIR_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/file.h uClibc/include/sys/file.h
- --- uClibc-0.9.33.2/include/sys/file.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/file.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_FILE_H
- #define _SYS_FILE_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/fsuid.h uClibc/include/sys/fsuid.h
- --- uClibc-0.9.33.2/include/sys/fsuid.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/fsuid.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_FSUID_H
- #define _SYS_FSUID_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/ioctl.h uClibc/include/sys/ioctl.h
- --- uClibc-0.9.33.2/include/sys/ioctl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/ioctl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IOCTL_H
- #define _SYS_IOCTL_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/ipc.h uClibc/include/sys/ipc.h
- --- uClibc-0.9.33.2/include/sys/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- #define _SYS_IPC_H 1
- @@ -51,7 +50,7 @@
- __BEGIN_DECLS
-
- /* Generates key for System V style IPC. */
- -extern key_t ftok (__const char *__pathname, int __proj_id) __THROW;
- +extern key_t ftok (const char *__pathname, int __proj_id) __THROW;
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/sys/kdaemon.h uClibc/include/sys/kdaemon.h
- --- uClibc-0.9.33.2/include/sys/kdaemon.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/kdaemon.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Interfaces to control the various kernel daemons. */
-
- diff -Nur uClibc-0.9.33.2/include/sys/kd.h uClibc/include/sys/kd.h
- --- uClibc-0.9.33.2/include/sys/kd.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/kd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_KD_H
- #define _SYS_KD_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/klog.h uClibc/include/sys/klog.h
- --- uClibc-0.9.33.2/include/sys/klog.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/klog.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_KLOG_H
-
- diff -Nur uClibc-0.9.33.2/include/sys/mman.h uClibc/include/sys/mman.h
- --- uClibc-0.9.33.2/include/sys/mman.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/mman.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MMAN_H
- #define _SYS_MMAN_H 1
- @@ -115,10 +114,10 @@
-
- /* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
- be memory resident. */
- -extern int mlock (__const void *__addr, size_t __len) __THROW;
- +extern int mlock (const void *__addr, size_t __len) __THROW;
-
- /* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN). */
- -extern int munlock (__const void *__addr, size_t __len) __THROW;
- +extern int munlock (const void *__addr, size_t __len) __THROW;
-
- /* Cause all currently mapped pages of the process to be memory resident
- until unlocked by a call to the `munlockall', until the process exits,
- @@ -133,8 +132,8 @@
-
- /* On no-mmu systems, memory cannot be swapped out, so
- * these functions will always succeed. */
- -static __inline__ int mlock (__const void *__addr, size_t __len) { return 0; }
- -static __inline__ int munlock (__const void *__addr, size_t __len) { return 0; }
- +static __inline__ int mlock (const void *__addr, size_t __len) { return 0; }
- +static __inline__ int munlock (const void *__addr, size_t __len) { return 0; }
- static __inline__ int mlockall (int __flags) { return 0; }
- static __inline__ int munlockall (void) { return 0; }
- #endif
- @@ -170,10 +169,10 @@
-
-
- /* Open shared memory segment. */
- -extern int shm_open (__const char *__name, int __oflag, mode_t __mode);
- +extern int shm_open (const char *__name, int __oflag, mode_t __mode);
-
- /* Remove shared memory segment. */
- -extern int shm_unlink (__const char *__name);
- +extern int shm_unlink (const char *__name);
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/sys/mount.h uClibc/include/sys/mount.h
- --- uClibc-0.9.33.2/include/sys/mount.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/mount.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,5 @@
- /* Header file for mounting/unmount Linux filesystems.
- - Copyright (C) 1996,1997,1998,1999,2000,2004 Free Software Foundation, Inc.
- + Copyright (C) 1996-2000, 2004, 2010, 2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This is taken from /usr/include/linux/fs.h. */
-
- @@ -47,23 +46,46 @@
- #define MS_REMOUNT MS_REMOUNT
- MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
- #define MS_MANDLOCK MS_MANDLOCK
- - S_WRITE = 128, /* Write on file/directory/symlink. */
- -#define S_WRITE S_WRITE
- - S_APPEND = 256, /* Append-only file. */
- -#define S_APPEND S_APPEND
- - S_IMMUTABLE = 512, /* Immutable file. */
- -#define S_IMMUTABLE S_IMMUTABLE
- + MS_DIRSYNC = 128, /* Directory modifications are synchronous. */
- +#define MS_DIRSYNC MS_DIRSYNC
- MS_NOATIME = 1024, /* Do not update access times. */
- #define MS_NOATIME MS_NOATIME
- MS_NODIRATIME = 2048, /* Do not update directory access times. */
- #define MS_NODIRATIME MS_NODIRATIME
- MS_BIND = 4096, /* Bind directory at different place. */
- #define MS_BIND MS_BIND
- + MS_MOVE = 8192,
- +#define MS_MOVE MS_MOVE
- + MS_REC = 16384,
- +#define MS_REC MS_REC
- + MS_SILENT = 32768,
- +#define MS_SILENT MS_SILENT
- + MS_POSIXACL = 1 << 16, /* VFS does not apply the umask. */
- +#define MS_POSIXACL MS_POSIXACL
- + MS_UNBINDABLE = 1 << 17, /* Change to unbindable. */
- +#define MS_UNBINDABLE MS_UNBINDABLE
- + MS_PRIVATE = 1 << 18, /* Change to private. */
- +#define MS_PRIVATE MS_PRIVATE
- + MS_SLAVE = 1 << 19, /* Change to slave. */
- +#define MS_SLAVE MS_SLAVE
- + MS_SHARED = 1 << 20, /* Change to shared. */
- +#define MS_SHARED MS_SHARED
- + MS_RELATIME = 1 << 21, /* Update atime relative to mtime/ctime. */
- +#define MS_RELATIME MS_RELATIME
- + MS_KERNMOUNT = 1 << 22, /* This is a kern_mount call. */
- +#define MS_KERNMOUNT MS_KERNMOUNT
- + MS_I_VERSION = 1 << 23, /* Update inode I_version field. */
- +#define MS_I_VERSION MS_I_VERSION
- + MS_STRICTATIME = 1 << 24, /* Always perform atime updates. */
- +#define MS_STRICTATIME MS_STRICTATIME
- + MS_ACTIVE = 1 << 30,
- +#define MS_ACTIVE MS_ACTIVE
- + MS_NOUSER = 1 << 31
- +#define MS_NOUSER MS_NOUSER
- };
-
- /* Flags that can be altered by MS_REMOUNT */
- -#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_NOATIME \
- - |MS_NODIRATIME)
- +#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION)
-
-
- /* Magic mount flag number. Has to be or-ed to the flag values. */
- @@ -100,23 +122,28 @@
- #define MNT_FORCE MNT_FORCE
- MNT_DETACH = 2, /* Just detach from the tree. */
- #define MNT_DETACH MNT_DETACH
- - MNT_EXPIRE = 4 /* Mark for expiry. */
- + MNT_EXPIRE = 4, /* Mark for expiry. */
- #define MNT_EXPIRE MNT_EXPIRE
- + UMOUNT_NOFOLLOW = 8 /* Don't follow symlink on umount. */
- +#define UMOUNT_NOFOLLOW UMOUNT_NOFOLLOW
- };
-
-
- __BEGIN_DECLS
-
- /* Mount a filesystem. */
- -extern int mount (__const char *__special_file, __const char *__dir,
- - __const char *__fstype, unsigned long int __rwflag,
- - __const void *__data) __THROW;
- +extern int mount (const char *__special_file, const char *__dir,
- + const char *__fstype, unsigned long int __rwflag,
- + const void *__data) __THROW;
-
- /* Unmount a filesystem. */
- -extern int umount (__const char *__special_file) __THROW;
- +extern int umount (const char *__special_file) __THROW;
-
- +#ifdef __UCLIBC_LINUX_SPECIFIC__
- /* Unmount a filesystem. Force unmounting if FLAGS is set to MNT_FORCE. */
- -extern int umount2 (__const char *__special_file, int __flags) __THROW;
- +extern int umount2 (const char *__special_file, int __flags) __THROW;
- +libc_hidden_proto(umount2)
- +#endif
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/sys/msg.h uClibc/include/sys/msg.h
- --- uClibc-0.9.33.2/include/sys/msg.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/msg.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MSG_H
- #define _SYS_MSG_H
- @@ -77,7 +76,7 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern int msgsnd (int __msqid, __const void *__msgp, size_t __msgsz,
- +extern int msgsnd (int __msqid, const void *__msgp, size_t __msgsz,
- int __msgflg);
-
- __END_DECLS
- diff -Nur uClibc-0.9.33.2/include/sys/mtio.h uClibc/include/sys/mtio.h
- --- uClibc-0.9.33.2/include/sys/mtio.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/mtio.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Written by H. Bergman <hennus@cybercomm.nl>. */
-
- diff -Nur uClibc-0.9.33.2/include/sys/param.h uClibc/include/sys/param.h
- --- uClibc-0.9.33.2/include/sys/param.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/param.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PARAM_H
- #define _SYS_PARAM_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/personality.h uClibc/include/sys/personality.h
- --- uClibc-0.9.33.2/include/sys/personality.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/personality.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Taken verbatim from Linux 2.4 (include/linux/personality.h). */
-
- diff -Nur uClibc-0.9.33.2/include/sys/poll.h uClibc/include/sys/poll.h
- --- uClibc-0.9.33.2/include/sys/poll.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/poll.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_POLL_H
- #define _SYS_POLL_H 1
- @@ -66,9 +65,8 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
- - __const struct timespec *__timeout,
- - __const __sigset_t *__ss);
- -libc_hidden_proto(ppoll)
- + const struct timespec *__timeout,
- + const __sigset_t *__ss);
- #endif
-
- __END_DECLS
- diff -Nur uClibc-0.9.33.2/include/sys/quota.h uClibc/include/sys/quota.h
- --- uClibc-0.9.33.2/include/sys/quota.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/quota.h 2014-02-03 12:32:56.000000000 +0100
- @@ -30,8 +30,6 @@
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- - *
- - * Version: $Id: quota.h,v 1.1 2002/01/03 04:00:09 andersen Exp $
- */
-
- #ifndef _SYS_QUOTA_H
- @@ -40,6 +38,19 @@
- #include <features.h>
- #include <sys/types.h>
-
- +#ifdef __UCLIBC__
- +# undef _LINUX_QUOTA_VERSION
- +# define _LINUX_QUOTA_VERSION 1
- +#endif
- +
- +/*
- + * Select between different incompatible quota versions.
- + * Default to the version used by Linux kernel version 2.4.22
- + * or later. */
- +#ifndef _LINUX_QUOTA_VERSION
- +# define _LINUX_QUOTA_VERSION 2
- +#endif
- +
- /*
- * Convert diskblocks to blocks and the other way around.
- * currently only to fool the BSD source. :-)
- @@ -94,21 +105,33 @@
- #define SUBCMDSHIFT 8
- #define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
-
- -#define Q_QUOTAON 0x0100 /* enable quotas */
- -#define Q_QUOTAOFF 0x0200 /* disable quotas */
- -#define Q_GETQUOTA 0x0300 /* get limits and usage */
- -#define Q_SETQUOTA 0x0400 /* set limits and usage */
- -#define Q_SETUSE 0x0500 /* set usage */
- -#define Q_SYNC 0x0600 /* sync disk copy of a filesystems quotas */
- -#define Q_SETQLIM 0x0700 /* set limits */
- -#define Q_GETSTATS 0x0800 /* get collected stats */
- -#define Q_RSQUASH 0x1000 /* set root_squash option */
- +#if _LINUX_QUOTA_VERSION < 2
- +# define Q_QUOTAON 0x0100 /* enable quotas */
- +# define Q_QUOTAOFF 0x0200 /* disable quotas */
- +# define Q_GETQUOTA 0x0300 /* get limits and usage */
- +# define Q_SETQUOTA 0x0400 /* set limits and usage */
- +# define Q_SETUSE 0x0500 /* set usage */
- +# define Q_SYNC 0x0600 /* sync disk copy of a filesystems quotas */
- +# define Q_SETQLIM 0x0700 /* set limits */
- +# define Q_GETSTATS 0x0800 /* get collected stats */
- +# define Q_RSQUASH 0x1000 /* set root_squash option */
- +#else
- +# define Q_SYNC 0x800001 /* sync disk copy of a filesystems quotas */
- +# define Q_QUOTAON 0x800002 /* turn quotas on */
- +# define Q_QUOTAOFF 0x800003 /* turn quotas off */
- +# define Q_GETFMT 0x800004 /* get quota format used on given filesystem */
- +# define Q_GETINFO 0x800005 /* get information about quota files */
- +# define Q_SETINFO 0x800006 /* set information about quota files */
- +# define Q_GETQUOTA 0x800007 /* get user quota structure */
- +# define Q_SETQUOTA 0x800008 /* set user quota structure */
- +#endif
-
- /*
- * The following structure defines the format of the disk quota file
- * (as it appears on disk) - the file is an array of these structures
- * indexed by user or group number.
- */
- +#if _LINUX_QUOTA_VERSION < 2
- struct dqblk
- {
- u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */
- @@ -120,13 +143,45 @@
- time_t dqb_btime; /* time limit for excessive disk use */
- time_t dqb_itime; /* time limit for excessive files */
- };
- +#else
- +
- +/* Flags that indicate which fields in dqblk structure are valid. */
- +#define QIF_BLIMITS 1
- +#define QIF_SPACE 2
- +#define QIF_ILIMITS 4
- +#define QIF_INODES 8
- +#define QIF_BTIME 16
- +#define QIF_ITIME 32
- +#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
- +#define QIF_USAGE (QIF_SPACE | QIF_INODES)
- +#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
- +#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
- +
- +struct dqblk
- + {
- + u_int64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */
- + u_int64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */
- + u_int64_t dqb_curspace; /* current quota block count */
- + u_int64_t dqb_ihardlimit; /* maximum # allocated inodes */
- + u_int64_t dqb_isoftlimit; /* preferred inode limit */
- + u_int64_t dqb_curinodes; /* current # allocated inodes */
- + u_int64_t dqb_btime; /* time limit for excessive disk use */
- + u_int64_t dqb_itime; /* time limit for excessive files */
- + u_int32_t dqb_valid; /* bitmask of QIF_* constants */
- + };
- +#endif
-
- /*
- * Shorthand notation.
- */
- #define dq_bhardlimit dq_dqb.dqb_bhardlimit
- #define dq_bsoftlimit dq_dqb.dqb_bsoftlimit
- -#define dq_curblocks dq_dqb.dqb_curblocks
- +#if _LINUX_QUOTA_VERSION < 2
- +# define dq_curblocks dq_dqb.dqb_curblocks
- +#else
- +# define dq_curspace dq_dqb.dqb_curspace
- +# define dq_valid dq_dqb.dqb_valid
- +#endif
- #define dq_ihardlimit dq_dqb.dqb_ihardlimit
- #define dq_isoftlimit dq_dqb.dqb_isoftlimit
- #define dq_curinodes dq_dqb.dqb_curinodes
- @@ -135,6 +190,7 @@
-
- #define dqoff(UID) ((loff_t)((UID) * sizeof (struct dqblk)))
-
- +#if _LINUX_QUOTA_VERSION < 2
- struct dqstats
- {
- u_int32_t lookups;
- @@ -147,6 +203,22 @@
- u_int32_t free_dquots;
- u_int32_t syncs;
- };
- +#else
- +
- +/* Flags that indicate which fields in dqinfo structure are valid. */
- +# define IIF_BGRACE 1
- +# define IIF_IGRACE 2
- +# define IIF_FLAGS 4
- +# define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
- +
- +struct dqinfo
- + {
- + u_int64_t dqi_bgrace;
- + u_int64_t dqi_igrace;
- + u_int32_t dqi_flags;
- + u_int32_t dqi_valid;
- + };
- +#endif
-
- __BEGIN_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/sys/reboot.h uClibc/include/sys/reboot.h
- --- uClibc-0.9.33.2/include/sys/reboot.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/reboot.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file should define RB_* macros to be used as flag
- bits in the argument to the `reboot' system call. */
- diff -Nur uClibc-0.9.33.2/include/sys/resource.h uClibc/include/sys/resource.h
- --- uClibc-0.9.33.2/include/sys/resource.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/resource.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_RESOURCE_H
- #define _SYS_RESOURCE_H 1
- @@ -69,12 +68,12 @@
- Return 0 if successful, -1 if not (and sets errno). */
- #ifndef __USE_FILE_OFFSET64
- extern int setrlimit (__rlimit_resource_t __resource,
- - __const struct rlimit *__rlimits) __THROW;
- + const struct rlimit *__rlimits) __THROW;
- libc_hidden_proto(setrlimit)
- #else
- # ifdef __REDIRECT_NTH
- extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,
- - __const struct rlimit *__rlimits),
- + const struct rlimit *__rlimits),
- setrlimit64);
- # else
- # define setrlimit setrlimit64
- @@ -82,7 +81,7 @@
- #endif
- #ifdef __USE_LARGEFILE64
- extern int setrlimit64 (__rlimit_resource_t __resource,
- - __const struct rlimit64 *__rlimits) __THROW;
- + const struct rlimit64 *__rlimits) __THROW;
- #endif
-
- /* Return resource usage information on process indicated by WHO
- diff -Nur uClibc-0.9.33.2/include/sys/select.h uClibc/include/sys/select.h
- --- uClibc-0.9.33.2/include/sys/select.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/select.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> */
-
- @@ -110,7 +109,10 @@
- fd_set *__restrict __writefds,
- fd_set *__restrict __exceptfds,
- struct timeval *__restrict __timeout);
- +#ifdef _LIBC
- +extern __typeof(select) __select_nocancel attribute_hidden;
- libc_hidden_proto(select)
- +#endif
-
- #ifdef __USE_XOPEN2K
- /* Same as above only that the TIMEOUT value is given with higher
- diff -Nur uClibc-0.9.33.2/include/sys/sem.h uClibc/include/sys/sem.h
- --- uClibc-0.9.33.2/include/sys/sem.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/sem.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SEM_H
- #define _SYS_SEM_H 1
- @@ -61,7 +60,7 @@
- #ifdef __USE_GNU
- /* Operate on semaphore with timeout. */
- extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops,
- - __const struct timespec *__timeout) __THROW;
- + const struct timespec *__timeout) __THROW;
- #endif
-
- __END_DECLS
- diff -Nur uClibc-0.9.33.2/include/sys/sendfile.h uClibc/include/sys/sendfile.h
- --- uClibc-0.9.33.2/include/sys/sendfile.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/sendfile.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SENDFILE_H
- #define _SYS_SENDFILE_H 1
- @@ -45,6 +44,7 @@
- #ifdef __USE_LARGEFILE64
- extern ssize_t sendfile64 (int __out_fd, int __in_fd, __off64_t *__offset,
- size_t __count) __THROW;
- +libc_hidden_proto(sendfile64)
- #endif
-
- __END_DECLS
- diff -Nur uClibc-0.9.33.2/include/sys/shm.h uClibc/include/sys/shm.h
- --- uClibc-0.9.33.2/include/sys/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- #define _SYS_SHM_H 1
- @@ -54,11 +53,11 @@
- extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW;
-
- /* Attach shared memory segment. */
- -extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg)
- +extern void *shmat (int __shmid, const void *__shmaddr, int __shmflg)
- __THROW;
-
- /* Detach shared memory segment. */
- -extern int shmdt (__const void *__shmaddr) __THROW;
- +extern int shmdt (const void *__shmaddr) __THROW;
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/sys/socket.h uClibc/include/sys/socket.h
- --- uClibc-0.9.33.2/include/sys/socket.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/socket.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SOCKET_H
- #define _SYS_SOCKET_H 1
- @@ -69,7 +68,7 @@
- old-style declaration, too. */
- #if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU
- # define __SOCKADDR_ARG struct sockaddr *__restrict
- -# define __CONST_SOCKADDR_ARG __const struct sockaddr *
- +# define __CONST_SOCKADDR_ARG const struct sockaddr *
- #else
- /* Add more `struct sockaddr_AF' types here as necessary.
- These are all the ones I found on NetBSD and Linux. */
- @@ -92,7 +91,7 @@
- typedef union { __SOCKADDR_ALLTYPES
- } __SOCKADDR_ARG __attribute__ ((__transparent_union__));
- # undef __SOCKADDR_ONETYPE
- -# define __SOCKADDR_ONETYPE(type) __const struct type *__restrict __##type##__;
- +# define __SOCKADDR_ONETYPE(type) const struct type *__restrict __##type##__;
- typedef union { __SOCKADDR_ALLTYPES
- } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__));
- # undef __SOCKADDR_ONETYPE
- @@ -142,7 +141,7 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags);
- +extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags);
- libc_hidden_proto(send)
-
- /* Read N bytes into BUF from socket FD.
- @@ -158,10 +157,13 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern ssize_t sendto (int __fd, __const void *__buf, size_t __n,
- +extern ssize_t sendto (int __fd, const void *__buf, size_t __n,
- int __flags, __CONST_SOCKADDR_ARG __addr,
- socklen_t __addr_len);
- +#ifdef _LIBC
- +extern __typeof(sendto) __sendto_nocancel attribute_hidden;
- libc_hidden_proto(sendto)
- +#endif
-
- /* Read N bytes into BUF through socket FD.
- If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of
- @@ -173,7 +175,10 @@
- extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
- int __flags, __SOCKADDR_ARG __addr,
- socklen_t *__restrict __addr_len);
- +#ifdef _LIBC
- +extern __typeof(recvfrom) __recvfrom_nocancel attribute_hidden;
- libc_hidden_proto(recvfrom)
- +#endif
-
-
- /* Send a message described MESSAGE on socket FD.
- @@ -181,7 +186,7 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern ssize_t sendmsg (int __fd, __const struct msghdr *__message,
- +extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
- int __flags);
- libc_hidden_proto(sendmsg)
-
- @@ -205,7 +210,7 @@
- to *OPTVAL (which is OPTLEN bytes long).
- Returns 0 on success, -1 for errors. */
- extern int setsockopt (int __fd, int __level, int __optname,
- - __const void *__optval, socklen_t __optlen) __THROW;
- + const void *__optval, socklen_t __optlen) __THROW;
- libc_hidden_proto(setsockopt)
-
-
- @@ -260,4 +265,8 @@
-
- __END_DECLS
-
- +#ifdef _LIBC
- +extern int __socketcall(int, unsigned long *) attribute_hidden;
- +#endif
- +
- #endif /* sys/socket.h */
- diff -Nur uClibc-0.9.33.2/include/sys/statfs.h uClibc/include/sys/statfs.h
- --- uClibc-0.9.33.2/include/sys/statfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/statfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STATFS_H
- #define _SYS_STATFS_H 1
- @@ -29,19 +28,20 @@
-
- /* Return information about the filesystem on which FILE resides. */
- #ifndef __USE_FILE_OFFSET64
- -extern int statfs (__const char *__file, struct statfs *__buf)
- +extern int statfs (const char *__file, struct statfs *__buf)
- __THROW __nonnull ((1, 2));
- +libc_hidden_proto(statfs)
- #else
- # ifdef __REDIRECT_NTH
- extern int __REDIRECT_NTH (statfs,
- - (__const char *__file, struct statfs *__buf),
- + (const char *__file, struct statfs *__buf),
- statfs64) __nonnull ((1, 2));
- # else
- # define statfs statfs64
- # endif
- #endif
- #ifdef __USE_LARGEFILE64
- -extern int statfs64 (__const char *__file, struct statfs64 *__buf)
- +extern int statfs64 (const char *__file, struct statfs64 *__buf)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(statfs64)
- #endif
- diff -Nur uClibc-0.9.33.2/include/sys/stat.h uClibc/include/sys/stat.h
- --- uClibc-0.9.33.2/include/sys/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 5.6 File Characteristics <sys/stat.h>
- @@ -206,7 +205,7 @@
-
- #ifndef __USE_FILE_OFFSET64
- /* Get file attributes for FILE and put them in BUF. */
- -extern int stat (__const char *__restrict __file,
- +extern int stat (const char *__restrict __file,
- struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
- libc_hidden_proto(stat)
-
- @@ -216,7 +215,7 @@
- libc_hidden_proto(fstat)
- #else
- # ifdef __REDIRECT_NTH
- -extern int __REDIRECT_NTH (stat, (__const char *__restrict __file,
- +extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
- struct stat *__restrict __buf), stat64)
- __nonnull ((1, 2));
- extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
- @@ -227,7 +226,7 @@
- # endif
- #endif
- #ifdef __USE_LARGEFILE64
- -extern int stat64 (__const char *__restrict __file,
- +extern int stat64 (const char *__restrict __file,
- struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
- extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
- libc_hidden_proto(stat64)
- @@ -239,12 +238,13 @@
- Relative path names are interpreted relative to FD unless FD is
- AT_FDCWD. */
- # ifndef __USE_FILE_OFFSET64
- -extern int fstatat (int __fd, __const char *__restrict __file,
- +extern int fstatat (int __fd, const char *__restrict __file,
- struct stat *__restrict __buf, int __flag)
- __THROW __nonnull ((2, 3));
- +libc_hidden_proto(fstatat)
- # else
- # ifdef __REDIRECT_NTH
- -extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__restrict __file,
- +extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
- struct stat *__restrict __buf,
- int __flag),
- fstatat64) __nonnull ((2, 3));
- @@ -254,9 +254,10 @@
- # endif
-
- # ifdef __USE_LARGEFILE64
- -extern int fstatat64 (int __fd, __const char *__restrict __file,
- +extern int fstatat64 (int __fd, const char *__restrict __file,
- struct stat64 *__restrict __buf, int __flag)
- __THROW __nonnull ((2, 3));
- +libc_hidden_proto(fstatat64)
- # endif
- #endif
-
- @@ -264,13 +265,13 @@
- # ifndef __USE_FILE_OFFSET64
- /* Get file attributes about FILE and put them in BUF.
- If FILE is a symbolic link, do not follow it. */
- -extern int lstat (__const char *__restrict __file,
- +extern int lstat (const char *__restrict __file,
- struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
- libc_hidden_proto(lstat)
- # else
- # ifdef __REDIRECT_NTH
- extern int __REDIRECT_NTH (lstat,
- - (__const char *__restrict __file,
- + (const char *__restrict __file,
- struct stat *__restrict __buf), lstat64)
- __nonnull ((1, 2));
- # else
- @@ -278,7 +279,7 @@
- # endif
- # endif
- # ifdef __USE_LARGEFILE64
- -extern int lstat64 (__const char *__restrict __file,
- +extern int lstat64 (const char *__restrict __file,
- struct stat64 *__restrict __buf)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(lstat64)
- @@ -287,7 +288,7 @@
-
- /* Set file access permissions for FILE to MODE.
- If FILE is a symbolic link, this affects its target instead. */
- -extern int chmod (__const char *__file, __mode_t __mode)
- +extern int chmod (const char *__file, __mode_t __mode)
- __THROW __nonnull ((1));
- libc_hidden_proto(chmod)
-
- @@ -295,7 +296,7 @@
- /* Set file access permissions for FILE to MODE.
- If FILE is a symbolic link, this affects the link itself
- rather than its target. */
- -extern int lchmod (__const char *__file, __mode_t __mode)
- +extern int lchmod (const char *__file, __mode_t __mode)
- __THROW __nonnull ((1));
- #endif
-
- @@ -307,9 +308,10 @@
- #ifdef __USE_ATFILE
- /* Set file access permissions of FILE relative to
- the directory FD is open on. */
- -extern int fchmodat (int __fd, __const char *__file, __mode_t __mode,
- +extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
- int __flag)
- __THROW __nonnull ((2)) __wur;
- +libc_hidden_proto(fchmodat)
- #endif /* Use ATFILE. */
-
-
- @@ -325,7 +327,7 @@
- #endif
-
- /* Create a new directory named PATH, with permission bits MODE. */
- -extern int mkdir (__const char *__path, __mode_t __mode)
- +extern int mkdir (const char *__path, __mode_t __mode)
- __THROW __nonnull ((1));
- libc_hidden_proto(mkdir)
-
- @@ -333,15 +335,16 @@
- /* Like mkdir, create a new directory with permission bits MODE. But
- interpret relative PATH names relative to the directory associated
- with FD. */
- -extern int mkdirat (int __fd, __const char *__path, __mode_t __mode)
- +extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
- __THROW __nonnull ((2));
- +libc_hidden_proto(mkdirat)
- #endif
-
- /* Create a device file named PATH, with permission and special bits MODE
- and device number DEV (which can be constructed from major and minor
- device numbers with the `makedev' macro above). */
- #if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- -extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
- +extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
- __THROW __nonnull ((1));
- libc_hidden_proto(mknod)
-
- @@ -349,7 +352,7 @@
- /* Like mknod, create a new device file with permission bits MODE and
- device number DEV. But interpret relative PATH names relative to
- the directory associated with FD. */
- -extern int mknodat (int __fd, __const char *__path, __mode_t __mode,
- +extern int mknodat (int __fd, const char *__path, __mode_t __mode,
- __dev_t __dev) __THROW __nonnull ((2));
- libc_hidden_proto(mknodat)
- # endif
- @@ -357,22 +360,22 @@
-
-
- /* Create a new FIFO named PATH, with permission bits MODE. */
- -extern int mkfifo (__const char *__path, __mode_t __mode)
- +extern int mkfifo (const char *__path, __mode_t __mode)
- __THROW __nonnull ((1));
-
- #ifdef __USE_ATFILE
- /* Like mkfifo, create a new FIFO with permission bits MODE. But
- interpret relative PATH names relative to the directory associated
- with FD. */
- -extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode)
- +extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
- __THROW __nonnull ((2));
- #endif
-
- #ifdef __USE_ATFILE
- /* Set file access and modification times relative to directory file
- descriptor. */
- -extern int utimensat (int __fd, __const char *__path,
- - __const struct timespec __times[2],
- +extern int utimensat (int __fd, const char *__path,
- + const struct timespec __times[2],
- int __flags)
- __THROW __nonnull ((2));
- libc_hidden_proto(utimensat)
- @@ -380,7 +383,7 @@
-
- #ifdef __USE_XOPEN2K8
- /* Set file access and modification times of the file associated with FD. */
- -extern int futimens (int __fd, __const struct timespec __times[2]) __THROW;
- +extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
- #endif
-
- /* on uClibc we have unversioned struct stat and mknod.
- diff -Nur uClibc-0.9.33.2/include/sys/statvfs.h uClibc/include/sys/statvfs.h
- --- uClibc-0.9.33.2/include/sys/statvfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/statvfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STATVFS_H
- #define _SYS_STATVFS_H 1
- @@ -49,14 +48,14 @@
-
- /* Return information about the filesystem on which FILE resides. */
- #ifndef __USE_FILE_OFFSET64
- -extern int statvfs (__const char *__restrict __file,
- +extern int statvfs (const char *__restrict __file,
- struct statvfs *__restrict __buf)
- __THROW __nonnull ((1, 2));
- libc_hidden_proto(statvfs)
- #else
- # ifdef __REDIRECT_NTH
- extern int __REDIRECT_NTH (statvfs,
- - (__const char *__restrict __file,
- + (const char *__restrict __file,
- struct statvfs *__restrict __buf), statvfs64)
- __nonnull ((1, 2));
- # else
- @@ -64,7 +63,7 @@
- # endif
- #endif
- #ifdef __USE_LARGEFILE64
- -extern int statvfs64 (__const char *__restrict __file,
- +extern int statvfs64 (const char *__restrict __file,
- struct statvfs64 *__restrict __buf)
- __THROW __nonnull ((1, 2));
- #endif
- diff -Nur uClibc-0.9.33.2/include/sys/swap.h uClibc/include/sys/swap.h
- --- uClibc-0.9.33.2/include/sys/swap.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/swap.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SWAP_H
-
- @@ -33,10 +32,10 @@
-
- /* Make the block special device PATH available to the system for swapping.
- This call is restricted to the super-user. */
- -extern int swapon (__const char *__path, int __flags) __THROW;
- +extern int swapon (const char *__path, int __flags) __THROW;
-
- /* Stop using block special device PATH for swapping. */
- -extern int swapoff (__const char *__path) __THROW;
- +extern int swapoff (const char *__path) __THROW;
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/sys/syscall.h uClibc/include/sys/syscall.h
- --- uClibc-0.9.33.2/include/sys/syscall.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/syscall.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYSCALL_H
- #define _SYSCALL_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/sysctl.h uClibc/include/sys/sysctl.h
- --- uClibc-0.9.33.2/include/sys/sysctl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/sysctl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SYSCTL_H
- #define _SYS_SYSCTL_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/sysinfo.h uClibc/include/sys/sysinfo.h
- --- uClibc-0.9.33.2/include/sys/sysinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/sysinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SYSINFO_H
- #define _SYS_SYSINFO_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/syslog.h uClibc/include/sys/syslog.h
- --- uClibc-0.9.33.2/include/sys/syslog.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/syslog.h 2014-02-03 12:32:56.000000000 +0100
- @@ -179,14 +179,12 @@
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- extern void closelog (void);
- -libc_hidden_proto(closelog)
-
- /* Open connection to system logger.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern void openlog (__const char *__ident, int __option, int __facility);
- -libc_hidden_proto(openlog)
- +extern void openlog (const char *__ident, int __option, int __facility);
-
- /* Set the log mask level. */
- extern int setlogmask (int __mask) __THROW;
- @@ -195,7 +193,7 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern void syslog (int __pri, __const char *__fmt, ...)
- +extern void syslog (int __pri, const char *__fmt, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
- libc_hidden_proto(syslog)
-
- @@ -206,9 +204,8 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern void vsyslog (int __pri, __const char *__fmt, __gnuc_va_list __ap)
- +extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
- __attribute__ ((__format__ (__printf__, 2, 0)));
- -libc_hidden_proto(vsyslog)
- #endif
-
- __END_DECLS
- diff -Nur uClibc-0.9.33.2/include/sys/sysmacros.h uClibc/include/sys/sysmacros.h
- --- uClibc-0.9.33.2/include/sys/sysmacros.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/sysmacros.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SYSMACROS_H
- #define _SYS_SYSMACROS_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/timeb.h uClibc/include/sys/timeb.h
- --- uClibc-0.9.33.2/include/sys/timeb.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/timeb.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_TIMEB_H
- #define _SYS_TIMEB_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/time.h uClibc/include/sys/time.h
- --- uClibc-0.9.33.2/include/sys/time.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/time.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_TIME_H
- #define _SYS_TIME_H 1
- @@ -77,8 +76,8 @@
- #ifdef __USE_BSD
- /* Set the current time of day and timezone information.
- This call is restricted to the super-user. */
- -extern int settimeofday (__const struct timeval *__tv,
- - __const struct timezone *__tz)
- +extern int settimeofday (const struct timeval *__tv,
- + const struct timezone *__tz)
- __THROW __nonnull ((1));
- libc_hidden_proto(settimeofday)
-
- @@ -86,7 +85,7 @@
- If OLDDELTA is not NULL, it is filled in with the amount
- of time adjustment remaining to be done from the last `adjtime' call.
- This call is restricted to the super-user. */
- -extern int adjtime (__const struct timeval *__delta,
- +extern int adjtime (const struct timeval *__delta,
- struct timeval *__olddelta) __THROW;
- #endif
-
- @@ -133,25 +132,25 @@
- set *OLD to the old value of timer WHICH.
- Returns 0 on success, -1 on errors. */
- extern int setitimer (__itimer_which_t __which,
- - __const struct itimerval *__restrict __new,
- + const struct itimerval *__restrict __new,
- struct itimerval *__restrict __old) __THROW;
- libc_hidden_proto(setitimer)
-
- /* Change the access time of FILE to TVP[0] and the modification time of
- FILE to TVP[1]. If TVP is a null pointer, use the current time instead.
- Returns 0 on success, -1 on errors. */
- -extern int utimes (__const char *__file, __const struct timeval __tvp[2])
- +extern int utimes (const char *__file, const struct timeval __tvp[2])
- __THROW __nonnull ((1));
- libc_hidden_proto(utimes)
-
- #ifdef __USE_BSD
- /* Same as `utimes', but does not follow symbolic links. */
- -extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
- +extern int lutimes (const char *__file, const struct timeval __tvp[2])
- __THROW __nonnull ((1));
-
- #if 0
- /* Same as `utimes', but takes an open file descriptor instead of a name. */
- -extern int futimes (int __fd, __const struct timeval __tvp[2]) __THROW;
- +extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW;
- #endif
- #endif
-
- @@ -159,8 +158,8 @@
- /* Change the access time of FILE relative to FD to TVP[0] and the
- modification time of FILE to TVP[1]. If TVP is a null pointer, use
- the current time instead. Returns 0 on success, -1 on errors. */
- -extern int futimesat (int __fd, __const char *__file,
- - __const struct timeval __tvp[2]) __THROW;
- +extern int futimesat (int __fd, const char *__file,
- + const struct timeval __tvp[2]) __THROW;
- #endif
-
-
- diff -Nur uClibc-0.9.33.2/include/sys/times.h uClibc/include/sys/times.h
- --- uClibc-0.9.33.2/include/sys/times.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/times.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 4.5.2 Process Times <sys/times.h>
- diff -Nur uClibc-0.9.33.2/include/sys/timex.h uClibc/include/sys/timex.h
- --- uClibc-0.9.33.2/include/sys/timex.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/timex.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_TIMEX_H
- #define _SYS_TIMEX_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/types.h uClibc/include/sys/types.h
- --- uClibc-0.9.33.2/include/sys/types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
- @@ -165,7 +164,7 @@
- typedef int int32_t;
- # if __WORDSIZE == 64
- typedef long int int64_t;
- -# elif defined __GNUC__ || defined __ICC
- +# elif defined __GNUC__ || defined __ICC || defined __TenDRA__
- __extension__ typedef long long int int64_t;
- # endif
- # endif
- @@ -176,7 +175,7 @@
- typedef unsigned int u_int32_t;
- # if __WORDSIZE == 64
- typedef unsigned long int u_int64_t;
- -# elif defined __GNUC__ || defined __ICC
- +# elif defined __GNUC__ || defined __ICC || defined __TenDRA__
- __extension__ typedef unsigned long long int u_int64_t;
- # endif
-
- diff -Nur uClibc-0.9.33.2/include/sys/uio.h uClibc/include/sys/uio.h
- --- uClibc-0.9.33.2/include/sys/uio.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/uio.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UIO_H
- #define _SYS_UIO_H 1
- @@ -37,7 +36,7 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count);
- +extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count);
-
- /* Write data pointed by the buffers described by IOVEC, which
- is a vector of COUNT `struct iovec's, to file descriptor FD.
- @@ -47,7 +46,7 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count);
- +extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count);
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/sys/un.h uClibc/include/sys/un.h
- --- uClibc-0.9.33.2/include/sys/un.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/un.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UN_H
- #define _SYS_UN_H 1
- diff -Nur uClibc-0.9.33.2/include/sys/ustat.h uClibc/include/sys/ustat.h
- --- uClibc-0.9.33.2/include/sys/ustat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/ustat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * This interface is obsolete. Use <sys/statfs.h> instead.
- diff -Nur uClibc-0.9.33.2/include/sys/utsname.h uClibc/include/sys/utsname.h
- --- uClibc-0.9.33.2/include/sys/utsname.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/utsname.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 4.4 System Identification <sys/utsname.h>
- diff -Nur uClibc-0.9.33.2/include/sys/wait.h uClibc/include/sys/wait.h
- --- uClibc-0.9.33.2/include/sys/wait.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/wait.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 3.2.1 Wait for Process Termination <sys/wait.h>
- @@ -47,7 +46,7 @@
- (__extension__ (((union { __typeof(status) __in; int __i; }) \
- { .__in = (status) }).__i))
- # else
- -# define __WAIT_INT(status) (*(__const int *) &(status))
- +# define __WAIT_INT(status) (*(const int *) &(status))
- # endif
-
- /* This is the type of the argument to `wait'. The funky union
- @@ -137,7 +136,10 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
- +#ifdef _LIBC
- +extern __typeof(waitpid) __waitpid_nocancel attribute_hidden;
- libc_hidden_proto(waitpid)
- +#endif
-
- #if defined __USE_SVID || defined __USE_XOPEN
- # define __need_siginfo_t
- @@ -158,10 +160,6 @@
- #endif
-
- #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- -/* This being here makes the prototypes valid whether or not
- - we have already included <sys/resource.h> to define `struct rusage'. */
- -struct rusage;
- -
- /* Wait for a child to exit. When one does, put its status in *STAT_LOC and
- return its process ID. For errors return (pid_t) -1. If USAGE is not
- nil, store information about the child's resource usage there. If the
- @@ -175,9 +173,12 @@
- /* PID is like waitpid. Other args are like wait3. */
- extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,
- struct rusage *__usage) __THROW;
- -libc_hidden_proto(wait4)
- #endif /* Use BSD. */
-
- +#ifdef _LIBC
- +extern __pid_t __wait4_nocancel(__pid_t, __WAIT_STATUS, int, struct rusage *) attribute_hidden;
- +#endif
- +
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/sys/xattr.h uClibc/include/sys/xattr.h
- --- uClibc-0.9.33.2/include/sys/xattr.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/sys/xattr.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_XATTR_H
- #define _SYS_XATTR_H 1
- @@ -37,48 +36,48 @@
-
- /* Set the attribute NAME of the file pointed to by PATH to VALUE (which
- is SIZE bytes long). Return 0 on success, -1 for errors. */
- -extern int setxattr (__const char *__path, __const char *__name,
- - __const void *__value, size_t __size, int __flags)
- +extern int setxattr (const char *__path, const char *__name,
- + const void *__value, size_t __size, int __flags)
- __THROW;
-
- /* Set the attribute NAME of the file pointed to by PATH to VALUE (which is
- SIZE bytes long), not following symlinks for the last pathname component.
- Return 0 on success, -1 for errors. */
- -extern int lsetxattr (__const char *__path, __const char *__name,
- - __const void *__value, size_t __size, int __flags)
- +extern int lsetxattr (const char *__path, const char *__name,
- + const void *__value, size_t __size, int __flags)
- __THROW;
-
- /* Set the attribute NAME of the file descriptor FD to VALUE (which is SIZE
- bytes long). Return 0 on success, -1 for errors. */
- -extern int fsetxattr (int __fd, __const char *__name, __const void *__value,
- +extern int fsetxattr (int __fd, const char *__name, const void *__value,
- size_t __size, int __flags) __THROW;
-
- /* Get the attribute NAME of the file pointed to by PATH to VALUE (which is
- SIZE bytes long). Return 0 on success, -1 for errors. */
- -extern ssize_t getxattr (__const char *__path, __const char *__name,
- +extern ssize_t getxattr (const char *__path, const char *__name,
- void *__value, size_t __size) __THROW;
-
- /* Get the attribute NAME of the file pointed to by PATH to VALUE (which is
- SIZE bytes long), not following symlinks for the last pathname component.
- Return 0 on success, -1 for errors. */
- -extern ssize_t lgetxattr (__const char *__path, __const char *__name,
- +extern ssize_t lgetxattr (const char *__path, const char *__name,
- void *__value, size_t __size) __THROW;
-
- /* Get the attribute NAME of the file descriptor FD to VALUE (which is SIZE
- bytes long). Return 0 on success, -1 for errors. */
- -extern ssize_t fgetxattr (int __fd, __const char *__name, void *__value,
- +extern ssize_t fgetxattr (int __fd, const char *__name, void *__value,
- size_t __size) __THROW;
-
- /* List attributes of the file pointed to by PATH into the user-supplied
- buffer LIST (which is SIZE bytes big). Return 0 on success, -1 for
- errors. */
- -extern ssize_t listxattr (__const char *__path, char *__list, size_t __size)
- +extern ssize_t listxattr (const char *__path, char *__list, size_t __size)
- __THROW;
-
- /* List attributes of the file pointed to by PATH into the user-supplied
- buffer LIST (which is SIZE bytes big), not following symlinks for the
- last pathname component. Return 0 on success, -1 for errors. */
- -extern ssize_t llistxattr (__const char *__path, char *__list, size_t __size)
- +extern ssize_t llistxattr (const char *__path, char *__list, size_t __size)
- __THROW;
-
- /* List attributes of the file descriptor FD into the user-supplied buffer
- @@ -88,16 +87,16 @@
-
- /* Remove the attribute NAME from the file pointed to by PATH. Return 0
- on success, -1 for errors. */
- -extern int removexattr (__const char *__path, __const char *__name) __THROW;
- +extern int removexattr (const char *__path, const char *__name) __THROW;
-
- /* Remove the attribute NAME from the file pointed to by PATH, not
- following symlinks for the last pathname component. Return 0 on
- success, -1 for errors. */
- -extern int lremovexattr (__const char *__path, __const char *__name) __THROW;
- +extern int lremovexattr (const char *__path, const char *__name) __THROW;
-
- /* Remove the attribute NAME from the file descriptor FD. Return 0 on
- success, -1 for errors. */
- -extern int fremovexattr (int __fd, __const char *__name) __THROW;
- +extern int fremovexattr (int __fd, const char *__name) __THROW;
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/include/tar.h uClibc/include/tar.h
- --- uClibc-0.9.33.2/include/tar.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/tar.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TAR_H
- #define _TAR_H 1
- diff -Nur uClibc-0.9.33.2/include/termios.h uClibc/include/termios.h
- --- uClibc-0.9.33.2/include/termios.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/termios.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 7.1-2 General Terminal Interface <termios.h>
- @@ -46,10 +45,10 @@
- #endif
-
- /* Return the output baud rate stored in *TERMIOS_P. */
- -extern speed_t cfgetospeed (__const struct termios *__termios_p) __THROW;
- +extern speed_t cfgetospeed (const struct termios *__termios_p) __THROW;
-
- /* Return the input baud rate stored in *TERMIOS_P. */
- -extern speed_t cfgetispeed (__const struct termios *__termios_p) __THROW;
- +extern speed_t cfgetispeed (const struct termios *__termios_p) __THROW;
-
- /* Set the output baud rate stored in *TERMIOS_P to SPEED. */
- extern int cfsetospeed (struct termios *__termios_p, speed_t __speed) __THROW;
- @@ -72,7 +71,7 @@
- /* Set the state of FD to *TERMIOS_P.
- Values for OPTIONAL_ACTIONS (TCSA*) are in <bits/termios.h>. */
- extern int tcsetattr (int __fd, int __optional_actions,
- - __const struct termios *__termios_p) __THROW;
- + const struct termios *__termios_p) __THROW;
- libc_hidden_proto(tcsetattr)
-
-
- diff -Nur uClibc-0.9.33.2/include/tgmath.h uClibc/include/tgmath.h
- --- uClibc-0.9.33.2/include/tgmath.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/tgmath.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,5 @@
- -/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- +/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007
- + Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.22 Type-generic math <tgmath.h>
- @@ -47,174 +47,199 @@
-
- /* 1 if 'type' is a floating type, 0 if 'type' is an integer type.
- Allows for _Bool. Expands to an integer constant expression. */
- -# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))
- +# if 0 /* __GNUC_PREREQ (3, 1) */
- +# define __floating_type(type) \
- + (__builtin_classify_type ((type) 0) == 8 \
- + || (__builtin_classify_type ((type) 0) == 9 \
- + && __builtin_classify_type (__real__ ((type) 0)) == 8))
- +# else
- +# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))
- +# endif
-
- /* The tgmath real type for T, where E is 0 if T is an integer type and
- 1 for a floating type. */
- # define __tgmath_real_type_sub(T, E) \
- - __typeof__(*(0 ? (__typeof__ (0 ? (double *) 0 : (void *) (E))) 0 \
- - : (__typeof__ (0 ? (T *) 0 : (void *) (!(E)))) 0))
- + __typeof__ (*(0 ? (__typeof__ (0 ? (double *) 0 : (void *) (E))) 0 \
- + : (__typeof__ (0 ? (T *) 0 : (void *) (!(E)))) 0))
-
- /* The tgmath real type of EXPR. */
- # define __tgmath_real_type(expr) \
- - __tgmath_real_type_sub(__typeof__(expr), __floating_type(__typeof__(expr)))
- + __tgmath_real_type_sub (__typeof__ ((__typeof__ (expr)) 0), \
- + __floating_type (__typeof__ (expr)))
-
-
- /* We have two kinds of generic macros: to support functions which are
- only defined on real valued parameters and those which are defined
- for complex functions as well. */
- # define __TGMATH_UNARY_REAL_ONLY(Val, Fct) \
- - (__extension__ ({ __tgmath_real_type (Val) __tgmres; \
- - if (sizeof (Val) == sizeof (double) \
- - || __builtin_classify_type (Val) != 8) \
- - __tgmres = Fct (Val); \
- - else if (sizeof (Val) == sizeof (float)) \
- - __tgmres = Fct##f (Val); \
- - else \
- - __tgmres = __tgml(Fct) (Val); \
- - __tgmres; }))
- + (__extension__ ((sizeof (Val) == sizeof (double) \
- + || __builtin_classify_type (Val) != 8) \
- + ? (__tgmath_real_type (Val)) Fct (Val) \
- + : (sizeof (Val) == sizeof (float)) \
- + ? (__tgmath_real_type (Val)) Fct##f (Val) \
- + : (__tgmath_real_type (Val)) __tgml(Fct) (Val)))
- +
- +# define __TGMATH_UNARY_REAL_RET_ONLY(Val, RetType, Fct) \
- + (__extension__ ((sizeof (Val) == sizeof (double) \
- + || __builtin_classify_type (Val) != 8) \
- + ? (RetType) Fct (Val) \
- + : (sizeof (Val) == sizeof (float)) \
- + ? (RetType) Fct##f (Val) \
- + : (RetType) __tgml(Fct) (Val)))
-
- # define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \
- - (__extension__ ({ __tgmath_real_type (Val1) __tgmres; \
- - if (sizeof (Val1) == sizeof (double) \
- - || __builtin_classify_type (Val1) != 8) \
- - __tgmres = Fct (Val1, Val2); \
- - else if (sizeof (Val1) == sizeof (float)) \
- - __tgmres = Fct##f (Val1, Val2); \
- - else \
- - __tgmres = __tgml(Fct) (Val1, Val2); \
- - __tgmres; }))
- + (__extension__ ((sizeof (Val1) == sizeof (double) \
- + || __builtin_classify_type (Val1) != 8) \
- + ? (__tgmath_real_type (Val1)) Fct (Val1, Val2) \
- + : (sizeof (Val1) == sizeof (float)) \
- + ? (__tgmath_real_type (Val1)) Fct##f (Val1, Val2) \
- + : (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2)))
-
- # define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
- - (__extension__ ({ __tgmath_real_type ((Val1) + (Val2)) __tgmres; \
- - if ((sizeof (Val1) > sizeof (double) \
- - || sizeof (Val2) > sizeof (double)) \
- - && __builtin_classify_type ((Val1) + (Val2)) == 8) \
- - __tgmres = __tgml(Fct) (Val1, Val2); \
- - else if (sizeof (Val1) == sizeof (double) \
- - || sizeof (Val2) == sizeof (double) \
- - || __builtin_classify_type (Val1) != 8 \
- - || __builtin_classify_type (Val2) != 8) \
- - __tgmres = Fct (Val1, Val2); \
- - else \
- - __tgmres = Fct##f (Val1, Val2); \
- - __tgmres; }))
- + (__extension__ (((sizeof (Val1) > sizeof (double) \
- + || sizeof (Val2) > sizeof (double)) \
- + && __builtin_classify_type ((Val1) + (Val2)) == 8) \
- + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + __tgml(Fct) (Val1, Val2) \
- + : (sizeof (Val1) == sizeof (double) \
- + || sizeof (Val2) == sizeof (double) \
- + || __builtin_classify_type (Val1) != 8 \
- + || __builtin_classify_type (Val2) != 8) \
- + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + Fct (Val1, Val2) \
- + : (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + Fct##f (Val1, Val2)))
-
- # define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
- - (__extension__ ({ __tgmath_real_type ((Val1) + (Val2)) __tgmres; \
- - if ((sizeof (Val1) > sizeof (double) \
- - || sizeof (Val2) > sizeof (double)) \
- - && __builtin_classify_type ((Val1) + (Val2)) == 8) \
- - __tgmres = __tgml(Fct) (Val1, Val2, Val3); \
- - else if (sizeof (Val1) == sizeof (double) \
- - || sizeof (Val2) == sizeof (double) \
- - || __builtin_classify_type (Val1) != 8 \
- - || __builtin_classify_type (Val2) != 8) \
- - __tgmres = Fct (Val1, Val2, Val3); \
- - else \
- - __tgmres = Fct##f (Val1, Val2, Val3); \
- - __tgmres; }))
- + (__extension__ (((sizeof (Val1) > sizeof (double) \
- + || sizeof (Val2) > sizeof (double)) \
- + && __builtin_classify_type ((Val1) + (Val2)) == 8) \
- + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + __tgml(Fct) (Val1, Val2, Val3) \
- + : (sizeof (Val1) == sizeof (double) \
- + || sizeof (Val2) == sizeof (double) \
- + || __builtin_classify_type (Val1) != 8 \
- + || __builtin_classify_type (Val2) != 8) \
- + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + Fct (Val1, Val2, Val3) \
- + : (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + Fct##f (Val1, Val2, Val3)))
-
- # define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
- - (__extension__ ({ __tgmath_real_type ((Val1) + (Val2) + (Val3)) __tgmres;\
- - if ((sizeof (Val1) > sizeof (double) \
- - || sizeof (Val2) > sizeof (double) \
- - || sizeof (Val3) > sizeof (double)) \
- - && __builtin_classify_type ((Val1) + (Val2) \
- - + (Val3)) == 8) \
- - __tgmres = __tgml(Fct) (Val1, Val2, Val3); \
- - else if (sizeof (Val1) == sizeof (double) \
- - || sizeof (Val2) == sizeof (double) \
- - || sizeof (Val3) == sizeof (double) \
- - || __builtin_classify_type (Val1) != 8 \
- - || __builtin_classify_type (Val2) != 8 \
- - || __builtin_classify_type (Val3) != 8) \
- - __tgmres = Fct (Val1, Val2, Val3); \
- - else \
- - __tgmres = Fct##f (Val1, Val2, Val3); \
- - __tgmres; }))
- + (__extension__ (((sizeof (Val1) > sizeof (double) \
- + || sizeof (Val2) > sizeof (double) \
- + || sizeof (Val3) > sizeof (double)) \
- + && __builtin_classify_type ((Val1) + (Val2) + (Val3)) \
- + == 8) \
- + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0 \
- + + (__tgmath_real_type (Val3)) 0)) \
- + __tgml(Fct) (Val1, Val2, Val3) \
- + : (sizeof (Val1) == sizeof (double) \
- + || sizeof (Val2) == sizeof (double) \
- + || sizeof (Val3) == sizeof (double) \
- + || __builtin_classify_type (Val1) != 8 \
- + || __builtin_classify_type (Val2) != 8 \
- + || __builtin_classify_type (Val3) != 8) \
- + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0 \
- + + (__tgmath_real_type (Val3)) 0)) \
- + Fct (Val1, Val2, Val3) \
- + : (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0 \
- + + (__tgmath_real_type (Val3)) 0)) \
- + Fct##f (Val1, Val2, Val3)))
-
- /* XXX This definition has to be changed as soon as the compiler understands
- the imaginary keyword. */
- # define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) \
- - (__extension__ ({ __tgmath_real_type (Val) __tgmres; \
- - if (sizeof (__real__ (Val)) > sizeof (double) \
- - && __builtin_classify_type (__real__ (Val)) == 8) \
- - { \
- - if (sizeof (__real__ (Val)) == sizeof (Val)) \
- - __tgmres = __tgml(Fct) (Val); \
- - else \
- - __tgmres = __tgml(Cfct) (Val); \
- - } \
- - else if (sizeof (__real__ (Val)) == sizeof (double) \
- - || __builtin_classify_type (__real__ (Val)) \
- - != 8) \
- - { \
- - if (sizeof (__real__ (Val)) == sizeof (Val)) \
- - __tgmres = Fct (Val); \
- - else \
- - __tgmres = Cfct (Val); \
- - } \
- - else \
- - { \
- - if (sizeof (__real__ (Val)) == sizeof (Val)) \
- - __tgmres = Fct##f (Val); \
- - else \
- - __tgmres = Cfct##f (Val); \
- - } \
- - __tgmres; }))
- + (__extension__ ((sizeof (__real__ (Val)) == sizeof (double) \
- + || __builtin_classify_type (__real__ (Val)) != 8) \
- + ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
- + ? (__tgmath_real_type (Val)) Fct (Val) \
- + : (__tgmath_real_type (Val)) Cfct (Val)) \
- + : (sizeof (__real__ (Val)) == sizeof (float)) \
- + ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
- + ? (__tgmath_real_type (Val)) Fct##f (Val) \
- + : (__tgmath_real_type (Val)) Cfct##f (Val)) \
- + : ((sizeof (__real__ (Val)) == sizeof (Val)) \
- + ? (__tgmath_real_type (Val)) __tgml(Fct) (Val) \
- + : (__tgmath_real_type (Val)) __tgml(Cfct) (Val))))
- +
- +# define __TGMATH_UNARY_IMAG(Val, Cfct) \
- + (__extension__ ((sizeof (__real__ (Val)) == sizeof (double) \
- + || __builtin_classify_type (__real__ (Val)) != 8) \
- + ? (__typeof__ ((__tgmath_real_type (Val)) 0 \
- + + _Complex_I)) Cfct (Val) \
- + : (sizeof (__real__ (Val)) == sizeof (float)) \
- + ? (__typeof__ ((__tgmath_real_type (Val)) 0 \
- + + _Complex_I)) Cfct##f (Val) \
- + : (__typeof__ ((__tgmath_real_type (Val)) 0 \
- + + _Complex_I)) __tgml(Cfct) (Val)))
-
- /* XXX This definition has to be changed as soon as the compiler understands
- the imaginary keyword. */
- -# define __TGMATH_UNARY_IMAG_ONLY(Val, Fct) \
- - (__extension__ ({ __tgmath_real_type (Val) __tgmres; \
- - if (sizeof (Val) == sizeof (__complex__ double) \
- - || __builtin_classify_type (__real__ (Val)) != 8) \
- - __tgmres = Fct (Val); \
- - else if (sizeof (Val) == sizeof (__complex__ float)) \
- - __tgmres = Fct##f (Val); \
- - else \
- - __tgmres = __tgml(Fct) (Val); \
- - __tgmres; }))
- +# define __TGMATH_UNARY_REAL_IMAG_RET_REAL(Val, Fct, Cfct) \
- + (__extension__ ((sizeof (__real__ (Val)) == sizeof (double) \
- + || __builtin_classify_type (__real__ (Val)) != 8) \
- + ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
- + ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
- + Fct (Val) \
- + : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
- + Cfct (Val)) \
- + : (sizeof (__real__ (Val)) == sizeof (float)) \
- + ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
- + ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
- + Fct##f (Val) \
- + : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
- + Cfct##f (Val)) \
- + : ((sizeof (__real__ (Val)) == sizeof (Val)) \
- + ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
- + __tgml(Fct) (Val) \
- + : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
- + __tgml(Cfct) (Val))))
-
- /* XXX This definition has to be changed as soon as the compiler understands
- the imaginary keyword. */
- # define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
- - (__extension__ ({ __tgmath_real_type ((Val1) + (Val2)) __tgmres; \
- - if ((sizeof (__real__ (Val1)) > sizeof (double) \
- - || sizeof (__real__ (Val2)) > sizeof (double)) \
- - && __builtin_classify_type (__real__ (Val1) \
- - + __real__ (Val2)) \
- - == 8) \
- - { \
- - if (sizeof (__real__ (Val1)) == sizeof (Val1) \
- - && sizeof (__real__ (Val2)) == sizeof (Val2)) \
- - __tgmres = __tgml(Fct) (Val1, Val2); \
- - else \
- - __tgmres = __tgml(Cfct) (Val1, Val2); \
- - } \
- - else if (sizeof (__real__ (Val1)) == sizeof (double) \
- - || sizeof (__real__ (Val2)) == sizeof(double) \
- - || (__builtin_classify_type (__real__ (Val1)) \
- - != 8) \
- - || (__builtin_classify_type (__real__ (Val2)) \
- - != 8)) \
- - { \
- - if (sizeof (__real__ (Val1)) == sizeof (Val1) \
- - && sizeof (__real__ (Val2)) == sizeof (Val2)) \
- - __tgmres = Fct (Val1, Val2); \
- - else \
- - __tgmres = Cfct (Val1, Val2); \
- - } \
- - else \
- - { \
- - if (sizeof (__real__ (Val1)) == sizeof (Val1) \
- - && sizeof (__real__ (Val2)) == sizeof (Val2)) \
- - __tgmres = Fct##f (Val1, Val2); \
- - else \
- - __tgmres = Cfct##f (Val1, Val2); \
- - } \
- - __tgmres; }))
- + (__extension__ (((sizeof (__real__ (Val1)) > sizeof (double) \
- + || sizeof (__real__ (Val2)) > sizeof (double)) \
- + && __builtin_classify_type (__real__ (Val1) \
- + + __real__ (Val2)) == 8) \
- + ? ((sizeof (__real__ (Val1)) == sizeof (Val1) \
- + && sizeof (__real__ (Val2)) == sizeof (Val2)) \
- + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + __tgml(Fct) (Val1, Val2) \
- + : (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + __tgml(Cfct) (Val1, Val2)) \
- + : (sizeof (__real__ (Val1)) == sizeof (double) \
- + || sizeof (__real__ (Val2)) == sizeof (double) \
- + || __builtin_classify_type (__real__ (Val1)) != 8 \
- + || __builtin_classify_type (__real__ (Val2)) != 8) \
- + ? ((sizeof (__real__ (Val1)) == sizeof (Val1) \
- + && sizeof (__real__ (Val2)) == sizeof (Val2)) \
- + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + Fct (Val1, Val2) \
- + : (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + Cfct (Val1, Val2)) \
- + : ((sizeof (__real__ (Val1)) == sizeof (Val1) \
- + && sizeof (__real__ (Val2)) == sizeof (Val2)) \
- + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + Fct##f (Val1, Val2) \
- + : (__typeof ((__tgmath_real_type (Val1)) 0 \
- + + (__tgmath_real_type (Val2)) 0)) \
- + Cfct##f (Val1, Val2))))
- #else
- # error "Unsupported compiler; you cannot use <tgmath.h>"
- #endif
- @@ -317,7 +342,7 @@
- #define ceil(Val) __TGMATH_UNARY_REAL_ONLY (Val, ceil)
-
- /* Absolute value of X. */
- -#define fabs(Val) __TGMATH_UNARY_REAL_IMAG (Val, fabs, cabs)
- +#define fabs(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, fabs, cabs)
-
- /* Largest integer not greater than X. */
- #define floor(Val) __TGMATH_UNARY_REAL_ONLY (Val, floor)
- @@ -345,13 +370,13 @@
-
- /* Round X to nearest integral value according to current rounding
- direction. */
- -#define lrint(Val) __TGMATH_UNARY_REAL_ONLY (Val, lrint)
- -#define llrint(Val) __TGMATH_UNARY_REAL_ONLY (Val, llrint)
- +#define lrint(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, long int, lrint)
- +#define llrint(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, long long int, llrint)
-
- /* Round X to nearest integral value, rounding halfway cases away from
- zero. */
- -#define lround(Val) __TGMATH_UNARY_REAL_ONLY (Val, lround)
- -#define llround(Val) __TGMATH_UNARY_REAL_ONLY (Val, llround)
- +#define lround(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, long int, lround)
- +#define llround(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, long long int, llround)
-
-
- /* Return X with its signed changed to Y's. */
- @@ -376,7 +401,7 @@
- /* Return the remainder of integer divison X / Y with infinite precision. */
- #define remainder(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, remainder)
-
- -#if defined __UCLIBC_SUSV3_LEGACY__
- +#ifdef __UCLIBC_SUSV3_LEGACY__
- /* Return X times (2 to the Nth power). */
- #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
- # define scalb(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, scalb)
- @@ -388,10 +413,10 @@
- /* Return X times (2 to the Nth power). */
- #define scalbln(Val1, Val2) \
- __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, scalbln)
- -#endif /* UCLIBC_SUSV3_LEGACY */
- +#endif /* __UCLIBC_SUSV3_LEGACY__ */
-
- /* Return the binary exponent of X, which must be nonzero. */
- -#define ilogb(Val) __TGMATH_UNARY_REAL_ONLY (Val, ilogb)
- +#define ilogb(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, int, ilogb)
-
-
- /* Return positive difference between X and Y. */
- @@ -412,21 +437,21 @@
- /* Absolute value, conjugates, and projection. */
-
- /* Argument value of Z. */
- -#define carg(Val) __TGMATH_UNARY_IMAG_ONLY (Val, carg)
- +#define carg(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, carg, carg)
-
- /* Complex conjugate of Z. */
- -#define conj(Val) __TGMATH_UNARY_IMAG_ONLY (Val, conj)
- +#define conj(Val) __TGMATH_UNARY_IMAG (Val, conj)
-
- /* Projection of Z onto the Riemann sphere. */
- -#define cproj(Val) __TGMATH_UNARY_IMAG_ONLY (Val, cproj)
- +#define cproj(Val) __TGMATH_UNARY_IMAG (Val, cproj)
-
-
- /* Decomposing complex values. */
-
- /* Imaginary part of Z. */
- -#define cimag(Val) __TGMATH_UNARY_IMAG_ONLY (Val, cimag)
- +#define cimag(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, cimag, cimag)
-
- /* Real part of Z. */
- -#define creal(Val) __TGMATH_UNARY_IMAG_ONLY (Val, creal)
- +#define creal(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, creal, creal)
-
- #endif /* tgmath.h */
- diff -Nur uClibc-0.9.33.2/include/time.h uClibc/include/time.h
- --- uClibc-0.9.33.2/include/time.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/time.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,4 @@
- -/* Copyright (C) 1991-1999,2000,2001,2002,2003,2006
- - Free Software Foundation, Inc.
- +/* Copyright (C) 1991-2003,2006,2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -13,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.23 Date and time <time.h>
- @@ -146,10 +144,10 @@
- #ifdef __UCLIBC_HAS_TM_EXTENSIONS__
- #ifdef __USE_BSD
- long int tm_gmtoff; /* Seconds east of UTC. */
- - __const char *tm_zone; /* Timezone abbreviation. */
- + const char *tm_zone; /* Timezone abbreviation. */
- #else
- long int __tm_gmtoff; /* Seconds east of UTC. */
- - __const char *__tm_zone; /* Timezone abbreviation. */
- + const char *__tm_zone; /* Timezone abbreviation. */
- #endif
- #endif /* __UCLIBC_HAS_TM_EXTENSIONS__ */
- };
- @@ -195,7 +193,9 @@
- __THROW __attribute__ ((__const__));
- #endif /* __UCLIBC_HAS_FLOATS__ */
-
- -#define CLOCK_IDFIELD_SIZE 3
- +#ifdef _LIBC
- +# define CLOCK_IDFIELD_SIZE 3
- +#endif
-
- /* Return the `time_t' representation of TP and normalize TP. */
- extern time_t mktime (struct tm *__tp) __THROW;
- @@ -205,32 +205,34 @@
- Write no more than MAXSIZE characters and return the number
- of characters written, or 0 if it would exceed MAXSIZE. */
- extern size_t strftime (char *__restrict __s, size_t __maxsize,
- - __const char *__restrict __format,
- - __const struct tm *__restrict __tp) __THROW;
- + const char *__restrict __format,
- + const struct tm *__restrict __tp) __THROW;
- __END_NAMESPACE_STD
-
- # ifdef __USE_XOPEN
- /* Parse S according to FORMAT and store binary time information in TP.
- The return value is a pointer to the first unparsed character in S. */
- -extern char *strptime (__const char *__restrict __s,
- - __const char *__restrict __fmt, struct tm *__tp)
- +extern char *strptime (const char *__restrict __s,
- + const char *__restrict __fmt, struct tm *__tp)
- __THROW;
- # endif
-
- #ifdef __UCLIBC_HAS_XLOCALE__
- -# ifdef __USE_GNU
- +# ifdef __USE_XOPEN2K8
- /* Similar to the two functions above but take the information from
- the provided locale and not the global locale. */
- # include <xlocale.h>
-
- extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
- - __const char *__restrict __format,
- - __const struct tm *__restrict __tp,
- + const char *__restrict __format,
- + const struct tm *__restrict __tp,
- __locale_t __loc) __THROW;
- libc_hidden_proto(strftime_l)
- +# endif
-
- -extern char *strptime_l (__const char *__restrict __s,
- - __const char *__restrict __fmt, struct tm *__tp,
- +# ifdef __USE_GNU
- +extern char *strptime_l (const char *__restrict __s,
- + const char *__restrict __fmt, struct tm *__tp,
- __locale_t __loc) __THROW;
- libc_hidden_proto(strptime_l)
- # endif
- @@ -240,23 +242,23 @@
- __BEGIN_NAMESPACE_STD
- /* Return the `struct tm' representation of *TIMER
- in Universal Coordinated Time (aka Greenwich Mean Time). */
- -extern struct tm *gmtime (__const time_t *__timer) __THROW;
- +extern struct tm *gmtime (const time_t *__timer) __THROW;
-
- /* Return the `struct tm' representation
- of *TIMER in the local timezone. */
- -extern struct tm *localtime (__const time_t *__timer) __THROW;
- +extern struct tm *localtime (const time_t *__timer) __THROW;
- libc_hidden_proto(localtime)
- __END_NAMESPACE_STD
-
- # if defined __USE_POSIX || defined __USE_MISC
- /* Return the `struct tm' representation of *TIMER in UTC,
- using *TP to store the result. */
- -extern struct tm *gmtime_r (__const time_t *__restrict __timer,
- +extern struct tm *gmtime_r (const time_t *__restrict __timer,
- struct tm *__restrict __tp) __THROW;
-
- /* Return the `struct tm' representation of *TIMER in local time,
- using *TP to store the result. */
- -extern struct tm *localtime_r (__const time_t *__restrict __timer,
- +extern struct tm *localtime_r (const time_t *__restrict __timer,
- struct tm *__restrict __tp) __THROW;
- libc_hidden_proto(localtime_r)
- # endif /* POSIX or misc */
- @@ -264,11 +266,11 @@
- __BEGIN_NAMESPACE_STD
- /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
- that is the representation of TP in this format. */
- -extern char *asctime (__const struct tm *__tp) __THROW;
- +extern char *asctime (const struct tm *__tp) __THROW;
- libc_hidden_proto(asctime)
-
- /* Equivalent to `asctime (localtime (timer))'. */
- -extern char *ctime (__const time_t *__timer) __THROW;
- +extern char *ctime (const time_t *__timer) __THROW;
- libc_hidden_proto(ctime)
- __END_NAMESPACE_STD
-
- @@ -277,12 +279,12 @@
-
- /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n"
- that is the representation of TP in this format. */
- -extern char *asctime_r (__const struct tm *__restrict __tp,
- +extern char *asctime_r (const struct tm *__restrict __tp,
- char *__restrict __buf) __THROW;
- libc_hidden_proto(asctime_r)
-
- /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
- -extern char *ctime_r (__const time_t *__restrict __timer,
- +extern char *ctime_r (const time_t *__restrict __timer,
- char *__restrict __buf) __THROW;
- # endif /* POSIX or misc */
-
- @@ -314,7 +316,8 @@
- # ifdef __USE_SVID
- /* Set the system time to *WHEN.
- This call is restricted to the superuser. */
- -extern int stime (__const time_t *__when) __THROW;
- +extern int stime (const time_t *__when) __THROW;
- +libc_hidden_proto(stime)
- # endif
-
-
- @@ -345,7 +348,7 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern int nanosleep (__const struct timespec *__requested_time,
- +extern int nanosleep (const struct timespec *__requested_time,
- struct timespec *__remaining);
- libc_hidden_proto(nanosleep)
-
- @@ -358,23 +361,24 @@
- extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
-
- /* Set clock CLOCK_ID to value TP. */
- -extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
- +extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
- __THROW;
- # endif /* __UCLIBC_HAS_REALTIME__ */
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -# if defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__
- +
- +# if defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__
- +# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- /* High-resolution sleep with the specified clock.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- extern int clock_nanosleep (clockid_t __clock_id, int __flags,
- - __const struct timespec *__req,
- + const struct timespec *__req,
- struct timespec *__rem);
-
- /* Return clock ID for CPU-time clock. */
- extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
- -# endif
- -# endif /* __UCLIBC_HAS_THREADS_NATIVE__ */
- +# endif /* __UCLIBC_HAS_THREADS_NATIVE__ */
- +# endif
-
- # if defined __UCLIBC_HAS_REALTIME__
- /* Create new per-process timer using CLOCK_ID. */
- @@ -387,7 +391,7 @@
-
- /* Set timer TIMERID to VALUE, returning old value in OVLAUE. */
- extern int timer_settime (timer_t __timerid, int __flags,
- - __const struct itimerspec *__restrict __value,
- + const struct itimerspec *__restrict __value,
- struct itimerspec *__restrict __ovalue) __THROW;
-
- /* Get current value of timer TIMERID and store it in VLAUE. */
- @@ -423,7 +427,7 @@
-
- This function is a possible cancellation points and therefore not
- marked with __THROW. */
- -extern struct tm *getdate (__const char *__string);
- +extern struct tm *getdate (const char *__string);
- # endif
-
- # ifdef __USE_GNU
- @@ -437,7 +441,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int getdate_r (__const char *__restrict __string,
- +extern int getdate_r (const char *__restrict __string,
- struct tm *__restrict __resbufp);
- # endif
- #endif /* __UCLIBC_MJN3_ONLY__ */
- diff -Nur uClibc-0.9.33.2/include/ttyent.h uClibc/include/ttyent.h
- --- uClibc-0.9.33.2/include/ttyent.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/ttyent.h 2014-02-03 12:32:56.000000000 +0100
- @@ -57,7 +57,7 @@
-
- extern struct ttyent *getttyent (void) __THROW;
- libc_hidden_proto(getttyent)
- -extern struct ttyent *getttynam (__const char *__tty) __THROW;
- +extern struct ttyent *getttynam (const char *__tty) __THROW;
- extern int setttyent (void) __THROW;
- libc_hidden_proto(setttyent)
- extern int endttyent (void) __THROW;
- diff -Nur uClibc-0.9.33.2/include/ucontext.h uClibc/include/ucontext.h
- --- uClibc-0.9.33.2/include/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,21 +12,46 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +/* The System V ABI user-level context switching support functions
- + are marked obsolescent by SuSv3. */
-
- #ifndef _UCONTEXT_H
- #define _UCONTEXT_H 1
-
- #include <features.h>
-
- +#ifdef __UCLIBC_HAS_CONTEXT_FUNCS__
- +
- /* Get machine dependent definition of data structures. */
- #include <sys/ucontext.h>
-
- -/* The System V ABI user-level context switching support functions
- - * are marked obsolescent by SuSv3, and are not implemented by
- - * uClibc. This header is therefore empty. */
- +__BEGIN_DECLS
- +
- +/* Get user context and store it in variable pointed to by UCP. */
- +extern int getcontext (ucontext_t *__ucp) __THROW;
- +
- +/* Set user context from information of variable pointed to by UCP. */
- +extern int setcontext (const ucontext_t *__ucp) __THROW;
- +
- +/* Save current context in context variable pointed to by OUCP and set
- + context from variable pointed to by UCP. */
- +extern int swapcontext (ucontext_t *__restrict __oucp,
- + const ucontext_t *__restrict __ucp) __THROW;
- +
- +/* Manipulate user context UCP to continue with calling functions FUNC
- + and the ARGC-1 parameters following ARGC when the context is used
- + the next time in `setcontext' or `swapcontext'.
- +
- + We cannot say anything about the parameters FUNC takes; `void'
- + is as good as any other choice. */
- +extern void makecontext (ucontext_t *__ucp, void (*__func) (void),
- + int __argc, ...) __THROW;
- +
- +__END_DECLS
-
- +#endif
-
- #endif /* ucontext.h */
- diff -Nur uClibc-0.9.33.2/include/ulimit.h uClibc/include/ulimit.h
- --- uClibc-0.9.33.2/include/ulimit.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/ulimit.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ULIMIT_H
- #define _ULIMIT_H 1
- diff -Nur uClibc-0.9.33.2/include/unistd.h uClibc/include/unistd.h
- --- uClibc-0.9.33.2/include/unistd.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/unistd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1991-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
- +/* Copyright (C) 1991-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 2.10 Symbolic Constants <unistd.h>
- @@ -30,35 +29,67 @@
- /* These may be used to determine what facilities are present at compile time.
- Their values can be obtained at run time from `sysconf'. */
-
- +#ifdef __USE_XOPEN2K8
- +/* POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. */
- +# define _POSIX_VERSION 200809L
- +#elif defined __USE_XOPEN2K
- /* POSIX Standard approved as ISO/IEC 9945-1 as of December 2001. */
- -#define _POSIX_VERSION 200112L
- +# define _POSIX_VERSION 200112L
- +#elif defined __USE_POSIX199506
- +/* POSIX Standard approved as ISO/IEC 9945-1 as of June 1995. */
- +# define _POSIX_VERSION 199506L
- +#elif defined __USE_POSIX199309
- +/* POSIX Standard approved as ISO/IEC 9945-1 as of September 1993. */
- +# define _POSIX_VERSION 199309L
- +#else
- +/* POSIX Standard approved as ISO/IEC 9945-1 as of September 1990. */
- +# define _POSIX_VERSION 199009L
- +#endif
-
- /* These are not #ifdef __USE_POSIX2 because they are
- in the theoretically application-owned namespace. */
-
- +#ifdef __USE_XOPEN2K8
- +# define __POSIX2_THIS_VERSION 200809L
- +/* The utilities on GNU systems also correspond to this version. */
- +#elif defined __USE_XOPEN2K
- +/* The utilities on GNU systems also correspond to this version. */
- +# define __POSIX2_THIS_VERSION 200112L
- +#elif defined __USE_POSIX199506
- +/* The utilities on GNU systems also correspond to this version. */
- +# define __POSIX2_THIS_VERSION 199506L
- +#else
- +/* The utilities on GNU systems also correspond to this version. */
- +# define __POSIX2_THIS_VERSION 199209L
- +#endif
- +
- /* The utilities on GNU systems also correspond to this version. */
- -#define _POSIX2_VERSION 200112L
- +#define _POSIX2_VERSION __POSIX2_THIS_VERSION
-
- /* If defined, the implementation supports the
- C Language Bindings Option. */
- -#define _POSIX2_C_BIND 200112L
- +#define _POSIX2_C_BIND __POSIX2_THIS_VERSION
-
- /* If defined, the implementation supports the
- C Language Development Utilities Option. */
- -#define _POSIX2_C_DEV 200112L
- +#define _POSIX2_C_DEV __POSIX2_THIS_VERSION
-
- /* If defined, the implementation supports the
- Software Development Utilities Option. */
- -#define _POSIX2_SW_DEV 200112L
- +#define _POSIX2_SW_DEV __POSIX2_THIS_VERSION
-
- #if 0 /* uClibc does not provide the utility */
- /* If defined, the implementation supports the
- creation of locales with the localedef utility. */
- -#define _POSIX2_LOCALEDEF 200112L
- +#define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION
- #endif
-
- /* X/Open version number to which the library conforms. It is selectable. */
- -#ifdef __USE_UNIX98
- +#ifdef __USE_XOPEN2K8
- +# define _XOPEN_VERSION 700
- +#elif defined __USE_XOPEN2K
- +# define _XOPEN_VERSION 600
- +#elif defined __USE_UNIX98
- # define _XOPEN_VERSION 500
- #else
- # define _XOPEN_VERSION 4
- @@ -171,6 +202,8 @@
- */
-
- #include <bits/posix_opt.h>
- +/* keep it after posix_opt.h, it overwrites based on uClibc's config options */
- +#include <bits/uClibc_posix_opt.h>
-
- /* Get the environment definitions from Unix98. */
- #ifdef __USE_UNIX98
- @@ -255,16 +288,16 @@
- #define F_OK 0 /* Test for existence. */
-
- /* Test for access to NAME using the real UID and real GID. */
- -extern int access (__const char *__name, int __type) __THROW __nonnull ((1));
- +extern int access (const char *__name, int __type) __THROW __nonnull ((1));
-
- #if 0 /*def __USE_GNU*/
- /* Test for access to NAME using the effective UID and GID
- (as normal file operations use). */
- -extern int euidaccess (__const char *__name, int __type)
- +extern int euidaccess (const char *__name, int __type)
- __THROW __nonnull ((1));
-
- /* An alias for `euidaccess', used by some other systems. */
- -extern int eaccess (__const char *__name, int __type)
- +extern int eaccess (const char *__name, int __type)
- __THROW __nonnull ((1));
- #endif
-
- @@ -272,8 +305,9 @@
- /* Test for access to FILE relative to the directory FD is open on.
- If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess',
- otherwise use real IDs like `access'. */
- -extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
- +extern int faccessat (int __fd, const char *__file, int __type, int __flag)
- __THROW __nonnull ((2)) __wur;
- +libc_hidden_proto(faccessat)
- #endif /* Use GNU. */
-
-
- @@ -299,7 +333,10 @@
- Return the new file position. */
- #ifndef __USE_FILE_OFFSET64
- extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
- +# ifdef _LIBC
- +extern __typeof(lseek) __lseek_nocancel attribute_hidden;
- libc_hidden_proto(lseek)
- +# endif
- #else
- # ifdef __REDIRECT_NTH
- extern __off64_t __REDIRECT_NTH (lseek,
- @@ -312,7 +349,10 @@
- #ifdef __USE_LARGEFILE64
- extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
- __THROW;
- +# ifdef _LIBC
- +extern __typeof(lseek64) __lseek64_nocancel attribute_hidden;
- libc_hidden_proto(lseek64)
- +# endif
- #endif
-
- /* Close the file descriptor FD.
- @@ -320,7 +360,11 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- extern int close (int __fd);
- +#ifdef _LIBC
- +extern __typeof(close) __close_nocancel attribute_hidden;
- +extern void __close_nocancel_no_status(int) attribute_hidden;
- libc_hidden_proto(close)
- +#endif
-
- /* Read NBYTES into BUF from FD. Return the
- number read, -1 for errors or 0 for EOF.
- @@ -328,14 +372,20 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur;
- +#ifdef _LIBC
- +extern __typeof(read) __read_nocancel attribute_hidden;
- libc_hidden_proto(read)
- +#endif
-
- /* Write N bytes of BUF to FD. Return the number written, or -1.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern ssize_t write (int __fd, __const void *__buf, size_t __n) __wur;
- +extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur;
- +#ifdef _LIBC
- +extern __typeof(write) __write_nocancel attribute_hidden;
- libc_hidden_proto(write)
- +#endif
-
- #ifdef __USE_UNIX98
- # ifndef __USE_FILE_OFFSET64
- @@ -353,14 +403,14 @@
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- -extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
- +extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
- __off_t __offset) __wur;
- # else
- # ifdef __REDIRECT
- extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
- __off64_t __offset),
- pread64) __wur;
- -extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
- +extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf,
- size_t __nbytes, __off64_t __offset),
- pwrite64) __wur;
- # else
- @@ -377,7 +427,7 @@
- __off64_t __offset) __wur;
- /* Write N bytes of BUF to FD at the given position OFFSET without
- changing the file pointer. Return the number written, or -1. */
- -extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
- +extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
- __off64_t __offset) __wur;
- # endif
- #endif
- @@ -446,7 +496,7 @@
-
-
- /* Change the owner and group of FILE. */
- -extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
- +extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
- __THROW __nonnull ((1)) __wur;
- libc_hidden_proto(chown)
-
- @@ -457,7 +507,7 @@
-
- /* Change owner and group of FILE, if it is a symbolic
- link the ownership of the symbolic link is changed. */
- -extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
- +extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
- __THROW __nonnull ((1)) __wur;
-
- #endif /* Use BSD || X/Open Unix. */
- @@ -465,13 +515,14 @@
- #ifdef __USE_ATFILE
- /* Change the owner and group of FILE relative to the directory FD is open
- on. */
- -extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
- +extern int fchownat (int __fd, const char *__file, __uid_t __owner,
- __gid_t __group, int __flag)
- __THROW __nonnull ((2)) __wur;
- +libc_hidden_proto(fchownat)
- #endif /* Use GNU. */
-
- /* Change the process's working directory to PATH. */
- -extern int chdir (__const char *__path) __THROW __nonnull ((1)) __wur;
- +extern int chdir (const char *__path) __THROW __nonnull ((1)) __wur;
- libc_hidden_proto(chdir)
-
- #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- @@ -513,6 +564,13 @@
- extern int dup2 (int __fd, int __fd2) __THROW;
- libc_hidden_proto(dup2)
-
- +#ifdef __USE_GNU
- +/* Duplicate FD to FD2, closing FD2 and making it open on the same
- + file while setting flags according to FLAGS. */
- +extern int dup3 (int __fd, int __fd2, int __flags) __THROW;
- +libc_hidden_proto(dup3)
- +#endif
- +
- /* NULL-terminated array of "NAME=VALUE" environment variables. */
- extern char **__environ;
- #ifdef __USE_GNU
- @@ -522,48 +580,56 @@
-
- /* Replace the current process, executing PATH with arguments ARGV and
- environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
- -extern int execve (__const char *__path, char *__const __argv[],
- - char *__const __envp[]) __THROW __nonnull ((1));
- +extern int execve (const char *__path, char *const __argv[],
- + char *const __envp[]) __THROW __nonnull ((1));
- libc_hidden_proto(execve)
-
- -#if 0 /*def __USE_GNU*/
- +#if 0 /*def __USE_XOPEN2K8*/
- /* Execute the file FD refers to, overlaying the running program image.
- ARGV and ENVP are passed to the new program, as for `execve'. */
- -extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
- +extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
- __THROW;
- #endif
-
-
- /* Execute PATH with arguments ARGV and environment from `environ'. */
- -extern int execv (__const char *__path, char *__const __argv[])
- +extern int execv (const char *__path, char *const __argv[])
- __THROW __nonnull ((1));
- libc_hidden_proto(execv)
-
- /* Execute PATH with all arguments after PATH until a NULL pointer,
- and the argument after that for environment. */
- -extern int execle (__const char *__path, __const char *__arg, ...)
- +extern int execle (const char *__path, const char *__arg, ...)
- __THROW __nonnull ((1));
- libc_hidden_proto(execle)
-
- /* Execute PATH with all arguments after PATH until
- a NULL pointer and environment from `environ'. */
- -extern int execl (__const char *__path, __const char *__arg, ...)
- +extern int execl (const char *__path, const char *__arg, ...)
- __THROW __nonnull ((1));
- libc_hidden_proto(execl)
-
- /* Execute FILE, searching in the `PATH' environment variable if it contains
- no slashes, with arguments ARGV and environment from `environ'. */
- -extern int execvp (__const char *__file, char *__const __argv[])
- +extern int execvp (const char *__file, char *const __argv[])
- __THROW __nonnull ((1));
- libc_hidden_proto(execvp)
-
- /* Execute FILE, searching in the `PATH' environment variable if
- it contains no slashes, with all arguments after FILE until a
- NULL pointer and environment from `environ'. */
- -extern int execlp (__const char *__file, __const char *__arg, ...)
- +extern int execlp (const char *__file, const char *__arg, ...)
- __THROW __nonnull ((1));
- libc_hidden_proto(execlp)
-
- +#ifdef __USE_GNU
- +/* Execute FILE, searching in the `PATH' environment variable if it contains
- + no slashes, with arguments ARGV and environment from a pointer */
- +extern int execvpe (__const char *__file, char *__const __argv[], char *__const __envp[])
- + __THROW __nonnull ((1));
- +libc_hidden_proto(execvpe)
- +#endif
- +
-
- #if defined __USE_MISC || defined __USE_XOPEN
- /* Add INC to priority of the current process. */
- @@ -582,7 +648,7 @@
- #include <bits/confname.h>
-
- /* Get file-specific configuration information about PATH. */
- -extern long int pathconf (__const char *__path, int __name)
- +extern long int pathconf (const char *__path, int __name)
- __THROW __nonnull ((1));
-
- /* Get file-specific configuration about descriptor FD. */
- @@ -767,7 +833,12 @@
- Return -1 for errors, 0 to the new process,
- and the process ID of the new process to the old process. */
- extern __pid_t fork (void) __THROW;
- +# ifdef _LIBC
- +# ifdef __UCLIBC_HAS_THREADS__
- +extern __typeof(fork) __libc_fork;
- +# endif
- libc_hidden_proto(fork)
- +# endif
- #endif
-
- #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- @@ -779,8 +850,10 @@
- libc_hidden_proto(vfork)
- #endif /* Use BSD. */
-
- +#if 0 /* psm: seems unused , exit-thread.S is not compiled */
- /* Special exit function which only terminates the current thread. */
- extern void __exit_thread (int val) __attribute__ ((__noreturn__));
- +#endif
-
- /* Return the pathname of the terminal FD is open on, or NULL on errors.
- The returned storage is good only until the next call to this function. */
- @@ -797,7 +870,6 @@
- extern int isatty (int __fd) __THROW;
- libc_hidden_proto(isatty)
-
- -
- #if 0 /*defined __USE_BSD \
- || (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98)*/
- /* Return the index into the active-logins file (utmp) for
- @@ -807,26 +879,27 @@
-
-
- /* Make a link to FROM named TO. */
- -extern int link (__const char *__from, __const char *__to)
- +extern int link (const char *__from, const char *__to)
- __THROW __nonnull ((1, 2)) __wur;
-
- #ifdef __USE_ATFILE
- /* Like link but relative paths in TO and FROM are interpreted relative
- to FROMFD and TOFD respectively. */
- -extern int linkat (int __fromfd, __const char *__from, int __tofd,
- - __const char *__to, int __flags)
- +extern int linkat (int __fromfd, const char *__from, int __tofd,
- + const char *__to, int __flags)
- __THROW __nonnull ((2, 4)) __wur;
- +libc_hidden_proto(linkat)
- #endif
-
- #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
- /* Make a symbolic link to FROM named TO. */
- -extern int symlink (__const char *__from, __const char *__to)
- +extern int symlink (const char *__from, const char *__to)
- __THROW __nonnull ((1, 2)) __wur;
-
- /* Read the contents of the symbolic link PATH into no more than
- LEN bytes of BUF. The contents are not null-terminated.
- Returns the number of characters read, or -1 for errors. */
- -extern ssize_t readlink (__const char *__restrict __path,
- +extern ssize_t readlink (const char *__restrict __path,
- char *__restrict __buf, size_t __len)
- __THROW __nonnull ((1, 2)) __wur;
- libc_hidden_proto(readlink)
- @@ -834,27 +907,30 @@
-
- #ifdef __USE_ATFILE
- /* Like symlink but a relative path in TO is interpreted relative to TOFD. */
- -extern int symlinkat (__const char *__from, int __tofd,
- - __const char *__to) __THROW __nonnull ((1, 3)) __wur;
- +extern int symlinkat (const char *__from, int __tofd,
- + const char *__to) __THROW __nonnull ((1, 3)) __wur;
- +libc_hidden_proto(symlinkat)
-
- /* Like readlink but a relative PATH is interpreted relative to FD. */
- -extern ssize_t readlinkat (int __fd, __const char *__restrict __path,
- +extern ssize_t readlinkat (int __fd, const char *__restrict __path,
- char *__restrict __buf, size_t __len)
- __THROW __nonnull ((2, 3)) __wur;
- +libc_hidden_proto(readlinkat)
- #endif
-
- /* Remove the link NAME. */
- -extern int unlink (__const char *__name) __THROW __nonnull ((1));
- +extern int unlink (const char *__name) __THROW __nonnull ((1));
- libc_hidden_proto(unlink)
-
- #ifdef __USE_ATFILE
- /* Remove the link NAME relative to FD. */
- -extern int unlinkat (int __fd, __const char *__name, int __flag)
- +extern int unlinkat (int __fd, const char *__name, int __flag)
- __THROW __nonnull ((2));
- +libc_hidden_proto(unlinkat)
- #endif
-
- /* Remove the directory PATH. */
- -extern int rmdir (__const char *__path) __THROW __nonnull ((1));
- +extern int rmdir (const char *__path) __THROW __nonnull ((1));
- libc_hidden_proto(rmdir)
-
-
- @@ -884,7 +960,7 @@
-
- #if 0 /*def __USE_BSD*/
- /* Set the login name returned by `getlogin'. */
- -extern int setlogin (__const char *__name) __THROW __nonnull ((1));
- +extern int setlogin (const char *__name) __THROW __nonnull ((1));
- #endif
-
-
- @@ -910,13 +986,14 @@
- #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
- /* Set the name of the current host to NAME, which is LEN bytes long.
- This call is restricted to the super-user. */
- -extern int sethostname (__const char *__name, size_t __len)
- +extern int sethostname (const char *__name, size_t __len)
- __THROW __nonnull ((1)) __wur;
-
- /* Set the current machine's Internet number to ID.
- This call is restricted to the super-user. */
- extern int sethostid (long int __id) __THROW __wur;
-
- +
- #if defined __UCLIBC_BSD_SPECIFIC__ || defined _LIBC
- /* Get and set the NIS (aka YP) domain name, if any.
- Called just like `gethostname' and `sethostname'.
- @@ -926,10 +1003,11 @@
- libc_hidden_proto(getdomainname)
- #endif
- #if defined __UCLIBC_BSD_SPECIFIC__
- -extern int setdomainname (__const char *__name, size_t __len)
- +extern int setdomainname (const char *__name, size_t __len)
- __THROW __nonnull ((1)) __wur;
- #endif
-
- +
- #if defined __UCLIBC_LINUX_SPECIFIC__
- /* Revoke access permissions to all processes currently communicating
- with the control terminal, and then send a SIGHUP signal to the process
- @@ -939,7 +1017,7 @@
-
- #if 0
- /* Revoke the access of all descriptors currently open on FILE. */
- -extern int revoke (__const char *__file) __THROW __nonnull ((1)) __wur;
- +extern int revoke (const char *__file) __THROW __nonnull ((1)) __wur;
-
-
- /* Enable statistical profiling, writing samples of the PC into at most
- @@ -956,7 +1034,7 @@
- /* Turn accounting on if NAME is an existing file. The system will then write
- a record for each process as it terminates, to this file. If NAME is NULL,
- turn accounting off. This call is restricted to the super-user. */
- -extern int acct (__const char *__name) __THROW;
- +extern int acct (const char *__name) __THROW;
-
-
- /* Successive calls return the shells listed in `/etc/shells'. */
- @@ -977,21 +1055,21 @@
- #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
- /* Make PATH be the root directory (the starting point for absolute paths).
- This call is restricted to the super-user. */
- -extern int chroot (__const char *__path) __THROW __nonnull ((1)) __wur;
- +extern int chroot (const char *__path) __THROW __nonnull ((1)) __wur;
-
- /* Prompt with PROMPT and read a string from the terminal without echoing.
- Uses /dev/tty if possible; otherwise stderr and stdin. */
- -extern char *getpass (__const char *__prompt) __nonnull ((1));
- +extern char *getpass (const char *__prompt) __nonnull ((1));
- #endif /* Use BSD || X/Open. */
-
-
- -#if defined __USE_BSD || defined __USE_XOPEN
- +#if defined __USE_BSD || defined __USE_XOPEN || defined __USE_XOPEN2K
- /* Make all changes done to FD actually appear on disk.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
- extern int fsync (int __fd);
- -#endif /* Use BSD || X/Open. */
- +#endif /* Use BSD || X/Open || Unix98. */
-
-
- #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- @@ -1017,21 +1095,22 @@
-
- /* Truncate FILE to LENGTH bytes. */
- # ifndef __USE_FILE_OFFSET64
- -extern int truncate (__const char *__file, __off_t __length)
- +extern int truncate (const char *__file, __off_t __length)
- __THROW __nonnull ((1)) __wur;
- libc_hidden_proto(truncate)
- # else
- # ifdef __REDIRECT_NTH
- extern int __REDIRECT_NTH (truncate,
- - (__const char *__file, __off64_t __length),
- + (const char *__file, __off64_t __length),
- truncate64) __nonnull ((1)) __wur;
- # else
- # define truncate truncate64
- # endif
- # endif
- # ifdef __USE_LARGEFILE64
- -extern int truncate64 (__const char *__file, __off64_t __length)
- +extern int truncate64 (const char *__file, __off64_t __length)
- __THROW __nonnull ((1)) __wur;
- +libc_hidden_proto(truncate64)
- # endif
-
- #endif /* Use BSD || X/Open Unix. */
- @@ -1120,7 +1199,6 @@
- # endif
- # ifdef __USE_LARGEFILE64
- extern int lockf64 (int __fd, int __cmd, __off64_t __len) __wur;
- -libc_hidden_proto(lockf64)
- # endif
- #endif /* Use misc and F_LOCK not already defined. */
-
- @@ -1142,7 +1220,7 @@
- && defined __UCLIBC_HAS_REALTIME__
- /* Synchronize at least the data part of a file with the underlying
- media. */
- -extern int fdatasync (int __fildes) __THROW;
- +extern int fdatasync (int __fildes);
- #endif /* Use POSIX199309 */
-
-
- @@ -1151,7 +1229,7 @@
- #ifdef __USE_XOPEN
- # if defined __UCLIBC_HAS_CRYPT__
- /* Encrypt at most 8 characters from KEY using salt to perturb DES. */
- -extern char *crypt (__const char *__key, __const char *__salt)
- +extern char *crypt (const char *__key, const char *__salt)
- __THROW __nonnull ((1, 2));
-
- /* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
- @@ -1164,7 +1242,7 @@
- FROM and copy the result to TO. The value of TO must not be in the
- range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
- is without partner. */
- -extern void swab (__const void *__restrict __from, void *__restrict __to,
- +extern void swab (const void *__restrict __from, void *__restrict __to,
- ssize_t __n) __THROW __nonnull ((1, 2));
- #endif
-
- @@ -1178,7 +1256,7 @@
-
-
- /* Define some macros helping to catch buffer overflows. */
- -#if __USE_FORTIFY_LEVEL > 0 && !defined __cplusplus
- +#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
- # include <bits/unistd.h>
- #endif
-
- @@ -1191,6 +1269,7 @@
- #endif
- typedef signed smallint_type smallint;
- typedef unsigned smallint_type smalluint;
- +extern size_t __pagesize attribute_hidden;
- #endif
-
-
- diff -Nur uClibc-0.9.33.2/include/utime.h uClibc/include/utime.h
- --- uClibc-0.9.33.2/include/utime.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/utime.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 5.6.6 Set File Access and Modification Times <utime.h>
- @@ -43,8 +42,8 @@
-
- /* Set the access and modification times of FILE to those given in
- *FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */
- -extern int utime (__const char *__file,
- - __const struct utimbuf *__file_times)
- +extern int utime (const char *__file,
- + const struct utimbuf *__file_times)
- __THROW __nonnull ((1));
- libc_hidden_proto(utime)
-
- diff -Nur uClibc-0.9.33.2/include/utmp.h uClibc/include/utmp.h
- --- uClibc-0.9.33.2/include/utmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/utmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _UTMP_H
- #define _UTMP_H 1
- @@ -44,60 +43,52 @@
-
-
- /* Write the given entry into utmp and wtmp. */
- -extern void login (__const struct utmp *__entry) __THROW;
- +extern void login (const struct utmp *__entry) __THROW;
-
- /* Write the utmp entry to say the user on UT_LINE has logged out. */
- -extern int logout (__const char *__ut_line) __THROW;
- +extern int logout (const char *__ut_line) __THROW;
-
- /* Append to wtmp an entry for the current time and the given info. */
- -extern void logwtmp (__const char *__ut_line, __const char *__ut_name,
- - __const char *__ut_host) __THROW;
- +extern void logwtmp (const char *__ut_line, const char *__ut_name,
- + const char *__ut_host) __THROW;
- #endif
-
- /* Append entry UTMP to the wtmp-like file WTMP_FILE. */
- -extern void updwtmp (__const char *__wtmp_file, __const struct utmp *__utmp)
- +extern void updwtmp (const char *__wtmp_file, const struct utmp *__utmp)
- __THROW;
- -libc_hidden_proto(updwtmp)
-
- /* Change name of the utmp file to be examined. */
- -extern int utmpname (__const char *__file) __THROW;
- -libc_hidden_proto(utmpname)
- +extern int utmpname (const char *__file) __THROW;
-
- /* Read next entry from a utmp-like file. */
- extern struct utmp *getutent (void) __THROW;
- -libc_hidden_proto(getutent)
-
- /* Reset the input stream to the beginning of the file. */
- extern void setutent (void) __THROW;
- -libc_hidden_proto(setutent)
-
- /* Close the current open file. */
- extern void endutent (void) __THROW;
- -libc_hidden_proto(endutent)
-
- /* Search forward from the current point in the utmp file until the
- next entry with a ut_type matching ID->ut_type. */
- -extern struct utmp *getutid (__const struct utmp *__id) __THROW;
- -libc_hidden_proto(getutid)
- +extern struct utmp *getutid (const struct utmp *__id) __THROW;
-
- /* Search forward from the current point in the utmp file until the
- next entry with a ut_line matching LINE->ut_line. */
- -extern struct utmp *getutline (__const struct utmp *__line) __THROW;
- -libc_hidden_proto(getutline)
- +extern struct utmp *getutline (const struct utmp *__line) __THROW;
-
- /* Write out entry pointed to by UTMP_PTR into the utmp file. */
- -extern struct utmp *pututline (__const struct utmp *__utmp_ptr) __THROW;
- -libc_hidden_proto(pututline)
- +extern struct utmp *pututline (const struct utmp *__utmp_ptr) __THROW;
-
-
- #if 0 /* def __USE_MISC */
- /* Reentrant versions of the file for handling utmp files. */
- extern int getutent_r (struct utmp *__buffer, struct utmp **__result) __THROW;
-
- -extern int getutid_r (__const struct utmp *__id, struct utmp *__buffer,
- +extern int getutid_r (const struct utmp *__id, struct utmp *__buffer,
- struct utmp **__result) __THROW;
-
- -extern int getutline_r (__const struct utmp *__line,
- +extern int getutline_r (const struct utmp *__line,
- struct utmp *__buffer, struct utmp **__result) __THROW;
-
- #endif /* Use misc. */
- diff -Nur uClibc-0.9.33.2/include/utmpx.h uClibc/include/utmpx.h
- --- uClibc-0.9.33.2/include/utmpx.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/utmpx.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _UTMPX_H
- #define _UTMPX_H 1
- @@ -69,19 +68,19 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct utmpx *getutxid (__const struct utmpx *__id);
- +extern struct utmpx *getutxid (const struct utmpx *__id);
-
- /* Get the user accounting database entry corresponding to LINE.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct utmpx *getutxline (__const struct utmpx *__line);
- +extern struct utmpx *getutxline (const struct utmpx *__line);
-
- /* Write the entry UTMPX into the user accounting database.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern struct utmpx *pututxline (__const struct utmpx *__utmpx);
- +extern struct utmpx *pututxline (const struct utmpx *__utmpx);
-
-
- #ifdef __USE_GNU
- @@ -91,7 +90,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int utmpxname (__const char *__file);
- +extern int utmpxname (const char *__file);
-
- /* Append entry UTMP to the wtmpx-like file WTMPX_FILE.
-
- @@ -99,8 +98,8 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern void updwtmpx (__const char *__wtmpx_file,
- - __const struct utmpx *__utmpx);
- +extern void updwtmpx (const char *__wtmpx_file,
- + const struct utmpx *__utmpx);
-
-
- /* Copy the information in UTMPX to UTMP.
- @@ -109,7 +108,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern void getutmp (__const struct utmpx *__utmpx,
- +extern void getutmp (const struct utmpx *__utmpx,
- struct utmp *__utmp);
-
- /* Copy the information in UTMP to UTMPX.
- @@ -118,7 +117,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern void getutmpx (__const struct utmp *__utmp,
- +extern void getutmpx (const struct utmp *__utmp,
- struct utmpx *__utmpx);
- #endif
-
- diff -Nur uClibc-0.9.33.2/include/values.h uClibc/include/values.h
- --- uClibc-0.9.33.2/include/values.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/values.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This interface is obsolete. New programs should use
- <limits.h> and/or <float.h> instead of <values.h>. */
- diff -Nur uClibc-0.9.33.2/include/wchar.h uClibc/include/wchar.h
- --- uClibc-0.9.33.2/include/wchar.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/wchar.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.24
- @@ -133,46 +132,46 @@
- /* This incomplete type is defined in <time.h> but needed here because
- of `wcsftime'. */
- struct tm;
- +__END_NAMESPACE_STD
- /* XXX We have to clean this up at some point. Since tm is in the std
- namespace but wcsftime is in __c99 the type wouldn't be found
- without inserting it in the global namespace. */
- __USING_NAMESPACE_STD(tm)
- -__END_NAMESPACE_STD
-
-
- __BEGIN_NAMESPACE_C99
- /* Copy SRC to DEST. */
- extern wchar_t *wcscpy (wchar_t *__restrict __dest,
- - __const wchar_t *__restrict __src) __THROW;
- + const wchar_t *__restrict __src) __THROW;
- /* Copy no more than N wide-characters of SRC to DEST. */
- extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
- - __const wchar_t *__restrict __src, size_t __n)
- + const wchar_t *__restrict __src, size_t __n)
- __THROW;
-
- /* Append SRC onto DEST. */
- extern wchar_t *wcscat (wchar_t *__restrict __dest,
- - __const wchar_t *__restrict __src) __THROW;
- + const wchar_t *__restrict __src) __THROW;
- libc_hidden_proto(wcscat)
- /* Append no more than N wide-characters of SRC onto DEST. */
- extern wchar_t *wcsncat (wchar_t *__restrict __dest,
- - __const wchar_t *__restrict __src, size_t __n)
- + const wchar_t *__restrict __src, size_t __n)
- __THROW;
-
- /* Compare S1 and S2. */
- -extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2)
- +extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2)
- __THROW __attribute_pure__;
- libc_hidden_proto(wcscmp)
- /* Compare N wide-characters of S1 and S2. */
- -extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
- +extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
- __THROW __attribute_pure__;
- __END_NAMESPACE_C99
-
- #ifdef __USE_GNU
- /* Compare S1 and S2, ignoring case. */
- -extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
- +extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) __THROW;
-
- /* Compare no more than N chars of S1 and S2, ignoring case. */
- -extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
- +extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2,
- size_t __n) __THROW;
-
- #ifdef __UCLIBC_HAS_XLOCALE__
- @@ -180,11 +179,11 @@
- the provided locale and not the global locale. */
- # include <xlocale.h>
-
- -extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
- +extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
- __locale_t __loc) __THROW;
- libc_hidden_proto(wcscasecmp_l)
-
- -extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
- +extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
- size_t __n, __locale_t __loc) __THROW;
- libc_hidden_proto(wcsncasecmp_l)
- #endif /* __UCLIBC_HAS_XLOCALE__ */
- @@ -193,13 +192,13 @@
- __BEGIN_NAMESPACE_C99
- /* Compare S1 and S2, both interpreted as appropriate to the
- LC_COLLATE category of the current locale. */
- -extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
- +extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW;
- libc_hidden_proto(wcscoll)
- /* Transform S2 into array pointed to by S1 such that if wcscmp is
- applied to two transformed strings the result is the as applying
- `wcscoll' to the original strings. */
- extern size_t wcsxfrm (wchar_t *__restrict __s1,
- - __const wchar_t *__restrict __s2, size_t __n) __THROW;
- + const wchar_t *__restrict __s2, size_t __n) __THROW;
- __END_NAMESPACE_C99
-
- #ifdef __USE_GNU
- @@ -209,76 +208,79 @@
-
- /* Compare S1 and S2, both interpreted as appropriate to the
- LC_COLLATE category of the given locale. */
- -extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2,
- +extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2,
- __locale_t __loc) __THROW;
- libc_hidden_proto(wcscoll_l)
-
- /* Transform S2 into array pointed to by S1 such that if wcscmp is
- applied to two transformed strings the result is the as applying
- `wcscoll' to the original strings. */
- -extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2,
- +extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2,
- size_t __n, __locale_t __loc) __THROW;
- libc_hidden_proto(wcsxfrm_l)
-
- #endif /* __UCLIBC_HAS_XLOCALE__ */
-
- /* Duplicate S, returning an identical malloc'd string. */
- -extern wchar_t *wcsdup (__const wchar_t *__s) __THROW __attribute_malloc__;
- +extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__;
- #endif
-
- __BEGIN_NAMESPACE_C99
- /* Find the first occurrence of WC in WCS. */
- -extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc)
- +extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc)
- __THROW __attribute_pure__;
- /* Find the last occurrence of WC in WCS. */
- -extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc)
- +extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc)
- __THROW __attribute_pure__;
- __END_NAMESPACE_C99
-
- #ifdef __USE_GNU
- /* This function is similar to `wcschr'. But it returns a pointer to
- the closing NUL wide character in case C is not found in S. */
- -extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc)
- +extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc)
- __THROW __attribute_pure__;
- #endif
-
- __BEGIN_NAMESPACE_C99
- /* Return the length of the initial segmet of WCS which
- consists entirely of wide characters not in REJECT. */
- -extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject)
- +extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject)
- __THROW __attribute_pure__;
- /* Return the length of the initial segmet of WCS which
- consists entirely of wide characters in ACCEPT. */
- -extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept)
- +extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept)
- __THROW __attribute_pure__;
- libc_hidden_proto(wcsspn)
- /* Find the first occurrence in WCS of any character in ACCEPT. */
- -extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
- +extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept)
- __THROW __attribute_pure__;
- libc_hidden_proto(wcspbrk)
- /* Find the first occurrence of NEEDLE in HAYSTACK. */
- -extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
- +/* SuSv uses restrict keyword, glibc does not */
- +extern wchar_t *wcsstr (const wchar_t *__restrict __haystack, const wchar_t *__restrict __needle)
- __THROW __attribute_pure__;
-
- /* Divide WCS into tokens separated by characters in DELIM. */
- extern wchar_t *wcstok (wchar_t *__restrict __s,
- - __const wchar_t *__restrict __delim,
- + const wchar_t *__restrict __delim,
- wchar_t **__restrict __ptr) __THROW;
-
- /* Return the number of wide characters in S. */
- -extern size_t wcslen (__const wchar_t *__s) __THROW __attribute_pure__;
- +extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__;
- libc_hidden_proto(wcslen)
- __END_NAMESPACE_C99
-
- #if defined __USE_XOPEN && defined __UCLIBC_SUSV3_LEGACY__
- /* Another name for `wcsstr' from XPG4. */
- -extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
- +/* SuSv3 did not use restrict keyword, probably because it was marked LEGACY
- + we do to be in sync with wcsstr */
- +extern wchar_t *wcswcs (const wchar_t *__restrict __haystack, const wchar_t *__restrict __needle)
- __THROW __attribute_pure__;
- #endif
-
- #ifdef __USE_GNU
- /* Return the number of wide characters in S, but at most MAXLEN. */
- -extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen)
- +extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen)
- __THROW __attribute_pure__;
- libc_hidden_proto(wcsnlen)
- #endif
- @@ -286,23 +288,24 @@
-
- __BEGIN_NAMESPACE_C99
- /* Search N wide characters of S for C. */
- -extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
- +extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n)
- __THROW __attribute_pure__;
- libc_hidden_proto(wmemchr)
-
- /* Compare N wide characters of S1 and S2. */
- -extern int wmemcmp (__const wchar_t *__restrict __s1,
- - __const wchar_t *__restrict __s2, size_t __n)
- +/* SuSv4 does not use restrict keyword for S1 and S2, glibc does */
- +extern int wmemcmp (const wchar_t *__s1,
- + const wchar_t *__s2, size_t __n)
- __THROW __attribute_pure__;
-
- /* Copy N wide characters of SRC to DEST. */
- extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
- - __const wchar_t *__restrict __s2, size_t __n) __THROW;
- + const wchar_t *__restrict __s2, size_t __n) __THROW;
- libc_hidden_proto(wmemcpy)
-
- /* Copy N wide characters of SRC to DEST, guaranteeing
- correct behavior for overlapping strings. */
- -extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
- +extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n)
- __THROW;
-
- /* Set N wide characters of S to C. */
- @@ -313,7 +316,7 @@
- /* Copy N wide characters of SRC to DEST and return pointer to following
- wide character. */
- extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
- - __const wchar_t *__restrict __s2, size_t __n)
- + const wchar_t *__restrict __s2, size_t __n)
- __THROW;
- libc_hidden_proto(wmempcpy)
- #endif
- @@ -331,13 +334,13 @@
-
- /* Determine whether PS points to an object representing the initial
- state. */
- -extern int mbsinit (__const mbstate_t *__ps) __THROW __attribute_pure__;
- +extern int mbsinit (const mbstate_t *__ps) __THROW __attribute_pure__;
- libc_hidden_proto(mbsinit)
-
- /* Write wide character representation of multibyte character pointed
- to by S to PWC. */
- extern size_t mbrtowc (wchar_t *__restrict __pwc,
- - __const char *__restrict __s, size_t __n,
- + const char *__restrict __s, size_t __n,
- mbstate_t *__p) __THROW;
- libc_hidden_proto(mbrtowc)
-
- @@ -348,24 +351,24 @@
-
- /* Return number of bytes in multibyte character pointed to by S. */
- #if 0 /* uClibc: disabled */
- -extern size_t __mbrlen (__const char *__restrict __s, size_t __n,
- +extern size_t __mbrlen (const char *__restrict __s, size_t __n,
- mbstate_t *__restrict __ps) __THROW;
- #endif
- -extern size_t mbrlen (__const char *__restrict __s, size_t __n,
- +extern size_t mbrlen (const char *__restrict __s, size_t __n,
- mbstate_t *__restrict __ps) __THROW;
- libc_hidden_proto(mbrlen)
-
- /* Write wide character representation of multibyte character string
- SRC to DST. */
- extern size_t mbsrtowcs (wchar_t *__restrict __dst,
- - __const char **__restrict __src, size_t __len,
- + const char **__restrict __src, size_t __len,
- mbstate_t *__restrict __ps) __THROW;
- libc_hidden_proto(mbsrtowcs)
-
- /* Write multibyte character representation of wide character string
- SRC to DST. */
- extern size_t wcsrtombs (char *__restrict __dst,
- - __const wchar_t **__restrict __src, size_t __len,
- + const wchar_t **__restrict __src, size_t __len,
- mbstate_t *__restrict __ps) __THROW;
- libc_hidden_proto(wcsrtombs)
- __END_NAMESPACE_C99
- @@ -375,14 +378,14 @@
- /* Write wide character representation of at most NMC bytes of the
- multibyte character string SRC to DST. */
- extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
- - __const char **__restrict __src, size_t __nmc,
- + const char **__restrict __src, size_t __nmc,
- size_t __len, mbstate_t *__restrict __ps) __THROW;
- libc_hidden_proto(mbsnrtowcs)
-
- /* Write multibyte character representation of at most NWC characters
- from the wide character string SRC to DST. */
- extern size_t wcsnrtombs (char *__restrict __dst,
- - __const wchar_t **__restrict __src,
- + const wchar_t **__restrict __src,
- size_t __nwc, size_t __len,
- mbstate_t *__restrict __ps) __THROW;
- libc_hidden_proto(wcsnrtombs)
- @@ -396,7 +399,7 @@
-
- /* Determine number of column positions required for first N wide
- characters (or fewer if S ends before this) in S. */
- -extern int wcswidth (__const wchar_t *__s, size_t __n) __THROW;
- +extern int wcswidth (const wchar_t *__s, size_t __n) __THROW;
- libc_hidden_proto(wcswidth)
- #endif /* Use X/Open. */
-
- @@ -405,14 +408,14 @@
- #ifdef __UCLIBC_HAS_FLOATS__
- /* Convert initial portion of the wide string NPTR to `double'
- representation. */
- -extern double wcstod (__const wchar_t *__restrict __nptr,
- +extern double wcstod (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr) __THROW;
-
- #ifdef __USE_ISOC99
- /* Likewise for `float' and `long double' sizes of floating-point numbers. */
- -extern float wcstof (__const wchar_t *__restrict __nptr,
- +extern float wcstof (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr) __THROW;
- -extern long double wcstold (__const wchar_t *__restrict __nptr,
- +extern long double wcstold (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr) __THROW;
- #endif /* C99 */
- #endif /* __UCLIBC_HAS_FLOATS__ */
- @@ -420,44 +423,44 @@
-
- /* Convert initial portion of wide string NPTR to `long int'
- representation. */
- -extern long int wcstol (__const wchar_t *__restrict __nptr,
- +extern long int wcstol (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __base) __THROW;
-
- /* Convert initial portion of wide string NPTR to `unsigned long int'
- representation. */
- -extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
- +extern unsigned long int wcstoul (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __base)
- __THROW;
-
- #if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_GNU)
- -/* Convert initial portion of wide string NPTR to `long int'
- +/* Convert initial portion of wide string NPTR to `long long int'
- representation. */
- __extension__
- -extern long long int wcstoll (__const wchar_t *__restrict __nptr,
- +extern long long int wcstoll (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __base)
- __THROW;
-
- /* Convert initial portion of wide string NPTR to `unsigned long long int'
- representation. */
- __extension__
- -extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr,
- +extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base) __THROW;
- #endif /* ISO C99 or GCC and GNU. */
- __END_NAMESPACE_C99
-
- #if defined __GNUC__ && defined __USE_GNU
- -/* Convert initial portion of wide string NPTR to `long int'
- +/* Convert initial portion of wide string NPTR to `long long int'
- representation. */
- __extension__
- -extern long long int wcstoq (__const wchar_t *__restrict __nptr,
- +extern long long int wcstoq (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __base)
- __THROW;
-
- /* Convert initial portion of wide string NPTR to `unsigned long long int'
- representation. */
- __extension__
- -extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr,
- +extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base) __THROW;
- #endif /* GCC and use GNU. */
- @@ -481,35 +484,35 @@
-
- /* Special versions of the functions above which take the locale to
- use as an additional parameter. */
- -extern long int wcstol_l (__const wchar_t *__restrict __nptr,
- +extern long int wcstol_l (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __base,
- __locale_t __loc) __THROW;
-
- -extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr,
- +extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base, __locale_t __loc) __THROW;
-
- __extension__
- -extern long long int wcstoll_l (__const wchar_t *__restrict __nptr,
- +extern long long int wcstoll_l (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base, __locale_t __loc) __THROW;
-
- __extension__
- -extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr,
- +extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base, __locale_t __loc)
- __THROW;
-
- #ifdef __UCLIBC_HAS_FLOATS__
- -extern double wcstod_l (__const wchar_t *__restrict __nptr,
- +extern double wcstod_l (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, __locale_t __loc)
- __THROW;
-
- -extern float wcstof_l (__const wchar_t *__restrict __nptr,
- +extern float wcstof_l (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, __locale_t __loc)
- __THROW;
-
- -extern long double wcstold_l (__const wchar_t *__restrict __nptr,
- +extern long double wcstold_l (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- __locale_t __loc) __THROW;
- #endif /* __UCLIBC_HAS_FLOATS__ */
- @@ -520,11 +523,11 @@
- #ifdef __USE_GNU
- /* Copy SRC to DEST, returning the address of the terminating L'\0' in
- DEST. */
- -extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW;
- +extern wchar_t *wcpcpy (wchar_t *__dest, const wchar_t *__src) __THROW;
-
- /* Copy no more than N characters of SRC to DEST, returning the address of
- the last character written into DEST. */
- -extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
- +extern wchar_t *wcpncpy (wchar_t *__dest, const wchar_t *__src, size_t __n)
- __THROW;
- #endif /* use GNU */
-
- @@ -542,17 +545,17 @@
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- extern int fwprintf (__FILE *__restrict __stream,
- - __const wchar_t *__restrict __format, ...)
- + const wchar_t *__restrict __format, ...)
- /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
- /* Write formatted output to stdout.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int wprintf (__const wchar_t *__restrict __format, ...)
- +extern int wprintf (const wchar_t *__restrict __format, ...)
- /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */;
- /* Write formatted output of at most N characters to S. */
- extern int swprintf (wchar_t *__restrict __s, size_t __n,
- - __const wchar_t *__restrict __format, ...)
- + const wchar_t *__restrict __format, ...)
- __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */;
-
- /* Write formatted output to S from argument list ARG.
- @@ -560,7 +563,7 @@
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- extern int vfwprintf (__FILE *__restrict __s,
- - __const wchar_t *__restrict __format,
- + const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
- libc_hidden_proto(vfwprintf)
- @@ -568,13 +571,13 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int vwprintf (__const wchar_t *__restrict __format,
- +extern int vwprintf (const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */;
- /* Write formatted output of at most N character to S from argument
- list ARG. */
- extern int vswprintf (wchar_t *__restrict __s, size_t __n,
- - __const wchar_t *__restrict __format,
- + const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
- libc_hidden_proto(vswprintf)
- @@ -585,17 +588,17 @@
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- extern int fwscanf (__FILE *__restrict __stream,
- - __const wchar_t *__restrict __format, ...)
- + const wchar_t *__restrict __format, ...)
- /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
- /* Read formatted input from stdin.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int wscanf (__const wchar_t *__restrict __format, ...)
- +extern int wscanf (const wchar_t *__restrict __format, ...)
- /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
- /* Read formatted input from S. */
- -extern int swscanf (__const wchar_t *__restrict __s,
- - __const wchar_t *__restrict __format, ...)
- +extern int swscanf (const wchar_t *__restrict __s,
- + const wchar_t *__restrict __format, ...)
- __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
-
- __END_NAMESPACE_C99
- @@ -609,7 +612,7 @@
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- extern int vfwscanf (__FILE *__restrict __s,
- - __const wchar_t *__restrict __format,
- + const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
- libc_hidden_proto(vfwscanf)
- @@ -617,12 +620,12 @@
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
- -extern int vwscanf (__const wchar_t *__restrict __format,
- +extern int vwscanf (const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
- /* Read formatted input from S into argument list ARG. */
- -extern int vswscanf (__const wchar_t *__restrict __s,
- - __const wchar_t *__restrict __format,
- +extern int vswscanf (const wchar_t *__restrict __s,
- + const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
- libc_hidden_proto(vswscanf)
- @@ -652,6 +655,7 @@
- These functions are possible cancellation points and therefore not
- marked with __THROW. */
- extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
- +libc_hidden_proto(fputwc)
- extern wint_t putwc (wchar_t __wc, __FILE *__stream);
-
- /* Write a character to stdout.
- @@ -673,7 +677,7 @@
-
- This function is a possible cancellation points and therefore not
- marked with __THROW. */
- -extern int fputws (__const wchar_t *__restrict __ws,
- +extern int fputws (const wchar_t *__restrict __ws,
- __FILE *__restrict __stream);
- libc_hidden_proto(fputws)
-
- @@ -743,7 +747,7 @@
- cancellation point. But due to similarity with an POSIX interface
- or due to the implementation it is a cancellation point and
- therefore not marked with __THROW. */
- -extern int fputws_unlocked (__const wchar_t *__restrict __ws,
- +extern int fputws_unlocked (const wchar_t *__restrict __ws,
- __FILE *__restrict __stream);
- libc_hidden_proto(fputws_unlocked)
- #endif
- @@ -754,8 +758,8 @@
- Write no more than MAXSIZE wide characters and return the number
- of wide characters written, or 0 if it would exceed MAXSIZE. */
- extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
- - __const wchar_t *__restrict __format,
- - __const struct tm *__restrict __tp) __THROW;
- + const wchar_t *__restrict __format,
- + const struct tm *__restrict __tp) __THROW;
- __END_NAMESPACE_C99
-
- # if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__
- @@ -764,8 +768,8 @@
- /* Similar to `wcsftime' but takes the information from
- the provided locale and not the global locale. */
- extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
- - __const wchar_t *__restrict __format,
- - __const struct tm *__restrict __tp,
- + const wchar_t *__restrict __format,
- + const struct tm *__restrict __tp,
- __locale_t __loc) __THROW;
- libc_hidden_proto(wcsftime_l)
- # endif
- diff -Nur uClibc-0.9.33.2/include/wctype.h uClibc/include/wctype.h
- --- uClibc-0.9.33.2/include/wctype.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/wctype.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 Standard: 7.25
- @@ -183,7 +182,7 @@
-
- /* Construct value that describes a class of wide characters identified
- by the string argument PROPERTY. */
- -extern wctype_t wctype (__const char *__property) __THROW;
- +extern wctype_t wctype (const char *__property) __THROW;
- libc_hidden_proto(wctype)
-
- /* Determine whether the wide-character WC has the property described by
- @@ -200,7 +199,7 @@
- __BEGIN_NAMESPACE_C99
- /* Scalar type that can hold values which represent locale-specific
- character mappings. */
- -/* uClibc note: glibc uses - typedef __const __int32_t *wctrans_t; */
- +/* uClibc note: glibc uses - typedef const __int32_t *wctrans_t; */
- typedef unsigned int wctrans_t;
- __END_NAMESPACE_C99
- #ifdef __USE_GNU
- @@ -235,7 +234,7 @@
- __BEGIN_NAMESPACE_C99
- /* Construct value that describes a mapping between wide characters
- identified by the string argument PROPERTY. */
- -extern wctrans_t wctrans (__const char *__property) __THROW;
- +extern wctrans_t wctrans (const char *__property) __THROW;
- libc_hidden_proto(wctrans)
-
- /* Map the wide character WC using the mapping described by DESC. */
- @@ -304,7 +303,7 @@
-
- /* Construct value that describes a class of wide characters identified
- by the string argument PROPERTY. */
- -extern wctype_t wctype_l (__const char *__property, __locale_t __locale)
- +extern wctype_t wctype_l (const char *__property, __locale_t __locale)
- __THROW;
-
- /* Determine whether the wide-character WC has the property described by
- @@ -328,7 +327,7 @@
-
- /* Construct value that describes a mapping between wide characters
- identified by the string argument PROPERTY. */
- -extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale)
- +extern wctrans_t wctrans_l (const char *__property, __locale_t __locale)
- __THROW;
-
- /* Map the wide character WC using the mapping described by DESC. */
- diff -Nur uClibc-0.9.33.2/include/wordexp.h uClibc/include/wordexp.h
- --- uClibc-0.9.33.2/include/wordexp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/wordexp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _WORDEXP_H
- #define _WORDEXP_H 1
- @@ -60,7 +59,7 @@
- };
-
- /* Do word expansion of WORDS into PWORDEXP. */
- -extern int wordexp (__const char *__restrict __words,
- +extern int wordexp (const char *__restrict __words,
- wordexp_t *__restrict __pwordexp, int __flags);
-
- /* Free the storage allocated by a `wordexp' call. */
- diff -Nur uClibc-0.9.33.2/include/xlocale.h uClibc/include/xlocale.h
- --- uClibc-0.9.33.2/include/xlocale.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/include/xlocale.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _XLOCALE_H
- #define _XLOCALE_H 1
- @@ -39,11 +38,11 @@
- /* Note: LC_ALL is not a valid index into this array. */
- const char *__names[13];
- } *__locale_t;
- +#else
- +# include <bits/uClibc_locale.h>
- +#endif
-
- /* POSIX 2008 makes locale_t official. */
- typedef __locale_t locale_t;
- -#else
- -# include <locale.h>
- -#endif
-
- #endif /* xlocale.h */
- diff -Nur uClibc-0.9.33.2/ldso/include/dl-defs.h uClibc/ldso/include/dl-defs.h
- --- uClibc-0.9.33.2/ldso/include/dl-defs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/include/dl-defs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -5,8 +5,8 @@
- * GNU Lesser General Public License version 2.1 or later.
- */
-
- -#ifndef _LD_DEFS_H
- -#define _LD_DEFS_H
- +#ifndef _DL_DEFS_H
- +#define _DL_DEFS_H
-
- #define FLAG_ANY -1
- #define FLAG_TYPE_MASK 0x00ff
- @@ -72,6 +72,11 @@
-
- #endif
-
- +#ifdef _LIBC
- +/* arch specific defines */
- +#include <dl-sysdep.h>
- +#endif
- +
- /* Provide a means for a port to pass additional arguments to the _dl_start
- function. */
- #ifndef DL_START
- @@ -281,4 +286,4 @@
- # define DL_GET_RUN_ADDR(loadaddr, mapaddr) (mapaddr)
- #endif
-
- -#endif /* _LD_DEFS_H */
- +#endif /* _DL_DEFS_H */
- diff -Nur uClibc-0.9.33.2/ldso/include/dl-elf.h uClibc/ldso/include/dl-elf.h
- --- uClibc-0.9.33.2/ldso/include/dl-elf.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/include/dl-elf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -5,19 +5,22 @@
- * GNU Lesser General Public License version 2.1 or later.
- */
-
- -#ifndef LINUXELF_H
- -#define LINUXELF_H
- +#ifndef _DL_ELF_H
- +#define _DL_ELF_H
-
- +#include <features.h>
- +#include <bits/wordsize.h>
- #include <dl-string.h> /* before elf.h to get ELF_USES_RELOCA right */
- #include <elf.h>
- #include <link.h>
- +#include <dl-defs.h>
- +#include <dlfcn.h>
-
- -/* Forward declarations for stuff defined in ld_hash.h */
- +/* Forward declarations for stuff defined in dl-hash.h */
- struct dyn_elf;
- struct elf_resolve;
- struct r_scope_elem;
-
- -#include <dl-defs.h>
- #ifdef __LDSO_CACHE_SUPPORT__
- extern int _dl_map_cache(void);
- extern int _dl_unmap_cache(void);
- @@ -29,7 +32,7 @@
- #define DL_RESOLVE_SECURE 0x0001
- #define DL_RESOLVE_NOLOAD 0x0002
-
- -/* Function prototypes for non-static stuff in readelflib1.c */
- +/* Function prototypes for non-static stuff in elfinterp.c */
- extern void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
- unsigned long rel_addr, unsigned long rel_size);
- extern int _dl_parse_relocation_information(struct dyn_elf *rpnt,
- @@ -39,8 +42,6 @@
- int trace_loaded_objects);
- extern struct elf_resolve * _dl_load_elf_shared_library(unsigned rflags,
- struct dyn_elf **rpnt, const char *libname);
- -extern struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libname,
- - int trace_loaded_objects);
- extern int _dl_linux_resolve(void);
- extern int _dl_fixup(struct dyn_elf *rpnt, struct r_scope_elem *scope, int flag);
- extern void _dl_protect_relro (struct elf_resolve *l);
- @@ -222,11 +223,6 @@
- #ifdef __DSBT__
- /* Get the mapped address of the DSBT base. */
- ADJUST_DYN_INFO(DT_DSBT_BASE_IDX, load_off);
- -
- - /* Initialize loadmap dsbt info. */
- - load_off.map->dsbt_table = (void *)dynamic_info[DT_DSBT_BASE_IDX];
- - load_off.map->dsbt_size = dynamic_info[DT_DSBT_SIZE_IDX];
- - load_off.map->dsbt_index = dynamic_info[DT_DSBT_INDEX_IDX];
- #endif
- #undef ADJUST_DYN_INFO
- return rtld_flags;
- @@ -259,4 +255,4 @@
- (((X) & PF_X) ? PROT_EXEC : 0))
-
-
- -#endif /* LINUXELF_H */
- +#endif /* _DL_ELF_H */
- diff -Nur uClibc-0.9.33.2/ldso/include/dlfcn.h uClibc/ldso/include/dlfcn.h
- --- uClibc-0.9.33.2/ldso/include/dlfcn.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/include/dlfcn.h 2014-02-03 12:32:56.000000000 +0100
- @@ -19,9 +19,9 @@
- `dladdr'. */
- typedef struct
- {
- - __const char *dli_fname; /* File name of defining object. */
- + const char *dli_fname; /* File name of defining object. */
- void *dli_fbase; /* Load address of that object. */
- - __const char *dli_sname; /* Name of nearest symbol. */
- + const char *dli_sname; /* Name of nearest symbol. */
- void *dli_saddr; /* Exact value of nearest symbol. */
- } Dl_info;
-
- diff -Nur uClibc-0.9.33.2/ldso/include/dl-hash.h uClibc/ldso/include/dl-hash.h
- --- uClibc-0.9.33.2/ldso/include/dl-hash.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/include/dl-hash.h 2014-02-03 12:32:56.000000000 +0100
- @@ -5,8 +5,8 @@
- * GNU Lesser General Public License version 2.1 or later.
- */
-
- -#ifndef _LD_HASH_H_
- -#define _LD_HASH_H_
- +#ifndef _DL_HASH_H
- +#define _DL_HASH_H
-
- #ifndef RTLD_NEXT
- #define RTLD_NEXT ((void*)-1)
- @@ -139,6 +139,12 @@
- memory when the module is dlclose()d. */
- struct funcdesc_ht *funcdesc_ht;
- #endif
- +#ifdef __DSBT__
- + /* Information for DSBT */
- + void **dsbt_table;
- + unsigned long dsbt_size;
- + unsigned long dsbt_index;
- +#endif
- };
-
- #define RELOCS_DONE 0x000001
- @@ -160,17 +166,7 @@
- struct elf_resolve *mytpnt, int type_class,
- struct symbol_ref *symbol);
-
- -extern int _dl_linux_dynamic_link(void);
- -
- extern char * _dl_library_path;
- -extern char * _dl_not_lazy;
- -
- -static __inline__ int _dl_symbol(char * name)
- -{
- - if (name[0] != '_' || name[1] != 'd' || name[2] != 'l' || name[3] != '_')
- - return 0;
- - return 1;
- -}
-
- #define LD_ERROR_NOFILE 1
- #define LD_ERROR_NOZERO 2
- @@ -184,4 +180,4 @@
- #define LD_BAD_HANDLE 10
- #define LD_NO_SYMBOL 11
-
- -#endif /* _LD_HASH_H_ */
- +#endif /* _DL_HASH_H */
- diff -Nur uClibc-0.9.33.2/ldso/include/dl-string.h uClibc/ldso/include/dl-string.h
- --- uClibc-0.9.33.2/ldso/include/dl-string.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/include/dl-string.h 2014-02-03 12:32:56.000000000 +0100
- @@ -5,12 +5,16 @@
- * GNU Lesser General Public License version 2.1 or later.
- */
-
- -#ifndef _LINUX_STRING_H_
- -#define _LINUX_STRING_H_
- +#ifndef _DL_STRING_H
- +#define _DL_STRING_H
-
- -#include <dl-sysdep.h> /* for do_rem */
- #include <features.h>
-
- +#define __need_NULL
- +#include <stddef.h>
- +
- +#include <dl-defs.h> /* for do_rem by dl-sysdep.h */
- +
- /* provide some sane defaults */
- #ifndef do_rem
- # define do_rem(result, n, base) ((result) = (n) % (base))
- @@ -19,25 +23,7 @@
- # define do_div_10(result, remain) ((result) /= 10)
- #endif
-
- -static size_t _dl_strlen(const char *str);
- -static char *_dl_strcat(char *dst, const char *src);
- -static char *_dl_strcpy(char *dst, const char *src);
- -static int _dl_strcmp(const char *s1, const char *s2);
- -static int _dl_strncmp(const char *s1, const char *s2, size_t len);
- -static char *_dl_strchr(const char *str, int c);
- -static char *_dl_strrchr(const char *str, int c);
- -static char *_dl_strstr(const char *s1, const char *s2);
- -static void *_dl_memcpy(void *dst, const void *src, size_t len);
- -static int _dl_memcmp(const void *s1, const void *s2, size_t len);
- -static void *_dl_memset(void *str, int c, size_t len);
- -static char *_dl_get_last_path_component(char *path);
- -static char *_dl_simple_ltoa(char *local, unsigned long i);
- -static char *_dl_simple_ltoahex(char *local, unsigned long i);
- -
- -#ifndef NULL
- -#define NULL ((void *) 0)
- -#endif
- -
- +#ifdef IS_IN_rtld
- static __always_inline size_t _dl_strlen(const char *str)
- {
- register const char *ptr = (char *) str-1;
- @@ -84,22 +70,6 @@
- return c1 - c2;
- }
-
- -static __always_inline int _dl_strncmp(const char *s1, const char *s2, size_t len)
- -{
- - register unsigned char c1 = '\0';
- - register unsigned char c2 = '\0';
- -
- - s1--;s2--;
- - while (len > 0) {
- - c1 = (unsigned char) *++s1;
- - c2 = (unsigned char) *++s2;
- - if (c1 == '\0' || c1 != c2)
- - return c1 - c2;
- - len--;
- - }
- - return c1 - c2;
- -}
- -
- static __always_inline char * _dl_strchr(const char *str, int c)
- {
- register char ch;
- @@ -172,7 +142,7 @@
- return 0;
- }
-
- -#if defined(powerpc)
- +#if defined(__powerpc__)
- /* Will generate smaller and faster code due to loop unrolling.*/
- static __always_inline void * _dl_memset(void *to, int c, size_t n)
- {
- @@ -228,7 +198,19 @@
- ;/* empty */
- return ptr == path ? ptr : ptr+1;
- }
- +#else /* IS_IN_rtld */
- +# include <string.h>
- +# define _dl_strlen strlen
- +# define _dl_strcat strcat
- +# define _dl_strcpy strcpy
- +# define _dl_strcmp strcmp
- +# define _dl_strrchr strrchr
- +# define _dl_memcpy memcpy
- +# define _dl_memcmp memcmp
- +# define _dl_memset memset
- +#endif /* IS_IN_rtld */
-
- +#if defined IS_IN_rtld || defined __SUPPORT_LD_DEBUG__
- /* Early on, we can't call printf, so use this to print out
- * numbers using the SEND_STDERR() macro. Avoid using mod
- * or using long division */
- @@ -246,7 +228,9 @@
- } while (i > 0);
- return p;
- }
- +#endif
-
- +#ifdef IS_IN_rtld
- static __always_inline char * _dl_simple_ltoahex(char *local, unsigned long i)
- {
- /* 16 digits plus a leading "0x" plus a null terminator,
- @@ -266,9 +250,6 @@
- return p;
- }
-
- -
- -
- -
- /* The following macros may be used in dl-startup.c to debug
- * ldso before ldso has fixed itself up to make function calls */
-
- @@ -285,7 +266,7 @@
- /* On some arches constant strings are referenced through the GOT.
- * This requires that load_addr must already be defined... */
- #if defined(mc68000) || defined(__arm__) || defined(__thumb__) || \
- - defined(__mips__) || defined(__sh__) || defined(__powerpc__) || \
- + defined(__sh__) || defined(__powerpc__) || \
- defined(__avr32__) || defined(__xtensa__) || defined(__sparc__) || defined(__microblaze__)
- # define CONSTANT_STRING_GOT_FIXUP(X) \
- if ((X) < (const char *) load_addr) (X) += load_addr
- @@ -362,4 +343,6 @@
- # define SEND_ADDRESS_STDERR_DEBUG(X, add_a_newline)
- #endif
-
- -#endif
- +#endif /* IS_IN_rtld */
- +
- +#endif /* _DL_STRING_H */
- diff -Nur uClibc-0.9.33.2/ldso/include/dl-syscall.h uClibc/ldso/include/dl-syscall.h
- --- uClibc-0.9.33.2/ldso/include/dl-syscall.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/include/dl-syscall.h 2014-02-03 12:32:56.000000000 +0100
- @@ -5,8 +5,8 @@
- * GNU Lesser General Public License version 2.1 or later.
- */
-
- -#ifndef _LD_SYSCALL_H_
- -#define _LD_SYSCALL_H_
- +#ifndef _DL_SYSCALL_H
- +#define _DL_SYSCALL_H
-
- /* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
- @@ -20,6 +20,8 @@
- /* For MAP_ANONYMOUS -- differs between platforms */
- #define _SYS_MMAN_H 1
- #include <bits/mman.h>
- +
- +#ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
- /* Pull in whatever this particular arch's kernel thinks the kernel version of
- * struct stat should look like. It turns out that each arch has a different
- * opinion on the subject, and different kernel revs use different names... */
- @@ -35,6 +37,13 @@
- #define S_ISUID 04000 /* Set user ID on execution. */
- #define S_ISGID 02000 /* Set group ID on execution. */
-
- +#else
- +/* 1. common-generic ABI doesn't need kernel_stat translation
- + * 3. S_IS?ID already provided by stat.h
- + */
- +#include <sys/stat.h>
- +#endif
- +
-
- /* Here are the definitions for some syscalls that are used
- by the dynamic linker. The idea is that we want to be able
- @@ -48,9 +57,18 @@
- #define __NR__dl_close __NR_close
- static __always_inline _syscall1(int, _dl_close, int, fd)
-
- -#define __NR__dl_open __NR_open
- +#if defined __NR_openat && !defined __NR_open
- +static __always_inline int _dl_open(const char *fn,
- + int flags, __kernel_mode_t mode)
- +{
- + return INLINE_SYSCALL(openat, 4, AT_FDCWD, fn, flags, mode);
- +}
- +
- +#elif defined __NR_open
- +# define __NR__dl_open __NR_open
- static __always_inline _syscall3(int, _dl_open, const char *, fn, int, flags,
- __kernel_mode_t, mode)
- +#endif
-
- #define __NR__dl_write __NR_write
- static __always_inline _syscall3(unsigned long, _dl_write, int, fd,
- @@ -64,11 +82,27 @@
- static __always_inline _syscall3(int, _dl_mprotect, const void *, addr,
- unsigned long, len, int, prot)
-
- -#define __NR__dl_stat __NR_stat
- +#if defined __NR_fstatat64 && !defined __NR_stat
- +# define __NR__dl_fstatat64 __NR_fstatat64
- +static __always_inline _syscall4(int, _dl_fstatat64, int, fd, const char *,
- + fn, struct stat *, stat, int, flags)
- +
- +static __always_inline int _dl_stat(const char *file_name,
- + struct stat *buf)
- +{
- + return _dl_fstatat64(AT_FDCWD, file_name, buf, 0);
- +}
- +#elif defined __NR_stat
- +# define __NR__dl_stat __NR_stat
- static __always_inline _syscall2(int, _dl_stat, const char *, file_name,
- struct stat *, buf)
- +#endif
-
- -#define __NR__dl_fstat __NR_fstat
- +#if defined __NR_fstat64 && !defined __NR_fstat
- +# define __NR__dl_fstat __NR_fstat64
- +#elif defined __NR_fstat
- +# define __NR__dl_fstat __NR_fstat
- +#endif
- static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf)
-
- #define __NR__dl_munmap __NR_munmap
- @@ -104,9 +138,15 @@
- #define __NR__dl_getpid __NR_getpid
- static __always_inline _syscall0(gid_t, _dl_getpid)
-
- -#define __NR__dl_readlink __NR_readlink
- +#if defined __NR_readlinkat && !defined __NR_readlink
- +# define __NR__dl_readlink __NR_readlinkat
- +static __always_inline _syscall4(int, _dl_readlink, int, id, const char *, path,
- + char *, buf, size_t, bufsiz)
- +#elif defined __NR_readlink
- +# define __NR__dl_readlink __NR_readlink
- static __always_inline _syscall3(int, _dl_readlink, const char *, path, char *, buf,
- size_t, bufsiz)
- +#endif
-
- #ifdef __NR_pread64
- #define __NR___syscall_pread __NR_pread64
- @@ -187,4 +227,4 @@
- #endif
- }
-
- -#endif /* _LD_SYSCALL_H_ */
- +#endif /* _DL_SYSCALL_H */
- diff -Nur uClibc-0.9.33.2/ldso/include/ldsodefs.h uClibc/ldso/include/ldsodefs.h
- --- uClibc-0.9.33.2/ldso/include/ldsodefs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/include/ldsodefs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -66,7 +66,7 @@
- /* Taken from glibc/elf/dl-reloc.c */
- #define CHECK_STATIC_TLS(sym_map) \
- do { \
- - if (__builtin_expect ((sym_map)->l_tls_offset == NO_TLS_OFFSET, 0)) \
- + if (unlikely((sym_map)->l_tls_offset == NO_TLS_OFFSET)) \
- _dl_allocate_static_tls (sym_map); \
- } while (0)
-
- diff -Nur uClibc-0.9.33.2/ldso/include/ldso.h uClibc/ldso/include/ldso.h
- --- uClibc-0.9.33.2/ldso/include/ldso.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/include/ldso.h 2014-02-03 12:32:56.000000000 +0100
- @@ -5,8 +5,8 @@
- * GNU Lesser General Public License version 2.1 or later.
- */
-
- -#ifndef _LDSO_H_
- -#define _LDSO_H_
- +#ifndef _LDSO_H
- +#define _LDSO_H
-
- #include <features.h>
-
- @@ -30,6 +30,10 @@
- #include <stddef.h> /* for ptrdiff_t */
- #include <stdbool.h>
- #define _FCNTL_H
- +/* We need this if arch has only new syscalls defined */
- +#ifndef AT_FDCWD
- +#define AT_FDCWD -100
- +#endif /* AT_FDCWD */
- #include <bits/fcntl.h>
- #include <bits/wordsize.h>
- /* Pull in the arch specific type information */
- @@ -42,7 +46,6 @@
- #ifndef __ARCH_HAS_NO_SHARED__
- #include <dl-syscall.h>
- #include <dl-string.h>
- -#include <dlfcn.h>
- /* Now the ldso specific headers */
- #include <dl-elf.h>
- #ifdef __UCLIBC_HAS_TLS__
- @@ -84,16 +87,15 @@
- #else
- #define _dl_trace_prelink 0
- #endif
- +#ifdef __DSBT__
- +extern void **_dl_ldso_dsbt;
- +#endif
-
- #if defined(USE_TLS) && USE_TLS
- extern void _dl_add_to_slotinfo (struct link_map *l);
- extern void ** __attribute__ ((const)) _dl_initial_error_catch_tsd (void);
- #endif
-
- -#ifdef USE_TLS
- -void _dl_add_to_slotinfo (struct link_map *l);
- -void ** __attribute__ ((const)) _dl_initial_error_catch_tsd (void);
- -#endif
- #ifdef __SUPPORT_LD_DEBUG__
- extern char *_dl_debug;
- extern char *_dl_debug_symbols;
- @@ -110,7 +112,8 @@
- #else
- # define __dl_debug_dprint(fmt, args...) do {} while (0)
- # define _dl_if_debug_dprint(fmt, args...) do {} while (0)
- -# define _dl_debug_file 2
- +/* disabled on purpose, _dl_debug_file should be guarded by __SUPPORT_LD_DEBUG__
- +# define _dl_debug_file 2*/
- #endif /* __SUPPORT_LD_DEBUG__ */
-
- #ifdef IS_IN_rtld
- @@ -146,8 +149,19 @@
- extern void _dl_free(void *);
- extern char *_dl_getenv(const char *symbol, char **envp);
- extern void _dl_unsetenv(const char *symbol, char **envp);
- +#ifdef IS_IN_rtld
- extern char *_dl_strdup(const char *string);
- extern void _dl_dprintf(int, const char *, ...);
- +#else
- +# include <string.h>
- +# define _dl_strdup strdup
- +# include <stdio.h>
- +# ifdef __USE_GNU
- +# define _dl_dprintf dprintf
- +# else
- +# define _dl_dprintf(fd, fmt, args...) fprintf(stderr, fmt, ## args)
- +# endif
- +#endif
-
- #ifndef DL_GET_READY_TO_RUN_EXTRA_PARMS
- # define DL_GET_READY_TO_RUN_EXTRA_PARMS
- @@ -168,4 +182,4 @@
- #include <dl-defs.h>
- #endif
-
- -#endif /* _LDSO_H_ */
- +#endif /* _LDSO_H */
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/dl-debug.h uClibc/ldso/ldso/arc/dl-debug.h
- --- uClibc-0.9.33.2/ldso/ldso/arc/dl-debug.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/arc/dl-debug.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,68 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +static const char *_dl_reltypes_tab[] =
- +{
- + "R_ARC_NONE", /* 0 */
- + "R_ARC_8",
- + "R_ARC_16",
- + "R_ARC_24",
- + "R_ARC_32",
- + "R_ARC_B26", /* 5 */
- + "R_ARC_B22_PCREL",
- + "R_ARC_H30",
- + "R_ARC_N8",
- + "R_ARC_N16",
- + "R_ARC_N24", /* 10 */
- + "R_ARC_N32",
- + "R_ARC_SDA",
- + "R_ARC_SECTOFF",
- + "R_ARC_S21H_PCREL",
- + "R_ARC_S21W_PCREL", /* 15 */
- + "R_ARC_S25H_PCREL",
- + "R_ARC_S25W_PCREL",
- + "R_ARC_SDA32",
- + "R_ARC_SDA_LDST",
- + "R_ARC_SDA_LDST1", /* 20 */
- + "R_ARC_SDA_LDST2",
- + "R_ARC_SDA16_LD",
- + "R_ARC_SDA16_LD1",
- + "R_ARC_SDA16_LD2",
- + "R_ARC_S13_PCREL", /* 25 */
- + "R_ARC_W",
- + "R_ARC_32_ME",
- + "R_ARC_N32_ME",
- + "R_ARC_SECTOFF_ME",
- + "R_ARC_SDA32_ME", /* 30 */
- + "R_ARC_W_ME",
- + "R_ARC_H30_ME",
- + "R_ARC_SECTOFF_U8",
- + "R_ARC_SECTOFF_S9",
- + "R_AC_SECTOFF_U8", /* 35 */
- + "R_AC_SECTOFF_U8_1",
- + "R_AC_SECTOFF_U8_2",
- + "R_AC_SECTOFF_S9",
- + "R_AC_SECTOFF_S9_1",
- + "R_AC_SECTOFF_S9_2", /* 40 */
- + "R_ARC_SECTOFF_ME_1",
- + "R_ARC_SECTOFF_ME_2",
- + "R_ARC_SECTOFF_1",
- + "R_ARC_SECTOFF_2",
- + "", /* 45 */
- + "",
- + "",
- + "",
- + "",
- + "R_ARC_PC32", /* 50 */
- + "R_ARC_GOTPC32",
- + "R_ARC_PLT32",
- + "R_ARC_COPY",
- + "R_ARC_GLOB_DAT",
- + "R_ARC_JMP_SLOT", /* 55 */
- + "R_ARC_RELATIVE",
- + "R_ARC_GOTOFF",
- + "R_ARC_GOTPC",
- + "R_ARC_GOT32",
- +};
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/dl-startup.h uClibc/ldso/ldso/arc/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/arc/dl-startup.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/arc/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,89 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +/*
- + * vineetg: Refactoring/cleanup of loader entry point
- + * Removed 6 useless insns
- + * Joern Improved it even further:
- + * -better insn scheduling
- + * -no need for conditional code for _dl_skip_args
- + * -use of assembler .&2 expressions vs. @gotpc refs (avoids need for GP)
- + *
- + * What this code does:
- + * -ldso starts execution here when kernel returns from execve()
- + * -calls into generic ldso entry point _dl_start( )
- + * -optionally adjusts argc for executable if exec passed as cmd
- + * -calls into app main with address of finaliser
- + */
- +__asm__(
- + ".section .text \n"
- + ".align 4 \n"
- + ".global _start \n"
- + ".hidden _start \n"
- + ".type _start,@function \n"
- +
- + "_start: \n"
- + " ; ldso entry point, returns app entry point \n"
- + " bl.d _dl_start \n"
- + " mov_s r0, sp ; pass ptr to aux vector tbl \n"
- +
- + " ; If ldso ran as cmd with executable file nm as arg \n"
- + " ; skip the extra args calc by dl_start() \n"
- + " ld_s r1, [sp] ; orig argc from aux-vec Tbl \n"
- +#ifdef STAR_9000535888_FIXED
- + " ld r12, [pcl, _dl_skip_args-.+(.&2)] \n"
- +#else
- + " add r12, pcl, _dl_skip_args-.+(.&2) \n"
- + " ld r12, [r12] \n"
- +#endif
- +
- + " add r2, pcl, _dl_fini-.+(.&2) ; finalizer \n"
- +
- + " add2 sp, sp, r12 ; discard argv entries from stack\n"
- + " sub_s r1, r1, r12 ; adjusted argc, on stack \n"
- + " st_s r1, [sp] \n"
- +
- + " j_s.d [r0] ; app entry point \n"
- + " mov_s r0, r2 ; ptr to finalizer _dl_fini \n"
- +
- + ".size _start,.-_start \n"
- + ".previous \n"
- +);
- +
- +/*
- + * Get a pointer to the argv array. On many platforms this can be just
- + * the address if the first argument, on other platforms we need to
- + * do something a little more subtle here.
- + */
- +#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long*) ARGS + 1)
- +
- +/*
- + * Dynamic loader bootstrapping:
- + * Since we don't modify text at runtime, these can only be data relos
- + * (so safe to assume that they are word aligned).
- + * And also they HAVE to be RELATIVE relos only
- + * @RELP is the relo entry being processed
- + * @REL is the pointer to the address we are relocating.
- + * @SYMBOL is the symbol involved in the relocation
- + * @LOAD is the load address.
- + */
- +
- +#define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \
- +do { \
- + int type = ELF32_R_TYPE((RELP)->r_info); \
- + if (likely(type == R_ARC_RELATIVE)) \
- + *REL += (unsigned long) LOAD; \
- + else \
- + _dl_exit(1); \
- +}while(0)
- +
- +/*
- + * This will go away once we have DT_RELACOUNT
- + */
- +#define ARCH_NEEDS_BOOTSTRAP_RELOCS
- +
- +/* we dont need to spit out argc, argv etc for debugging */
- +#define NO_EARLY_SEND_STDERR 1
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/dl-syscalls.h uClibc/ldso/ldso/arc/dl-syscalls.h
- --- uClibc-0.9.33.2/ldso/ldso/arc/dl-syscalls.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/arc/dl-syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,7 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +/* stub for arch-specific syscall issues */
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/dl-sysdep.h uClibc/ldso/ldso/arc/dl-sysdep.h
- --- uClibc-0.9.33.2/ldso/ldso/arc/dl-sysdep.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/arc/dl-sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,150 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include "elf.h"
- +
- +/*
- + * Define this if the system uses RELOCA.
- + */
- +#define ELF_USES_RELOCA
- +
- +/*
- + * Dynamic Linking ABI for ARCompact ISA
- + *
- + * PLT
- + * --------------------------------
- + * | ld r11, [pcl, off-to-GOT[1] | 0 (20 bytes)
- + * | | 4
- + * plt0 | ld r10, [pcl, off-to-GOT[2] | 8
- + * | | 12
- + * | j [r10] | 16
- + * --------------------------------
- + * | Base address of GOT | 20
- + * --------------------------------
- + * | ld r12, [pcl, off-to-GOT[3] | 24 (12 bytes each)
- + * plt1 | |
- + * | j_s.d [r12] | 32
- + * | mov_s r12, pcl | 34
- + * --------------------------------
- + * | | 36
- + * ~ ~
- + * ~ ~
- + * | |
- + * --------------------------------
- + *
- + * GOT
- + * --------------
- + * | [0] |
- + * --------------
- + * | [1] | Module info - setup by ldso
- + * --------------
- + * | [2] | resolver entry point
- + * --------------
- + * | [3] |
- + * | ... | Runtime address for function symbols
- + * | [f] |
- + * --------------
- + * | [f+1] |
- + * | ... | Runtime address for data symbols
- + * | [last] |
- + * --------------
- + */
- +
- +/*
- + * Initialization sequence for a GOT.
- + * Caller elf_resolve() seeds @GOT_BASE from DT_PLTGOT - which essentially is
- + * pointer to first PLT entry. The actual GOT base is 5th word in PLT
- + *
- + */
- +#define INIT_GOT(GOT_BASE,MODULE) \
- +do { \
- + unsigned long *__plt_base = (unsigned long *)GOT_BASE; \
- + GOT_BASE = (unsigned long *)(__plt_base[5] + \
- + (unsigned long)MODULE->loadaddr); \
- + GOT_BASE[1] = (unsigned long) MODULE; \
- + GOT_BASE[2] = (unsigned long) _dl_linux_resolve; \
- +} while(0)
- +
- +/* Here we define the magic numbers that this dynamic loader should accept */
- +#define MAGIC1 EM_ARCOMPACT
- +#undef MAGIC2
- +
- +/* Used for error messages */
- +#define ELF_TARGET "ARC"
- +
- +struct elf_resolve;
- +extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt,
- + unsigned int plt_pc);
- +
- +extern unsigned __udivmodsi4(unsigned, unsigned) attribute_hidden;
- +
- +#define do_rem(result, n, base) ((result) = \
- + \
- + __builtin_constant_p (base) ? (n) % (unsigned) (base) : \
- + __extension__ ({ \
- + register unsigned r1 __asm__ ("r1") = (base); \
- + \
- + __asm__("bl.d @__udivmodsi4` mov r0,%1" \
- + : "=r" (r1) \
- + : "r" (n), "r" (r1) \
- + : "r0", "r2", "r3", "r4", "lp_count", "blink", "cc"); \
- + \
- + r1; \
- + }) \
- +)
- +
- +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
- + PLT entries should not be allowed to define the value.
- + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
- + of the main executable's symbols, as for a COPY reloc. */
- +#define elf_machine_type_class(type) \
- + ((((type) == R_ARC_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
- + | (((type) == R_ARC_COPY) * ELF_RTYPE_CLASS_COPY))
- +
- +/*
- + * Get the runtime address of GOT[0]
- + */
- +static __always_inline Elf32_Addr elf_machine_dynamic(void)
- +{
- + Elf32_Addr dyn;
- +
- + __asm__("ld %0,[pcl,_DYNAMIC@gotpc]\n\t" : "=r" (dyn));
- + return dyn;
- +
- +/*
- + * Another way would have been to simply return GP, which due to some
- + * PIC reference would be automatically setup by gcc in caller
- + * register Elf32_Addr *got __asm__ ("gp"); return *got;
- + */
- +}
- +
- +/* Return the run-time load address of the shared object. */
- +static __always_inline Elf32_Addr elf_machine_load_address(void)
- +{
- + /* To find the loadaddr we subtract the runtime addr of any symbol
- + * say _dl_start from it's build-time addr.
- + */
- + Elf32_Addr addr, tmp;
- + __asm__ (
- + "ld %1, [pcl, _dl_start@gotpc] ;build addr of _dl_start \n"
- + "add %0, pcl, _dl_start-.+(.&2) ;runtime addr of _dl_start \n"
- + "sub %0, %0, %1 ;delta \n"
- + : "=&r" (addr), "=r"(tmp)
- + );
- + return addr;
- +}
- +
- +static __always_inline void
- +elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
- + Elf32_Word relative_count)
- +{
- + Elf32_Rel * rpnt = (void *) rel_addr;
- + --rpnt;
- + do {
- + Elf32_Addr *const reloc_addr = (void *) (load_off + (++rpnt)->r_offset);
- + *reloc_addr += load_off;
- + } while (--relative_count);
- +}
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/elfinterp.c uClibc/ldso/ldso/arc/elfinterp.c
- --- uClibc-0.9.33.2/ldso/ldso/arc/elfinterp.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/arc/elfinterp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,279 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Lots of code copied from ../i386/elfinterp.c, so:
- + * Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
- + * David Engel, Hongjiu Lu and Mitch D'Souza
- + * Copyright (C) 2001-2002, Erik Andersen
- + * All rights reserved.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +#include "ldso.h"
- +
- +#define ARC_PLT_SIZE 12
- +
- +unsigned long
- +_dl_linux_resolver(struct elf_resolve *tpnt, unsigned int plt_pc)
- +{
- + ELF_RELOC *this_reloc, *rel_base;
- + char *strtab, *symname, *new_addr;
- + ElfW(Sym) *symtab;
- + int symtab_index;
- + unsigned int *got_addr;
- + unsigned long plt_base;
- + int plt_idx;
- +
- + /* start of .rela.plt */
- + rel_base = (ELF_RELOC *)(tpnt->dynamic_info[DT_JMPREL]);
- +
- + /* starts of .plt (addr of PLT0) */
- + plt_base = tpnt->dynamic_info[DT_PLTGOT];
- +
- + /*
- + * compute the idx of the yet-unresolved PLT entry in .plt
- + * Same idx will be used to find the relo entry in .rela.plt
- + */
- + plt_idx = (plt_pc - plt_base)/ARC_PLT_SIZE - 2; /* ignoring 2 dummy PLTs */
- +
- + this_reloc = rel_base + plt_idx;
- +
- + symtab_index = ELF_R_SYM(this_reloc->r_info);
- + symtab = (ElfW(Sym) *)(intptr_t) (tpnt->dynamic_info[DT_SYMTAB]);
- + strtab = (char *) (tpnt->dynamic_info[DT_STRTAB]);
- + symname= strtab + symtab[symtab_index].st_name;
- +
- + /* relo-offset to fixup, shd be a .got entry */
- + got_addr = (unsigned int *)(this_reloc->r_offset + tpnt->loadaddr);
- +
- + /* Get the address of the GOT entry */
- + new_addr = _dl_find_hash(symname, &_dl_loaded_modules->symbol_scope, tpnt,
- + ELF_RTYPE_CLASS_PLT, NULL);
- +
- + if (unlikely(!new_addr)) {
- + _dl_dprintf(2, "%s: can't resolve symbol '%s'\n", _dl_progname, symname);
- + _dl_exit(1);
- + }
- +
- +
- +#if defined __SUPPORT_LD_DEBUG__
- + if (_dl_debug_bindings) {
- + _dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
- + if (_dl_debug_detail)
- + _dl_dprintf(_dl_debug_file, "\n\tpatched %x ==> %pc @ %pl\n",
- + *got_addr, new_addr, got_addr);
- + }
- +
- + if (!_dl_debug_nofixups)
- + *got_addr = (unsigned int)new_addr;
- +#else
- + /* Update the .got entry with the runtime address of symbol */
- + *got_addr = (unsigned int)new_addr;
- +#endif
- +
- + /*
- + * Return the new addres, where the asm trampoline will jump to
- + * after re-setting up the orig args
- + */
- + return (unsigned long) new_addr;
- +}
- +
- +
- +static int
- +_dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- + ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
- +{
- + int reloc_type;
- + int symtab_index;
- + char *symname;
- + unsigned long *reloc_addr;
- + unsigned long symbol_addr;
- +#if defined __SUPPORT_LD_DEBUG__
- + unsigned long old_val = 0;
- +#endif
- + struct symbol_ref sym_ref;
- +
- + reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset);
- + reloc_type = ELF_R_TYPE(rpnt->r_info);
- + symtab_index = ELF_R_SYM(rpnt->r_info);
- + symbol_addr = 0;
- +
- + sym_ref.sym = &symtab[symtab_index];
- + sym_ref.tpnt = NULL;
- +
- +#if defined __SUPPORT_LD_DEBUG__
- + if (reloc_addr)
- + old_val = *reloc_addr;
- +#endif
- +
- + if (symtab_index) {
- + symname = strtab + symtab[symtab_index].st_name;
- + symbol_addr = (unsigned long) _dl_find_hash(symname, scope, tpnt,
- + elf_machine_type_class(reloc_type), &sym_ref);
- +
- + /*
- + * We want to allow undefined references to weak symbols,
- + * this might have been intentional. We should not be linking
- + * local symbols here, so all bases should be covered.
- + */
- +
- + if (unlikely(!symbol_addr
- + && ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK)) {
- + /* Non-fatal if called from dlopen, hence different ret code */
- + return 1;
- + }
- + } else if (reloc_type == R_ARC_RELATIVE ) {
- + *reloc_addr += tpnt->loadaddr;
- + goto log_entry;
- + }
- +
- + switch (reloc_type) {
- + case R_ARC_32:
- + *reloc_addr += symbol_addr + rpnt->r_addend;
- + break;
- + case R_ARC_PC32:
- + *reloc_addr += symbol_addr + rpnt->r_addend - (unsigned long) reloc_addr;
- + break;
- + case R_ARC_GLOB_DAT:
- + case R_ARC_JMP_SLOT:
- + *reloc_addr = symbol_addr;
- + break;
- + case R_ARC_COPY:
- + _dl_memcpy((void *) reloc_addr,(void *) symbol_addr,
- + symtab[symtab_index].st_size);
- + break;
- + default:
- + return -1;
- + }
- +
- +log_entry:
- +#if defined __SUPPORT_LD_DEBUG__
- + if (_dl_debug_detail)
- + _dl_dprintf(_dl_debug_file,"\tpatched: %lx ==> %lx @ %pl: addend %x ",
- + old_val, *reloc_addr, reloc_addr, rpnt->r_addend);
- +#endif
- +
- + return 0;
- +}
- +
- +static int
- +_dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- + ELF_RELOC *rpnt)
- +{
- + int reloc_type;
- + unsigned long *reloc_addr;
- +#if defined __SUPPORT_LD_DEBUG__
- + unsigned long old_val;
- +#endif
- +
- + reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset);
- + reloc_type = ELF_R_TYPE(rpnt->r_info);
- +
- +#if defined __SUPPORT_LD_DEBUG__
- + old_val = *reloc_addr;
- +#endif
- +
- + switch (reloc_type) {
- + case R_ARC_JMP_SLOT:
- + *reloc_addr += tpnt->loadaddr;
- + break;
- + default:
- + return -1;
- + }
- +
- +#if defined __SUPPORT_LD_DEBUG__
- + if (_dl_debug_reloc && _dl_debug_detail)
- + _dl_dprintf(_dl_debug_file, "\tpatched: %lx ==> %lx @ %pl\n",
- + old_val, *reloc_addr, reloc_addr);
- +#endif
- +
- + return 0;
- +}
- +
- +#define ___DO_LAZY 1
- +#define ___DO_NOW 2
- +
- +static int _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- + unsigned long rel_addr, unsigned long rel_size, int type)
- +{
- + unsigned int i;
- + char *strtab;
- + ElfW(Sym) *symtab;
- + ELF_RELOC *rpnt;
- + int symtab_index;
- + int res = 0;
- +
- + /* Now parse the relocation information */
- + rpnt = (ELF_RELOC *)(intptr_t) (rel_addr);
- + rel_size = rel_size / sizeof(ELF_RELOC);
- +
- + symtab = (ElfW(Sym) *)(intptr_t) (tpnt->dynamic_info[DT_SYMTAB]);
- + strtab = (char *) (tpnt->dynamic_info[DT_STRTAB]);
- +
- + for (i = 0; i < rel_size; i++, rpnt++) {
- +
- + symtab_index = ELF_R_SYM(rpnt->r_info);
- +
- + debug_sym(symtab,strtab,symtab_index);
- + debug_reloc(symtab,strtab,rpnt);
- +
- + /* constant propagation subsumes the 'if' */
- + if (type == ___DO_LAZY)
- + res = _dl_do_lazy_reloc(tpnt, scope, rpnt);
- + else
- + res = _dl_do_reloc(tpnt, scope, rpnt, symtab, strtab);
- +
- + if (res != 0)
- + break;
- + }
- +
- + if (unlikely(res != 0)) {
- + if (res < 0) {
- + int reloc_type = ELF_R_TYPE(rpnt->r_info);
- +#if defined __SUPPORT_LD_DEBUG__
- + _dl_dprintf(2, "can't handle reloc type %s\n ",
- + _dl_reltypes(reloc_type));
- +#else
- + _dl_dprintf(2, "can't handle reloc type %x\n",
- + reloc_type);
- +#endif
- + _dl_exit(-res);
- + } else {
- + _dl_dprintf(2, "can't resolve symbol\n");
- + /* Fall thru to return res */
- + }
- + }
- +
- + return res;
- +}
- +
- +void
- +_dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
- + unsigned long rel_addr,
- + unsigned long rel_size)
- +{
- + /* This func is called for processing .rela.plt of loaded module(s)
- + * The relo entries handled are JMP_SLOT type for fixing up .got slots
- + * for external function calls.
- + * This function doesn't resolve the slots: that is done lazily at
- + * runtime. The build linker (at least thats what happens for ARC) had
- + * pre-init the .got slots to point to PLT0. All that is done here is
- + * to fix them up to point to load value of PLT0 (as opposed to the
- + * build value).
- + * On ARC, the loadaddr of dyn exec is zero, thus elfaddr == loadaddr
- + * Thus there is no point in adding "0" to values and un-necessarily
- + * stir up the caches and TLB.
- + * For ldso processing busybox binary, this skips over 380 relo entries
- + */
- + if (rpnt->dyn->loadaddr != 0)
- + _dl_parse(rpnt->dyn, NULL, rel_addr, rel_size, ___DO_LAZY);
- +}
- +
- +int
- +_dl_parse_relocation_information(struct dyn_elf *rpnt,
- + struct r_scope_elem *scope,
- + unsigned long rel_addr,
- + unsigned long rel_size)
- +{
- + return _dl_parse(rpnt->dyn, scope, rel_addr, rel_size, ___DO_NOW);
- +}
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/resolve.S uClibc/ldso/ldso/arc/resolve.S
- --- uClibc-0.9.33.2/ldso/ldso/arc/resolve.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/arc/resolve.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,57 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sysdep.h>
- +#include <sys/syscall.h>
- +
- +; Save the registers which resolver could possibly clobber
- +; r0-r9: args to the function - symbol being resolved
- +; r10-r12 are already clobbered by PLTn, PLT0 thus neednot be saved
- +
- +.macro SAVE_CALLER_SAVED
- + push_s r0
- + push_s r1
- + push_s r2
- + push_s r3
- + st.a r4, [sp, -4]
- + st.a r5, [sp, -4]
- + st.a r6, [sp, -4]
- + st.a r7, [sp, -4]
- + st.a r8, [sp, -4]
- + st.a r9, [sp, -4]
- + push_s blink
- +.endm
- +
- +.macro RESTORE_CALLER_SAVED_BUT_R0
- + ld.ab blink,[sp, 4]
- + ld.ab r9, [sp, 4]
- + ld.ab r8, [sp, 4]
- + ld.ab r7, [sp, 4]
- + ld.ab r6, [sp, 4]
- + ld.ab r5, [sp, 4]
- + ld.ab r4, [sp, 4]
- + pop_s r3
- + pop_s r2
- + pop_s r1
- +.endm
- +
- +; Upon entry, PLTn, which led us here, sets up the following regs
- +; r11 = Module info (tpnt pointer as expected by resolver)
- +; r12 = PC of the PLTn itself - needed by resolver to find
- +; corresponding .rela.plt entry
- +
- +ENTRY(_dl_linux_resolve)
- + ; args to func being resolved, which resolver might clobber
- + SAVE_CALLER_SAVED
- +
- + mov_s r1, r12
- + bl.d _dl_linux_resolver
- + mov r0, r11
- +
- + RESTORE_CALLER_SAVED_BUT_R0
- + j_s.d [r0] ; r0 has resolved function addr
- + pop_s r0 ; restore first arg to resolved call
- +END(_dl_linux_resolve)
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/aeabi_read_tp.S uClibc/ldso/ldso/arm/aeabi_read_tp.S
- --- uClibc-0.9.33.2/ldso/ldso/arm/aeabi_read_tp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/arm/aeabi_read_tp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -29,9 +29,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/dl-startup.h uClibc/ldso/ldso/arm/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/arm/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/arm/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,6 +14,7 @@
- " .text\n"
- " .globl _start\n"
- " .type _start,%function\n"
- + " .hidden _start\n"
- "_start:\n"
- " @ at start time, all the args are on the stack\n"
- " mov r0, sp\n"
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/dl-sysdep.h uClibc/ldso/ldso/arm/dl-sysdep.h
- --- uClibc-0.9.33.2/ldso/ldso/arm/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/arm/dl-sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -58,11 +58,6 @@
- struct elf_resolve;
- unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
-
- -/* 4096 bytes alignment */
- -#define PAGE_ALIGN 0xfffff000
- -#define ADDR_ALIGN 0xfff
- -#define OFFS_ALIGN 0x7ffff000
- -
- /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
- TLS variable, so undefined references should not be allowed to
- define the value.
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/elfinterp.c uClibc/ldso/ldso/arm/elfinterp.c
- --- uClibc-0.9.33.2/ldso/ldso/arm/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/arm/elfinterp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -77,9 +77,9 @@
- _dl_exit(1);
- }
- #if defined (__SUPPORT_LD_DEBUG__)
- -#if !defined __SUPPORT_LD_DEBUG_EARLY__
- +# if !defined __SUPPORT_LD_DEBUG_EARLY__
- if ((unsigned long) got_addr < 0x40000000)
- -#endif
- +# endif
- {
- if (_dl_debug_bindings)
- {
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/resolve.S uClibc/ldso/ldso/arm/resolve.S
- --- uClibc-0.9.33.2/ldso/ldso/arm/resolve.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/arm/resolve.S 2014-02-03 12:32:56.000000000 +0100
- @@ -101,7 +101,7 @@
-
- .text
- .align 4 @ 16 byte boundary and there are 32 bytes below (arm case)
- - #if !defined(__thumb__) || defined(__thumb2__)
- +#if 1 /*(!defined(__thumb__) || defined __THUMB_INTERWORK__) || defined(__thumb2__)*/
- .arm
- .globl _dl_linux_resolve
- .type _dl_linux_resolve,%function
- diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/thumb_atomics.S uClibc/ldso/ldso/arm/thumb_atomics.S
- --- uClibc-0.9.33.2/ldso/ldso/arm/thumb_atomics.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/arm/thumb_atomics.S 2014-02-03 12:32:56.000000000 +0100
- @@ -29,9 +29,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/ldso/ldso/avr32/dl-startup.h uClibc/ldso/ldso/avr32/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/avr32/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/avr32/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,6 +12,7 @@
- __asm__(" .text\n"
- " .global _start\n"
- " .type _start,@function\n"
- + " .hidden _start\n"
- "_start:\n"
- /* All arguments are on the stack initially */
- " mov r12, sp\n"
- diff -Nur uClibc-0.9.33.2/ldso/ldso/avr32/dl-sysdep.h uClibc/ldso/ldso/avr32/dl-sysdep.h
- --- uClibc-0.9.33.2/ldso/ldso/avr32/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/avr32/dl-sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -35,8 +35,6 @@
- GOT_BASE[_i] += (unsigned long)MODULE->loadaddr; \
- } while (0)
-
- -#define do_rem(result, n, base) ((result) = (n) % (base))
- -
- /* Here we define the magic numbers that this dynamic loader should accept */
- #define MAGIC1 EM_AVR32
- #undef MAGIC2
- diff -Nur uClibc-0.9.33.2/ldso/ldso/bfin/dl-startup.h uClibc/ldso/ldso/bfin/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/bfin/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/bfin/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Library General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- -License along with uClibc; see the file COPYING.LIB. If not, write to
- -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- -USA. */
- +License along with uClibc; see the file COPYING.LIB. If not, see
- +<http://www.gnu.org/licenses/>. */
-
- /* Any assembly language/system dependent hacks needed to setup
- * boot1.c so it will work as expected and cope with whatever platform
- @@ -40,10 +39,7 @@
- " .text\n"
- " .global __start\n"
- " .type __start,@function\n"
- - /* Build system expects a "_start" for the entry point;
- - provide it as it's free to do so with aliases. */
- - " .set _start, __start\n"
- - " .global _start\n"
- + " .hidden __start\n"
- "__start:\n"
- " call .Lcall\n"
- ".Lcall:\n"
- diff -Nur uClibc-0.9.33.2/ldso/ldso/bfin/dl-syscalls.h uClibc/ldso/ldso/bfin/dl-syscalls.h
- --- uClibc-0.9.33.2/ldso/ldso/bfin/dl-syscalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/bfin/dl-syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Library General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- -License along with uClibc; see the file COPYING.LIB. If not, write to
- -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- -USA. */
- +License along with uClibc; see the file COPYING.LIB. If not, see
- +<http://www.gnu.org/licenses/>. */
-
- #ifdef __NR_sram_alloc
- #define __NR__dl_sram_alloc __NR_sram_alloc
- diff -Nur uClibc-0.9.33.2/ldso/ldso/bfin/elfinterp.c uClibc/ldso/ldso/bfin/elfinterp.c
- --- uClibc-0.9.33.2/ldso/ldso/bfin/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/bfin/elfinterp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -20,9 +20,8 @@
- Library General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- -License along with uClibc; see the file COPYING.LIB. If not, write to
- -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- -USA. */
- +License along with uClibc; see the file COPYING.LIB. If not, see
- +<http://www.gnu.org/licenses/>. */
-
- #include <sys/cdefs.h> /* __attribute_used__ */
-
- diff -Nur uClibc-0.9.33.2/ldso/ldso/bfin/resolve.S uClibc/ldso/ldso/bfin/resolve.S
- --- uClibc-0.9.33.2/ldso/ldso/bfin/resolve.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/bfin/resolve.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Library General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- -License along with uClibc; see the file COPYING.LIB. If not, write to
- -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- -USA. */
- +License along with uClibc; see the file COPYING.LIB. If not, see
- +<http://www.gnu.org/licenses/>. */
-
- /* The function below is tail-called by resolver stubs when a
- lazily-bound function is called. It must preserve all
- diff -Nur uClibc-0.9.33.2/ldso/ldso/c6x/dl-startup.h uClibc/ldso/ldso/c6x/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/c6x/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/c6x/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -6,10 +6,9 @@
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
- -
- #undef DL_START
- #define DL_START(X) \
- -int \
- +static void * __attribute_used__ \
- _dl_start (unsigned placeholder, \
- struct elf32_dsbt_loadmap *dl_boot_progmap, \
- struct elf32_dsbt_loadmap *dl_boot_ldsomap, \
- @@ -34,7 +33,6 @@
- * B4 --> executable loadmap address
- * A6 --> interpreter loadmap address
- * B6 --> dynamic section address
- - * B14 --> our DP setup by kernel
- *
- * NB: DSBT index is always 0 for the executable
- * and 1 for the interpreter
- @@ -42,7 +40,76 @@
-
- __asm__(" .text\n"
- ".globl _start\n"
- + ".hidden _start\n"
- "_start:\n"
- + /* Find interpreter DSBT base in dynamic section */
- + " MV .S2 B6,B2\n"
- + " || ADD .D1X B6,4,A2\n"
- + " LDW .D2T2 *B2++[2],B0\n"
- + " || LDW .D1T1 *A2++[2],A0\n"
- + " MVKL .S2 " __stringify(DT_C6000_DSBT_BASE) ",B7\n"
- + " MVKH .S2 " __stringify(DT_C6000_DSBT_BASE) ",B7\n"
- + " NOP\n"
- + " NOP\n"
- + /*
- + * B0 now holds dynamic tag and A0 holds tag value.
- + * Loop through looking for DSBT base tag
- + */
- + "0:\n"
- + " [B0] CMPEQ .L2 B0,B7,B1\n"
- + " || [!B0] MVK .S2 1,B1\n"
- + " [!B1] BNOP .S1 0b,5\n"
- + " ||[!B1] LDW .D2T2 *B2++[2],B0\n"
- + " ||[!B1] LDW .D1T1 *A2++[2],A0\n"
- + /*
- + * DSBT base in A0 needs to be relocated.
- + * Search through our loadmap to find where it got loaded.
- + *
- + * struct elf32_dsbt_loadmap {
- + * Elf32_Half version;
- + * Elf32_Half nsegs;
- + * struct {
- + * Elf32_Addr addr;
- + * Elf32_Addr p_vaddr;
- + * Elf32_Word p_memsz;
- + * } segments[];
- + * }
- + *
- + */
- + " MV .S1 A6,A1\n"
- + " [!A1] MV .S1X B4,A1\n"
- + " ADD .D1 A1,2,A3\n"
- + " LDHU .D1T2 *A3++[1],B0\n" /* nsegs */
- + " LDW .D1T1 *A3++[1],A10\n" /* addr */
- + " LDW .D1T1 *A3++[1],A11\n" /* p_vaddr */
- + " LDW .D1T1 *A3++[1],A12\n" /* p_memsz */
- + " NOP\n"
- + " NOP\n"
- + /*
- + * Here we have:
- + * B0 -> number of segments to search.
- + * A3 -> pointer to next segment to check
- + * A10 -> segment load address
- + * A11 -> ELF segment virt address
- + * A12 -> ELF segment size
- + */
- + "0:\n"
- + " [!B0] B .S2 0f\n"
- + " SUB .D2 B0,1,B0\n"
- + " CMPLTU .L1 A0,A11,A13\n"
- + " || SUB .S1 A12,1,A12\n"
- + " ADD .D1 A11,A12,A12\n"
- + " CMPGTU .L1 A0,A12,A14\n"
- + " OR .L1 A13,A14,A2\n"
- + " [A2] B .S2 0b\n"
- + " || [!A2] SUB .L1 A0,A11,A0\n"
- + " [B0] LDW .D1T1 *A3++[1],A10\n" /* addr */
- + " || [!A2] ADD .L1 A0,A10,A0\n"
- + " [B0] LDW .D1T1 *A3++[1],A11\n" /* p_vaddr */
- + " [B0] LDW .D1T1 *A3++[1],A12\n" /* p_memsz */
- + " MV .S2X A0,B14\n"
- + " NOP\n"
- + "0:\n"
- " B .S2 _dl_start\n"
- " STW .D2T2 B14, *+B14[1]\n"
- " ADD .D1X B15,8,A8\n"
- diff -Nur uClibc-0.9.33.2/ldso/ldso/c6x/dl-sysdep.h uClibc/ldso/ldso/c6x/dl-sysdep.h
- --- uClibc-0.9.33.2/ldso/ldso/c6x/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/c6x/dl-sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -52,13 +52,13 @@
- struct funcdesc_ht;
- struct elf32_dsbt_loadaddr;
-
- -/* We must force strings used early in the bootstrap into the text
- - segment (const data), such that they are referenced relative to
- - the DP register rather than through the GOT which will not have
- - been relocated when these are used. */
- +/* Current toolchains access constant strings via unrelocated GOT
- + entries. Fortunately, we have enough in place to just call the
- + relocation function early on. */
- #undef SEND_EARLY_STDERR
- #define SEND_EARLY_STDERR(S) \
- - do { static char __s[] = (S); SEND_STDERR (__s); } while (0)
- + do { char *__p = __reloc_pointer((S), dl_boot_ldsomap?:dl_boot_progmap);\
- + SEND_STDERR (__p); } while (0)
-
- #define DL_LOADADDR_TYPE struct elf32_dsbt_loadaddr
-
- @@ -114,7 +114,7 @@
- (__dl_loadaddr_unmap ((LIB)->loadaddr))
-
- #define DL_LOADADDR_BASE(LOADADDR) \
- - ((LOADADDR).map->dsbt_table)
- + ((LOADADDR).map)
-
- #define DL_ADDR_IN_LOADADDR(ADDR, TPNT, TFROM) \
- (! (TFROM) && __dl_addr_in_loadaddr ((void*)(ADDR), (TPNT)->loadaddr))
- @@ -150,18 +150,28 @@
-
-
- /*
- - * Compute the GOT address.
- - * Also setup program and interpreter DSBT table entries.
- + * C6X doesn't really need the GOT here.
- + * The GOT is placed just past the DSBT table, so we could find it by
- + * using the DSBT register + table size found in the dynamic section.
- + *
- + * do { \
- + * unsigned long *ldso_dsbt; \
- + * ElfW(Dyn) *d = dl_boot_ldso_dyn_pointer; \
- + * while (d->d_tag != DT_NULL) { \
- + * if (d->d_tag == DT_C6000_DSBT_SIZE) { \
- + * __asm__ (" MV .S2 B14,%0\n" \
- + * : "=b" (ldso_dsbt)); \
- + * (GOT) = ldso_dsbt + d->d_un.d_val; \
- + * break; \
- + * } \
- + * d++; \
- + * } \
- + * } while(0)
- + *
- + * Instead, just point it to the DSBT table to avoid unused variable warning.
- */
- #define DL_BOOT_COMPUTE_GOT(GOT) \
- - do { \
- - unsigned long *ldso_dsbt, *prog_dsbt; \
- - ldso_dsbt = dl_boot_ldsomap->dsbt_table; \
- - prog_dsbt = dl_boot_progmap->dsbt_table; \
- - ldso_dsbt[0] = prog_dsbt[0] = (unsigned long)prog_dsbt; \
- - ldso_dsbt[1] = prog_dsbt[1] = (unsigned long)ldso_dsbt; \
- - (GOT) = ldso_dsbt + dl_boot_ldsomap->dsbt_size; \
- - } while(0)
- + __asm__ (" MV .S2 B14,%0\n" : "=b" (GOT))
-
- #define DL_BOOT_COMPUTE_DYN(dpnt, got, load_addr) \
- ((dpnt) = dl_boot_ldso_dyn_pointer)
- @@ -186,12 +196,9 @@
- # undef __USE_GNU
- #endif
-
- -static __always_inline Elf32_Addr
- -elf_machine_load_address (void)
- -{
- - /* this is never an issue on DSBT systems */
- - return 0;
- -}
- +/* we need this for __LDSO_STANDALONE_SUPPORT__ */
- +#define elf_machine_load_address() \
- + (dl_boot_ldsomap ?: dl_boot_progmap)->segs[0].addr
-
- static __always_inline void
- elf_machine_relative (DL_LOADADDR_TYPE load_off, const Elf32_Addr rel_addr,
- diff -Nur uClibc-0.9.33.2/ldso/ldso/c6x/elfinterp.c uClibc/ldso/ldso/c6x/elfinterp.c
- --- uClibc-0.9.33.2/ldso/ldso/c6x/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/c6x/elfinterp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -69,14 +69,12 @@
- got_addr = (char **) DL_RELOC_ADDR(tpnt->loadaddr, this_reloc->r_offset);
-
- /* Get the address to be used to fill in the GOT entry. */
- - new_addr = _dl_find_hash(symname, tpnt->symbol_scope, tpnt,
- - ELF_RTYPE_CLASS_PLT, NULL);
- + new_addr = _dl_find_hash(symname, &_dl_loaded_modules->symbol_scope, tpnt, ELF_RTYPE_CLASS_PLT, NULL);
- if (unlikely(!new_addr)) {
- _dl_dprintf(2, "%s: can't resolve symbol '%s' in lib '%s'.\n", _dl_progname, symname, tpnt->libname);
- _dl_exit(1);
- }
-
- -
- #if defined (__SUPPORT_LD_DEBUG__)
- if (_dl_debug_bindings) {
- _dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
- @@ -96,9 +94,9 @@
- }
-
- static int
- -_dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
- +_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- unsigned long rel_addr, unsigned long rel_size,
- - int (*reloc_fnc) (struct elf_resolve *tpnt, struct dyn_elf *scope,
- + int (*reloc_fnc) (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
- {
- unsigned int i;
- @@ -148,7 +146,7 @@
- }
-
- static int
- -_dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
- +_dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
- ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
- {
- int reloc_type;
- @@ -157,7 +155,9 @@
- unsigned long *reloc_addr;
- unsigned long symbol_addr, sym_val;
- long reloc_addend;
- - unsigned long old_val, new_val;
- + unsigned long old_val, new_val = 0;
- + struct symbol_ref sym_ref;
- + struct elf_resolve *symbol_tpnt;
-
- reloc_addr = (unsigned long *)(intptr_t)
- DL_RELOC_ADDR (tpnt->loadaddr, rpnt->r_offset);
- @@ -167,14 +167,17 @@
- symtab_index = ELF_R_SYM(rpnt->r_info);
- symbol_addr = 0;
- symname = strtab + symtab[symtab_index].st_name;
- + sym_ref.sym = &symtab[symtab_index];
- + sym_ref.tpnt = NULL;
-
- if (ELF_ST_BIND (symtab[symtab_index].st_info) == STB_LOCAL) {
- symbol_addr = (unsigned long)
- DL_RELOC_ADDR (tpnt->loadaddr, symtab[symtab_index].st_value);
- + symbol_tpnt = tpnt;
- } else {
- - symbol_addr = (unsigned long) _dl_find_hash(strtab + symtab[symtab_index].st_name,
- - scope, tpnt, elf_machine_type_class(reloc_type),
- - NULL);
- + symbol_addr = (unsigned long) _dl_find_hash(symname,
- + scope, NULL, elf_machine_type_class(reloc_type),
- + &sym_ref);
- /*
- * We want to allow undefined references to weak symbols - this might
- * have been intentional. We should not be linking local symbols
- @@ -186,6 +189,7 @@
- _dl_progname, strtab + symtab[symtab_index].st_name);
- _dl_exit (1);
- }
- + symbol_tpnt = sym_ref.tpnt;
- }
- old_val = *reloc_addr;
- sym_val = symbol_addr + reloc_addend;
- @@ -199,7 +203,7 @@
- *reloc_addr = sym_val;
- break;
- case R_C6000_DSBT_INDEX:
- - new_val = (old_val & ~0x007fff00) | ((tpnt->loadaddr.map->dsbt_index & 0x7fff) << 8);
- + new_val = (old_val & ~0x007fff00) | ((symbol_tpnt->dsbt_index & 0x7fff) << 8);
- *reloc_addr = new_val;
- break;
- case R_C6000_ABS_L16:
- @@ -242,7 +246,7 @@
-
- static int
- _dl_do_lazy_reloc (struct elf_resolve *tpnt,
- - struct dyn_elf *scope attribute_unused,
- + struct r_scope_elem *scope attribute_unused,
- ELF_RELOC *rpnt, ElfW(Sym) *symtab attribute_unused,
- char *strtab attribute_unused)
- {
- @@ -283,9 +287,9 @@
-
- int
- _dl_parse_relocation_information
- -(struct dyn_elf *rpnt, unsigned long rel_addr, unsigned long rel_size)
- +(struct dyn_elf *rpnt, struct r_scope_elem *scope, unsigned long rel_addr, unsigned long rel_size)
- {
- - return _dl_parse(rpnt->dyn, rpnt->dyn->symbol_scope, rel_addr, rel_size, _dl_do_reloc);
- + return _dl_parse(rpnt->dyn, scope, rel_addr, rel_size, _dl_do_reloc);
- }
-
- /* We don't have copy relocs. */
- diff -Nur uClibc-0.9.33.2/ldso/ldso/cris/dl-startup.h uClibc/ldso/ldso/cris/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/cris/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/cris/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,7 @@
- " .text\n" \
- " .globl _start\n" \
- " .type _start,@function\n" \
- +" .hidden _start\n" \
- "_start:\n" \
- " move.d $sp,$r10\n" \
- " lapc _dl_start,$r9\n" \
- @@ -28,6 +29,7 @@
- " .text\n" \
- " .globl _start\n" \
- " .type _start,@function\n" \
- +" .hidden _start\n" \
- "_start:\n" \
- " move.d $sp,$r10\n" \
- " move.d $pc,$r9\n" \
- diff -Nur uClibc-0.9.33.2/ldso/ldso/dl-elf.c uClibc/ldso/ldso/dl-elf.c
- --- uClibc-0.9.33.2/ldso/ldso/dl-elf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/dl-elf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -174,8 +174,11 @@
- _dl_strcpy(mylibname, "."); /* Assume current dir if empty path */
- _dl_strcat(mylibname, "/");
- _dl_strcat(mylibname, name);
- - if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
- - return tpnt;
- +#ifdef __LDSO_SAFE_RUNPATH__
- + if (*mylibname == '/')
- +#endif
- + if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
- + return tpnt;
- path_n = path+1;
- }
- path++;
- @@ -500,7 +503,7 @@
- return NULL;
- }
- header = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE,
- - MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0);
- + MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0);
- if (_dl_mmap_check_error(header)) {
- _dl_dprintf(2, "%s:%i: can't map '%s'\n", _dl_progname, __LINE__, libname);
- _dl_internal_error_number = LD_ERROR_MMAP_FAILED;
- @@ -739,7 +742,7 @@
- }
- }
- #else
- - _dl_dprintf(_dl_debug_file, "Can't modify %s's text section."
- + _dl_dprintf(2, "Can't modify %s's text section."
- " Use GCC option -fPIC for shared objects, please.\n",
- libname);
- _dl_exit(1);
- @@ -791,7 +794,7 @@
- #endif
- {
- # ifdef __SUPPORT_LD_DEBUG_EARLY__
- - unsigned int tmp = (unsigned int) tpnt->l_tls_initimage;
- + char *tmp = (char *) tpnt->l_tls_initimage;
- tpnt->l_tls_initimage = (char *) tlsppnt->p_vaddr + tpnt->loadaddr;
- _dl_debug_early("Relocated TLS initial image from %x to %x (size = %x)\n", tmp, tpnt->l_tls_initimage, tpnt->l_tls_initimage_size);
- tmp = 0;
- @@ -851,10 +854,15 @@
- /* Handle DSBT initialization */
- {
- struct elf_resolve *t, *ref;
- - int idx = tpnt->loadaddr.map->dsbt_index;
- - unsigned *dsbt = tpnt->loadaddr.map->dsbt_table;
- + int idx = tpnt->dsbt_index;
- + void **dsbt = tpnt->dsbt_table;
-
- - if (idx == 0) {
- + /*
- + * It is okay (required actually) to have zero idx for an executable.
- + * This is the case when running ldso standalone and the program
- + * is being mapped in via _dl_load_shared_library().
- + */
- + if (idx == 0 && tpnt->libtype != elf_executable) {
- if (!dynamic_info[DT_TEXTREL]) {
- /* This DSO has not been assigned an index. */
- _dl_dprintf(2, "%s: '%s' is missing a dsbt index assignment!\n",
- @@ -869,9 +877,9 @@
- break;
- }
- }
- - idx = tpnt->loadaddr.map->dsbt_size;
- + idx = tpnt->dsbt_size;
- while (idx-- > 0)
- - if (!ref || ref->loadaddr.map->dsbt_table[idx] == NULL)
- + if (!ref || ref->dsbt_table[idx] == NULL)
- break;
- if (idx <= 0) {
- _dl_dprintf(2, "%s: '%s' caused DSBT table overflow!\n",
- @@ -880,43 +888,36 @@
- }
- _dl_if_debug_dprint("\n\tfile='%s'; assigned index %d\n",
- libname, idx);
- - tpnt->loadaddr.map->dsbt_index = idx;
- + tpnt->dsbt_index = idx;
- + }
-
- + /* make sure index is not already used */
- + if (_dl_ldso_dsbt[idx]) {
- + struct elf_resolve *dup;
- + const char *dup_name;
- +
- + for (dup = _dl_loaded_modules; dup; dup = dup->next)
- + if (dup != tpnt && dup->dsbt_index == idx)
- + break;
- + if (dup)
- + dup_name = dup->libname;
- + else if (idx == 1)
- + dup_name = "runtime linker";
- + else
- + dup_name = "unknown library";
- + _dl_dprintf(2, "%s: '%s' dsbt index %d already used by %s!\n",
- + _dl_progname, libname, idx, dup_name);
- + _dl_exit(1);
- }
-
- /*
- * Setup dsbt slot for this module in dsbt of all modules.
- */
- - ref = NULL;
- - for (t = _dl_loaded_modules; t; t = t->next) {
- - /* find a dsbt table from another module */
- - if (ref == NULL && t != tpnt) {
- - ref = t;
- -
- - /* make sure index is not already used */
- - if (t->loadaddr.map->dsbt_table[idx]) {
- - struct elf_resolve *dup;
- - char *dup_name;
- -
- - for (dup = _dl_loaded_modules; dup; dup = dup->next)
- - if (dup != tpnt && dup->loadaddr.map->dsbt_index == idx)
- - break;
- - if (dup)
- - dup_name = dup->libname;
- - else if (idx == 1)
- - dup_name = "runtime linker";
- - else
- - dup_name = "unknown library";
- - _dl_dprintf(2, "%s: '%s' dsbt index %d already used by %s!\n",
- - _dl_progname, libname, idx, dup_name);
- - _dl_exit(1);
- - }
- - }
- - t->loadaddr.map->dsbt_table[idx] = (unsigned)dsbt;
- - }
- - if (ref)
- - _dl_memcpy(dsbt, ref->loadaddr.map->dsbt_table,
- - tpnt->loadaddr.map->dsbt_size * sizeof(unsigned *));
- + for (t = _dl_loaded_modules; t; t = t->next)
- + t->dsbt_table[idx] = dsbt;
- + _dl_ldso_dsbt[idx] = dsbt;
- + _dl_memcpy(dsbt, _dl_ldso_dsbt,
- + tpnt->dsbt_size * sizeof(tpnt->dsbt_table[0]));
- }
- #endif
- _dl_if_debug_dprint("\n\tfile='%s'; generating link map\n", libname);
- @@ -1006,6 +1007,7 @@
- return goof;
- }
-
- +#ifdef IS_IN_rtld
- /* Minimal printf which handles only %s, %d, and %x */
- void _dl_dprintf(int fd, const char *fmt, ...)
- {
- @@ -1071,7 +1073,7 @@
- break;
- }
- case 'x':
- - case 'X':
- + case 'p':
- {
- char tmp[22];
- #if __WORDSIZE > 32
- @@ -1108,6 +1110,7 @@
- _dl_strcpy(retval, string);
- return retval;
- }
- +#endif
-
- unsigned int _dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[],
- void *debug_addr, DL_LOADADDR_TYPE load_off)
- diff -Nur uClibc-0.9.33.2/ldso/ldso/dl-hash.c uClibc/ldso/ldso/dl-hash.c
- --- uClibc-0.9.33.2/ldso/ldso/dl-hash.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/dl-hash.c 2014-02-03 12:32:56.000000000 +0100
- @@ -115,6 +115,15 @@
- tpnt->dynamic_addr = (ElfW(Dyn) *)dynamic_addr;
- tpnt->libtype = loaded_file;
-
- +#ifdef __DSBT__
- + if (dynamic_info[DT_DSBT_BASE_IDX] != 0)
- + tpnt->dsbt_table = (void *)dynamic_info[DT_DSBT_BASE_IDX];
- + if (dynamic_info[DT_DSBT_SIZE_IDX] != 0)
- + tpnt->dsbt_size = dynamic_info[DT_DSBT_SIZE_IDX];
- + if (dynamic_info[DT_DSBT_INDEX_IDX] != 0)
- + tpnt->dsbt_index = dynamic_info[DT_DSBT_INDEX_IDX];
- +#endif /* __DSBT__ */
- +
- #ifdef __LDSO_GNU_HASH_SUPPORT__
- if (dynamic_info[DT_GNU_HASH_IDX] != 0) {
- Elf32_Word *hash32 = (Elf_Symndx*)dynamic_info[DT_GNU_HASH_IDX];
- @@ -355,7 +364,6 @@
- #if defined(USE_TLS) && USE_TLS
- if (ELF_ST_TYPE(sym->st_info) == STT_TLS) {
- _dl_assert(sym_ref != NULL);
- - sym_ref->tpnt = tpnt;
- return (char *)sym->st_value;
- }
- #endif
- diff -Nur uClibc-0.9.33.2/ldso/ldso/dl-tls.c uClibc/ldso/ldso/dl-tls.c
- --- uClibc-0.9.33.2/ldso/ldso/dl-tls.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/dl-tls.c 2014-02-03 12:32:56.000000000 +0100
- @@ -922,8 +922,7 @@
- generation. */
- ++_dl_tls_generation;
-
- - _dl_dprintf (_dl_debug_file,
- - "cannot create TLS data structures: ABORT\n");
- + _dl_dprintf(2, "cannot create TLS data structures: ABORT\n");
- _dl_exit (127);
- }
-
- diff -Nur uClibc-0.9.33.2/ldso/ldso/i386/dl-startup.h uClibc/ldso/ldso/i386/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/i386/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/i386/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -7,6 +7,7 @@
- " .text\n"
- " .globl _start\n"
- " .type _start,@function\n"
- + " .hidden _start\n"
- "_start:\n"
- " call _dl_start\n"
- " # Save the user entry point address in %edi.\n"
- diff -Nur uClibc-0.9.33.2/ldso/ldso/ldso.c uClibc/ldso/ldso/ldso.c
- --- uClibc-0.9.33.2/ldso/ldso/ldso.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/ldso.c 2014-02-03 12:32:56.000000000 +0100
- @@ -64,7 +64,7 @@
- bool _dl_verbose = true; /* On by default */
- bool prelinked = false;
- #endif
- -static int _dl_secure = 1; /* Are we dealing with setuid stuff? */
- +int _dl_secure = 1; /* Are we dealing with setuid stuff? */
-
- #ifdef __SUPPORT_LD_DEBUG__
- char *_dl_debug = NULL;
- @@ -77,17 +77,11 @@
- int _dl_debug_file = 2;
- #endif
-
- -#if defined (__LDSO_STANDALONE_SUPPORT__) && defined (__sh__)
- -/* Not hidden, needed for standalone execution. */
- -/*
- - * FIXME: align dl_start for SH to other archs so that we can keep this symbol
- - * hidden and we don't need to handle in __uClibc_main
- - */
- +#ifdef __DSBT__
- +void **_dl_ldso_dsbt = NULL;
- +#endif
-
- -unsigned long _dl_skip_args = 0;
- -#else
- unsigned long attribute_hidden _dl_skip_args = 0;
- -#endif
-
- const char *_dl_progname = UCLIBC_LDSO; /* The name of the executable being run */
- #include "dl-startup.c"
- @@ -245,9 +239,9 @@
-
- _dl_debug_early("mmapping more memory\n");
- _dl_mmap_zero = _dl_malloc_addr = _dl_mmap((void *) 0, rounded_size,
- - PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0);
- + PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0);
- if (_dl_mmap_check_error(_dl_mmap_zero)) {
- - _dl_dprintf(_dl_debug_file, "%s: mmap of a spare page failed!\n", _dl_progname);
- + _dl_dprintf(2, "%s: mmap of a spare page failed!\n", _dl_progname);
- _dl_exit(20);
- }
- }
- @@ -464,9 +458,14 @@
- _dl_progname = argv[0];
- }
-
- +#ifdef __DSBT__
- + _dl_ldso_dsbt = (void *)tpnt->dynamic_info[DT_DSBT_BASE_IDX];
- + _dl_ldso_dsbt[tpnt->dynamic_info[DT_DSBT_INDEX_IDX]] = _dl_ldso_dsbt;
- +#endif
- +
- #ifndef __LDSO_STANDALONE_SUPPORT__
- if (_start == (void *) auxvt[AT_ENTRY].a_un.a_val) {
- - _dl_dprintf(_dl_debug_file, "Standalone execution is not enabled\n");
- + _dl_dprintf(2, "Standalone execution is not enabled\n");
- _dl_exit(1);
- }
- #endif
- @@ -504,15 +503,15 @@
- const char *nextp;
- _dl_secure = 1;
-
- +#ifdef __LDSO_PRELOAD_ENV_SUPPORT__
- + _dl_preload = _dl_getenv("LD_PRELOAD", envp);
- +#endif
- nextp = unsecure_envvars;
- do {
- _dl_unsetenv (nextp, envp);
- /* We could use rawmemchr but this need not be fast. */
- nextp = _dl_strchr(nextp, '\0') + 1;
- } while (*nextp != '\0');
- -#ifdef __LDSO_PRELOAD_ENV_SUPPORT__
- - _dl_preload = NULL;
- -#endif
- #ifdef __LDSO_LD_LIBRARY_PATH__
- _dl_library_path = NULL;
- #endif
- @@ -580,7 +579,7 @@
- */
- app_tpnt = _dl_load_elf_shared_library(_dl_secure, &rpnt, _dl_progname);
- if (!app_tpnt) {
- - _dl_dprintf(_dl_debug_file, "can't load '%s'\n", _dl_progname);
- + _dl_dprintf(2, "can't load '%s'\n", _dl_progname);
- _dl_exit(16);
- }
- /*
- @@ -675,7 +674,7 @@
- }
- #else
- if (app_tpnt->dynamic_info[DT_TEXTREL]) {
- - _dl_dprintf(_dl_debug_file, "Can't modify application's text section; use the GCC option -fPIE for position-independent executables.\n");
- + _dl_dprintf(2, "Can't modify application's text section; use the GCC option -fPIE for position-independent executables.\n");
- _dl_exit(1);
- }
- #endif
- @@ -698,6 +697,11 @@
- app_tpnt->mapaddr = app_mapaddr;
- app_tpnt->rtld_flags = unlazy | RTLD_GLOBAL;
- app_tpnt->usage_count++;
- +#ifdef __DSBT__
- + _dl_ldso_dsbt[0] = app_tpnt->dsbt_table;
- + _dl_memcpy(app_tpnt->dsbt_table, _dl_ldso_dsbt,
- + app_tpnt->dsbt_size * sizeof(tpnt->dsbt_table[0]));
- +#endif
- lpnt = (unsigned long *) (app_tpnt->dynamic_info[DT_PLTGOT]);
- #ifdef ALLOW_ZERO_PLTGOT
- if (lpnt)
- @@ -733,7 +737,7 @@
- _dl_debug_early("Found TLS header for application program\n");
- break;
- #else
- - _dl_dprintf(_dl_debug_file, "Program uses unsupported TLS data!\n");
- + _dl_dprintf(2, "Program uses unsupported TLS data!\n");
- _dl_exit(1);
- #endif
- }
- @@ -747,7 +751,8 @@
- * case the executable is actually an ET_DYN object.
- */
- if (app_tpnt->l_tls_initimage != NULL) {
- - unsigned int tmp = (unsigned int) app_tpnt->l_tls_initimage;
- + char *tmp attribute_unused =
- + (char *) app_tpnt->l_tls_initimage;
- app_tpnt->l_tls_initimage =
- (char *) app_tpnt->l_tls_initimage + app_tpnt->loadaddr;
- _dl_debug_early("Relocated TLS initial image from %x to %x (size = %x)\n",
- @@ -823,7 +828,7 @@
-
- #ifndef __LDSO_LDD_SUPPORT__
- if (trace_loaded_objects) {
- - _dl_dprintf(_dl_debug_file, "Use the ldd provided by uClibc\n");
- + _dl_dprintf(2, "Use the ldd provided by uClibc\n");
- _dl_exit(1);
- }
- #endif
- @@ -879,8 +884,9 @@
- else
- #endif
- {
- - _dl_dprintf(_dl_debug_file, "%s: can't load " "library '%s'\n", _dl_progname, str);
- - _dl_exit(15);
- + _dl_dprintf(2, "%s: library '%s' "
- + "from LD_PRELOAD can't be preloaded: ignored.\n",
- + _dl_progname, str);
- }
- } else {
- tpnt1->rtld_flags = unlazy | RTLD_GLOBAL;
- @@ -923,7 +929,7 @@
- }
-
- if ((fd = _dl_open(LDSO_PRELOAD, O_RDONLY, 0)) < 0) {
- - _dl_dprintf(_dl_debug_file, "%s: can't open file '%s'\n",
- + _dl_dprintf(2, "%s: can't open file '%s'\n",
- _dl_progname, LDSO_PRELOAD);
- break;
- }
- @@ -932,7 +938,7 @@
- PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
- _dl_close(fd);
- if (preload == (caddr_t) -1) {
- - _dl_dprintf(_dl_debug_file, "%s:%i: can't map '%s'\n",
- + _dl_dprintf(2, "%s:%i: can't map '%s'\n",
- _dl_progname, __LINE__, LDSO_PRELOAD);
- break;
- }
- @@ -971,7 +977,7 @@
- else
- # endif
- {
- - _dl_dprintf(_dl_debug_file, "%s: can't load library '%s'\n", _dl_progname, cp2);
- + _dl_dprintf(2, "%s: can't load library '%s'\n", _dl_progname, cp2);
- _dl_exit(15);
- }
- } else {
- @@ -1032,7 +1038,7 @@
- } else
- #endif
- {
- - _dl_dprintf(_dl_debug_file, "%s: can't load library '%s'\n", _dl_progname, lpntstr);
- + _dl_dprintf(2, "%s: can't load library '%s'\n", _dl_progname, lpntstr);
- _dl_exit(16);
- }
- }
- diff -Nur uClibc-0.9.33.2/ldso/ldso/m68k/dl-startup.h uClibc/ldso/ldso/m68k/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/m68k/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/m68k/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -19,6 +19,7 @@
- .text\n\
- .globl _start\n\
- .type _start,@function\n\
- + .hidden _start\n\
- _start:\n\
- move.l %sp, -(%sp)\n\
- jbsr _dl_start\n\
- diff -Nur uClibc-0.9.33.2/ldso/ldso/m68k/elfinterp.c uClibc/ldso/ldso/m68k/elfinterp.c
- --- uClibc-0.9.33.2/ldso/ldso/m68k/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/m68k/elfinterp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -241,8 +241,11 @@
- _dl_memcpy ((void *) reloc_addr,
- (void *) symbol_addr,
- sym_ref.sym->st_size);
- - } else
- + }
- +#if defined (__SUPPORT_LD_DEBUG__)
- + else
- _dl_dprintf(_dl_debug_file, "no symbol_addr to copy !?\n");
- +#endif
- break;
-
- default:
- diff -Nur uClibc-0.9.33.2/ldso/ldso/Makefile.in uClibc/ldso/ldso/Makefile.in
- --- uClibc-0.9.33.2/ldso/ldso/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -36,7 +36,7 @@
- else
- LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs
- endif
- -LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,_start -Wl,-z,now -Wl,-Bsymbolic \
- +LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,$(SYMBOL_PREFIX)_start -Wl,-z,now -Wl,-Bsymbolic \
- -Wl,--export-dynamic $(CFLAG_-Wl--sort-common) -Wl,--discard-locals \
- $(CFLAG_-Wl--discard-all) -Wl,--no-undefined
-
- diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/dl-debug.h uClibc/ldso/ldso/metag/dl-debug.h
- --- uClibc-0.9.33.2/ldso/ldso/metag/dl-debug.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/metag/dl-debug.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,33 @@
- +/*
- + * Meta ELF shared library loader support.
- + *
- + * Program to load an elf binary on a linux system, and run it.
- + * References to symbols in sharable libraries can be resolved
- + * by either an ELF sharable library or a linux style of shared
- + * library.
- + *
- + * Copyright (C) 2013, Imagination Technologies Ltd.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +static const char *_dl_reltypes_tab[] = {
- + [0] "R_METAG_HIADDR16", "R_METAG_LOADDR16", "R_METAG_ADDR32",
- + [3] "R_METAG_NONE", "R_METAG_RELBRANCH", "R_METAG_GETSETOFF",
- + [6] "R_METAG_REG32OP1", "R_METAG_REG32OP2", "R_METAG_REG32OP3",
- + [9] "R_METAG_REG16OP1", "R_METAG_REG16OP2", "R_METAG_REG16OP3",
- + [12] "R_METAG_REG32OP4", "R_METAG_HIOG", "R_METAG_LOOG",
- + [30] "R_METAG_GNU_VTINHERIT", "R_METAG_GNU_VTENTRY",
- + [32] "R_METAG_HI16_GOTOFF", "R_METAG_LO16_GOTOFF",
- + [34] "R_METAG_GETSET_GOTOFF", "R_METAG_GETSET_GOT",
- + [36] "R_METAG_HI16_GOTPC", "R_METAG_LO16_GOTPC",
- + [38] "R_METAG_HI16_PLT", "R_METAG_LO16_PLT",
- + [40] "R_METAG_RELBRANCH_PLT", "R_METAG_GOTOFF",
- + [42] "R_METAG_PLT", "R_METAG_COPY", "R_METAG_JMP_SLOT",
- + [45] "R_METAG_RELATIVE", "R_METAG_GLOB_DAT", "R_METAG_TLS_GD",
- + [48] "R_METAG_TLS_LDM", "R_METAG_TLS_LDO_HI16", "R_METAG_TLS_LDO_LO16",
- + [51] "R_METAG_TLS_LDO", "R_METAG_TLS_IE", "R_METAG_TLS_IENONPIC",
- + [54] "R_METAG_TLS_IENONPIC_HI16", "R_METAG_TLS_IENONPIC_LO16",
- + [56] "R_METAG_TLS_TPOFF", "R_METAG_TLS_DTPMOD", "R_METAG_TLS_DTPOFF",
- + [59] "R_METAG_TLS_LE", "R_METAG_TLS_LE_HI16", "R_METAG_TLS_LE_LO16"
- +};
- diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/dl-inlines.h uClibc/ldso/ldso/metag/dl-inlines.h
- --- uClibc-0.9.33.2/ldso/ldso/metag/dl-inlines.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/metag/dl-inlines.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,39 @@
- +/*
- + * Copyright (C) 2013, Imagination Technologies Ltd.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +static __always_inline int
- +__dl_is_special_segment (Elf32_Ehdr *epnt,
- + Elf32_Phdr *ppnt)
- +{
- + if (ppnt->p_type != PT_LOAD &&
- + ppnt->p_type != PT_DYNAMIC)
- + return 0;
- +
- + if (ppnt->p_vaddr >= 0x80000000 &&
- + ppnt->p_vaddr < 0x82060000)
- + return 1;
- +
- + if (ppnt->p_vaddr >= 0xe0200000 &&
- + ppnt->p_vaddr < 0xe0260000)
- + return 1;
- +
- + return 0;
- +}
- +
- +static __always_inline char *
- +__dl_map_segment (Elf32_Ehdr *epnt,
- + Elf32_Phdr *ppnt,
- + int infile,
- + int flags)
- +{
- + char *addr = (char *)ppnt->p_vaddr;
- +
- + if (_DL_PREAD (infile, addr, ppnt->p_filesz, ppnt->p_offset) != ppnt->p_filesz) {
- + return 0;
- + }
- +
- + return addr;
- +}
- diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/dl-startup.h uClibc/ldso/ldso/metag/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/metag/dl-startup.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/metag/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,68 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +/*
- + * This code fixes the stack pointer so that the dynamic linker
- + * can find argc, argv and auxvt (Auxillary Vector Table).
- + */
- +
- +__asm__ (
- +" .text\n"
- +" .global __start\n"
- +" .type __start,@function\n"
- +" .hidden __start\n"
- +"_start:\n"
- +"__start:\n"
- +" MSETL [A0StP++],D0Ar4,D0Ar2\n"
- +" MOV D1Ar1,D0Ar2\n"
- +" CALLR D1RtP,__dl_start\n"
- +" GETL D0Ar2,D1Ar1,[A0StP+#-(1*8)]\n"
- +" GETL D0Ar4,D1Ar3,[A0StP+#-(2*8)]\n"
- +" ADDT A1LbP,CPC1,#HI(__GLOBAL_OFFSET_TABLE__)\n"
- +" ADD A1LbP,A1LbP,#LO(__GLOBAL_OFFSET_TABLE__+4)\n"
- +" ADDT A1LbP,A1LbP,#HI(__dl_fini@GOTOFF)\n"
- +" ADD A1LbP,A1LbP,#LO(__dl_fini@GOTOFF)\n"
- +" MOV D0Ar4, A1LbP\n"
- +" SUB A0StP,A0StP,#(2*8)\n"
- +" MOV PC,D0Re0\n"
- +" .size __start,.-__start\n"
- +" .previous\n"
- +);
- +
- +
- +/*
- + * Get a pointer to the argv array. On many platforms this can be just
- + * the address if the first argument, on other platforms we need to
- + * do something a little more subtle here.
- + */
- +
- +#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long *) ARGS))
- +
- +
- +/* Handle relocation of the symbols in the dynamic loader. */
- +static inline
- +void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
- + unsigned long symbol_addr, unsigned long load_addr, Elf32_Sym *symtab)
- +{
- + switch (ELF32_R_TYPE(rpnt->r_info)) {
- + case R_METAG_GLOB_DAT:
- + case R_METAG_JMP_SLOT:
- + case R_METAG_ADDR32:
- + *reloc_addr = symbol_addr;
- + break;
- + case R_METAG_RELATIVE:
- + *reloc_addr = load_addr + rpnt->r_addend;
- + break;
- + case R_METAG_RELBRANCH:
- + *reloc_addr = symbol_addr + rpnt->r_addend - *reloc_addr - 4;
- + break;
- + case R_METAG_NONE:
- + break;
- + default:
- + _dl_exit(1);
- + break;
- + }
- +}
- diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/dl-syscalls.h uClibc/ldso/ldso/metag/dl-syscalls.h
- --- uClibc-0.9.33.2/ldso/ldso/metag/dl-syscalls.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/metag/dl-syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,6 @@
- +/* stub for arch-specific syscall issues
- + *
- + * Copyright (C) 2013, Imagination Technologies Ltd.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/dl-sysdep.h uClibc/ldso/ldso/metag/dl-sysdep.h
- --- uClibc-0.9.33.2/ldso/ldso/metag/dl-sysdep.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/metag/dl-sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,121 @@
- +/*
- + * Meta can never use Elf32_Rel relocations.
- + *
- + * Copyright (C) 2013, Imagination Technologies Ltd.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#define ELF_USES_RELOCA
- +
- +#include <elf.h>
- +
- +/* Initialization sequence for the GOT. */
- +#define INIT_GOT(GOT_BASE,MODULE) \
- +{ \
- + GOT_BASE[1] = (unsigned long) MODULE; \
- + GOT_BASE[2] = (unsigned long) _dl_linux_resolve; \
- +}
- +
- +/* Maximum unsigned GOT [GS]ETD offset size, ie. 2^(11+2). */
- +#define GOT_REG_OFFSET 0x2000
- +
- +/* Defined some magic numbers that this ld.so should accept. */
- +#define MAGIC1 EM_METAG
- +#undef MAGIC2
- +#define ELF_TARGET "META"
- +
- +/* Need bootstrap relocations */
- +#define ARCH_NEEDS_BOOTSTRAP_RELOCS
- +
- +struct elf_resolve;
- +extern unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry);
- +
- +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
- + TLS variable, so undefined references should not be allowed to
- + define the value.
- +
- + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
- + of the main executable's symbols, as for a COPY reloc. */
- +#define elf_machine_type_class(type) \
- + ((((type) == R_METAG_JMP_SLOT || (type) == R_METAG_TLS_DTPMOD \
- + || (type) == R_METAG_TLS_DTPOFF || (type) == R_METAG_TLS_TPOFF) \
- + * ELF_RTYPE_CLASS_PLT) \
- + | (((type) == R_METAG_COPY) * ELF_RTYPE_CLASS_COPY))
- +
- +static inline Elf32_Addr
- +elf_machine_dynamic(Elf32_Ehdr *header)
- +{
- + Elf32_Addr *got;
- +
- + __asm__ ("MOV %0,A1LbP" : "=r" (got));
- +
- + if (header->e_ident[EI_ABIVERSION] >= 1) {
- + /* GOT register offset was introduced with ABI v1 */
- + got = (Elf32_Addr*)((void*)got - GOT_REG_OFFSET);
- + }
- + return *got;
- +}
- +
- +#define DL_BOOT_COMPUTE_GOT(GOT) \
- + ((GOT) = elf_machine_dynamic(header))
- +
- +static inline Elf32_Addr
- +elf_machine_load_address(void)
- +{
- + Elf32_Addr addr;
- + __asm__ ("MOV D1Ar1,A1LbP\n"
- + "ADDT D1Ar1,D1Ar1,#HI(__dl_start@GOTOFF)\n"
- + "ADD D1Ar1,D1Ar1,#LO(__dl_start@GOTOFF)\n"
- + "ADDT D0Ar2,D0Ar2,#HI(__dl_start_addr@GOTOFF)\n"
- + "ADD D0Ar2,D0Ar2,#LO(__dl_start_addr@GOTOFF)\n"
- + "GETD D0Ar2,[D0Ar2]\n"
- + "SUB %0,D1Ar1,D0Ar2\n"
- + ".section .data\n"
- + "__dl_start_addr: .long __dl_start\n"
- + ".previous\n"
- + : "=d" (addr) : : "D1Ar1", "D0Ar2");
- + return addr;
- +}
- +
- +static inline void
- +elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
- + Elf32_Word relative_count)
- +{
- + Elf32_Rela *rpnt = (void *)rel_addr;
- +
- + --rpnt;
- + do {
- + Elf32_Addr *const reloc_addr =
- + (void *)(load_off + (++rpnt)->r_offset);
- +
- + *reloc_addr = load_off + rpnt->r_addend;
- + } while (--relative_count);
- +}
- +
- +#define DL_MALLOC_ALIGN 8
- +
- +#define HAVE_DL_INLINES_H
- +
- +#define DL_IS_SPECIAL_SEGMENT(EPNT, PPNT) \
- + __dl_is_special_segment(EPNT, PPNT)
- +#define DL_MAP_SEGMENT(EPNT, PPNT, INFILE, FLAGS) \
- + __dl_map_segment (EPNT, PPNT, INFILE, FLAGS)
- +
- +#define DL_CHECK_LIB_TYPE(epnt, piclib, _dl_progname, libname) \
- +do \
- +{ \
- + ElfW(Phdr) *ppnt_; \
- + char *header_ = (char *)epnt; \
- + ppnt_ = (ElfW(Phdr) *)(intptr_t) & header_[epnt->e_phoff]; \
- + if (ppnt_->p_vaddr >= 0x80000000 && \
- + ppnt_->p_vaddr < 0x82060000) \
- + (piclib) = 2; \
- + if (ppnt_->p_vaddr >= 0xe0200000 && \
- + ppnt_->p_vaddr < 0xe0260000) \
- + (piclib) = 2; \
- +} \
- +while (0)
- +
- +#define _DL_PREAD(FD, BUF, SIZE, OFFSET) \
- + (_dl_pread((FD), (BUF), (SIZE), (OFFSET)))
- diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/elfinterp.c uClibc/ldso/ldso/metag/elfinterp.c
- --- uClibc-0.9.33.2/ldso/ldso/metag/elfinterp.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/metag/elfinterp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,318 @@
- +/*
- + * Meta ELF shared library loader support.
- + *
- + * Program to load an elf binary on a linux system, and run it.
- + * References to symbols in sharable libraries can be resolved
- + * by either an ELF sharable library or a linux style of shared
- + * library.
- + *
- + * Copyright (C) 2013, Imagination Technologies Ltd.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include "ldso.h"
- +
- +/* Defined in resolve.S. */
- +extern int _dl_linux_resolve(void);
- +
- +static inline unsigned long __get_unaligned_reloc(unsigned long *addr)
- +{
- + char *rel_addr = (char *)addr;
- + unsigned long val;
- +
- + val = *rel_addr++ & 0xff;
- + val |= (*rel_addr++ << 8) & 0x0000ff00;
- + val |= (*rel_addr++ << 16) & 0x00ff0000;
- + val |= (*rel_addr++ << 24) & 0xff000000;
- +
- + return val;
- +}
- +
- +static inline void __put_unaligned_reloc(unsigned long *addr,
- + unsigned long val)
- +{
- + char *rel_addr = (char *)addr;
- +
- + *rel_addr++ = (val & 0x000000ff);
- + *rel_addr++ = ((val & 0x0000ff00) >> 8);
- + *rel_addr++ = ((val & 0x00ff0000) >> 16);
- + *rel_addr++ = ((val & 0xff000000) >> 24);
- +}
- +
- +unsigned long
- +_dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
- +{
- + int symtab_index;
- + char *strtab;
- + char *symname;
- + char *new_addr;
- + char *rel_addr;
- + char **got_addr;
- + ElfW(Sym) *symtab;
- + ELF_RELOC *this_reloc;
- + unsigned long instr_addr;
- +
- + rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
- +
- + this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- + symtab_index = ELF_R_SYM(this_reloc->r_info);
- +
- + symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
- + strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
- + symname = strtab + symtab[symtab_index].st_name;
- +
- + /* Address of the jump instruction to fix up. */
- + instr_addr = ((unsigned long)this_reloc->r_offset +
- + (unsigned long)tpnt->loadaddr);
- + got_addr = (char **)instr_addr;
- +
- + /* Get the address of the GOT entry. */
- + new_addr = _dl_find_hash(symname, &_dl_loaded_modules->symbol_scope, tpnt,
- + ELF_RTYPE_CLASS_PLT, NULL);
- + if (unlikely(!new_addr)) {
- + _dl_dprintf(2, "%s: Can't resolve symbol '%s'\n",
- + _dl_progname, symname);
- + _dl_exit(1);
- + }
- +
- +#if defined (__SUPPORT_LD_DEBUG__)
- + if (_dl_debug_bindings) {
- + _dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
- + if (_dl_debug_detail)
- + _dl_dprintf(_dl_debug_file,
- + "\n\tpatched: %x ==> %x @ %x\n",
- + *got_addr, new_addr, got_addr);
- + }
- + if (!_dl_debug_nofixups) {
- + *got_addr = new_addr;
- + }
- +#else
- + *got_addr = new_addr;
- +#endif
- +
- + return (unsigned long)new_addr;
- +}
- +
- +static int
- +_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- + unsigned long rel_addr, unsigned long rel_size,
- + int (*reloc_fnc)(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- + ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
- +{
- + int symtab_index;
- + unsigned int i;
- + char *strtab;
- + ElfW(Sym) *symtab;
- + ELF_RELOC *rpnt;
- +
- + /* Parse the relocation information. */
- + rpnt = (ELF_RELOC *)(intptr_t)rel_addr;
- + rel_size /= sizeof(ELF_RELOC);
- +
- + symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
- + strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
- +
- + for (i = 0; i < rel_size; i++, rpnt++) {
- + int res;
- +
- + symtab_index = ELF_R_SYM(rpnt->r_info);
- +
- + debug_sym(symtab, strtab, symtab_index);
- + debug_reloc(symtab, strtab, rpnt);
- +
- + /* Pass over to actual relocation function. */
- + res = reloc_fnc(tpnt, scope, rpnt, symtab, strtab);
- +
- + if (res == 0)
- + continue;
- +
- + _dl_dprintf(2, "\n%s: ", _dl_progname);
- +
- + if (symtab_index)
- + _dl_dprintf(2, "symbol '%s': ",
- + strtab + symtab[symtab_index].st_name);
- +
- + if (unlikely(res < 0)) {
- + int reloc_type = ELF_R_TYPE(rpnt->r_info);
- +
- +#if defined (__SUPPORT_LD_DEBUG__)
- + _dl_dprintf(2, "can't handle reloc type %s\n",
- + _dl_reltypes(reloc_type));
- +#else
- + _dl_dprintf(2, "can't handle reloc type %x\n",
- + reloc_type);
- +#endif
- + _dl_exit(-res);
- + } else if (unlikely(res > 0)) {
- + _dl_dprintf(2, "can't resolve symbol\n");
- + return res;
- + }
- + }
- +
- + return 0;
- +}
- +
- +static int
- +_dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- + ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
- +{
- + int reloc_type;
- + int symtab_index;
- + char *symname = NULL;
- + unsigned long *reloc_addr;
- + unsigned long symbol_addr;
- +#if defined (__SUPPORT_LD_DEBUG__)
- + unsigned long old_val = 0;
- +#endif
- + struct elf_resolve *tls_tpnt = NULL;
- + struct symbol_ref sym_ref;
- +
- + reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset);
- + reloc_type = ELF_R_TYPE(rpnt->r_info);
- + symtab_index = ELF_R_SYM(rpnt->r_info);
- + symbol_addr = 0;
- + sym_ref.sym = &symtab[symtab_index];
- + sym_ref.tpnt = NULL;
- +
- + if (symtab_index) {
- + symname = strtab + symtab[symtab_index].st_name;
- + symbol_addr = (unsigned long)_dl_find_hash(symname, scope, tpnt,
- + elf_machine_type_class(reloc_type), &sym_ref);
- +
- + if (!symbol_addr
- + && ELF_ST_TYPE(symtab[symtab_index].st_info) != STT_TLS
- + && ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
- + _dl_dprintf(2, "%s: can't resolve symbol '%s'\n",
- + _dl_progname, symname);
- + return 1;
- + };
- + if (_dl_trace_prelink) {
- + _dl_debug_lookup(symname, tpnt, &symtab[symtab_index],
- + &sym_ref, elf_machine_type_class(reloc_type));
- + }
- + tls_tpnt = sym_ref.tpnt;
- + }
- +
- +#if defined (__SUPPORT_LD_DEBUG__)
- + if (reloc_type != R_METAG_NONE)
- + old_val = __get_unaligned_reloc(reloc_addr);
- +#endif
- +
- +#if defined USE_TLS && USE_TLS
- + /* In case of a TLS reloc, tls_tpnt NULL means we have an 'anonymous'
- + symbol. This is the case for a static tls variable, so the lookup
- + module is just that one is referencing the tls variable. */
- + if (!tls_tpnt)
- + tls_tpnt = tpnt;
- +#endif
- + switch (reloc_type) {
- + case R_METAG_NONE:
- + break;
- + case R_METAG_GLOB_DAT:
- + case R_METAG_JMP_SLOT:
- + case R_METAG_ADDR32:
- + __put_unaligned_reloc(reloc_addr,
- + symbol_addr + rpnt->r_addend);
- + break;
- + case R_METAG_COPY:
- +#if defined (__SUPPORT_LD_DEBUG__)
- + if (_dl_debug_move)
- + _dl_dprintf(_dl_debug_file,
- + "\t%s move %d bytes from %x to %x\n",
- + symname, symtab[symtab_index].st_size,
- + symbol_addr + rpnt->r_addend,
- + reloc_addr);
- +#endif
- +
- + _dl_memcpy((char *)reloc_addr,
- + (char *)symbol_addr + rpnt->r_addend,
- + symtab[symtab_index].st_size);
- + break;
- + case R_METAG_RELATIVE:
- + __put_unaligned_reloc(reloc_addr,
- + (unsigned long)tpnt->loadaddr +
- + rpnt->r_addend);
- + break;
- +#if defined USE_TLS && USE_TLS
- + case R_METAG_TLS_DTPMOD:
- + *reloc_addr = tls_tpnt->l_tls_modid;
- + break;
- + case R_METAG_TLS_DTPOFF:
- + *reloc_addr = symbol_addr;
- + break;
- + case R_METAG_TLS_TPOFF:
- + CHECK_STATIC_TLS ((struct link_map *) tls_tpnt);
- + *reloc_addr = tls_tpnt->l_tls_offset + symbol_addr + rpnt->r_addend;
- + break;
- +#endif
- + default:
- + return -1; /* Calls _dl_exit(1). */
- + }
- +
- +#if defined (__SUPPORT_LD_DEBUG__)
- + if (_dl_debug_reloc && _dl_debug_detail && reloc_type != R_METAG_NONE) {
- + unsigned long new_val = __get_unaligned_reloc(reloc_addr);
- + _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n",
- + old_val, new_val, reloc_addr);
- + }
- +#endif
- +
- + return 0;
- +}
- +
- +static int
- +_dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- + ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
- +{
- + int reloc_type;
- + unsigned long *reloc_addr;
- +#if defined (__SUPPORT_LD_DEBUG__)
- + unsigned long old_val;
- +#endif
- +
- + reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset);
- + reloc_type = ELF_R_TYPE(rpnt->r_info);
- +
- +#if defined (__SUPPORT_LD_DEBUG__)
- + old_val = *reloc_addr;
- +#endif
- +
- + switch (reloc_type) {
- + case R_METAG_NONE:
- + break;
- + case R_METAG_JMP_SLOT:
- + *reloc_addr += (unsigned long)tpnt->loadaddr;
- + break;
- + default:
- + return -1; /* Calls _dl_exit(1). */
- + }
- +
- +#if defined (__SUPPORT_LD_DEBUG__)
- + if (_dl_debug_reloc && _dl_debug_detail)
- + _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n",
- + old_val, *reloc_addr, reloc_addr);
- +#endif
- +
- + return 0;
- +}
- +
- +/* External interface to the generic part of the dynamic linker. */
- +
- +void
- +_dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
- + unsigned long rel_addr,
- + unsigned long rel_size)
- +{
- + _dl_parse(rpnt->dyn, NULL, rel_addr, rel_size, _dl_do_lazy_reloc);
- +}
- +
- +int
- +_dl_parse_relocation_information(struct dyn_elf *rpnt,
- + struct r_scope_elem *scope,
- + unsigned long rel_addr,
- + unsigned long rel_size)
- +{
- + return _dl_parse(rpnt->dyn, scope, rel_addr,
- + rel_size, _dl_do_reloc);
- +}
- diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/metag_load_tp.S uClibc/ldso/ldso/metag/metag_load_tp.S
- --- uClibc-0.9.33.2/ldso/ldso/metag/metag_load_tp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/metag/metag_load_tp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,20 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +#include <features.h>
- +
- +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +
- +#include <sysdep.h>
- +
- + .text
- + .global ___metag_load_tp
- + .type ___metag_load_tp,@function
- +
- +___metag_load_tp:
- + MOVT D1Ar1,#HI(0x6ffff000)
- + JUMP D1Ar1,#LO(0x6ffff000)
- + .size ___metag_load_tp,.-___metag_load_tp
- +
- +#endif /* __UCLIBC_HAS_THREADS_NATIVE__ */
- diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/resolve.S uClibc/ldso/ldso/metag/resolve.S
- --- uClibc-0.9.33.2/ldso/ldso/metag/resolve.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/ldso/ldso/metag/resolve.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,51 @@
- +/*
- + * Meta dynamic resolver
- + *
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + *
- + * This function is _not_ called directly. It is jumped to (so no return
- + * address is on the stack) when attempting to use a symbol that has not yet
- + * been resolved. The first time a jump symbol (such as a function call inside
- + * a shared library) is used (before it gets resolved) it will jump here to
- + * _dl_linux_resolve. When we get called the stack looks like this:
- + * reloc_entry
- + * tpnt
- + *
- + * This function saves all the registers then makes the function call
- + * _dl_linux_resolver(tpnt, reloc_entry). _dl_linux_resolver() figures out
- + * where the jump symbol is _really_ supposed to have jumped to and returns
- + * that to us. Once we have that, we overwrite tpnt with this fixed up
- + * address. We then clean up after ourselves, put all the registers back how we
- + * found them, then we jump to the fixed up address, which is where the jump
- + * symbol that got us here really wanted to jump to in the first place.
- + * -Erik Andersen
- + */
- +
- + .text
- + .global __dl_linux_resolve
- + .type __dl_linux_resolve,@function
- +
- +__dl_linux_resolve:
- + !! Save registers on the stack. Do we need to save any more here?
- + MSETL [A0StP++],D0Ar6,D0Ar4,D0Ar2,D0FrT
- + SETL [A0StP++],A0FrP,A1LbP
- + !! Get the args for _dl_linux_resolver off the stack
- + GETL D0Re0,D1Re0,[A0StP+#-(6*8)]
- + GETD D1Ar1,[D0Re0]
- + MOV D0Ar2,D1Re0
- + !! Multiply plt_index by sizeof(Elf32_Rela)
- + MULW D0Ar2,D0Ar2,#12
- + !! Call the resolver
- + CALLR D1RtP,__dl_linux_resolver
- + !! Restore the registers from the stack
- + SUB A0.2,A0StP,#(1*8)
- + GETL A0FrP,A1LbP,[A0.2]
- + SUB A0.2,A0.2,#(4*8)
- + MGETL D0Ar6,D0Ar4,D0Ar2,D0FrT,[A0.2]
- + !! Also take into account args pushed by PLT
- + SUB A0StP,A0StP,#(6*8)
- + !! Jump to the resolved address
- + MOV PC,D0Re0
- + .size __dl_linux_resolve, .-__dl_linux_resolve
- diff -Nur uClibc-0.9.33.2/ldso/ldso/microblaze/dl-startup.h uClibc/ldso/ldso/microblaze/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/microblaze/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/microblaze/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,14 +12,14 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- __asm__ ("\
- .text\n\
- .globl _start\n\
- .type _start,@function\n\
- + .hidden _start\n\
- _start:\n\
- addk r5,r0,r1\n\
- addk r3,r0,r0\n\
- diff -Nur uClibc-0.9.33.2/ldso/ldso/microblaze/dl-sysdep.h uClibc/ldso/ldso/microblaze/dl-sysdep.h
- --- uClibc-0.9.33.2/ldso/ldso/microblaze/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/microblaze/dl-sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Use reloca */
- #define ELF_USES_RELOCA
- diff -Nur uClibc-0.9.33.2/ldso/ldso/microblaze/resolve.S uClibc/ldso/ldso/microblaze/resolve.S
- --- uClibc-0.9.33.2/ldso/ldso/microblaze/resolve.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/microblaze/resolve.S 2014-02-03 12:32:56.000000000 +0100
- @@ -18,9 +18,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- .text
- .align 4
- diff -Nur uClibc-0.9.33.2/ldso/ldso/mips/dl-startup.h uClibc/ldso/ldso/mips/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/mips/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/mips/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,6 +12,7 @@
- " .globl _start\n"
- " .ent _start\n"
- " .type _start,@function\n"
- + " .hidden _start\n"
- "_start:\n"
- " .set noreorder\n"
- " move $25, $31\n"
- diff -Nur uClibc-0.9.33.2/ldso/ldso/mips/elfinterp.c uClibc/ldso/ldso/mips/elfinterp.c
- --- uClibc-0.9.33.2/ldso/ldso/mips/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/mips/elfinterp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -259,11 +259,11 @@
- case R_MIPS_TLS_TPREL32:
- case R_MIPS_TLS_TPREL64:
- CHECK_STATIC_TLS((struct link_map *)tls_tpnt);
- - *(ElfW(Word) *)reloc_addr +=
- + *(ElfW(Addr) *)reloc_addr +=
- TLS_TPREL_VALUE (tls_tpnt, symbol_addr);
- #ifdef __SUPPORT_LD_DEBUG__
- _dl_dprintf(2, "TLS_TPREL : %s, %x, %x\n",
- - symname, old_val, *((unsigned int *)reloc_addr));
- + symname, old_val, *((unsigned long *)reloc_addr));
- #endif
- break;
- }
- diff -Nur uClibc-0.9.33.2/ldso/ldso/mips/README uClibc/ldso/ldso/mips/README
- --- uClibc-0.9.33.2/ldso/ldso/mips/README 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/mips/README 2014-02-03 12:32:56.000000000 +0100
- @@ -13,7 +13,7 @@
- elfinterp.c
- -----------
- Contains the runtime resolver code taken from the function
- -'__dl_runtime_resolve' in 'sysdeps/mips/dl-machine.h'. Also
- +'__dl_runtime_resolve' in 'sysdeps/mips/dl-trampoline.h'. Also
- contains the function to perform relocations for objects
- other than the linker itself. The code was taken from the
- function 'elf_machine_rel' in 'sysdeps/mips/dl-machine.h'.
- @@ -47,6 +47,6 @@
- ---------
- Contains the low-level assembly code for the dynamic runtime
- resolver. The code is taken from the assembly code function
- -'_dl_runtime_resolve' in the file 'sysdeps/mips/dl-machine.h'.
- +'_dl_runtime_resolve' in the file 'sysdeps/mips/dl-trampoline.h'.
- The code looks a bit different since we only need to pass the
- symbol index and the old GP register.
- diff -Nur uClibc-0.9.33.2/ldso/ldso/powerpc/dl-startup.h uClibc/ldso/ldso/powerpc/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/powerpc/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/powerpc/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -8,6 +8,7 @@
- " .text\n"
- " .globl _start\n"
- " .type _start,@function\n"
- + " .hidden _start\n"
- "_start:\n"
- " mr 3,1\n" /* Pass SP to _dl_start in r3 */
- " li 0,0\n"
- diff -Nur uClibc-0.9.33.2/ldso/ldso/powerpc/elfinterp.c uClibc/ldso/ldso/powerpc/elfinterp.c
- --- uClibc-0.9.33.2/ldso/ldso/powerpc/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/powerpc/elfinterp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -234,12 +234,12 @@
- case R_PPC_ADDR32:
- case R_PPC_GLOB_DAT:
- *reloc_addr = finaladdr;
- - goto out_nocode; /* No code code modified */
- + goto out_nocode; /* No code modified */
- case R_PPC_JMP_SLOT:
- {
- if (tpnt->dynamic_info[DT_PPC_GOT_IDX] != 0) {
- *reloc_addr = finaladdr;
- - goto out_nocode; /* No code code modified */
- + goto out_nocode; /* No code modified */
- } else {
- Elf32_Sword delta = finaladdr - (Elf32_Word)reloc_addr;
- if (delta<<6>>6 == delta) {
- @@ -275,7 +275,7 @@
- symbol_addr, reloc_addr);
- #endif
- _dl_memcpy((char *) reloc_addr, (char *) finaladdr, sym_ref.sym->st_size);
- - goto out_nocode; /* No code code modified */
- + goto out_nocode; /* No code modified */
- case R_PPC_ADDR16_HA:
- finaladdr += 0x8000; /* fall through. */
- case R_PPC_ADDR16_HI:
- @@ -314,7 +314,7 @@
- return -1;
- #endif
- case R_PPC_NONE:
- - goto out_nocode; /* No code code modified */
- + goto out_nocode; /* No code modified */
- default:
- _dl_dprintf(2, "%s: can't handle reloc type ", _dl_progname);
- #if defined (__SUPPORT_LD_DEBUG__)
- diff -Nur uClibc-0.9.33.2/ldso/ldso/sh/dl-startup.h uClibc/ldso/ldso/sh/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/sh/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/sh/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -6,6 +6,7 @@
- " .text\n"
- " .globl _start\n"
- " .type _start,@function\n"
- + " .hidden _start\n"
- "_start:\n"
- " mov r15, r4\n"
- " mov.l .L_dl_start, r0\n"
- @@ -16,12 +17,22 @@
- " mov.l .L_got, r12 ! Load the GOT on r12\n"
- " mova .L_got, r0\n"
- " add r0, r12\n"
- + " mov.l .L_dl_skip_args,r0\n"
- + " mov.l @(r0,r12),r0\n"
- + " mov.l @r0,r0\n"
- + " mov.l @r15,r5 ! Get the original argument count\n"
- + " sub r0,r5 ! Subtract _dl_skip_args from it\n"
- + " shll2 r0\n"
- + " add r0,r15 ! Adjust the stack pointer to skip _dl_skip_args words\n"
- + " mov.l r5,@r15 ! Store back the modified argument count\n"
- " mov.l .L_dl_fini, r0\n"
- " mov.l @(r0,r12), r4 ! Pass the finalizer in r4\n"
- " jmp @r8\n"
- " nop\n"
- ".L_dl_start:\n"
- " .long _dl_start-.jmp_loc\n"
- + ".L_dl_skip_args:\n"
- + " .long _dl_skip_args@GOT\n"
- ".L_dl_fini:\n"
- " .long _dl_fini@GOT\n"
- ".L_got:\n"
- diff -Nur uClibc-0.9.33.2/ldso/ldso/sh/elfinterp.c uClibc/ldso/ldso/sh/elfinterp.c
- --- uClibc-0.9.33.2/ldso/ldso/sh/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/sh/elfinterp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -160,7 +160,9 @@
- unsigned long old_val;
- #endif
-
- +#if defined USE_TLS && USE_TLS
- struct elf_resolve *tls_tpnt = NULL;
- +#endif
- struct symbol_ref sym_ref;
-
- reloc_addr = (unsigned long *)(intptr_t) (tpnt->loadaddr + (unsigned long) rpnt->r_offset);
- @@ -193,7 +195,9 @@
- _dl_debug_lookup (symname, tpnt, &symtab[symtab_index],
- &sym_ref, elf_machine_type_class(reloc_type));
- }
- +#if defined USE_TLS && USE_TLS
- tls_tpnt = sym_ref.tpnt;
- +#endif
- }
-
- #if defined (__SUPPORT_LD_DEBUG__)
- diff -Nur uClibc-0.9.33.2/ldso/ldso/sh64/dl-startup.h uClibc/ldso/ldso/sh64/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/sh64/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/sh64/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -7,6 +7,7 @@
- " .section .text..SHmedia32,\"ax\"\n" \
- " .globl _start\n" \
- " .type _start, @function\n" \
- +" .hidden _start\n" \
- " .align 5\n" \
- "_start:\n" \
- " ! Set r12 to point to GOT\n" \
- diff -Nur uClibc-0.9.33.2/ldso/ldso/sparc/dl-startup.h uClibc/ldso/ldso/sparc/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/sparc/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/sparc/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -8,6 +8,7 @@
- .text\n\
- .global _start\n\
- .type _start,%function\n\
- + .hidden _start\n\
- .align 32\n\
- .register %g2, #scratch\n\
- _start:\n\
- diff -Nur uClibc-0.9.33.2/ldso/ldso/sparc/elfinterp.c uClibc/ldso/ldso/sparc/elfinterp.c
- --- uClibc-0.9.33.2/ldso/ldso/sparc/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/sparc/elfinterp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -275,8 +275,11 @@
- _dl_memcpy((char *)reloc_addr,
- (char *)symbol_addr,
- sym_ref.sym->st_size);
- - } else
- + }
- +#if defined (__SUPPORT_LD_DEBUG__)
- + else
- _dl_dprintf(_dl_debug_file, "no symbol_addr to copy !?\n");
- +#endif
- break;
- #if defined USE_TLS && USE_TLS
- case R_SPARC_TLS_DTPMOD32:
- diff -Nur uClibc-0.9.33.2/ldso/ldso/x86_64/dl-startup.h uClibc/ldso/ldso/x86_64/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/x86_64/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/x86_64/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,7 @@
- " .text\n"
- " .global _start\n"
- " .type _start,%function\n"
- + " .hidden _start\n"
- "_start:\n"
- " movq %rsp, %rdi\n"
- " call _dl_start\n"
- diff -Nur uClibc-0.9.33.2/ldso/ldso/x86_64/dl-sysdep.h uClibc/ldso/ldso/x86_64/dl-sysdep.h
- --- uClibc-0.9.33.2/ldso/ldso/x86_64/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/x86_64/dl-sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define this if the system uses RELOCA. */
- #define ELF_USES_RELOCA
- diff -Nur uClibc-0.9.33.2/ldso/ldso/xtensa/dl-startup.h uClibc/ldso/ldso/xtensa/dl-startup.h
- --- uClibc-0.9.33.2/ldso/ldso/xtensa/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/xtensa/dl-startup.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,6 +13,7 @@
- " .align 4\n"
- " .global _start\n"
- " .type _start, @function\n"
- + " .hidden _start\n"
- "_start:\n"
- " # Compute load offset in a2: the GOT has not yet been relocated\n"
- " # but the entries for local symbols contain the relative offsets\n"
- diff -Nur uClibc-0.9.33.2/ldso/ldso/xtensa/dl-sysdep.h uClibc/ldso/ldso/xtensa/dl-sysdep.h
- --- uClibc-0.9.33.2/ldso/ldso/xtensa/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/xtensa/dl-sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define this if the system uses RELOCA. */
- #define ELF_USES_RELOCA
- diff -Nur uClibc-0.9.33.2/ldso/ldso/xtensa/resolve.S uClibc/ldso/ldso/xtensa/resolve.S
- --- uClibc-0.9.33.2/ldso/ldso/xtensa/resolve.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/ldso/xtensa/resolve.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define MIN_FRAME_SIZE 32
-
- diff -Nur uClibc-0.9.33.2/ldso/libdl/libdl.c uClibc/ldso/libdl/libdl.c
- --- uClibc-0.9.33.2/ldso/libdl/libdl.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/libdl/libdl.c 2014-02-03 12:32:56.000000000 +0100
- @@ -32,7 +32,7 @@
-
- #include <ldso.h>
- #include <stdio.h>
- -#include <string.h> /* Needed for 'strstr' prototype' */
- +#include <string.h>
- #include <stdbool.h>
- #include <bits/uClibc_mutex.h>
-
- @@ -42,6 +42,7 @@
-
- #if defined(USE_TLS) && USE_TLS
- #include <ldsodefs.h>
- +#include <dl-tls.h>
- extern void _dl_add_to_slotinfo(struct link_map *l);
- #endif
-
- @@ -51,7 +52,6 @@
-
- #ifdef SHARED
- # if defined(USE_TLS) && USE_TLS
- -# include <dl-tls.h>
- extern struct link_map *_dl_update_slotinfo(unsigned long int req_modid);
- # endif
-
- @@ -269,7 +269,7 @@
- #endif
-
- #ifndef __LDSO_NO_CLEANUP__
- -void dl_cleanup(void) __attribute__ ((destructor));
- +void dl_cleanup(void) attribute_hidden __attribute__ ((destructor));
- void dl_cleanup(void)
- {
- struct dyn_elf *h, *n;
- @@ -296,11 +296,10 @@
- return p - list;
- }
-
- -static void *do_dlopen(const char *libname, int flag)
- +static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from)
- {
- struct elf_resolve *tpnt, *tfrom;
- struct dyn_elf *dyn_chain, *rpnt = NULL, *dyn_ptr, *relro_ptr, *handle;
- - ElfW(Addr) from;
- struct elf_resolve *tpnt1;
- void (*dl_brk) (void);
- int now_flag;
- @@ -309,7 +308,9 @@
- struct elf_resolve **init_fini_list;
- static bool _dl_init;
- struct elf_resolve **local_scope;
- +#ifdef SHARED
- struct r_scope_elem *ls;
- +#endif
- #if defined(USE_TLS) && USE_TLS
- bool any_tls = false;
- #endif
- @@ -320,8 +321,6 @@
- return NULL;
- }
-
- - from = (ElfW(Addr)) __builtin_return_address(0);
- -
- if (!_dl_init) {
- _dl_init = true;
- _dl_malloc_function = malloc;
- @@ -335,7 +334,7 @@
- # ifdef __SUPPORT_LD_DEBUG__
- _dl_debug = getenv("LD_DEBUG");
- if (_dl_debug) {
- - if (_dl_strstr(_dl_debug, "all")) {
- + if (strstr(_dl_debug, "all")) {
- _dl_debug_detail = _dl_debug_move = _dl_debug_symbols
- = _dl_debug_reloc = _dl_debug_bindings = _dl_debug_nofixups = (void*)1;
- } else {
- @@ -377,7 +376,7 @@
- if (getenv("LD_BIND_NOW"))
- now_flag = RTLD_NOW;
-
- -#if !defined SHARED && defined __LDSO_LIBRARY_PATH__
- +#if !defined SHARED && defined __LDSO_LD_LIBRARY_PATH__
- /* When statically linked, the _dl_library_path is not yet initialized */
- _dl_library_path = getenv("LD_LIBRARY_PATH");
- #endif
- @@ -393,7 +392,7 @@
- return NULL;
- }
- dyn_chain = (struct dyn_elf *) malloc(sizeof(struct dyn_elf));
- - _dl_memset(dyn_chain, 0, sizeof(struct dyn_elf));
- + memset(dyn_chain, 0, sizeof(struct dyn_elf));
- dyn_chain->dyn = tpnt;
- tpnt->rtld_flags |= (flag & RTLD_GLOBAL);
-
- @@ -444,7 +443,7 @@
-
- /* This list is for dlsym() and relocation */
- dyn_ptr->next = (struct dyn_elf *) malloc(sizeof(struct dyn_elf));
- - _dl_memset (dyn_ptr->next, 0, sizeof (struct dyn_elf));
- + memset (dyn_ptr->next, 0, sizeof (struct dyn_elf));
- dyn_ptr = dyn_ptr->next;
- dyn_ptr->dyn = tpnt1;
- /* Used to record RTLD_LOCAL scope */
- @@ -544,11 +543,18 @@
- * to the GOT tables. We need to do this in reverse order so that COPY
- * directives work correctly */
-
- - /* Get the tail of the list */
- +#ifdef SHARED
- + /*
- + * Get the tail of the list.
- + * In the static case doesn't need to extend the global scope, it is
- + * ready to be used as it is, because _dl_loaded_modules already points
- + * to the dlopened library.
- + */
- for (ls = &_dl_loaded_modules->symbol_scope; ls && ls->next; ls = ls->next);
-
- /* Extend the global scope by adding the local scope of the dlopened DSO. */
- ls->next = &dyn_chain->dyn->symbol_scope;
- +#endif
- #ifdef __mips__
- /*
- * Relocation of the GOT entries for MIPS have to be done
- @@ -661,7 +667,8 @@
- void *ret;
-
- __UCLIBC_MUTEX_CONDITIONAL_LOCK(_dl_mutex, 1);
- - ret = do_dlopen(libname, flag);
- + ret = do_dlopen(libname, flag,
- + (ElfW(Addr)) __builtin_return_address(0));
- __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(_dl_mutex, 1);
-
- return ret;
- @@ -671,7 +678,7 @@
- {
- struct elf_resolve *tpnt, *tfrom;
- struct dyn_elf *handle;
- - ElfW(Addr) from;
- + ElfW(Addr) from = 0;
- struct dyn_elf *rpnt;
- void *ret;
- struct symbol_ref sym_ref = { NULL, NULL };
- @@ -729,7 +736,13 @@
- tpnt = NULL;
- if (handle == _dl_symbol_tables)
- tpnt = handle->dyn; /* Only search RTLD_GLOBAL objs if global object */
- - ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref);
- +
- + do {
- + ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref);
- + if (ret != NULL)
- + break;
- + handle = handle->next;
- + } while (from && handle);
-
- #if defined(USE_TLS) && USE_TLS && defined SHARED
- if (sym_ref.sym && (ELF_ST_TYPE(sym_ref.sym->st_info) == STT_TLS) && (sym_ref.tpnt)) {
- @@ -1081,8 +1094,10 @@
- * Dump information to stderr about the current loaded modules
- */
- #ifdef __USE_GNU
- +# if 0
- static const char type[][4] = { "Lib", "Exe", "Int", "Mod" };
-
- +/* reimplement this, being a GNU extension it should be the same as on glibc */
- int dlinfo(void)
- {
- struct elf_resolve *tpnt;
- @@ -1109,6 +1124,7 @@
- }
- return 0;
- }
- +#endif
-
- static int do_dladdr(const void *__address, Dl_info * __info)
- {
- diff -Nur uClibc-0.9.33.2/ldso/libdl/Makefile.in uClibc/ldso/libdl/Makefile.in
- --- uClibc-0.9.33.2/ldso/libdl/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/libdl/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -23,7 +23,7 @@
- LDFLAGS-libdl.so := $(LDFLAGS)
-
- ifeq ($(LDSO_NO_CLEANUP),)
- -LDFLAGS-libdl.so += -Wl,-fini,dl_cleanup
- +LDFLAGS-libdl.so += -Wl,-fini,$(SYMBOL_PREFIX)dl_cleanup
- endif
-
- LIBS-libdl.so := $(LIBS) $(ldso)
- diff -Nur uClibc-0.9.33.2/ldso/man/dlopen.3 uClibc/ldso/man/dlopen.3
- --- uClibc-0.9.33.2/ldso/man/dlopen.3 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/ldso/man/dlopen.3 2014-02-03 12:32:56.000000000 +0100
- @@ -19,9 +19,8 @@
- .\" GNU General Public License for more details.
- .\"
- .\" You should have received a copy of the GNU General Public
- -.\" License along with this manual; if not, write to the Free
- -.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
- -.\" USA.
- +.\" License along with this manual; if not, see
- +.\" <http://www.gnu.org/licenses/>.
- .\"
- .TH DLOPEN 3 "16 May 1995" "Linux" "Linux Programmer's Manual"
- .SH NAME
- diff -Nur uClibc-0.9.33.2/libc/.gitignore uClibc/libc/.gitignore
- --- uClibc-0.9.33.2/libc/.gitignore 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/.gitignore 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1 @@
- +ucontext_i.[chs]
- diff -Nur uClibc-0.9.33.2/libc/inet/addr.c uClibc/libc/inet/addr.c
- --- uClibc-0.9.33.2/libc/inet/addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/addr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,8 +17,6 @@
- * Changed to use _int10tostr.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- @@ -114,7 +112,7 @@
-
- #define INET_NTOA_MAX_LEN 16 /* max 12 digits + 3 '.'s + 1 nul */
-
- -char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
- +static char *__inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
- {
- in_addr_t addr = ntohl(in.s_addr);
- int i;
- @@ -133,12 +131,12 @@
-
- return p+1;
- }
- -libc_hidden_def(inet_ntoa_r)
- +strong_alias(__inet_ntoa_r,inet_ntoa_r)
-
- char *inet_ntoa(struct in_addr in)
- {
- static char buf[INET_NTOA_MAX_LEN];
- - return inet_ntoa_r(in, buf);
- + return __inet_ntoa_r(in, buf);
- }
- libc_hidden_def(inet_ntoa)
- #endif
- @@ -153,18 +151,18 @@
- */
- struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host)
- {
- - in_addr_t addr;
- + struct in_addr in;
-
- if (net < 128)
- - addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
- + in.s_addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
- else if (net < 65536)
- - addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
- + in.s_addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
- else if (net < 16777216UL)
- - addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
- + in.s_addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
- else
- - addr = net | host;
- - addr = htonl(addr);
- - return *(struct in_addr *)&addr;
- + in.s_addr = net | host;
- + in.s_addr = htonl(in.s_addr);
- + return in;
- }
- libc_hidden_def(inet_makeaddr)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/inet/ether_addr.c uClibc/libc/inet/ether_addr.c
- --- uClibc-0.9.33.2/libc/inet/ether_addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/ether_addr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>.
- */
-
- /*
- @@ -23,8 +22,6 @@
- * - initial uClibc port
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <ctype.h>
- #include <stdio.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/gai_strerror.c uClibc/libc/inet/gai_strerror.c
- --- uClibc-0.9.33.2/libc/inet/gai_strerror.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/gai_strerror.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,17 +13,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <stdio.h>
- #include <netdb.h>
- +#include <libintl.h>
-
- -#define N_(x) x
- -#define _(x) x
- static const struct
- {
- int code;
- diff -Nur uClibc-0.9.33.2/libc/inet/getaddrinfo.c uClibc/libc/inet/getaddrinfo.c
- --- uClibc-0.9.33.2/libc/inet/getaddrinfo.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/getaddrinfo.c 2014-02-03 12:32:56.000000000 +0100
- @@ -51,8 +51,6 @@
-
- If these license terms cause you a real problem, contact the author. */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <assert.h>
- #include <errno.h>
- #include <netdb.h>
- @@ -283,7 +281,7 @@
- ai->ai_protocol = req->ai_protocol;
- ai->ai_addrlen = sizeof(struct sockaddr_un);
- ai->ai_addr = (void *)ai + sizeof(struct addrinfo);
- -#if SALEN
- +#if 0 /* SALEN */
- ((struct sockaddr_un *)ai->ai_addr)->sun_len = sizeof(struct sockaddr_un);
- #endif /* SALEN */
-
- @@ -713,7 +711,7 @@
- (*pai)->ai_protocol = st2->protocol;
- (*pai)->ai_addrlen = socklen;
- (*pai)->ai_addr = (void *) (*pai) + sizeof(struct addrinfo);
- -#if defined SALEN
- +#if 0 /* SALEN */
- (*pai)->ai_addr->sa_len = socklen;
- #endif
- (*pai)->ai_addr->sa_family = family;
- diff -Nur uClibc-0.9.33.2/libc/inet/herror.c uClibc/libc/inet/herror.c
- --- uClibc-0.9.33.2/libc/inet/herror.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/herror.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,8 +17,6 @@
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <stdio.h>
- #include <string.h>
- #include <netdb.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/hostid.c uClibc/libc/inet/hostid.c
- --- uClibc-0.9.33.2/libc/inet/hostid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/hostid.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,8 +5,6 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <errno.h>
- #include <unistd.h>
- #include <sys/types.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/ifaddrs.c uClibc/libc/inet/ifaddrs.c
- --- uClibc-0.9.33.2/libc/inet/ifaddrs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/ifaddrs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,12 +13,9 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <alloca.h>
- #include <assert.h>
- #include <errno.h>
- @@ -33,7 +30,6 @@
- #include <string.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
- -#include <libc-internal.h>
- #include <time.h>
- #include <unistd.h>
-
- diff -Nur uClibc-0.9.33.2/libc/inet/if_index.c uClibc/libc/inet/if_index.c
- --- uClibc-0.9.33.2/libc/inet/if_index.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/if_index.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,15 +13,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>.
-
- Reworked Dec 2002 by Erik Andersen <andersen@codepoet.org>
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <string.h>
- #include <alloca.h>
- #include <errno.h>
- @@ -31,7 +28,6 @@
- #include <net/if.h>
- #include <sys/socket.h>
- #include <sys/ioctl.h>
- -#include <libc-internal.h>
- #include <not-cancel.h>
-
- #include "netlinkaccess.h"
- diff -Nur uClibc-0.9.33.2/libc/inet/in6_addr.c uClibc/libc/inet/in6_addr.c
- --- uClibc-0.9.33.2/libc/inet/in6_addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/in6_addr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,12 +13,9 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <netinet/in.h>
-
- #ifdef __UCLIBC_HAS_IPV6__
- diff -Nur uClibc-0.9.33.2/libc/inet/inet_addr.c uClibc/libc/inet/inet_addr.c
- --- uClibc-0.9.33.2/libc/inet/inet_addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/inet_addr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,5 +4,5 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define L_inet_makeaddr
- +#define L_inet_addr
- #include "addr.c"
- diff -Nur uClibc-0.9.33.2/libc/inet/inet_makeaddr.c uClibc/libc/inet/inet_makeaddr.c
- --- uClibc-0.9.33.2/libc/inet/inet_makeaddr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/inet_makeaddr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,5 +4,5 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define L_inet_addr
- +#define L_inet_makeaddr
- #include "addr.c"
- diff -Nur uClibc-0.9.33.2/libc/inet/inet_net.c uClibc/libc/inet/inet_net.c
- --- uClibc-0.9.33.2/libc/inet/inet_net.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/inet_net.c 2014-02-03 12:32:56.000000000 +0100
- @@ -32,8 +32,6 @@
- * SUCH DAMAGE.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <ctype.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/Makefile.in uClibc/libc/inet/Makefile.in
- --- uClibc-0.9.33.2/libc/inet/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -11,33 +11,34 @@
-
- INET_DIR := $(top_srcdir)libc/inet
- INET_OUT := $(top_builddir)libc/inet
- +V4_OR_V6 := $(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6))
-
- CFLAGS-inet := -DRESOLVER="\"resolv.c\""
- CSRC-y :=
- # des uses ntohl
- -CSRC-$(findstring y,$(UCLIBC_HAS_CRYPT_IMPL)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += ntohl.c
- -CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
- +CSRC-$(findstring y,$(UCLIBC_HAS_CRYPT_IMPL)$(V4_OR_V6)) += ntohl.c
- +CSRC-$(V4_OR_V6) += \
- getservice.c getproto.c getnet.c hostid.c \
- inet_net.c herror.c if_index.c gai_strerror.c getaddrinfo.c \
- ifaddrs.c ntop.c
- CSRC-$(UCLIBC_HAS_IPV6) += in6_addr.c
- # multi source addr.c
- -CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
- +CSRC-$(V4_OR_V6) += \
- inet_aton.c inet_addr.c inet_ntoa.c inet_makeaddr.c \
- inet_lnaof.c inet_netof.c
- # multi source resolv.c
- -CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
- +CSRC-$(V4_OR_V6) += \
- encodeh.c decodeh.c encoded.c decoded.c \
- encodeq.c encodea.c \
- read_etc_hosts_r.c \
- dnslookup.c opennameservers.c closenameservers.c \
- getnameinfo.c \
- gethostent.c gethostent_r.c
- -CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
- +CSRC-$(V4_OR_V6) += \
- get_hosts_byaddr_r.c get_hosts_byname_r.c \
- gethostbyaddr_r.c gethostbyname_r.c gethostbyname2_r.c \
- gethostbyaddr.c gethostbyname.c gethostbyname2.c
- -CSRC-$(findstring y,$(UCLIBC_HAS_RESOLVER_SUPPORT)) += \
- +CSRC-$(UCLIBC_HAS_RESOLVER_SUPPORT) += \
- ns_netint.c ns_parse.c res_data.c \
- res_init.c res_query.c res_comp.c ns_name.c \
- _res_state.c
- @@ -52,7 +53,7 @@
- socketcalls_CSRC-$(UCLIBC_LINUX_SPECIFIC) += accept4.c
- CSRC-$(UCLIBC_HAS_SOCKET) += $(socketcalls_CSRC-y) opensock.c
-
- -CSRC-$(findstring y,$(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += ethers.c ether_addr.c
- +CSRC-$(findstring y,$(UCLIBC_HAS_SOCKET)$(V4_OR_V6)) += ethers.c ether_addr.c
-
- INET_SRC := $(patsubst %.c,$(INET_DIR)/%.c,$(CSRC-y))
- INET_OBJ := $(patsubst %.c,$(INET_OUT)/%.o,$(CSRC-y))
- diff -Nur uClibc-0.9.33.2/libc/inet/netlinkaccess.h uClibc/libc/inet/netlinkaccess.h
- --- uClibc-0.9.33.2/libc/inet/netlinkaccess.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/netlinkaccess.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETLINKACCESS_H
- #define _NETLINKACCESS_H 1
- diff -Nur uClibc-0.9.33.2/libc/inet/ntohl.c uClibc/libc/inet/ntohl.c
- --- uClibc-0.9.33.2/libc/inet/ntohl.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/ntohl.c 2014-02-03 12:32:56.000000000 +0100
- @@ -6,9 +6,6 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <stdint.h>
- -#include <endian.h>
- -#include <byteswap.h>
- #include <netinet/in.h>
-
- #undef ntohl
- @@ -16,51 +13,30 @@
- #undef htonl
- #undef htons
-
- -#if __BYTE_ORDER == __BIG_ENDIAN
- -uint32_t ntohl (uint32_t x)
- -{
- - return x;
- -}
- -
- -uint16_t ntohs (uint16_t x)
- -{
- - return x;
- -}
- -
- -uint32_t htonl (uint32_t x)
- -{
- - return x;
- -}
- +#if __BYTE_ORDER != __BIG_ENDIAN && __BYTE_ORDER != __LITTLE_ENDIAN
- +# error "You seem to have an unsupported byteorder"
- +#endif
-
- -uint16_t htons (uint16_t x)
- -{
- - return x;
- -}
- -#elif __BYTE_ORDER == __LITTLE_ENDIAN
- uint32_t ntohl (uint32_t x)
- {
- +#if __BYTE_ORDER == __BIG_ENDIAN
- + return x;
- +#else
- return __bswap_32(x);
- +#endif
- }
- +libc_hidden_def(ntohl)
- +strong_alias(ntohl,htonl)
- +libc_hidden_def(htonl)
-
- uint16_t ntohs (uint16_t x)
- {
- - return __bswap_16(x);
- -}
- -
- -uint32_t htonl (uint32_t x)
- -{
- - return __bswap_32(x);
- -}
- -
- -uint16_t htons (uint16_t x)
- -{
- - return __bswap_16(x);
- -}
- +#if __BYTE_ORDER == __BIG_ENDIAN
- + return x;
- #else
- -#error "You seem to have an unsupported byteorder"
- + return __bswap_16(x);
- #endif
- -
- -libc_hidden_def(ntohl)
- +}
- libc_hidden_def(ntohs)
- -libc_hidden_def(htonl)
- +strong_alias(ntohs,htons)
- libc_hidden_def(htons)
- diff -Nur uClibc-0.9.33.2/libc/inet/ntop.c uClibc/libc/inet/ntop.c
- --- uClibc-0.9.33.2/libc/inet/ntop.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/ntop.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,6 @@
- * SOFTWARE.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <sys/param.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/opensock.c uClibc/libc/inet/opensock.c
- --- uClibc-0.9.33.2/libc/inet/opensock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/opensock.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,18 +12,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <assert.h>
- -#include <errno.h>
- -#include <stdio.h>
- -#include <string.h>
- -#include <unistd.h>
- #include <sys/socket.h>
- -#include <features.h>
- -#include <libc-internal.h>
- +#include <bits/kernel-features.h>
-
- /* Return a socket of any type. The socket can be used in subsequent
- ioctl calls to talk to the kernel. */
- diff -Nur uClibc-0.9.33.2/libc/inet/resolv.c uClibc/libc/inet/resolv.c
- --- uClibc-0.9.33.2/libc/inet/resolv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/resolv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -293,8 +293,6 @@
- - a sequence of labels ending with a pointer
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <string.h>
- #include <stdio.h>
- #include <stdio_ext.h>
- @@ -317,6 +315,7 @@
- #include <sys/utsname.h>
- #include <sys/un.h>
- #include <sys/stat.h>
- +#include <sys/param.h>
- #include <bits/uClibc_mutex.h>
- #include "internal/parse_config.h"
-
- @@ -406,7 +405,7 @@
- } sockaddr46_t;
-
-
- -__UCLIBC_MUTEX_EXTERN(__resolv_lock);
- +__UCLIBC_MUTEX_EXTERN(__resolv_lock) attribute_hidden;
-
- /* Protected by __resolv_lock */
- extern void (*__res_sync)(void) attribute_hidden;
- @@ -566,7 +565,7 @@
-
- #ifdef L_encodeh
-
- -int attribute_hidden __encode_header(struct resolv_header *h, unsigned char *dest, int maxlen)
- +int __encode_header(struct resolv_header *h, unsigned char *dest, int maxlen)
- {
- if (maxlen < HFIXEDSZ)
- return -1;
- @@ -595,7 +594,7 @@
-
- #ifdef L_decodeh
-
- -void attribute_hidden __decode_header(unsigned char *data,
- +void __decode_header(unsigned char *data,
- struct resolv_header *h)
- {
- h->id = (data[0] << 8) | data[1];
- @@ -619,7 +618,7 @@
- /* Encode a dotted string into nameserver transport-level encoding.
- This routine is fairly dumb, and doesn't attempt to compress
- the data */
- -int attribute_hidden __encode_dotted(const char *dotted, unsigned char *dest, int maxlen)
- +int __encode_dotted(const char *dotted, unsigned char *dest, int maxlen)
- {
- unsigned used = 0;
-
- @@ -657,7 +656,7 @@
-
- /* Decode a dotted string from nameserver transport-level encoding.
- This routine understands compressed data. */
- -int attribute_hidden __decode_dotted(const unsigned char *packet,
- +int __decode_dotted(const unsigned char *packet,
- int offset,
- int packet_len,
- char *dest,
- @@ -722,7 +721,7 @@
-
- #ifdef L_encodeq
-
- -int attribute_hidden __encode_question(const struct resolv_question *q,
- +int __encode_question(const struct resolv_question *q,
- unsigned char *dest,
- int maxlen)
- {
- @@ -750,7 +749,7 @@
-
- #ifdef L_encodea
-
- -int attribute_hidden __encode_answer(struct resolv_answer *a, unsigned char *dest, int maxlen)
- +int __encode_answer(struct resolv_answer *a, unsigned char *dest, int maxlen)
- {
- int i;
-
- @@ -864,7 +863,7 @@
- const char *name,
- int type,
- unsigned char *packet,
- - int maxlen);
- + int maxlen) attribute_hidden;
- int __form_query(int id,
- const char *name,
- int type,
- @@ -956,7 +955,7 @@
- }
-
- /* Must be called under __resolv_lock. */
- -void attribute_hidden __open_nameservers(void)
- +void __open_nameservers(void)
- {
- static uint32_t resolv_conf_mtime;
-
- @@ -1122,7 +1121,7 @@
- #ifdef L_closenameservers
-
- /* Must be called under __resolv_lock. */
- -void attribute_hidden __close_nameservers(void)
- +void __close_nameservers(void)
- {
- if (__nameserver != (void*) &__local_nameserver)
- free(__nameserver);
- @@ -1230,7 +1229,7 @@
- * appended. (why the filed is called "dotted" I have no idea)
- * This is a malloced string. May be NULL because strdup failed.
- */
- -int attribute_hidden __dns_lookup(const char *name,
- +int __dns_lookup(const char *name,
- int type,
- unsigned char **outpacket,
- struct resolv_answer *a)
- @@ -1594,7 +1593,7 @@
- #define HALISTOFF (sizeof(char*) * MAXTOKENS)
- #define INADDROFF (HALISTOFF + 2 * sizeof(char*))
-
- -int attribute_hidden __read_etc_hosts_r(
- +int __read_etc_hosts_r(
- parser_t * parser,
- const char *name,
- int type,
- @@ -1708,7 +1707,7 @@
-
- #ifdef L_get_hosts_byname_r
-
- -int attribute_hidden __get_hosts_byname_r(const char *name,
- +int __get_hosts_byname_r(const char *name,
- int type,
- struct hostent *result_buf,
- char *buf,
- @@ -1724,7 +1723,7 @@
-
- #ifdef L_get_hosts_byaddr_r
-
- -int attribute_hidden __get_hosts_byaddr_r(const char *addr,
- +int __get_hosts_byaddr_r(const char *addr,
- int len,
- int type,
- struct hostent *result_buf,
- @@ -1775,7 +1774,7 @@
- unsigned flags)
- {
- int serrno = errno;
- - unsigned ok;
- + bool ok = 0;
- struct hostent *hoste = NULL;
- char domain[256];
-
- @@ -1785,16 +1784,15 @@
- if (sa == NULL || addrlen < sizeof(sa_family_t))
- return EAI_FAMILY;
-
- - ok = sa->sa_family;
- - if (ok == AF_LOCAL) /* valid */;
- + if (sa->sa_family == AF_LOCAL) /* valid */;
- #ifdef __UCLIBC_HAS_IPV4__
- - else if (ok == AF_INET) {
- + else if (sa->sa_family == AF_INET) {
- if (addrlen < sizeof(struct sockaddr_in))
- return EAI_FAMILY;
- }
- #endif
- #ifdef __UCLIBC_HAS_IPV6__
- - else if (ok == AF_INET6) {
- + else if (sa->sa_family == AF_INET6) {
- if (addrlen < sizeof(struct sockaddr_in6))
- return EAI_FAMILY;
- }
- @@ -1802,7 +1800,6 @@
- else
- return EAI_FAMILY;
-
- - ok = 0;
- if (host != NULL && hostlen > 0)
- switch (sa->sa_family) {
- case AF_INET:
- @@ -1826,21 +1823,18 @@
-
- if (hoste) {
- char *c;
- -#undef min
- -#define min(x,y) (((x) > (y)) ? (y) : (x))
- if ((flags & NI_NOFQDN)
- && (getdomainname(domain, sizeof(domain)) == 0)
- && (c = strstr(hoste->h_name, domain)) != NULL
- && (c != hoste->h_name) && (*(--c) == '.')
- ) {
- strncpy(host, hoste->h_name,
- - min(hostlen, (size_t) (c - hoste->h_name)));
- - host[min(hostlen - 1, (size_t) (c - hoste->h_name))] = '\0';
- + MIN(hostlen, (size_t) (c - hoste->h_name)));
- + host[MIN(hostlen - 1, (size_t) (c - hoste->h_name))] = '\0';
- } else {
- strncpy(host, hoste->h_name, hostlen);
- }
- ok = 1;
- -#undef min
- }
- }
-
- @@ -3432,6 +3426,7 @@
- */
- }
-
- +/* has to be called under __resolv_lock */
- static int
- __res_vinit(res_state rp, int preinit)
- {
- @@ -3440,7 +3435,6 @@
- int m = 0;
- #endif
-
- - __UCLIBC_MUTEX_LOCK(__resolv_lock);
- __close_nameservers();
- __open_nameservers();
-
- @@ -3532,29 +3526,87 @@
-
- rp->options |= RES_INIT;
-
- + return 0;
- +}
- +
- +static unsigned int
- +res_randomid(void)
- +{
- + return 0xffff & getpid();
- +}
- +
- +/* Our res_init never fails (always returns 0) */
- +int
- +res_init(void)
- +{
- + /*
- + * These three fields used to be statically initialized. This made
- + * it hard to use this code in a shared library. It is necessary,
- + * now that we're doing dynamic initialization here, that we preserve
- + * the old semantics: if an application modifies one of these three
- + * fields of _res before res_init() is called, res_init() will not
- + * alter them. Of course, if an application is setting them to
- + * _zero_ before calling res_init(), hoping to override what used
- + * to be the static default, we can't detect it and unexpected results
- + * will follow. Zero for any of these fields would make no sense,
- + * so one can safely assume that the applications were already getting
- + * unexpected results.
- + *
- + * _res.options is tricky since some apps were known to diddle the bits
- + * before res_init() was first called. We can't replicate that semantic
- + * with dynamic initialization (they may have turned bits off that are
- + * set in RES_DEFAULT). Our solution is to declare such applications
- + * "broken". They could fool us by setting RES_INIT but none do (yet).
- + */
- +
- + __UCLIBC_MUTEX_LOCK(__resolv_lock);
- +
- + if (!_res.retrans)
- + _res.retrans = RES_TIMEOUT;
- + if (!_res.retry)
- + _res.retry = 4;
- + if (!(_res.options & RES_INIT))
- + _res.options = RES_DEFAULT;
- +
- + /*
- + * This one used to initialize implicitly to zero, so unless the app
- + * has set it to something in particular, we can randomize it now.
- + */
- + if (!_res.id)
- + _res.id = res_randomid();
- +
- + __res_sync = NULL;
- + __res_vinit(&_res, 1);
- + __res_sync = res_sync_func;
- +
- __UCLIBC_MUTEX_UNLOCK(__resolv_lock);
- +
- return 0;
- }
- +libc_hidden_def(res_init)
-
- static void
- -__res_iclose(void)
- +__res_iclose(res_state statp)
- {
- + struct __res_state * rp = statp;
- __UCLIBC_MUTEX_LOCK(__resolv_lock);
- + if (rp == NULL)
- + rp = __res_state();
- __close_nameservers();
- __res_sync = NULL;
- #ifdef __UCLIBC_HAS_IPV6__
- {
- - char *p1 = (char*) &(_res.nsaddr_list[0]);
- - int m = 0;
- + char *p1 = (char*) &(rp->nsaddr_list[0]);
- + unsigned int m = 0;
- /* free nsaddrs[m] if they do not point to nsaddr_list[x] */
- - while (m < ARRAY_SIZE(_res._u._ext.nsaddrs)) {
- - char *p2 = (char*)(_res._u._ext.nsaddrs[m++]);
- - if (p2 < p1 || (p2 - p1) > sizeof(_res.nsaddr_list))
- + while (m < ARRAY_SIZE(rp->_u._ext.nsaddrs)) {
- + char *p2 = (char*)(rp->_u._ext.nsaddrs[m++]);
- + if (p2 < p1 || (p2 - p1) > (signed)sizeof(rp->nsaddr_list))
- free(p2);
- }
- }
- #endif
- - memset(&_res, 0, sizeof(_res));
- + memset(rp, 0, sizeof(struct __res_state));
- __UCLIBC_MUTEX_UNLOCK(__resolv_lock);
- }
-
- @@ -3569,13 +3621,13 @@
- void
- res_nclose(res_state statp)
- {
- - __res_iclose();
- + __res_iclose(statp);
- }
-
- #ifdef __UCLIBC_HAS_BSD_RES_CLOSE__
- void res_close(void)
- {
- - __res_iclose();
- + __res_iclose(NULL);
- }
- #endif
-
- @@ -3595,74 +3647,14 @@
- # if defined __UCLIBC_HAS_TLS__
- # undef __resp
- __thread struct __res_state *__resp = &_res;
- -/*
- - * FIXME: Add usage of hidden attribute for this when used in the shared
- - * library. It currently crashes the linker when doing section
- - * relocations.
- - */
- extern __thread struct __res_state *__libc_resp
- - __attribute__ ((alias ("__resp"))) attribute_hidden;
- + __attribute__ ((alias ("__resp"))) attribute_hidden attribute_tls_model_ie;
- # else
- # undef __resp
- struct __res_state *__resp = &_res;
- # endif
- #endif /* !__UCLIBC_HAS_THREADS__ */
-
- -static unsigned int
- -res_randomid(void)
- -{
- - return 0xffff & getpid();
- -}
- -
- -/* Our res_init never fails (always returns 0) */
- -int
- -res_init(void)
- -{
- - /*
- - * These three fields used to be statically initialized. This made
- - * it hard to use this code in a shared library. It is necessary,
- - * now that we're doing dynamic initialization here, that we preserve
- - * the old semantics: if an application modifies one of these three
- - * fields of _res before res_init() is called, res_init() will not
- - * alter them. Of course, if an application is setting them to
- - * _zero_ before calling res_init(), hoping to override what used
- - * to be the static default, we can't detect it and unexpected results
- - * will follow. Zero for any of these fields would make no sense,
- - * so one can safely assume that the applications were already getting
- - * unexpected results.
- - *
- - * _res.options is tricky since some apps were known to diddle the bits
- - * before res_init() was first called. We can't replicate that semantic
- - * with dynamic initialization (they may have turned bits off that are
- - * set in RES_DEFAULT). Our solution is to declare such applications
- - * "broken". They could fool us by setting RES_INIT but none do (yet).
- - */
- -
- - __UCLIBC_MUTEX_LOCK(__resolv_lock);
- -
- - if (!_res.retrans)
- - _res.retrans = RES_TIMEOUT;
- - if (!_res.retry)
- - _res.retry = 4;
- - if (!(_res.options & RES_INIT))
- - _res.options = RES_DEFAULT;
- -
- - /*
- - * This one used to initialize implicitly to zero, so unless the app
- - * has set it to something in particular, we can randomize it now.
- - */
- - if (!_res.id)
- - _res.id = res_randomid();
- - __res_sync = res_sync_func;
- -
- - __UCLIBC_MUTEX_UNLOCK(__resolv_lock);
- -
- - __res_vinit(&_res, 1);
- -
- - return 0;
- -}
- -libc_hidden_def(res_init)
- -
- /*
- * Set up default settings. If the configuration file exist, the values
- * there will have precedence. Otherwise, the server address is set to
- @@ -3687,7 +3679,11 @@
- int
- res_ninit(res_state statp)
- {
- - return __res_vinit(statp, 0);
- + int ret;
- + __UCLIBC_MUTEX_LOCK(__resolv_lock);
- + ret = __res_vinit(statp, 0);
- + __UCLIBC_MUTEX_UNLOCK(__resolv_lock);
- + return ret;
- }
-
- #endif /* L_res_init */
- @@ -3740,11 +3736,10 @@
-
- free(a.dotted);
-
- - if (a.atype == type) { /* CNAME */
- - if (i > anslen)
- - i = anslen;
- - memcpy(answer, packet, i);
- - }
- + if (i > anslen)
- + i = anslen;
- + memcpy(answer, packet, i);
- +
- free(packet);
- return i;
- }
- @@ -4227,7 +4222,7 @@
- hp = (HEADER *) buf;
- hp->id = getpid() & 0xffff;
- hp->opcode = op;
- - hp->rd = (_res.options & RES_RECURSE) != 0U;
- + hp->rd = (_res_options & RES_RECURSE) != 0U;
- hp->rcode = NOERROR;
-
- cp = buf + HFIXEDSZ;
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/auth_none.c uClibc/libc/inet/rpc/auth_none.c
- --- uClibc-0.9.33.2/libc/inet/rpc/auth_none.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/auth_none.c 2014-02-03 12:32:56.000000000 +0100
- @@ -35,8 +35,6 @@
- * credentials and verifiers to remote systems.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include "rpc_private.h"
-
-
- @@ -66,49 +64,54 @@
- char marshalled_client[MAX_MARSHAL_SIZE];
- u_int mcnt;
- };
- +
- +static struct authnone_private_s authnone_private;
- #ifdef __UCLIBC_HAS_THREADS__
- -#define authnone_private (*(struct authnone_private_s **)&RPC_THREAD_VARIABLE(authnone_private_s))
- -#else
- -static struct authnone_private_s *authnone_private;
- +__libc_once_define(static, authnone_private_guard);
- #endif
-
- -AUTH *
- -authnone_create (void)
- +static void authnone_create_once (void);
- +
- +static void
- +authnone_create_once (void)
- {
- struct authnone_private_s *ap;
- XDR xdr_stream;
- XDR *xdrs;
-
- - ap = (struct authnone_private_s *) authnone_private;
- - if (ap == NULL)
- - {
- - ap = (struct authnone_private_s *) calloc (1, sizeof (*ap));
- - if (ap == NULL)
- - return NULL;
- - authnone_private = ap;
- - }
- - if (!ap->mcnt)
- - {
- - ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth;
- - ap->no_client.ah_ops = (struct auth_ops *)&ops;
- - xdrs = &xdr_stream;
- - xdrmem_create (xdrs, ap->marshalled_client, (u_int) MAX_MARSHAL_SIZE,
- - XDR_ENCODE);
- - (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_cred);
- - (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_verf);
- - ap->mcnt = XDR_GETPOS (xdrs);
- - XDR_DESTROY (xdrs);
- - }
- - return (&ap->no_client);
- + ap = &authnone_private;
- +
- + ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth;
- + ap->no_client.ah_ops = (struct auth_ops *) &ops;
- + xdrs = &xdr_stream;
- + xdrmem_create(xdrs, ap->marshalled_client,
- + (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE);
- + (void) xdr_opaque_auth(xdrs, &ap->no_client.ah_cred);
- + (void) xdr_opaque_auth(xdrs, &ap->no_client.ah_verf);
- + ap->mcnt = XDR_GETPOS (xdrs);
- + XDR_DESTROY (xdrs);
- +}
- +
- +AUTH *
- +authnone_create (void)
- +{
- +#ifdef __UCLIBC_HAS_THREADS__
- + __libc_once (authnone_private_guard, authnone_create_once);
- +#else
- + authnone_create_once();
- +#endif
- + return &authnone_private.no_client;
- }
- libc_hidden_def(authnone_create)
-
- static bool_t
- -authnone_marshal (AUTH *client attribute_unused, XDR *xdrs)
- +authnone_marshal (AUTH *client, XDR *xdrs)
- {
- struct authnone_private_s *ap;
-
- - ap = authnone_private;
- + /* authnone_create returned authnone_private->no_client, which is
- + the first field of struct authnone_private_s. */
- + ap = (struct authnone_private_s *) client;
- if (ap == NULL)
- return FALSE;
- return (*xdrs->x_ops->x_putbytes) (xdrs, ap->marshalled_client, ap->mcnt);
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/auth_unix.c uClibc/libc/inet/rpc/auth_unix.c
- --- uClibc-0.9.33.2/libc/inet/rpc/auth_unix.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/auth_unix.c 2014-02-03 12:32:56.000000000 +0100
- @@ -38,13 +38,11 @@
- * for the credentials.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <limits.h>
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
- +#include <libintl.h>
- #include <sys/param.h>
-
- #include <rpc/types.h>
- @@ -52,10 +50,6 @@
- #include <rpc/auth.h>
- #include <rpc/auth_unix.h>
-
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -#endif
- -
- /*
- * Unix authenticator operations vector
- */
- @@ -65,7 +59,7 @@
- static bool_t authunix_refresh (AUTH *);
- static void authunix_destroy (AUTH *);
-
- -static struct auth_ops auth_unix_ops = {
- +static const struct auth_ops auth_unix_ops = {
- authunix_nextverf,
- authunix_marshal,
- authunix_validate,
- @@ -111,13 +105,7 @@
- if (auth == NULL || au == NULL)
- {
- no_memory:
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s",
- - _("authunix_create: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("authunix_create: out of memory\n"), stderr);
- + (void) fputs (_("authunix_create: out of memory\n"), stderr);
- mem_free (auth, sizeof (*auth));
- mem_free (au, sizeof (*au));
- return NULL;
- @@ -326,7 +314,7 @@
- xdrmem_create (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
- if ((!xdr_opaque_auth (xdrs, &(auth->ah_cred))) ||
- (!xdr_opaque_auth (xdrs, &(auth->ah_verf))))
- - perror (_("auth_none.c - Fatal marshalling problem"));
- + perror (_("auth_unix.c - Fatal marshalling problem"));
- else
- au->au_mpos = XDR_GETPOS (xdrs);
-
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/bindresvport.c uClibc/libc/inet/rpc/bindresvport.c
- --- uClibc-0.9.33.2/libc/inet/rpc/bindresvport.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/bindresvport.c 2014-02-03 12:32:56.000000000 +0100
- @@ -30,9 +30,6 @@
- * Copyright (c) 1987 by Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <errno.h>
- #include <unistd.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_generic.c uClibc/libc/inet/rpc/clnt_generic.c
- --- uClibc-0.9.33.2/libc/inet/rpc/clnt_generic.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/clnt_generic.c 2014-02-03 12:32:56.000000000 +0100
- @@ -30,9 +30,6 @@
- * Copyright (C) 1987, Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <alloca.h>
- #include <errno.h>
- #include <string.h>
- @@ -119,7 +116,7 @@
- prttmpbuf = alloca (prtbuflen);
- while (getprotobyname_r (proto, &protobuf, prttmpbuf, prtbuflen, &p) != 0
- || p == NULL)
- - if (errno != ERANGE)
- + if (errno != ERANGE)
- {
- struct rpc_createerr *ce = &get_rpc_createerr ();
- ce->cf_stat = RPC_UNKNOWNPROTO;
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_perror.c uClibc/libc/inet/rpc/clnt_perror.c
- --- uClibc-0.9.33.2/libc/inet/rpc/clnt_perror.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/clnt_perror.c 2014-02-03 12:32:56.000000000 +0100
- @@ -38,19 +38,10 @@
- *
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <string.h>
- #include "rpc_private.h"
-
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -# include <libio/iolibio.h>
- -# define fputs(s, f) _IO_fputs (s, f)
- -#endif
- -
- static char *auth_errmsg (enum auth_stat stat) internal_function;
-
- #ifdef __UCLIBC_HAS_THREADS__
- @@ -81,74 +72,74 @@
- static const char rpc_errstr[] =
- {
- #define RPC_SUCCESS_IDX 0
- - _("RPC: Success")
- + N_("RPC: Success")
- "\0"
- #define RPC_CANTENCODEARGS_IDX (RPC_SUCCESS_IDX + sizeof "RPC: Success")
- - _("RPC: Can't encode arguments")
- + N_("RPC: Can't encode arguments")
- "\0"
- #define RPC_CANTDECODERES_IDX (RPC_CANTENCODEARGS_IDX \
- + sizeof "RPC: Can't encode arguments")
- - _("RPC: Can't decode result")
- + N_("RPC: Can't decode result")
- "\0"
- #define RPC_CANTSEND_IDX (RPC_CANTDECODERES_IDX \
- + sizeof "RPC: Can't decode result")
- - _("RPC: Unable to send")
- + N_("RPC: Unable to send")
- "\0"
- #define RPC_CANTRECV_IDX (RPC_CANTSEND_IDX \
- + sizeof "RPC: Unable to send")
- - _("RPC: Unable to receive")
- + N_("RPC: Unable to receive")
- "\0"
- #define RPC_TIMEDOUT_IDX (RPC_CANTRECV_IDX \
- + sizeof "RPC: Unable to receive")
- - _("RPC: Timed out")
- + N_("RPC: Timed out")
- "\0"
- #define RPC_VERSMISMATCH_IDX (RPC_TIMEDOUT_IDX \
- + sizeof "RPC: Timed out")
- - _("RPC: Incompatible versions of RPC")
- + N_("RPC: Incompatible versions of RPC")
- "\0"
- #define RPC_AUTHERROR_IDX (RPC_VERSMISMATCH_IDX \
- + sizeof "RPC: Incompatible versions of RPC")
- - _("RPC: Authentication error")
- + N_("RPC: Authentication error")
- "\0"
- #define RPC_PROGUNAVAIL_IDX (RPC_AUTHERROR_IDX \
- + sizeof "RPC: Authentication error")
- - _("RPC: Program unavailable")
- + N_("RPC: Program unavailable")
- "\0"
- #define RPC_PROGVERSMISMATCH_IDX (RPC_PROGUNAVAIL_IDX \
- + sizeof "RPC: Program unavailable")
- - _("RPC: Program/version mismatch")
- + N_("RPC: Program/version mismatch")
- "\0"
- #define RPC_PROCUNAVAIL_IDX (RPC_PROGVERSMISMATCH_IDX \
- + sizeof "RPC: Program/version mismatch")
- - _("RPC: Procedure unavailable")
- + N_("RPC: Procedure unavailable")
- "\0"
- #define RPC_CANTDECODEARGS_IDX (RPC_PROCUNAVAIL_IDX \
- + sizeof "RPC: Procedure unavailable")
- - _("RPC: Server can't decode arguments")
- + N_("RPC: Server can't decode arguments")
- "\0"
- #define RPC_SYSTEMERROR_IDX (RPC_CANTDECODEARGS_IDX \
- + sizeof "RPC: Server can't decode arguments")
- - _("RPC: Remote system error")
- + N_("RPC: Remote system error")
- "\0"
- #define RPC_UNKNOWNHOST_IDX (RPC_SYSTEMERROR_IDX \
- + sizeof "RPC: Remote system error")
- - _("RPC: Unknown host")
- + N_("RPC: Unknown host")
- "\0"
- #define RPC_UNKNOWNPROTO_IDX (RPC_UNKNOWNHOST_IDX \
- + sizeof "RPC: Unknown host")
- - _("RPC: Unknown protocol")
- + N_("RPC: Unknown protocol")
- "\0"
- #define RPC_PMAPFAILURE_IDX (RPC_UNKNOWNPROTO_IDX \
- + sizeof "RPC: Unknown protocol")
- - _("RPC: Port mapper failure")
- + N_("RPC: Port mapper failure")
- "\0"
- #define RPC_PROGNOTREGISTERED_IDX (RPC_PMAPFAILURE_IDX \
- + sizeof "RPC: Port mapper failure")
- - _("RPC: Program not registered")
- + N_("RPC: Program not registered")
- "\0"
- #define RPC_FAILED_IDX (RPC_PROGNOTREGISTERED_IDX \
- + sizeof "RPC: Program not registered")
- - _("RPC: Failed (unspecified error)")
- + N_("RPC: Failed (unspecified error)")
- };
-
- static const struct rpc_errtab rpc_errlist[] =
- @@ -189,19 +180,14 @@
- return (char*)_(rpc_errstr + rpc_errlist[i].message_off);
- }
- }
- - return _("RPC: (unknown error code)");
- + return N_("RPC: (unknown error code)");
- }
- libc_hidden_def(clnt_sperrno)
-
- void
- clnt_perrno (enum clnt_stat num)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s", clnt_sperrno (num));
- - else
- -#endif
- - (void) fputs (clnt_sperrno (num), stderr);
- + (void) fputs (clnt_sperrno (num), stderr);
- }
-
- /*
- @@ -295,12 +281,7 @@
- void
- clnt_perror (CLIENT * rpch, const char *msg)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s", clnt_sperror (rpch, msg));
- - else
- -#endif
- - (void) fputs (clnt_sperror (rpch, msg), stderr);
- + (void) fputs (clnt_sperror (rpch, msg), stderr);
- }
- libc_hidden_def(clnt_perror)
-
- @@ -352,12 +333,7 @@
- void
- clnt_pcreateerror (const char *msg)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s", clnt_spcreateerror (msg));
- - else
- -#endif
- - (void) fputs (clnt_spcreateerror (msg), stderr);
- + (void) fputs (clnt_spcreateerror (msg), stderr);
- }
-
- struct auth_errtab
- @@ -369,34 +345,34 @@
- static const char auth_errstr[] =
- {
- #define AUTH_OK_IDX 0
- - _("Authentication OK")
- + N_("Authentication OK")
- "\0"
- #define AUTH_BADCRED_IDX (AUTH_OK_IDX + sizeof "Authentication OK")
- - _("Invalid client credential")
- + N_("Invalid client credential")
- "\0"
- #define AUTH_REJECTEDCRED_IDX (AUTH_BADCRED_IDX \
- + sizeof "Invalid client credential")
- - _("Server rejected credential")
- + N_("Server rejected credential")
- "\0"
- #define AUTH_BADVERF_IDX (AUTH_REJECTEDCRED_IDX \
- + sizeof "Server rejected credential")
- - _("Invalid client verifier")
- + N_("Invalid client verifier")
- "\0"
- #define AUTH_REJECTEDVERF_IDX (AUTH_BADVERF_IDX \
- + sizeof "Invalid client verifier")
- - _("Server rejected verifier")
- + N_("Server rejected verifier")
- "\0"
- #define AUTH_TOOWEAK_IDX (AUTH_REJECTEDVERF_IDX \
- + sizeof "Server rejected verifier")
- - _("Client credential too weak")
- + N_("Client credential too weak")
- "\0"
- #define AUTH_INVALIDRESP_IDX (AUTH_TOOWEAK_IDX \
- + sizeof "Client credential too weak")
- - _("Invalid server verifier")
- + N_("Invalid server verifier")
- "\0"
- #define AUTH_FAILED_IDX (AUTH_INVALIDRESP_IDX \
- + sizeof "Invalid server verifier")
- - _("Failed (unspecified error)")
- + N_("Failed (unspecified error)")
- };
-
- static const struct auth_errtab auth_errlist[] =
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_raw.c uClibc/libc/inet/rpc/clnt_raw.c
- --- uClibc-0.9.33.2/libc/inet/rpc/clnt_raw.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/clnt_raw.c 2014-02-03 12:32:56.000000000 +0100
- @@ -42,7 +42,6 @@
- * any interference from the kernel.
- */
-
- -#define __FORCE_GLIBC
- #include <features.h>
- #include "rpc_private.h"
- #include <rpc/svc.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_simple.c uClibc/libc/inet/rpc/clnt_simple.c
- --- uClibc-0.9.33.2/libc/inet/rpc/clnt_simple.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/clnt_simple.c 2014-02-03 12:32:56.000000000 +0100
- @@ -38,9 +38,6 @@
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <alloca.h>
- #include <errno.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_tcp.c uClibc/libc/inet/rpc/clnt_tcp.c
- --- uClibc-0.9.33.2/libc/inet/rpc/clnt_tcp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/clnt_tcp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -50,22 +50,14 @@
- * Now go hang yourself.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <netdb.h>
- #include <errno.h>
- #include <stdio.h>
- #include <unistd.h>
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
- #include <sys/poll.h>
- #include <sys/socket.h>
- #include <rpc/pmap_clnt.h>
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -#endif
- -
- -extern u_long _create_xid (void) attribute_hidden;
-
- #define MCALL_MSG_SIZE 24
-
- @@ -130,13 +122,7 @@
- if (h == NULL || ct == NULL)
- {
- struct rpc_createerr *ce = &get_rpc_createerr ();
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s",
- - _("clnttcp_create: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("clnttcp_create: out of memory\n"), stderr);
- + (void) fputs (_("clnttcp_create: out of memory\n"), stderr);
- ce->cf_stat = RPC_SYSTEMERROR;
- ce->cf_error.re_errno = ENOMEM;
- goto fooy;
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_udp.c uClibc/libc/inet/rpc/clnt_udp.c
- --- uClibc-0.9.33.2/libc/inet/rpc/clnt_udp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/clnt_udp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -37,12 +37,9 @@
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <unistd.h>
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
- #include <rpc/xdr.h>
- #include <rpc/clnt.h>
- #include <sys/poll.h>
- @@ -52,20 +49,12 @@
- #include <errno.h>
- #include <rpc/pmap_clnt.h>
- #include <net/if.h>
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -#endif
-
- #ifdef IP_RECVERR
- #include "errqueue.h"
- #include <sys/uio.h>
- #endif
-
- -/* CMSG_NXTHDR is using it */
- -
- -
- -extern u_long _create_xid (void) attribute_hidden;
- -
- /*
- * UDP bases client side rpc operations
- */
- @@ -116,7 +105,7 @@
- * NB: The rpch->cl_auth is initialized to null authentication.
- * Caller may wish to set this something more useful.
- *
- - * wait is the amount of time used between retransmitting a call if
- + * _wait is the amount of time used between retransmitting a call if
- * no response has been heard; retransmission occurs until the actual
- * rpc call times out.
- *
- @@ -125,7 +114,7 @@
- */
- CLIENT *
- clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version,
- - struct timeval wait, int *sockp, u_int sendsz,
- + struct timeval _wait, int *sockp, u_int sendsz,
- u_int recvsz)
- {
- CLIENT *cl;
- @@ -139,13 +128,7 @@
- if (cl == NULL || cu == NULL)
- {
- struct rpc_createerr *ce = &get_rpc_createerr ();
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s",
- - _("clntudp_create: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("clntudp_create: out of memory\n"), stderr);
- + (void) fputs (_("clntudp_create: out of memory\n"), stderr);
- ce->cf_stat = RPC_SYSTEMERROR;
- ce->cf_error.re_errno = ENOMEM;
- goto fooy;
- @@ -166,7 +149,7 @@
- cl->cl_private = (caddr_t) cu;
- cu->cu_raddr = *raddr;
- cu->cu_rlen = sizeof (cu->cu_raddr);
- - cu->cu_wait = wait;
- + cu->cu_wait = _wait;
- cu->cu_total.tv_sec = -1;
- cu->cu_total.tv_usec = -1;
- cu->cu_sendsz = sendsz;
- @@ -224,10 +207,10 @@
- libc_hidden_def(clntudp_bufcreate)
-
- CLIENT *
- -clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval wait, int *sockp)
- +clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval _wait, int *sockp)
- {
-
- - return clntudp_bufcreate (raddr, program, version, wait, sockp,
- + return clntudp_bufcreate (raddr, program, version, _wait, sockp,
- UDPMSGSIZE, UDPMSGSIZE);
- }
- libc_hidden_def(clntudp_create)
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_unix.c uClibc/libc/inet/rpc/clnt_unix.c
- --- uClibc-0.9.33.2/libc/inet/rpc/clnt_unix.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/clnt_unix.c 2014-02-03 12:32:56.000000000 +0100
- @@ -46,24 +46,15 @@
- * Now go hang yourself.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <netdb.h>
- #include <errno.h>
- #include <stdio.h>
- #include <unistd.h>
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
- #include <sys/uio.h>
- #include <sys/poll.h>
- #include <sys/socket.h>
- #include <rpc/pmap_clnt.h>
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -#endif
- -
- -
- -extern u_long _create_xid (void) attribute_hidden;
-
- #define MCALL_MSG_SIZE 24
-
- @@ -128,13 +119,7 @@
- if (h == NULL || ct == NULL)
- {
- struct rpc_createerr *ce = &get_rpc_createerr ();
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s",
- - _("clntunix_create: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("clntunix_create: out of memory\n"), stderr);
- + (void) fputs (_("clntunix_create: out of memory\n"), stderr);
- ce->cf_stat = RPC_SYSTEMERROR;
- ce->cf_error.re_errno = ENOMEM;
- goto fooy;
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/create_xid.c uClibc/libc/inet/rpc/create_xid.c
- --- uClibc-0.9.33.2/libc/inet/rpc/create_xid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/create_xid.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,17 +13,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#define __FORCE_GLIBC
- -#include <features.h>
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
- #include <stdlib.h>
- #include <sys/time.h>
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
-
-
- /* The RPC code is not threadsafe, but new code should be threadsafe. */
- @@ -34,7 +30,6 @@
- static smallint is_initialized;
- static struct drand48_data __rpc_lrand48_data;
-
- -u_long _create_xid (void) attribute_hidden;
- u_long _create_xid (void)
- {
- long res;
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/errqueue.h uClibc/libc/inet/rpc/errqueue.h
- --- uClibc-0.9.33.2/libc/inet/rpc/errqueue.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/errqueue.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Linux version. */
-
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/get_myaddress.c uClibc/libc/inet/rpc/get_myaddress.c
- --- uClibc-0.9.33.2/libc/inet/rpc/get_myaddress.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/get_myaddress.c 2014-02-03 12:32:56.000000000 +0100
- @@ -44,6 +44,7 @@
- #include <sys/socket.h>
- #include <stdio.h>
- #include <unistd.h>
- +#include <libintl.h>
- #include <net/if.h>
- #include <sys/ioctl.h>
- /* Order of following two #includes reversed by roland@gnu */
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/getrpcent.c uClibc/libc/inet/rpc/getrpcent.c
- --- uClibc-0.9.33.2/libc/inet/rpc/getrpcent.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/getrpcent.c 2014-02-03 12:32:56.000000000 +0100
- @@ -33,8 +33,6 @@
- * Copyright (c) 1985 by Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <stdio.h>
- #include <string.h>
- #include <sys/types.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/getrpcport.c uClibc/libc/inet/rpc/getrpcport.c
- --- uClibc-0.9.33.2/libc/inet/rpc/getrpcport.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/getrpcport.c 2014-02-03 12:32:56.000000000 +0100
- @@ -35,9 +35,6 @@
- * Copyright (c) 1985 by Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <alloca.h>
- #include <errno.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/Makefile.in uClibc/libc/inet/rpc/Makefile.in
- --- uClibc-0.9.33.2/libc/inet/rpc/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -9,9 +9,8 @@
-
- CFLAGS-rpc := -fno-strict-aliasing
-
- -ifneq ($(UCLIBC_HAS_FULL_RPC),y)
- # For now, only compile the stuff needed to do an NFS mount....
- -CSRC:= authunix_prot.c auth_none.c auth_unix.c bindresvport.c \
- +CSRC_NFS = authunix_prot.c auth_none.c auth_unix.c bindresvport.c \
- clnt_perror.c clnt_simple.c clnt_tcp.c clnt_udp.c \
- create_xid.c getrpcent.c \
- pmap_clnt.c pm_getmaps.c pm_getport.c pmap_prot.c pmap_prot2.c \
- @@ -19,27 +18,23 @@
- rpc_prot.c rpc_thread.c rtime.c ruserpass.c sa_len.c \
- svc.c svc_auth.c svc_authux.c \
- xdr.c xdr_array.c xdr_mem.c xdr_rec.c xdr_reference.c
- -endif
-
- INET_RPC_DIR:=$(top_srcdir)libc/inet/rpc
- INET_RPC_OUT:=$(top_builddir)libc/inet/rpc
-
- -ifeq ($(UCLIBC_HAS_FULL_RPC),y)
- -INET_RPC_SRC:=$(wildcard $(INET_RPC_DIR)/*.c)
- -else
- -INET_RPC_SRC:=$(patsubst %.c,$(INET_RPC_DIR)/%.c,$(CSRC))
- -endif
- -# rpc_thread.oS is better, because the header adds unneeded references to __pthread_internal_tsd*
- -INET_RPC_SRC:=$(filter-out $(INET_RPC_DIR)/rpc_thread.c,$(INET_RPC_SRC))
- +CSRC_ALL = $(notdir $(wildcard $(INET_RPC_DIR)/*.c))
- +CSRC-y := $(if $(UCLIBC_HAS_FULL_RPC),$(CSRC_ALL),$(CSRC_NFS))
- +# rpc_thread.oS is better, because the header adds unneeded references
- +# to __pthread_internal_tsd*
- +CSRC-y := $(filter-out rpc_thread.c,$(CSRC-y))
-
- -INET_RPC_OBJ:=$(patsubst $(INET_RPC_DIR)/%.c,$(INET_RPC_OUT)/%.o,$(INET_RPC_SRC))
- -
- -libc-static-$(UCLIBC_HAS_RPC)+=$(INET_RPC_OUT)/rpc_thread.o
- -libc-shared-$(UCLIBC_HAS_RPC)+=$(INET_RPC_OUT)/rpc_thread.oS
- +INET_RPC_SRC:=$(patsubst %.c,$(INET_RPC_DIR)/%.c,$(CSRC-y))
- +INET_RPC_OBJ:=$(patsubst %.c,$(INET_RPC_OUT)/%.o,$(CSRC-y))
-
- +libc-static-$(UCLIBC_HAS_RPC) += $(INET_RPC_OUT)/rpc_thread.o
- +libc-shared-$(UCLIBC_HAS_RPC) += $(INET_RPC_OUT)/rpc_thread.oS
- libc-nomulti-$(UCLIBC_HAS_RPC) += $(INET_RPC_OUT)/rpc_thread.o
- -
- -libc-$(UCLIBC_HAS_RPC)+=$(INET_RPC_OBJ)
- +libc-$(UCLIBC_HAS_RPC) += $(INET_RPC_OBJ)
-
- objclean-y+=CLEAN_libc/inet/rpc
-
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/pmap_clnt.c uClibc/libc/inet/rpc/pmap_clnt.c
- --- uClibc-0.9.33.2/libc/inet/rpc/pmap_clnt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/pmap_clnt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -34,9 +34,6 @@
- * Client interface to pmap rpc service.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <unistd.h>
- #include <net/if.h>
- @@ -44,7 +41,7 @@
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
- #include <rpc/pmap_prot.h>
- #include <rpc/pmap_clnt.h>
-
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/pmap_rmt.c uClibc/libc/inet/rpc/pmap_rmt.c
- --- uClibc-0.9.33.2/libc/inet/rpc/pmap_rmt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/pmap_rmt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -39,12 +39,9 @@
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <unistd.h>
- #include <string.h>
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
- #include <rpc/pmap_prot.h>
- #include <rpc/pmap_clnt.h>
- #include <rpc/pmap_rmt.h>
- @@ -52,17 +49,12 @@
- #include <sys/socket.h>
- #include <stdio.h>
- #include <errno.h>
- -#undef _POSIX_SOURCE /* Ultrix <sys/param.h> needs --roland@gnu */
- #include <sys/param.h> /* Ultrix needs before net/if --roland@gnu */
- #include <net/if.h>
- #include <sys/ioctl.h>
- #include <arpa/inet.h>
- #define MAX_BROADCAST_SIZE 1400
-
- -
- -
- -extern u_long _create_xid (void) attribute_hidden;
- -
- static const struct timeval timeout = {3, 0};
-
- /*
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/pm_getmaps.c uClibc/libc/inet/rpc/pm_getmaps.c
- --- uClibc-0.9.33.2/libc/inet/rpc/pm_getmaps.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/pm_getmaps.c 2014-02-03 12:32:56.000000000 +0100
- @@ -39,7 +39,7 @@
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
- #include <rpc/pmap_prot.h>
- #include <rpc/pmap_clnt.h>
- #include <netdb.h>
- @@ -78,7 +78,7 @@
- }
- CLNT_DESTROY (client);
- }
- - /* (void)__close(_socket); CLNT_DESTROY already closed it */
- + /* (void)close(_socket); CLNT_DESTROY already closed it */
- address->sin_port = 0;
- return head;
- }
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/pm_getport.c uClibc/libc/inet/rpc/pm_getport.c
- --- uClibc-0.9.33.2/libc/inet/rpc/pm_getport.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/pm_getport.c 2014-02-03 12:32:56.000000000 +0100
- @@ -65,7 +65,19 @@
- struct pmap parms;
-
- address->sin_port = htons (PMAPPORT);
- - client = clntudp_bufcreate (address, PMAPPROG,
- + if (protocol == IPPROTO_TCP)
- + {
- + // glibc does this:
- + ///* Don't need a reserved port to get ports from the portmapper. */
- + //socket = __get_socket(address); // does socket(TCP),bind(),connect(address)
- + //if (_socket != -1)
- + // closeit = true;
- + // do we need/want to do the same?
- + client = clnttcp_create (address, PMAPPROG,
- + PMAPVERS, &_socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
- + }
- + else
- + client = clntudp_bufcreate (address, PMAPPROG,
- PMAPVERS, timeout, &_socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
- if (client != (CLIENT *) NULL)
- {
- @@ -87,7 +99,7 @@
- }
- CLNT_DESTROY (client);
- }
- - /* (void)__close(_socket); CLNT_DESTROY already closed it */
- + /* (void)close(_socket); CLNT_DESTROY already closed it */
- address->sin_port = 0;
- return port;
- }
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rcmd.c uClibc/libc/inet/rpc/rcmd.c
- --- uClibc-0.9.33.2/libc/inet/rpc/rcmd.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/rcmd.c 2014-02-03 12:32:56.000000000 +0100
- @@ -76,7 +76,6 @@
- #include <pwd.h>
- #include <errno.h>
- #include <stdio.h>
- -#include <stdio_ext.h>
- #include <ctype.h>
- #include <string.h>
- #include <libintl.h>
- @@ -87,6 +86,11 @@
- #include <sys/uio.h>
- #include <bits/uClibc_alloc.h>
-
- +/* sigsetmask and sigblock are not provided anymore, until this file is corrected,
- + * include the sources */
- +#include "../../signal/sigblock.c"
- +#include "../../signal/sigsetmask.c"
- +
-
- /* some forward declarations */
- static int __ivaliduser2(FILE *hostf, u_int32_t raddr,
- @@ -146,7 +150,7 @@
- pfd[1].events = POLLIN;
-
- *ahost = hp->h_name;
- - oldmask = sigblock(sigmask(SIGURG)); /* __sigblock */
- + oldmask = sigblock(__sigmask(SIGURG)); /* sigblock */
- for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
- s = rresvport(&lport);
- if (s < 0) {
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rexec.c uClibc/libc/inet/rpc/rexec.c
- --- uClibc-0.9.33.2/libc/inet/rpc/rexec.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/rexec.c 2014-02-03 12:32:56.000000000 +0100
- @@ -27,8 +27,6 @@
- * SUCH DAMAGE.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <sys/types.h>
- #include <sys/socket.h>
-
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rpc_cmsg.c uClibc/libc/inet/rpc/rpc_cmsg.c
- --- uClibc-0.9.33.2/libc/inet/rpc/rpc_cmsg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/rpc_cmsg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -38,9 +38,6 @@
- *
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <string.h>
- #include <sys/param.h>
- #include <rpc/rpc.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rpc_dtablesize.c uClibc/libc/inet/rpc/rpc_dtablesize.c
- --- uClibc-0.9.33.2/libc/inet/rpc/rpc_dtablesize.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/rpc_dtablesize.c 2014-02-03 12:32:56.000000000 +0100
- @@ -31,10 +31,6 @@
- static char sccsid[] = "@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro";
- #endif
-
- -#define __FORCE_GLIBC
- -#define __USE_BSD
- -#include <features.h>
- -
- #include <unistd.h>
- #include <rpc/clnt.h>
-
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rpc_private.h uClibc/libc/inet/rpc/rpc_private.h
- --- uClibc-0.9.33.2/libc/inet/rpc/rpc_private.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/rpc_private.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,7 @@
- -#ifndef _RPC_RPC_H
- +#ifndef _RPC_PRIVATE_H
- +#define _RPC_PRIVATE_H
- #include <rpc/rpc.h>
- +#include <libintl.h>
-
- /* Now define the internal interfaces. */
- extern u_long _create_xid (void) attribute_hidden;
- @@ -12,14 +14,13 @@
- */
- #ifdef __UCLIBC_HAS_THREADS__
- #include <pthread.h>
- +#include <bits/libc-lock.h>
- struct rpc_thread_variables {
- fd_set svc_fdset_s; /* Global, rpc_common.c */
- struct rpc_createerr rpc_createerr_s; /* Global, rpc_common.c */
- struct pollfd *svc_pollfd_s; /* Global, rpc_common.c */
- int svc_max_pollfd_s; /* Global, rpc_common.c */
-
- - void *authnone_private_s; /* auth_none.c */
- -
- void *clnt_perr_buf_s; /* clnt_perr.c */
-
- void *clntraw_private_s; /* clnt_raw.c */
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rpc_prot.c uClibc/libc/inet/rpc/rpc_prot.c
- --- uClibc-0.9.33.2/libc/inet/rpc/rpc_prot.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/rpc_prot.c 2014-02-03 12:32:56.000000000 +0100
- @@ -44,9 +44,6 @@
- * routines are also in this program.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <sys/param.h>
-
- #include <rpc/rpc.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rpc_thread.c uClibc/libc/inet/rpc/rpc_thread.c
- --- uClibc-0.9.33.2/libc/inet/rpc/rpc_thread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/rpc_thread.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,8 +4,6 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <stdio.h>
- #include <assert.h>
- #include "rpc_private.h"
- @@ -32,7 +30,6 @@
- __rpc_thread_svc_cleanup ();
- __rpc_thread_clnt_cleanup ();
- /*__rpc_thread_key_cleanup (); */
- - free (tvp->authnone_private_s);
- free (tvp->clnt_perr_buf_s);
- free (tvp->clntraw_private_s);
- free (tvp->svcraw_private_s);
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rtime.c uClibc/libc/inet/rpc/rtime.c
- --- uClibc-0.9.33.2/libc/inet/rpc/rtime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/rtime.c 2014-02-03 12:32:56.000000000 +0100
- @@ -43,9 +43,6 @@
- * what unix uses.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <unistd.h>
- #include <rpc/rpc.h>
- @@ -150,4 +147,3 @@
- timep->tv_usec = 0;
- return 0;
- }
- -libc_hidden_def (rtime)
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/ruserpass.c uClibc/libc/inet/rpc/ruserpass.c
- --- uClibc-0.9.33.2/libc/inet/rpc/ruserpass.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/ruserpass.c 2014-02-03 12:32:56.000000000 +0100
- @@ -27,8 +27,6 @@
- * SUCH DAMAGE.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-
- @@ -37,13 +35,14 @@
- #include <errno.h>
- #include <netdb.h>
- #include <stdio.h>
- -#include <stdio_ext.h>
- +#ifdef __UCLIBC_HAS_THREADS__
- +# include <stdio_ext.h>
- +#endif
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
- +#include <libintl.h>
-
- -
- -#define _(X) (X)
- /* #include "ftp_var.h" */
-
- static int token (void);
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/sa_len.c uClibc/libc/inet/rpc/sa_len.c
- --- uClibc-0.9.33.2/libc/inet/rpc/sa_len.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/sa_len.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,17 +12,14 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- -#include <netipx/ipx.h>
- #include <sys/un.h>
- #if 0
- +#include <netipx/ipx.h>
- #include <netash/ash.h>
- #include <netatalk/at.h>
- #include <netax25/ax25.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_auth.c uClibc/libc/inet/rpc/svc_auth.c
- --- uClibc-0.9.33.2/libc/inet/rpc/svc_auth.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/svc_auth.c 2014-02-03 12:32:56.000000000 +0100
- @@ -58,9 +58,9 @@
-
- static enum auth_stat _svcauth_null (struct svc_req *, struct rpc_msg *);
- /* no authentication */
- -extern enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *);
- +extern enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *) attribute_hidden;
- /* unix style (uid, gids) */
- -extern enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *);
- +extern enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *) attribute_hidden;
- /* short hand unix style */
- #ifdef CONFIG_AUTH_DES
- extern enum auth_stat _svcauth_des (struct svc_req *, struct rpc_msg *);
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_authux.c uClibc/libc/inet/rpc/svc_authux.c
- --- uClibc-0.9.33.2/libc/inet/rpc/svc_authux.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/svc_authux.c 2014-02-03 12:32:56.000000000 +0100
- @@ -38,9 +38,6 @@
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <string.h>
- #include <rpc/rpc.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc.c uClibc/libc/inet/rpc/svc.c
- --- uClibc-0.9.33.2/libc/inet/rpc/svc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/svc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -36,9 +36,6 @@
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <errno.h>
- #include <unistd.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_raw.c uClibc/libc/inet/rpc/svc_raw.c
- --- uClibc-0.9.33.2/libc/inet/rpc/svc_raw.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/svc_raw.c 2014-02-03 12:32:56.000000000 +0100
- @@ -40,8 +40,6 @@
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include "rpc_private.h"
- #include <rpc/svc.h>
-
- @@ -69,7 +67,7 @@
- static bool_t svcraw_freeargs (SVCXPRT *, xdrproc_t, caddr_t);
- static void svcraw_destroy (SVCXPRT *);
-
- -static struct xp_ops server_ops =
- +static const struct xp_ops server_ops =
- {
- svcraw_recv,
- svcraw_stat,
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_run.c uClibc/libc/inet/rpc/svc_run.c
- --- uClibc-0.9.33.2/libc/inet/rpc/svc_run.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/svc_run.c 2014-02-03 12:32:56.000000000 +0100
- @@ -31,13 +31,10 @@
- * Wait for input, call server program.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <errno.h>
- #include <unistd.h>
- #include <sys/poll.h>
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
-
- /* used by svc_[max_]pollfd */
-
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_simple.c uClibc/libc/inet/rpc/svc_simple.c
- --- uClibc-0.9.33.2/libc/inet/rpc/svc_simple.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/svc_simple.c 2014-02-03 12:32:56.000000000 +0100
- @@ -38,9 +38,6 @@
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
- @@ -49,13 +46,6 @@
- #include <sys/socket.h>
- #include <netdb.h>
-
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -# include <libio/iolibio.h>
- -# define fputs(s, f) _IO_fputs (s, f)
- -#endif
- -
- -
- struct proglst_
- {
- char *(*p_progname) (char *);
- @@ -127,12 +117,7 @@
- return 0;
-
- err_out:
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) __fwprintf (stderr, L"%s", buf);
- - else
- -#endif
- - (void) fputs (buf, stderr);
- + (void) fputs (buf, stderr);
- free (buf);
- return -1;
- }
- @@ -186,12 +171,7 @@
- return;
- }
- (void) asprintf (&buf, _("never registered prog %d\n"), prog);
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - __fwprintf (stderr, L"%s", buf);
- - else
- -#endif
- - fputs (buf, stderr);
- + fputs (buf, stderr);
- free (buf);
- exit (1);
- }
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_tcp.c uClibc/libc/inet/rpc/svc_tcp.c
- --- uClibc-0.9.33.2/libc/inet/rpc/svc_tcp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/svc_tcp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -41,25 +41,15 @@
- * and a record/tcp stream.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <unistd.h>
- #include <string.h>
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
- #include <sys/socket.h>
- #include <sys/poll.h>
- #include <errno.h>
- #include <stdlib.h>
-
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -# include <libio/iolibio.h>
- -# define fputs(s, f) _IO_fputs (s, f)
- -#endif
- -
- -
- /*
- * Ops vector for TCP/IP based rpc service handle
- */
- @@ -180,12 +170,7 @@
- xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT));
- if (r == NULL || xprt == NULL)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) __fwprintf (stderr, L"%s", _("svctcp_create: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("svctcp_create: out of memory\n"), stderr);
- + (void) fputs (_("svctcp_create: out of memory\n"), stderr);
- mem_free (r, sizeof (*r));
- mem_free (xprt, sizeof (SVCXPRT));
- return NULL;
- @@ -225,13 +210,7 @@
- cd = (struct tcp_conn *) mem_alloc (sizeof (struct tcp_conn));
- if (xprt == (SVCXPRT *) NULL || cd == NULL)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) __fwprintf (stderr, L"%s",
- - _("svc_tcp: makefd_xprt: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("svc_tcp: makefd_xprt: out of memory\n"), stderr);
- + (void) fputs (_("svc_tcp: makefd_xprt: out of memory\n"), stderr);
- mem_free (xprt, sizeof (SVCXPRT));
- mem_free (cd, sizeof (struct tcp_conn));
- return NULL;
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_udp.c uClibc/libc/inet/rpc/svc_udp.c
- --- uClibc-0.9.33.2/libc/inet/rpc/svc_udp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/svc_udp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -39,13 +39,10 @@
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <unistd.h>
- #include <string.h>
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
- #include <sys/socket.h>
- #include <errno.h>
-
- @@ -53,13 +50,6 @@
- #include <sys/uio.h>
- #endif
-
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -# include <libio/iolibio.h>
- -# define fputs(s, f) _IO_fputs (s, f)
- -#endif
- -
- -
- #define rpc_buffer(xprt) ((xprt)->xp_p1)
- #ifndef MAX
- #define MAX(a, b) ((a > b) ? a : b)
- @@ -151,12 +141,7 @@
- buf = mem_alloc (((MAX (sendsz, recvsz) + 3) / 4) * 4);
- if (xprt == NULL || su == NULL || buf == NULL)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s", _("svcudp_create: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("svcudp_create: out of memory\n"), stderr);
- + (void) fputs (_("svcudp_create: out of memory\n"), stderr);
- mem_free (xprt, sizeof (SVCXPRT));
- mem_free (su, sizeof (*su));
- mem_free (buf, ((MAX (sendsz, recvsz) + 3) / 4) * 4);
- @@ -177,13 +162,7 @@
- + sizeof(struct cmsghdr) + sizeof (struct in_pktinfo))
- > sizeof (xprt->xp_pad))
- {
- -# ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s",
- - _("svcudp_create: xp_pad is too small for IP_PKTINFO\n"));
- - else
- -# endif
- - (void) fputs (_("svcudp_create: xp_pad is too small for IP_PKTINFO\n"),
- + (void) fputs (_("svcudp_create: xp_pad is too small for IP_PKTINFO\n"),
- stderr);
- return NULL;
- }
- @@ -378,16 +357,8 @@
-
- #define SPARSENESS 4 /* 75% sparse */
-
- -#ifdef USE_IN_LIBIO
- -# define CACHE_PERROR(msg) \
- - if (_IO_fwide (stderr, 0) > 0) \
- - (void) __fwprintf(stderr, L"%s\n", msg); \
- - else \
- - (void) fprintf(stderr, "%s\n", msg)
- -#else
- -# define CACHE_PERROR(msg) \
- +#define CACHE_PERROR(msg) \
- (void) fprintf(stderr,"%s\n", msg)
- -#endif
-
- #define ALLOC(type, size) \
- (type *) mem_alloc((unsigned) (sizeof(type) * (size)))
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_unix.c uClibc/libc/inet/rpc/svc_unix.c
- --- uClibc-0.9.33.2/libc/inet/rpc/svc_unix.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/svc_unix.c 2014-02-03 12:32:56.000000000 +0100
- @@ -37,13 +37,10 @@
- * and a record/unix stream.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <unistd.h>
- #include <string.h>
- -#include <rpc/rpc.h>
- +#include "rpc_private.h"
- #include <rpc/svc.h>
- #include <sys/socket.h>
- #include <sys/uio.h>
- @@ -51,11 +48,6 @@
- #include <errno.h>
- #include <stdlib.h>
-
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -#endif
- -
- -
- /*
- * Ops vector for AF_UNIX based rpc service handle
- */
- @@ -176,12 +168,7 @@
- xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT));
- if (r == NULL || xprt == NULL)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - __fwprintf (stderr, L"%s", _("svcunix_create: out of memory\n"));
- - else
- -#endif
- - fputs (_("svcunix_create: out of memory\n"), stderr);
- + fputs (_("svcunix_create: out of memory\n"), stderr);
- mem_free (r, sizeof (*r));
- mem_free (xprt, sizeof (SVCXPRT));
- return NULL;
- @@ -221,13 +208,7 @@
- cd = (struct unix_conn *) mem_alloc (sizeof (struct unix_conn));
- if (xprt == (SVCXPRT *) NULL || cd == (struct unix_conn *) NULL)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) __fwprintf (stderr, L"%s",
- - _("svc_unix: makefd_xprt: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("svc_unix: makefd_xprt: out of memory\n"), stderr);
- + (void) fputs (_("svc_unix: makefd_xprt: out of memory\n"), stderr);
- mem_free (xprt, sizeof (SVCXPRT));
- mem_free (cd, sizeof (struct unix_conn));
- return NULL;
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_array.c uClibc/libc/inet/rpc/xdr_array.c
- --- uClibc-0.9.33.2/libc/inet/rpc/xdr_array.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/xdr_array.c 2014-02-03 12:32:56.000000000 +0100
- @@ -40,23 +40,15 @@
- * arrays. See xdr.h for more info on the interface to xdr.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <string.h>
- #include <rpc/types.h>
- #include <rpc/xdr.h>
- #include <limits.h>
- -
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -#endif
- -
- +#include <libintl.h>
-
- #define LASTUNSIGNED ((u_int)0-1)
-
- -
- /*
- * XDR an array of arbitrary elements
- * *addrp is a pointer to the array, *sizep is the number of elements.
- @@ -102,13 +94,7 @@
- *addrp = target = mem_alloc (nodesize);
- if (target == NULL)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s",
- - _("xdr_array: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("xdr_array: out of memory\n"), stderr);
- + (void) fputs (_("xdr_array: out of memory\n"), stderr);
- return FALSE;
- }
- memset (target, 0, nodesize);
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr.c uClibc/libc/inet/rpc/xdr.c
- --- uClibc-0.9.33.2/libc/inet/rpc/xdr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/xdr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -41,21 +41,14 @@
- * xdr.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <limits.h>
- #include <string.h>
- +#include <libintl.h>
-
- #include <rpc/types.h>
- #include <rpc/xdr.h>
-
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -#endif
- -
- -
- /*
- * constants specific to the xdr "protocol"
- */
- @@ -564,12 +557,7 @@
- }
- if (sp == NULL)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s", _("xdr_bytes: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("xdr_bytes: out of memory\n"), stderr);
- + (void) fputs (_("xdr_bytes: out of memory\n"), stderr);
- return FALSE;
- }
- /* fall into ... */
- @@ -706,13 +694,7 @@
- *cpp = sp = (char *) mem_alloc (nodesize);
- if (sp == NULL)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s",
- - _("xdr_string: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("xdr_string: out of memory\n"), stderr);
- + (void) fputs (_("xdr_string: out of memory\n"), stderr);
- return FALSE;
- }
- sp[size] = 0;
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_float.c uClibc/libc/inet/rpc/xdr_float.c
- --- uClibc-0.9.33.2/libc/inet/rpc/xdr_float.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/xdr_float.c 2014-02-03 12:32:56.000000000 +0100
- @@ -41,9 +41,6 @@
- * xdr.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <endian.h>
-
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_intXX_t.c uClibc/libc/inet/rpc/xdr_intXX_t.c
- --- uClibc-0.9.33.2/libc/inet/rpc/xdr_intXX_t.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/xdr_intXX_t.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <rpc/types.h>
- #include <rpc/xdr.h>
- @@ -47,6 +46,7 @@
- return FALSE;
- }
- }
- +strong_alias_untyped(xdr_int64_t,xdr_quad_t)
-
- /* XDR 64bit unsigned integers */
- bool_t
- @@ -75,6 +75,7 @@
- return FALSE;
- }
- }
- +strong_alias_untyped(xdr_uint64_t,xdr_u_quad_t)
-
- /* XDR 32bit integers */
- bool_t
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_mem.c uClibc/libc/inet/rpc/xdr_mem.c
- --- uClibc-0.9.33.2/libc/inet/rpc/xdr_mem.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/xdr_mem.c 2014-02-03 12:32:56.000000000 +0100
- @@ -77,9 +77,7 @@
- xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
- {
- xdrs->x_op = op;
- - /* We have to add the const since the `struct xdr_ops' in `struct XDR'
- - is not `const'. */
- - xdrs->x_ops = (struct xdr_ops *) &xdrmem_ops;
- + xdrs->x_ops = &xdrmem_ops;
- xdrs->x_private = xdrs->x_base = addr;
- xdrs->x_handy = size;
- }
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_rec.c uClibc/libc/inet/rpc/xdr_rec.c
- --- uClibc-0.9.33.2/libc/inet/rpc/xdr_rec.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/xdr_rec.c 2014-02-03 12:32:56.000000000 +0100
- @@ -44,21 +44,10 @@
- * The other 31 bits encode the byte length of the fragment.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- -
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
- -#include <rpc/rpc.h>
- -
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -# include <libio/iolibio.h>
- -# define fputs(s, f) _IO_fputs (s, f)
- -#endif
- -
- +#include "rpc_private.h"
-
- static bool_t xdrrec_getbytes (XDR *, caddr_t, u_int);
- static bool_t xdrrec_putbytes (XDR *, const char *, u_int);
- @@ -165,12 +154,7 @@
-
- if (rstrm == NULL || buf == NULL)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s", _("xdrrec_create: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("xdrrec_create: out of memory\n"), stderr);
- + (void) fputs (_("xdrrec_create: out of memory\n"), stderr);
- mem_free (rstrm, sizeof (RECSTREAM));
- mem_free (buf, sendsize + recvsize + BYTES_PER_XDR_UNIT);
- /*
- @@ -193,9 +177,7 @@
- /*
- * now the rest ...
- */
- - /* We have to add the const since the `struct xdr_ops' in `struct XDR'
- - is not `const'. */
- - xdrs->x_ops = (struct xdr_ops *) &xdrrec_ops;
- + xdrs->x_ops = &xdrrec_ops;
- xdrs->x_private = (caddr_t) rstrm;
- rstrm->tcp_handle = tcp_handle;
- rstrm->readit = readit;
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_reference.c uClibc/libc/inet/rpc/xdr_reference.c
- --- uClibc-0.9.33.2/libc/inet/rpc/xdr_reference.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/xdr_reference.c 2014-02-03 12:32:56.000000000 +0100
- @@ -40,20 +40,11 @@
- * "pointers". See xdr.h for more info on the interface to xdr.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
- #include <string.h>
- #include <rpc/types.h>
- #include <rpc/xdr.h>
- -
- -#ifdef USE_IN_LIBIO
- -# include <wchar.h>
- -# include <libio/iolibio.h>
- -# define fputs(s, f) _IO_fputs (s, f)
- -#endif
- -
- +#include <libintl.h>
-
- #define LASTUNSIGNED ((u_int)0-1)
-
- @@ -82,13 +73,7 @@
- *pp = loc = (caddr_t) mem_alloc (size);
- if (loc == NULL)
- {
- -#ifdef USE_IN_LIBIO
- - if (_IO_fwide (stderr, 0) > 0)
- - (void) fwprintf (stderr, L"%s",
- - _("xdr_reference: out of memory\n"));
- - else
- -#endif
- - (void) fputs (_("xdr_reference: out of memory\n"), stderr);
- + (void) fputs (_("xdr_reference: out of memory\n"), stderr);
- return FALSE;
- }
- memset (loc, 0, (int) size);
- diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_stdio.c uClibc/libc/inet/rpc/xdr_stdio.c
- --- uClibc-0.9.33.2/libc/inet/rpc/xdr_stdio.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/rpc/xdr_stdio.c 2014-02-03 12:32:56.000000000 +0100
- @@ -41,15 +41,6 @@
- #include <stdio.h>
- #include <rpc/xdr.h>
-
- -#ifdef USE_IN_LIBIO
- -# include <libio/iolibio.h>
- -# define fflush(s) _IO_fflush (s)
- -# define fread(p, m, n, s) _IO_fread (p, m, n, s)
- -# define ftell(s) _IO_ftell (s)
- -# define fwrite(p, m, n, s) _IO_fwrite (p, m, n, s)
- -#endif
- -
- -
- static bool_t xdrstdio_getlong (XDR *, long *);
- static bool_t xdrstdio_putlong (XDR *, const long *);
- static bool_t xdrstdio_getbytes (XDR *, caddr_t, u_int);
- @@ -87,9 +78,7 @@
- xdrstdio_create (XDR *xdrs, FILE *file, enum xdr_op op)
- {
- xdrs->x_op = op;
- - /* We have to add the const since the `struct xdr_ops' in `struct XDR'
- - is not `const'. */
- - xdrs->x_ops = (struct xdr_ops *) &xdrstdio_ops;
- + xdrs->x_ops = &xdrstdio_ops;
- xdrs->x_private = (caddr_t) file;
- xdrs->x_handy = 0;
- xdrs->x_base = 0;
- diff -Nur uClibc-0.9.33.2/libc/inet/socketcalls.c uClibc/libc/inet/socketcalls.c
- --- uClibc-0.9.33.2/libc/inet/socketcalls.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/inet/socketcalls.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,15 +4,12 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -#include <errno.h>
- -#include <syscall.h>
- +#include <stddef.h>
- +#include <sys/syscall.h>
- #include <sys/socket.h>
- +#include <cancel.h>
-
- #ifdef __NR_socketcall
- -extern int __socketcall(int call, unsigned long *args) attribute_hidden;
- -
- /* Various socketcall numbers */
- #define SYS_SOCKET 1
- #define SYS_BIND 2
- @@ -34,53 +31,24 @@
- #define SYS_ACCEPT4 18
- #endif
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- -#include <pthreadP.h>
- -#else
- -#define SINGLE_THREAD_P 1
- -#endif
- -
- #ifdef L_accept
- -extern __typeof(accept) __libc_accept;
- -#ifdef __NR_accept
- -#define __NR___sys_accept __NR_accept
- -static
- -_syscall3(int, __sys_accept, int, call, struct sockaddr *, addr, socklen_t *,addrlen)
- -int __libc_accept(int s, struct sockaddr *addr, socklen_t * addrlen)
- -{
- - if (SINGLE_THREAD_P)
- - return __sys_accept(s, addr, addrlen);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __sys_accept(s, addr, addrlen);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -#elif defined(__NR_socketcall)
- -int __libc_accept(int s, struct sockaddr *addr, socklen_t * addrlen)
- +static int __NC(accept)(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
- {
- +# ifdef __NR_accept
- + return INLINE_SYSCALL(accept, 3, sockfd, addr, addrlen);
- +# else
- unsigned long args[3];
-
- - args[0] = s;
- + args[0] = sockfd;
- args[1] = (unsigned long) addr;
- args[2] = (unsigned long) addrlen;
-
- - if (SINGLE_THREAD_P)
- - return __socketcall(SYS_ACCEPT, args);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __socketcall(SYS_ACCEPT, args);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- + return __socketcall(SYS_ACCEPT, args);
- +# endif
- }
- -#endif
- -weak_alias(__libc_accept,accept)
- -libc_hidden_weak(accept)
- +CANCELLABLE_SYSCALL(int, accept, (int sockfd, struct sockaddr *addr, socklen_t *addrlen),
- + (sockfd, addr, addrlen))
- +lt_libc_hidden(accept)
- #endif
-
- #ifdef L_accept4
- @@ -124,104 +92,81 @@
- #endif
-
- #ifdef L_bind
- -#ifdef __NR_bind
- -_syscall3(int, bind, int, sockfd, const struct sockaddr *, myaddr, socklen_t, addrlen)
- -#elif defined(__NR_socketcall)
- int bind(int sockfd, const struct sockaddr *myaddr, socklen_t addrlen)
- {
- +# ifdef __NR_bind
- + return INLINE_SYSCALL(bind, 3, sockfd, myaddr, addrlen);
- +# else
- unsigned long args[3];
-
- args[0] = sockfd;
- args[1] = (unsigned long) myaddr;
- args[2] = addrlen;
- return __socketcall(SYS_BIND, args);
- +# endif
- }
- -#endif
- libc_hidden_def(bind)
- #endif
-
- #ifdef L_connect
- -extern __typeof(connect) __libc_connect;
- -#ifdef __NR_connect
- -#define __NR___sys_connect __NR_connect
- -static
- -_syscall3(int, __sys_connect, int, sockfd, const struct sockaddr *, saddr, socklen_t, addrlen)
- -int __libc_connect(int sockfd, const struct sockaddr *saddr, socklen_t addrlen)
- -{
- - if (SINGLE_THREAD_P)
- - return __sys_connect(sockfd, saddr, addrlen);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __sys_connect(sockfd, saddr, addrlen);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -#elif defined(__NR_socketcall)
- -int __libc_connect(int sockfd, const struct sockaddr *saddr, socklen_t addrlen)
- +static int __NC(connect)(int sockfd, const struct sockaddr *saddr, socklen_t addrlen)
- {
- +# ifdef __NR_connect
- + return INLINE_SYSCALL(connect, 3, sockfd, saddr, addrlen);
- +# else
- unsigned long args[3];
-
- args[0] = sockfd;
- args[1] = (unsigned long) saddr;
- args[2] = addrlen;
- -
- - if (SINGLE_THREAD_P)
- - return __socketcall(SYS_CONNECT, args);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __socketcall(SYS_CONNECT, args);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- + return __socketcall(SYS_CONNECT, args);
- +# endif
- }
- -#endif
- -weak_alias(__libc_connect,connect)
- -libc_hidden_weak(connect)
- +CANCELLABLE_SYSCALL(int, connect, (int sockfd, const struct sockaddr *saddr, socklen_t addrlen),
- + (sockfd, saddr, addrlen))
- +lt_libc_hidden(connect)
- #endif
-
- #ifdef L_getpeername
- -#ifdef __NR_getpeername
- -_syscall3(int, getpeername, int, sockfd, struct sockaddr *, addr, socklen_t *,paddrlen)
- -#elif defined(__NR_socketcall)
- -int getpeername(int sockfd, struct sockaddr *addr, socklen_t * paddrlen)
- +int getpeername(int sockfd, struct sockaddr *addr, socklen_t *paddrlen)
- {
- +# ifdef __NR_getpeername
- + return INLINE_SYSCALL(getpeername, 3, sockfd, addr, paddrlen);
- +# else
- unsigned long args[3];
-
- args[0] = sockfd;
- args[1] = (unsigned long) addr;
- args[2] = (unsigned long) paddrlen;
- return __socketcall(SYS_GETPEERNAME, args);
- +# endif
- }
- #endif
- -#endif
-
- #ifdef L_getsockname
- -#ifdef __NR_getsockname
- -_syscall3(int, getsockname, int, sockfd, struct sockaddr *, addr, socklen_t *,paddrlen)
- -#elif defined(__NR_socketcall)
- int getsockname(int sockfd, struct sockaddr *addr, socklen_t * paddrlen)
- {
- +# ifdef __NR_getsockname
- + return INLINE_SYSCALL(getsockname, 3, sockfd, addr, paddrlen);
- +# else
- unsigned long args[3];
-
- args[0] = sockfd;
- args[1] = (unsigned long) addr;
- args[2] = (unsigned long) paddrlen;
- return __socketcall(SYS_GETSOCKNAME, args);
- +# endif
- }
- -#endif
- libc_hidden_def(getsockname)
- #endif
-
- #ifdef L_getsockopt
- -#ifdef __NR_getsockopt
- -_syscall5(int, getsockopt, int, fd, int, level, int, optname, __ptr_t, optval, socklen_t *, optlen)
- -#elif defined(__NR_socketcall)
- -int getsockopt(int fd, int level, int optname, __ptr_t optval,
- - socklen_t * optlen)
- +int getsockopt(int fd, int level, int optname, void *optval,
- + socklen_t *optlen)
- {
- +# ifdef __NR_getsockopt
- + return INLINE_SYSCALL(getsockopt, 5, fd, level, optname, optval, optlen);
- +# else
- unsigned long args[5];
-
- args[0] = fd;
- @@ -230,101 +175,56 @@
- args[3] = (unsigned long) optval;
- args[4] = (unsigned long) optlen;
- return (__socketcall(SYS_GETSOCKOPT, args));
- +# endif
- }
- #endif
- -#endif
-
- #ifdef L_listen
- -#ifdef __NR_listen
- -_syscall2(int, listen, int, sockfd, int, backlog)
- -#elif defined(__NR_socketcall)
- int listen(int sockfd, int backlog)
- {
- +# ifdef __NR_listen
- + return INLINE_SYSCALL(listen, 2, sockfd, backlog);
- +# else
- unsigned long args[2];
-
- args[0] = sockfd;
- args[1] = backlog;
- return __socketcall(SYS_LISTEN, args);
- +# endif
- }
- -#endif
- libc_hidden_def(listen)
- #endif
-
- #ifdef L_recv
- -extern __typeof(recv) __libc_recv;
- -#ifdef __NR_recv
- -#define __NR___sys_recv __NR_recv
- -static
- -_syscall4(ssize_t, __sys_recv, int, sockfd, __ptr_t, buffer, size_t, len,
- - int, flags)
- -ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
- -{
- - if (SINGLE_THREAD_P)
- - return __sys_recv(sockfd, buffer, len, flags);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __sys_recv(sockfd, buffer, len, flags);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -#elif defined(__NR_socketcall)
- -/* recv, recvfrom added by bir7@leland.stanford.edu */
- -ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
- +static ssize_t __NC(recv)(int sockfd, void *buffer, size_t len, int flags)
- {
- +# ifdef __NR_recv
- + return (ssize_t)INLINE_SYSCALL(recv, 4, sockfd, buffer, len, flags);
- +# elif defined __NR_recvfrom && defined _syscall6
- + return __NC(recvfrom)(sockfd, buffer, len, flags, NULL, NULL);
- +# else
- unsigned long args[4];
-
- args[0] = sockfd;
- args[1] = (unsigned long) buffer;
- args[2] = len;
- args[3] = flags;
- -
- - if (SINGLE_THREAD_P)
- - return (__socketcall(SYS_RECV, args));
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __socketcall(SYS_RECV, args);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -#elif defined(__NR_recvfrom)
- -ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
- -{
- - return (recvfrom(sockfd, buffer, len, flags, NULL, NULL));
- + return (ssize_t)__socketcall(SYS_RECV, args);
- +# endif
- }
- -#endif
- -weak_alias(__libc_recv,recv)
- -libc_hidden_weak(recv)
- +CANCELLABLE_SYSCALL(ssize_t, recv, (int sockfd, void *buffer, size_t len, int flags),
- + (sockfd, buffer, len, flags))
- +lt_libc_hidden(recv)
- #endif
-
- #ifdef L_recvfrom
- -extern __typeof(recvfrom) __libc_recvfrom;
- -#ifdef __NR_recvfrom
- -#define __NR___sys_recvfrom __NR_recvfrom
- -static
- -_syscall6(ssize_t, __sys_recvfrom, int, sockfd, __ptr_t, buffer, size_t, len,
- - int, flags, struct sockaddr *, to, socklen_t *, tolen)
- -ssize_t __libc_recvfrom(int sockfd, __ptr_t buffer, size_t len, int flags,
- - struct sockaddr *to, socklen_t * tolen)
- -{
- - if (SINGLE_THREAD_P)
- - return __sys_recvfrom(sockfd, buffer, len, flags, to, tolen);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __sys_recvfrom(sockfd, buffer, len, flags, to, tolen);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -#elif defined(__NR_socketcall)
- -/* recv, recvfrom added by bir7@leland.stanford.edu */
- -ssize_t __libc_recvfrom(int sockfd, __ptr_t buffer, size_t len, int flags,
- - struct sockaddr *to, socklen_t * tolen)
- +ssize_t __NC(recvfrom)(int sockfd, void *buffer, size_t len, int flags,
- + struct sockaddr *to, socklen_t *tolen)
- {
- +# if defined __NR_recvfrom && defined _syscall6
- + return (ssize_t)INLINE_SYSCALL(recvfrom, 6, sockfd, buffer, len,
- + flags, to, tolen);
- +# else
- unsigned long args[6];
-
- args[0] = sockfd;
- @@ -333,180 +233,82 @@
- args[3] = flags;
- args[4] = (unsigned long) to;
- args[5] = (unsigned long) tolen;
- -
- - if (SINGLE_THREAD_P)
- - return (__socketcall(SYS_RECVFROM, args));
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __socketcall(SYS_RECVFROM, args);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- + return (ssize_t)__socketcall(SYS_RECVFROM, args);
- +# endif
- }
- -#endif
- -weak_alias(__libc_recvfrom,recvfrom)
- -libc_hidden_weak(recvfrom)
- +CANCELLABLE_SYSCALL(ssize_t, recvfrom, (int sockfd, void *buffer, size_t len,
- + int flags, struct sockaddr *to, socklen_t *tolen),
- + (sockfd, buffer, len, flags, to, tolen))
- +lt_libc_hidden(recvfrom)
- #endif
-
- #ifdef L_recvmsg
- -extern __typeof(recvmsg) __libc_recvmsg;
- -#ifdef __NR_recvmsg
- -#define __NR___sys_recvmsg __NR_recvmsg
- -static
- -_syscall3(ssize_t, __sys_recvmsg, int, sockfd, struct msghdr *, msg, int, flags)
- -ssize_t __libc_recvmsg(int sockfd, struct msghdr *msg, int flags)
- -{
- - if (SINGLE_THREAD_P)
- - return __sys_recvmsg(sockfd, msg, flags);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __sys_recvmsg(sockfd, msg, flags);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -#elif defined(__NR_socketcall)
- -ssize_t __libc_recvmsg(int sockfd, struct msghdr *msg, int flags)
- +static ssize_t __NC(recvmsg)(int sockfd, struct msghdr *msg, int flags)
- {
- +# ifdef __NR_recvmsg
- + return (ssize_t)INLINE_SYSCALL(recvmsg, 3, sockfd, msg, flags);
- +# else
- unsigned long args[3];
-
- args[0] = sockfd;
- args[1] = (unsigned long) msg;
- args[2] = flags;
- -
- - if (SINGLE_THREAD_P)
- - return (__socketcall(SYS_RECVMSG, args));
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __socketcall(SYS_RECVMSG, args);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- + return (ssize_t)__socketcall(SYS_RECVMSG, args);
- +# endif
- }
- -#endif
- -weak_alias(__libc_recvmsg,recvmsg)
- -libc_hidden_weak(recvmsg)
- +CANCELLABLE_SYSCALL(ssize_t, recvmsg, (int sockfd, struct msghdr *msg, int flags),
- + (sockfd, msg, flags))
- +lt_libc_hidden(recvmsg)
- #endif
-
- #ifdef L_send
- -extern __typeof(send) __libc_send;
- -#ifdef __NR_send
- -#define __NR___sys_send __NR_send
- -static
- -_syscall4(ssize_t, __sys_send, int, sockfd, const void *, buffer, size_t, len, int, flags)
- -ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags)
- -{
- - if (SINGLE_THREAD_P)
- - return __sys_send(sockfd, buffer, len, flags);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __sys_send(sockfd, buffer, len, flags);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -#elif defined(__NR_socketcall)
- -/* send, sendto added by bir7@leland.stanford.edu */
- -ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags)
- +static ssize_t __NC(send)(int sockfd, const void *buffer, size_t len, int flags)
- {
- +# ifdef __NR_send
- + return (ssize_t)INLINE_SYSCALL(send, 4, sockfd, buffer, len, flags);
- +# elif defined __NR_sendto && defined _syscall6
- + return __NC(sendto)(sockfd, buffer, len, flags, NULL, 0);
- +# else
- unsigned long args[4];
-
- args[0] = sockfd;
- args[1] = (unsigned long) buffer;
- args[2] = len;
- args[3] = flags;
- -
- - if (SINGLE_THREAD_P)
- - return (__socketcall(SYS_SEND, args));
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __socketcall(SYS_SEND, args);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -
- -#elif defined(__NR_sendto)
- -ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags)
- -{
- - return (sendto(sockfd, buffer, len, flags, NULL, 0));
- + return (ssize_t)__socketcall(SYS_SEND, args);
- +# endif
- }
- -#endif
- -weak_alias(__libc_send,send)
- -libc_hidden_weak(send)
- +CANCELLABLE_SYSCALL(ssize_t, send, (int sockfd, const void *buffer, size_t len, int flags),
- + (sockfd, buffer, len, flags))
- +lt_libc_hidden(send)
- #endif
-
- #ifdef L_sendmsg
- -extern __typeof(sendmsg) __libc_sendmsg;
- -#ifdef __NR_sendmsg
- -#define __NR___sys_sendmsg __NR_sendmsg
- -static
- -_syscall3(ssize_t, __sys_sendmsg, int, sockfd, const struct msghdr *, msg, int, flags)
- -ssize_t __libc_sendmsg(int sockfd, const struct msghdr *msg, int flags)
- -{
- - if (SINGLE_THREAD_P)
- - return __sys_sendmsg(sockfd, msg, flags);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __sys_sendmsg(sockfd, msg, flags);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -#elif defined(__NR_socketcall)
- -ssize_t __libc_sendmsg(int sockfd, const struct msghdr *msg, int flags)
- +static ssize_t __NC(sendmsg)(int sockfd, const struct msghdr *msg, int flags)
- {
- +# ifdef __NR_sendmsg
- + return (ssize_t)INLINE_SYSCALL(sendmsg, 3, sockfd, msg, flags);
- +# else
- unsigned long args[3];
-
- args[0] = sockfd;
- args[1] = (unsigned long) msg;
- args[2] = flags;
- -
- - if (SINGLE_THREAD_P)
- - return (__socketcall(SYS_SENDMSG, args));
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __socketcall(SYS_SENDMSG, args);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- + return (ssize_t)__socketcall(SYS_SENDMSG, args);
- +# endif
- }
- -#endif
- -weak_alias(__libc_sendmsg,sendmsg)
- -libc_hidden_weak(sendmsg)
- +CANCELLABLE_SYSCALL(ssize_t, sendmsg, (int sockfd, const struct msghdr *msg, int flags),
- + (sockfd, msg, flags))
- +lt_libc_hidden(sendmsg)
- #endif
-
- #ifdef L_sendto
- -extern __typeof(sendto) __libc_sendto;
- -#ifdef __NR_sendto
- -#define __NR___sys_sendto __NR_sendto
- -static
- -_syscall6(ssize_t, __sys_sendto, int, sockfd, const void *, buffer,
- - size_t, len, int, flags, const struct sockaddr *, to, socklen_t, tolen)
- -ssize_t __libc_sendto(int sockfd, const void *buffer, size_t len, int flags,const struct sockaddr *to, socklen_t tolen)
- -{
- - if (SINGLE_THREAD_P)
- - return __sys_sendto(sockfd, buffer, len, flags, to, tolen);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __sys_sendto(sockfd, buffer, len, flags, to, tolen);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -#elif defined(__NR_socketcall)
- -/* send, sendto added by bir7@leland.stanford.edu */
- -ssize_t __libc_sendto(int sockfd, const void *buffer, size_t len, int flags,
- - const struct sockaddr *to, socklen_t tolen)
- +ssize_t __NC(sendto)(int sockfd, const void *buffer, size_t len, int flags,
- + const struct sockaddr *to, socklen_t tolen)
- {
- +# if defined __NR_sendto && defined _syscall6
- + return (ssize_t)INLINE_SYSCALL(sendto, 6, sockfd, buffer, len, flags, to, tolen);
- +# else
- unsigned long args[6];
-
- args[0] = sockfd;
- @@ -515,30 +317,21 @@
- args[3] = flags;
- args[4] = (unsigned long) to;
- args[5] = tolen;
- -
- - if (SINGLE_THREAD_P)
- - return (__socketcall(SYS_SENDTO, args));
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __socketcall(SYS_SENDTO, args);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- + return (ssize_t)__socketcall(SYS_SENDTO, args);
- +# endif
- }
- -#endif
- -weak_alias(__libc_sendto,sendto)
- -libc_hidden_weak(sendto)
- +CANCELLABLE_SYSCALL(ssize_t, sendto, (int sockfd, const void *buffer, size_t len,
- + int flags, const struct sockaddr *to, socklen_t tolen),
- + (sockfd, buffer, len, flags, to, tolen))
- +lt_libc_hidden(sendto)
- #endif
-
- #ifdef L_setsockopt
- -#ifdef __NR_setsockopt
- -_syscall5(int, setsockopt, int, fd, int, level, int, optname, const void *, optval, socklen_t, optlen)
- -#elif defined(__NR_socketcall)
- -/* [sg]etsockoptions by bir7@leland.stanford.edu */
- -int setsockopt(int fd, int level, int optname, const void *optval,
- - socklen_t optlen)
- +int setsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen)
- {
- +# ifdef __NR_setsockopt
- + return INLINE_SYSCALL(setsockopt, 5, fd, level, optname, optval, optlen);
- +# else
- unsigned long args[5];
-
- args[0] = fd;
- @@ -546,51 +339,50 @@
- args[2] = optname;
- args[3] = (unsigned long) optval;
- args[4] = optlen;
- - return (__socketcall(SYS_SETSOCKOPT, args));
- + return __socketcall(SYS_SETSOCKOPT, args);
- +# endif
- }
- -#endif
- libc_hidden_def(setsockopt)
- #endif
-
- #ifdef L_shutdown
- -#ifdef __NR_shutdown
- -_syscall2(int, shutdown, int, sockfd, int, how)
- -#elif defined(__NR_socketcall)
- -/* shutdown by bir7@leland.stanford.edu */
- int shutdown(int sockfd, int how)
- {
- +# ifdef __NR_shutdown
- + return INLINE_SYSCALL(shutdown, 2, sockfd, how);
- +# else
- unsigned long args[2];
-
- args[0] = sockfd;
- args[1] = how;
- - return (__socketcall(SYS_SHUTDOWN, args));
- + return __socketcall(SYS_SHUTDOWN, args);
- +# endif
- }
- #endif
- -#endif
-
- #ifdef L_socket
- -#ifdef __NR_socket
- -_syscall3(int, socket, int, family, int, type, int, protocol)
- -#elif defined(__NR_socketcall)
- int socket(int family, int type, int protocol)
- {
- +# ifdef __NR_socket
- + return INLINE_SYSCALL(socket, 3, family, type, protocol);
- +# else
- unsigned long args[3];
-
- args[0] = family;
- args[1] = type;
- args[2] = (unsigned long) protocol;
- return __socketcall(SYS_SOCKET, args);
- +# endif
- }
- -#endif
- libc_hidden_def(socket)
- #endif
-
- #ifdef L_socketpair
- -#ifdef __NR_socketpair
- -_syscall4(int, socketpair, int, family, int, type, int, protocol, int *, sockvec)
- -#elif defined(__NR_socketcall)
- int socketpair(int family, int type, int protocol, int sockvec[2])
- {
- +# ifdef __NR_socketpair
- + return INLINE_SYSCALL(socketpair, 4, family, type, protocol, sockvec);
- +# else
- unsigned long args[4];
-
- args[0] = family;
- @@ -598,7 +390,6 @@
- args[2] = protocol;
- args[3] = (unsigned long) sockvec;
- return __socketcall(SYS_SOCKETPAIR, args);
- +# endif
- }
- #endif
- -#endif
- -
- diff -Nur uClibc-0.9.33.2/libc/misc/assert/__assert.c uClibc/libc/misc/assert/__assert.c
- --- uClibc-0.9.33.2/libc/misc/assert/__assert.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/assert/__assert.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* Oct 28, 2002
- diff -Nur uClibc-0.9.33.2/libc/misc/assert/Makefile.in uClibc/libc/misc/assert/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/assert/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/assert/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,13 +7,13 @@
-
- subdirs += libc/misc/assert
-
- -CSRC := __assert.c
- +CSRC-y := __assert.c
-
- MISC_ASSERT_DIR := $(top_srcdir)libc/misc/assert
- MISC_ASSERT_OUT := $(top_builddir)libc/misc/assert
-
- -MISC_ASSERT_SRC := $(MISC_ASSERT_DIR)/__assert.c
- -MISC_ASSERT_OBJ := $(MISC_ASSERT_OUT)/__assert.o
- +MISC_ASSERT_SRC := $(patsubst %.c,$(MISC_ASSERT_DIR)/%.c,$(CSRC-y))
- +MISC_ASSERT_OBJ := $(patsubst %.c,$(MISC_ASSERT_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_ASSERT_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/ctype/ctype.c uClibc/libc/misc/ctype/ctype.c
- --- uClibc-0.9.33.2/libc/misc/ctype/ctype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/ctype/ctype.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
- @@ -36,10 +36,6 @@
- #include <assert.h>
- #include <locale.h>
-
- -#ifdef __UCLIBC_HAS_XLOCALE__
- -# include <xlocale.h>
- -#endif
- -
- /**********************************************************************/
- #ifdef __UCLIBC_HAS_CTYPE_TABLES__
-
- diff -Nur uClibc-0.9.33.2/libc/misc/ctype/Makefile.in uClibc/libc/misc/ctype/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/ctype/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/ctype/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -8,31 +8,25 @@
- subdirs += libc/misc/ctype
-
- # multi source ctype.c
- -COM_SRC := \
- +COM_SRC-y := \
- isalnum.c isalpha.c iscntrl.c isdigit.c \
- isgraph.c islower.c isprint.c ispunct.c isspace.c \
- isupper.c isxdigit.c tolower.c toupper.c \
- isblank.c
- -ifeq ($(UCLIBC_SUSV4_LEGACY),y)
- -COM_SRC += isascii.c toascii.c
- -endif
- -CSRC := $(COM_SRC)
- +COM_SRC-$(UCLIBC_SUSV4_LEGACY) += isascii.c toascii.c
- +CSRC-y := $(COM_SRC-y)
-
- -ifeq ($(UCLIBC_HAS_CTYPE_TABLES),y)
- -CSRC += __C_ctype_b.c __C_ctype_tolower.c __C_ctype_toupper.c \
- +CSRC-$(UCLIBC_HAS_CTYPE_TABLES) += \
- + __C_ctype_b.c __C_ctype_tolower.c __C_ctype_toupper.c \
- __ctype_b_loc.c __ctype_tolower_loc.c __ctype_toupper_loc.c \
- __ctype_assert.c isctype.c
- -endif
- -
- -ifeq ($(UCLIBC_HAS_XLOCALE),y)
- -CSRC += $(patsubst %.c,%_l.c,$(COM_SRC))
- -endif
- +CSRC-$(UCLIBC_HAS_XLOCALE) += $(patsubst %.c,%_l.c,$(COM_SRC-y))
-
- MISC_CTYPE_DIR := $(top_srcdir)libc/misc/ctype
- MISC_CTYPE_OUT := $(top_builddir)libc/misc/ctype
-
- -MISC_CTYPE_SRC := $(patsubst %.c,$(MISC_CTYPE_DIR)/%.c,$(CSRC))
- -MISC_CTYPE_OBJ := $(patsubst %.c,$(MISC_CTYPE_OUT)/%.o,$(CSRC))
- +MISC_CTYPE_SRC := $(patsubst %.c,$(MISC_CTYPE_DIR)/%.c,$(CSRC-y))
- +MISC_CTYPE_OBJ := $(patsubst %.c,$(MISC_CTYPE_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_CTYPE_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/alphasort64.c uClibc/libc/misc/dirent/alphasort64.c
- --- uClibc-0.9.33.2/libc/misc/dirent/alphasort64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/alphasort64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,12 +5,14 @@
- */
-
- #include <_lfs_64.h>
- -
- #include <dirent.h>
- -#include <string.h>
- -#include "dirstream.h"
- +
- +#if __WORDSIZE != 64
- +# include <string.h>
- +# include "dirstream.h"
-
- int alphasort64(const struct dirent64 **a, const struct dirent64 **b)
- {
- - return strcmp((*a)->d_name, (*b)->d_name);
- + return strcoll((*a)->d_name, (*b)->d_name);
- }
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/alphasort.c uClibc/libc/misc/dirent/alphasort.c
- --- uClibc-0.9.33.2/libc/misc/dirent/alphasort.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/alphasort.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,8 @@
-
- int alphasort(const struct dirent **a, const struct dirent **b)
- {
- - return strcmp((*a)->d_name, (*b)->d_name);
- + return strcoll((*a)->d_name, (*b)->d_name);
- }
- -
- +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
- +strong_alias_untyped(alphasort,alphasort64)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/dirstream.h uClibc/libc/misc/dirent/dirstream.h
- --- uClibc-0.9.33.2/libc/misc/dirent/dirstream.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/dirstream.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 5.1.2 Directory Operations <dirent.h>
- @@ -29,18 +28,6 @@
-
- #include <bits/uClibc_mutex.h>
-
- -/* For now, syscall readdir () only supports one entry at a time. It
- - * will be changed in the future.
- -#define NUMENT 3
- -*/
- -#ifndef NUMENT
- -#define NUMENT 1
- -#endif
- -
- -#define SINGLE_READDIR 11
- -#define MULTI_READDIR 12
- -#define NEW_READDIR 13
- -
- /* Directory stream type. */
- struct __dirstream {
- /* file descriptor */
- @@ -65,10 +52,4 @@
- __UCLIBC_MUTEX(dd_lock);
- }; /* stream data from opendir() */
-
- -
- -extern ssize_t __getdents(int fd, char *buf, size_t count) attribute_hidden;
- -#ifdef __UCLIBC_HAS_LFS__
- -extern ssize_t __getdents64 (int fd, char *buf, size_t count) attribute_hidden;
- -#endif
- -
- #endif /* dirent.h */
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/Makefile.in uClibc/libc/misc/dirent/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/dirent/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,18 +7,18 @@
-
- subdirs += libc/misc/dirent
-
- -CSRC := alphasort.c closedir.c dirfd.c opendir.c readdir.c rewinddir.c \
- - scandir.c seekdir.c telldir.c readdir_r.c versionsort.c
- -
- -ifeq ($(UCLIBC_HAS_LFS),y)
- -CSRC += readdir64.c alphasort64.c scandir64.c readdir64_r.c versionsort64.c
- -endif
- +CSRC := alphasort.c readdir.c scandir.c versionsort.c
- +CSRC_R := readdir_r.c
- +CSRC-y := closedir.c dirfd.c opendir.c rewinddir.c seekdir.c telldir.c $(CSRC) \
- + $(CSRC_R)
- +CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %.c,%64.c,$(CSRC))
- +CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %_r.c,%64_r.c,$(CSRC_R))
-
- MISC_DIRENT_DIR := $(top_srcdir)libc/misc/dirent
- MISC_DIRENT_OUT := $(top_builddir)libc/misc/dirent
-
- -MISC_DIRENT_SRC := $(patsubst %.c,$(MISC_DIRENT_DIR)/%.c,$(CSRC))
- -MISC_DIRENT_OBJ := $(patsubst %.c,$(MISC_DIRENT_OUT)/%.o,$(CSRC))
- +MISC_DIRENT_SRC := $(patsubst %.c,$(MISC_DIRENT_DIR)/%.c,$(CSRC-y))
- +MISC_DIRENT_OBJ := $(patsubst %.c,$(MISC_DIRENT_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_DIRENT_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/readdir64.c uClibc/libc/misc/dirent/readdir64.c
- --- uClibc-0.9.33.2/libc/misc/dirent/readdir64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/readdir64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,52 +5,12 @@
- */
-
- #include <_lfs_64.h>
- -
- -#include <errno.h>
- -#include <stdlib.h>
- -#include <string.h>
- -#include <unistd.h>
- #include <dirent.h>
- -#include "dirstream.h"
- -
- -struct dirent64 *readdir64(DIR * dir)
- -{
- - ssize_t bytes;
- - struct dirent64 *de;
- -
- - if (!dir) {
- - __set_errno(EBADF);
- - return NULL;
- - }
- -
- - __UCLIBC_MUTEX_LOCK(dir->dd_lock);
- -
- - do {
- - if (dir->dd_size <= dir->dd_nextloc) {
- - /* read dir->dd_max bytes of directory entries. */
- - bytes = __getdents64(dir->dd_fd, dir->dd_buf, dir->dd_max);
- - if (bytes <= 0) {
- - de = NULL;
- - goto all_done;
- - }
- - dir->dd_size = bytes;
- - dir->dd_nextloc = 0;
- - }
- -
- - de = (struct dirent64 *) (((char *) dir->dd_buf) + dir->dd_nextloc);
- -
- - /* Am I right? H.J. */
- - dir->dd_nextloc += de->d_reclen;
- -
- - /* We have to save the next offset here. */
- - dir->dd_nextoff = de->d_off;
- -
- - /* Skip deleted files. */
- - } while (de->d_ino == 0);
-
- -all_done:
- - __UCLIBC_MUTEX_UNLOCK(dir->dd_lock);
- +#if __WORDSIZE != 64
- +# define __READDIR readdir64
- +# define __DIRENT_TYPE struct dirent64
- +# define __GETDENTS __getdents64
-
- - return de;
- -}
- -libc_hidden_def(readdir64)
- +# include "readdir.c"
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/readdir64_r.c uClibc/libc/misc/dirent/readdir64_r.c
- --- uClibc-0.9.33.2/libc/misc/dirent/readdir64_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/readdir64_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,62 +5,12 @@
- */
-
- #include <_lfs_64.h>
- -
- -#include <errno.h>
- -#include <stdlib.h>
- -#include <string.h>
- -#include <unistd.h>
- #include <dirent.h>
- -#include "dirstream.h"
- -
- -
- -int readdir64_r(DIR *dir, struct dirent64 *entry, struct dirent64 **result)
- -{
- - int ret;
- - ssize_t bytes;
- - struct dirent64 *de;
- -
- - if (!dir) {
- - __set_errno(EBADF);
- - return(EBADF);
- - }
- - de = NULL;
- -
- - __UCLIBC_MUTEX_LOCK(dir->dd_lock);
- -
- - do {
- - if (dir->dd_size <= dir->dd_nextloc) {
- - /* read dir->dd_max bytes of directory entries. */
- - bytes = __getdents64(dir->dd_fd, dir->dd_buf, dir->dd_max);
- - if (bytes <= 0) {
- - *result = NULL;
- - ret = (bytes==0)? 0 : errno;
- - goto all_done;
- - }
- - dir->dd_size = bytes;
- - dir->dd_nextloc = 0;
- - }
- -
- - de = (struct dirent64 *) (((char *) dir->dd_buf) + dir->dd_nextloc);
- -
- - /* Am I right? H.J. */
- - dir->dd_nextloc += de->d_reclen;
- -
- - /* We have to save the next offset here. */
- - dir->dd_nextoff = de->d_off;
- - /* Skip deleted files. */
- - } while (de->d_ino == 0);
- -
- - if (de == NULL) {
- - *result = NULL;
- - } else {
- - *result = memcpy (entry, de, de->d_reclen);
- - }
- - ret = 0;
-
- -all_done:
- +#if __WORDSIZE != 64
- +# define __READDIR_R readdir64_r
- +# define __DIRENT_TYPE struct dirent64
- +# define __GETDENTS __getdents64
-
- - __UCLIBC_MUTEX_UNLOCK(dir->dd_lock);
- - return((de != NULL)? 0 : ret);
- -}
- -libc_hidden_def(readdir64_r)
- +# include "readdir_r.c"
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/readdir.c uClibc/libc/misc/dirent/readdir.c
- --- uClibc-0.9.33.2/libc/misc/dirent/readdir.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/readdir.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,20 +4,22 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <features.h>
- -
- -#include <errno.h>
- -#include <stdlib.h>
- -#include <string.h>
- -#include <unistd.h>
- #include <dirent.h>
- +#include <errno.h>
- +#define __need_NULL
- +#include <stddef.h>
- #include "dirstream.h"
-
- +#ifndef __READDIR
- +# define __READDIR readdir
- +# define __DIRENT_TYPE struct dirent
- +# define __GETDENTS __getdents
- +#endif
-
- -struct dirent *readdir(DIR * dir)
- +__DIRENT_TYPE *__READDIR(DIR * dir)
- {
- ssize_t bytes;
- - struct dirent *de;
- + __DIRENT_TYPE *de;
-
- if (!dir) {
- __set_errno(EBADF);
- @@ -29,7 +31,7 @@
- do {
- if (dir->dd_size <= dir->dd_nextloc) {
- /* read dir->dd_max bytes of directory entries. */
- - bytes = __getdents(dir->dd_fd, dir->dd_buf, dir->dd_max);
- + bytes = __GETDENTS(dir->dd_fd, dir->dd_buf, dir->dd_max);
- if (bytes <= 0) {
- de = NULL;
- goto all_done;
- @@ -38,7 +40,7 @@
- dir->dd_nextloc = 0;
- }
-
- - de = (struct dirent *) (((char *) dir->dd_buf) + dir->dd_nextloc);
- + de = (__DIRENT_TYPE *) (((char *) dir->dd_buf) + dir->dd_nextloc);
-
- /* Am I right? H.J. */
- dir->dd_nextloc += de->d_reclen;
- @@ -53,4 +55,8 @@
- __UCLIBC_MUTEX_UNLOCK(dir->dd_lock);
- return de;
- }
- -libc_hidden_def(readdir)
- +libc_hidden_def(__READDIR)
- +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
- +strong_alias_untyped(readdir,readdir64)
- +libc_hidden_def(readdir64)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/readdir_r.c uClibc/libc/misc/dirent/readdir_r.c
- --- uClibc-0.9.33.2/libc/misc/dirent/readdir_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/readdir_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,19 +4,24 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- +#include <dirent.h>
- #include <errno.h>
- -#include <stdlib.h>
- #include <string.h>
- -#include <unistd.h>
- -#include <dirent.h>
- +#define __need_NULL
- +#include <stddef.h>
- #include "dirstream.h"
-
- +#ifndef __READDIR_R
- +# define __READDIR_R readdir_r
- +# define __DIRENT_TYPE struct dirent
- +# define __GETDENTS __getdents
- +#endif
-
- -int readdir_r(DIR *dir, struct dirent *entry, struct dirent **result)
- +int __READDIR_R(DIR *dir, __DIRENT_TYPE *entry, __DIRENT_TYPE **result)
- {
- int ret;
- ssize_t bytes;
- - struct dirent *de;
- + __DIRENT_TYPE *de;
-
- if (!dir) {
- __set_errno(EBADF);
- @@ -29,7 +34,7 @@
- do {
- if (dir->dd_size <= dir->dd_nextloc) {
- /* read dir->dd_max bytes of directory entries. */
- - bytes = __getdents(dir->dd_fd, dir->dd_buf, dir->dd_max);
- + bytes = __GETDENTS(dir->dd_fd, dir->dd_buf, dir->dd_max);
- if (bytes <= 0) {
- *result = NULL;
- ret = (bytes==0)? 0 : errno;
- @@ -39,7 +44,7 @@
- dir->dd_nextloc = 0;
- }
-
- - de = (struct dirent *) (((char *) dir->dd_buf) + dir->dd_nextloc);
- + de = (__DIRENT_TYPE *) (((char *) dir->dd_buf) + dir->dd_nextloc);
-
- /* Am I right? H.J. */
- dir->dd_nextloc += de->d_reclen;
- @@ -61,4 +66,8 @@
- __UCLIBC_MUTEX_UNLOCK(dir->dd_lock);
- return((de != NULL)? 0 : ret);
- }
- -libc_hidden_def(readdir_r)
- +libc_hidden_def(__READDIR_R)
- +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
- +strong_alias_untyped(readdir_r,readdir64_r)
- +libc_hidden_def(readdir64_r)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/scandir64.c uClibc/libc/misc/dirent/scandir64.c
- --- uClibc-0.9.33.2/libc/misc/dirent/scandir64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/scandir64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -1,111 +1,16 @@
- -/* Copyright (C) 1992-1998, 2000 Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- - */
- -
- -/* Modified for uClibc by Erik Andersen
- - */
- +/*
- + * Copyright (C) 2000-2011 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
-
- #include <_lfs_64.h>
- -
- #include <dirent.h>
- -#include <stdio.h>
- -#include <string.h>
- -#include <stdlib.h>
- -#include <errno.h>
- -#include <sys/types.h>
- -#include "dirstream.h"
- -
- -int scandir64(const char *dir, struct dirent64 ***namelist,
- - int (*selector) (const struct dirent64 *),
- - int (*compar) (const struct dirent64 **, const struct dirent64 **))
- -{
- - DIR *dp = opendir (dir);
- - struct dirent64 *current;
- - struct dirent64 **names = NULL;
- - size_t names_size = 0, pos;
- - int save;
- -
- - if (dp == NULL)
- - return -1;
- -
- - save = errno;
- - __set_errno (0);
- -
- - pos = 0;
- - while ((current = readdir64 (dp)) != NULL) {
- - int use_it = selector == NULL;
- -
- - if (! use_it)
- - {
- - use_it = (*selector) (current);
- - /* The selector function might have changed errno.
- - * It was zero before and it need to be again to make
- - * the latter tests work. */
- - if (! use_it)
- - __set_errno (0);
- - }
- - if (use_it)
- - {
- - struct dirent64 *vnew;
- - size_t dsize;
- -
- - /* Ignore errors from selector or readdir64 */
- - __set_errno (0);
- -
- - if (unlikely(pos == names_size))
- - {
- - struct dirent64 **new;
- - if (names_size == 0)
- - names_size = 10;
- - else
- - names_size *= 2;
- - new = (struct dirent64 **) realloc (names,
- - names_size * sizeof (struct dirent64 *));
- - if (new == NULL)
- - break;
- - names = new;
- - }
- -
- - dsize = ¤t->d_name[_D_ALLOC_NAMLEN(current)] - (char*)current;
- - vnew = (struct dirent64 *) malloc (dsize);
- - if (vnew == NULL)
- - break;
- -
- - names[pos++] = (struct dirent64 *) memcpy (vnew, current, dsize);
- - }
- - }
- - if (unlikely(errno != 0))
- - {
- - save = errno;
- - closedir (dp);
- - while (pos > 0)
- - free (names[--pos]);
- - free (names);
- - __set_errno (save);
- - return -1;
- - }
-
- - closedir (dp);
- - __set_errno (save);
- +#if __WORDSIZE != 64
- +# define __SCANDIR scandir64
- +# define __DIRENT_TYPE struct dirent64
- +# define __READDIR readdir64
-
- - /* Sort the list if we have a comparison function to sort with. */
- - if (compar != NULL)
- - qsort (names, pos, sizeof (struct dirent64 *), (comparison_fn_t) compar);
- - *namelist = names;
- - return pos;
- -}
- +# include "scandir.c"
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/scandir.c uClibc/libc/misc/dirent/scandir.c
- --- uClibc-0.9.33.2/libc/misc/dirent/scandir.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/scandir.c 2014-02-03 12:32:56.000000000 +0100
- @@ -1,24 +1,29 @@
- +/* vi: set sw=4 ts=4: */
- /*
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + * Copyright (C) 2000-2011 Erik Andersen <andersen@uclibc.org>
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- #include <dirent.h>
- -#include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <errno.h>
- -#include <sys/types.h>
- #include "dirstream.h"
-
- -int scandir(const char *dir, struct dirent ***namelist,
- - int (*selector) (const struct dirent *),
- - int (*compar) (const struct dirent **, const struct dirent **))
- +#ifndef __SCANDIR
- +# define __SCANDIR scandir
- +# define __DIRENT_TYPE struct dirent
- +# define __READDIR readdir
- +#endif
- +
- +int __SCANDIR(const char *dir, __DIRENT_TYPE ***namelist,
- + int (*selector) (const __DIRENT_TYPE *),
- + int (*compar) (const __DIRENT_TYPE **, const __DIRENT_TYPE **))
- {
- DIR *dp = opendir (dir);
- - struct dirent *current;
- - struct dirent **names = NULL;
- + __DIRENT_TYPE *current;
- + __DIRENT_TYPE **names = NULL;
- size_t names_size = 0, pos;
- int save;
-
- @@ -29,7 +34,7 @@
- __set_errno (0);
-
- pos = 0;
- - while ((current = readdir (dp)) != NULL) {
- + while ((current = __READDIR (dp)) != NULL) {
- int use_it = selector == NULL;
-
- if (! use_it)
- @@ -43,7 +48,7 @@
- }
- if (use_it)
- {
- - struct dirent *vnew;
- + __DIRENT_TYPE *vnew;
- size_t dsize;
-
- /* Ignore errors from selector or readdir */
- @@ -51,24 +56,24 @@
-
- if (unlikely(pos == names_size))
- {
- - struct dirent **new;
- + __DIRENT_TYPE **new;
- if (names_size == 0)
- names_size = 10;
- else
- names_size *= 2;
- - new = (struct dirent **) realloc (names,
- - names_size * sizeof (struct dirent *));
- + new = (__DIRENT_TYPE **) realloc (names,
- + names_size * sizeof (__DIRENT_TYPE *));
- if (new == NULL)
- break;
- names = new;
- }
-
- dsize = ¤t->d_name[_D_ALLOC_NAMLEN(current)] - (char*)current;
- - vnew = (struct dirent *) malloc (dsize);
- + vnew = (__DIRENT_TYPE *) malloc (dsize);
- if (vnew == NULL)
- break;
-
- - names[pos++] = (struct dirent *) memcpy (vnew, current, dsize);
- + names[pos++] = (__DIRENT_TYPE *) memcpy (vnew, current, dsize);
- }
- }
-
- @@ -88,7 +93,10 @@
-
- /* Sort the list if we have a comparison function to sort with. */
- if (compar != NULL)
- - qsort (names, pos, sizeof (struct dirent *), (comparison_fn_t) compar);
- + qsort (names, pos, sizeof (__DIRENT_TYPE *), (comparison_fn_t) compar);
- *namelist = names;
- return pos;
- }
- +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
- +strong_alias_untyped(scandir,scandir64)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/versionsort64.c uClibc/libc/misc/dirent/versionsort64.c
- --- uClibc-0.9.33.2/libc/misc/dirent/versionsort64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/versionsort64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,12 +5,14 @@
- */
-
- #include <_lfs_64.h>
- -
- #include <dirent.h>
- -#include <string.h>
- -#include "dirstream.h"
- +
- +#if __WORDSIZE != 64
- +# include <string.h>
- +# include "dirstream.h"
-
- int versionsort64(const struct dirent64 **a, const struct dirent64 **b)
- {
- return strverscmp((*a)->d_name, (*b)->d_name);
- }
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/dirent/versionsort.c uClibc/libc/misc/dirent/versionsort.c
- --- uClibc-0.9.33.2/libc/misc/dirent/versionsort.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/dirent/versionsort.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,3 +12,6 @@
- {
- return strverscmp((*a)->d_name, (*b)->d_name);
- }
- +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
- +strong_alias_untyped(versionsort,versionsort64)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/elf/dl-iterate-phdr.c uClibc/libc/misc/elf/dl-iterate-phdr.c
- --- uClibc-0.9.33.2/libc/misc/elf/dl-iterate-phdr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/elf/dl-iterate-phdr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -18,10 +18,7 @@
- /* we want this in libc but nowhere else */
- #ifdef __USE_GNU
-
- -extern __typeof(dl_iterate_phdr) __dl_iterate_phdr;
- -
- -hidden_proto(__dl_iterate_phdr)
- -int
- +static int
- __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data)
- {
- int ret = 0;
- @@ -41,7 +38,6 @@
- #endif
- return ret;
- }
- -hidden_def (__dl_iterate_phdr)
-
- # ifdef SHARED
-
- diff -Nur uClibc-0.9.33.2/libc/misc/elf/dl-support.c uClibc/libc/misc/elf/dl-support.c
- --- uClibc-0.9.33.2/libc/misc/elf/dl-support.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/elf/dl-support.c 2014-02-03 12:32:56.000000000 +0100
- @@ -19,6 +19,7 @@
- #include <ldsodefs.h>
- #include <string.h>
- #endif
- +#include <bits/uClibc_page.h>
-
- #if defined(USE_TLS) && USE_TLS
-
- @@ -28,6 +29,7 @@
-
- ElfW(Phdr) *_dl_phdr;
- size_t _dl_phnum;
- +size_t _dl_pagesize;
-
- void internal_function _dl_aux_init (ElfW(auxv_t) *av);
- void internal_function _dl_aux_init (ElfW(auxv_t) *av)
- @@ -37,6 +39,9 @@
-
- /* Get the number of program headers from the aux vect */
- _dl_phnum = (size_t) av[AT_PHNUM].a_un.a_val;
- +
- + /* Get the pagesize from the aux vect */
- + _dl_pagesize = (av[AT_PAGESZ].a_un.a_val) ? (size_t) av[AT_PAGESZ].a_un.a_val : PAGE_SIZE;
- }
-
- #if defined(USE_TLS) && USE_TLS
- diff -Nur uClibc-0.9.33.2/libc/misc/error/err.c uClibc/libc/misc/error/err.c
- --- uClibc-0.9.33.2/libc/misc/error/err.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/error/err.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,9 +11,6 @@
- #include <stdarg.h>
- #include <errno.h>
- #include <err.h>
- -#ifdef __UCLIBC_HAS_THREADS__
- -#include <pthread.h>
- -#endif
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning REMINDER: Deal with wide oriented stderr case.
- @@ -50,68 +47,68 @@
- __STDIO_AUTO_THREADUNLOCK(stderr);
- }
-
- -void vwarn(const char *format, va_list args)
- +static void __vwarn(const char *format, va_list args)
- {
- vwarn_work(format, args, 1);
- }
- -libc_hidden_def(vwarn)
- +strong_alias(__vwarn,vwarn)
-
- void warn(const char *format, ...)
- {
- va_list args;
-
- va_start(args, format);
- - vwarn(format, args);
- + __vwarn(format, args);
- va_end(args);
- }
-
- -void vwarnx(const char *format, va_list args)
- +static void __vwarnx(const char *format, va_list args)
- {
- vwarn_work(format, args, 0);
- }
- -libc_hidden_def(vwarnx)
- +strong_alias(__vwarnx,vwarnx)
-
- void warnx(const char *format, ...)
- {
- va_list args;
-
- va_start(args, format);
- - vwarnx(format, args);
- + __vwarnx(format, args);
- va_end(args);
- }
-
- -void verr(int status, const char *format, va_list args)
- +static void attribute_noreturn __verr(int status, const char *format, va_list args)
- {
- - vwarn(format, args);
- + __vwarn(format, args);
- exit(status);
- }
- -libc_hidden_def(verr)
- +strong_alias(__verr,verr)
-
- -void attribute_noreturn err(int status, const char *format, ...)
- +void err(int status, const char *format, ...)
- {
- va_list args;
-
- va_start(args, format);
- - verr(status, format, args);
- + __verr(status, format, args);
- /* This should get optimized away. We'll leave it now for safety. */
- /* The loop is added only to keep gcc happy. */
- while(1)
- va_end(args);
- }
-
- -void verrx(int status, const char *format, va_list args)
- +static void attribute_noreturn __verrx(int status, const char *format, va_list args)
- {
- - vwarnx(format, args);
- + __vwarnx(format, args);
- exit(status);
- }
- -libc_hidden_def(verrx)
- +strong_alias(__verrx,verrx)
-
- -void attribute_noreturn errx(int status, const char *format, ...)
- +void errx(int status, const char *format, ...)
- {
- va_list args;
-
- va_start(args, format);
- - verrx(status, format, args);
- + __verrx(status, format, args);
- /* This should get optimized away. We'll leave it now for safety. */
- /* The loop is added only to keep gcc happy. */
- while(1)
- diff -Nur uClibc-0.9.33.2/libc/misc/error/error.c uClibc/libc/misc/error/error.c
- --- uClibc-0.9.33.2/libc/misc/error/error.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/error/error.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
- /* Adjusted slightly by Erik Andersen <andersen@uclibc.org> */
- @@ -37,8 +36,7 @@
- function without parameters instead. */
- void (*error_print_progname) (void) = NULL;
-
- -extern __typeof(error) __error attribute_hidden;
- -void __error (int status, int errnum, const char *message, ...)
- +void error (int status, int errnum, const char *message, ...)
- {
- va_list args;
-
- @@ -60,11 +58,9 @@
- if (status)
- exit (status);
- }
- -weak_alias(__error,error)
-
- -extern __typeof(error_at_line) __error_at_line attribute_hidden;
- -void __error_at_line (int status, int errnum, const char *file_name,
- - unsigned int line_number, const char *message, ...)
- +void error_at_line (int status, int errnum, const char *file_name,
- + unsigned int line_number, const char *message, ...)
- {
- va_list args;
-
- @@ -103,4 +99,3 @@
- if (status)
- exit (status);
- }
- -weak_alias(__error_at_line,error_at_line)
- diff -Nur uClibc-0.9.33.2/libc/misc/error/Makefile.in uClibc/libc/misc/error/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/error/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/error/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,19 +7,15 @@
-
- subdirs += libc/misc/error
-
- -CSRC :=
- -ifeq ($(UCLIBC_HAS_BSD_ERR),y)
- -CSRC += err.c
- -endif
- -ifeq ($(UCLIBC_HAS_GNU_ERROR),y)
- -CSRC += error.c
- -endif
- +CSRC-y :=
- +CSRC-$(UCLIBC_HAS_BSD_ERR) += err.c
- +CSRC-$(UCLIBC_HAS_GNU_ERROR) += error.c
-
- MISC_ERROR_DIR := $(top_srcdir)libc/misc/error
- MISC_ERROR_OUT := $(top_builddir)libc/misc/error
-
- -MISC_ERROR_SRC := $(patsubst %.c,$(MISC_ERROR_DIR)/%.c,$(CSRC))
- -MISC_ERROR_OBJ := $(patsubst %.c,$(MISC_ERROR_OUT)/%.o,$(CSRC))
- +MISC_ERROR_SRC := $(patsubst %.c,$(MISC_ERROR_DIR)/%.c,$(CSRC-y))
- +MISC_ERROR_OBJ := $(patsubst %.c,$(MISC_ERROR_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_ERROR_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/file/isfdtype.c uClibc/libc/misc/file/isfdtype.c
- --- uClibc-0.9.33.2/libc/misc/file/isfdtype.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/misc/file/isfdtype.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,40 @@
- +/* Determine whether descriptor has given property.
- + Copyright (C) 1996-2013 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <errno.h>
- +#include <sys/stat.h>
- +#include <sys/socket.h>
- +#include <sys/types.h>
- +#ifdef __UCLIBC_HAS_LFS__
- +# include <_lfs_64.h>
- +#else
- +# define stat64 stat
- +# define fstat64 fstat
- +#endif
- +
- +int
- +isfdtype (int fildes, int fdtype)
- +{
- + struct stat64 st;
- + int save_error = errno;
- + int result = fstat64 (fildes, &st);
- + __set_errno (save_error);
- + if (result)
- + return result;
- + return (st.st_mode & S_IFMT) == (mode_t) fdtype;
- +}
- diff -Nur uClibc-0.9.33.2/libc/misc/file/lockf64.c uClibc/libc/misc/file/lockf64.c
- --- uClibc-0.9.33.2/libc/misc/file/lockf64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/file/lockf64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <_lfs_64.h>
-
- @@ -90,4 +89,3 @@
-
- return fcntl(fd, cmd, &fl);
- }
- -libc_hidden_def(lockf64)
- diff -Nur uClibc-0.9.33.2/libc/misc/file/lockf.c uClibc/libc/misc/file/lockf.c
- --- uClibc-0.9.33.2/libc/misc/file/lockf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/file/lockf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,19 +13,15 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- -
- #include <sys/types.h>
- -#include <unistd.h>
- #include <fcntl.h>
- +#include <unistd.h>
- #include <errno.h>
- #include <string.h>
-
- -
- -
- /* lockf is a simplified interface to fcntl's locking facilities. */
-
- int lockf (int fd, int cmd, off_t len)
- diff -Nur uClibc-0.9.33.2/libc/misc/file/Makefile.in uClibc/libc/misc/file/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/file/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/file/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -10,12 +10,12 @@
- MISC_FILE_DIR := $(top_srcdir)libc/misc/file
- MISC_FILE_OUT := $(top_builddir)libc/misc/file
-
- -MISC_FILE_SRC := $(wildcard $(MISC_FILE_DIR)/*.c)
- -ifneq ($(UCLIBC_HAS_LFS),y)
- -MISC_FILE_SRC := $(filter-out $(MISC_FILE_DIR)/lockf64.c,$(MISC_FILE_SRC))
- -endif
- -MISC_FILE_OBJ := $(patsubst $(MISC_FILE_DIR)/%.c,$(MISC_FILE_OUT)/%.o,$(MISC_FILE_SRC))
- +CSRC-y := $(wildcard $(MISC_FILE_DIR)/*.c)
- +CSRC_LFS := $(wildcard $(MISC_FILE_DIR)/*64.c)
- +CSRC-y := $(filter-out $(CSRC_LFS),$(CSRC-y))
- +CSRC-$(UCLIBC_HAS_LFS) += $(CSRC_LFS)
-
- +MISC_FILE_OBJ := $(patsubst $(MISC_FILE_DIR)/%.c,$(MISC_FILE_OUT)/%.o,$(CSRC-y))
- libc-y += $(MISC_FILE_OBJ)
-
- libc-nomulti-$(UCLIBC_HAS_LFS) += $(MISC_FILE_OUT)/lockf64.o
- diff -Nur uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch.c uClibc/libc/misc/fnmatch/fnmatch.c
- --- uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/fnmatch/fnmatch.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- @@ -54,10 +53,6 @@
- # include <stdlib.h>
- #endif
-
- -#ifdef __UCLIBC__
- -# define __memset memset
- -#endif
- -
- /* For platform which support the ISO C amendement 1 functionality we
- support user defined character classes. */
- #if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
- @@ -347,7 +342,7 @@
- wchar_t *wstring = NULL;
-
- /* Convert the strings into wide characters. */
- - __memset (&ps, '\0', sizeof (ps));
- + memset (&ps, '\0', sizeof (ps));
- p = pattern;
- #ifdef _LIBC
- n = strnlen (pattern, 1024);
- @@ -364,7 +359,7 @@
- already done? */
- return -1;
- if (p)
- - __memset (&ps, '\0', sizeof (ps));
- + memset (&ps, '\0', sizeof (ps));
- }
- if (__builtin_expect (p != NULL, 0))
- {
- @@ -396,7 +391,7 @@
- already done? */
- return -1;
- if (p)
- - __memset (&ps, '\0', sizeof (ps));
- + memset (&ps, '\0', sizeof (ps));
- }
- if (__builtin_expect (p != NULL, 0))
- {
- diff -Nur uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch_loop.c uClibc/libc/misc/fnmatch/fnmatch_loop.c
- --- uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch_loop.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/fnmatch/fnmatch_loop.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Match STRING against the filename pattern PATTERN, returning zero if
- it matches, nonzero if not. */
- @@ -508,7 +507,7 @@
- if (symb_table[2 * elem] == hash
- && (c1
- == extra[symb_table[2 * elem + 1]])
- - && __memcmp (str,
- + && memcmp (str,
- &extra[symb_table[2 * elem
- + 1]
- + 1], c1) == 0)
- @@ -729,7 +728,7 @@
- if (symb_table[2 * elem] == hash
- && (c1
- == extra[symb_table[2 * elem + 1]])
- - && __memcmp (str,
- + && memcmp (str,
- &extra[symb_table[2 * elem + 1]
- + 1], c1) == 0)
- {
- diff -Nur uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch_old.c uClibc/libc/misc/fnmatch/fnmatch_old.c
- --- uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch_old.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/fnmatch/fnmatch_old.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with this library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- diff -Nur uClibc-0.9.33.2/libc/misc/fnmatch/Makefile.in uClibc/libc/misc/fnmatch/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/fnmatch/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/fnmatch/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,17 +7,13 @@
-
- subdirs += libc/misc/fnmatch
-
- -ifeq ($(UCLIBC_HAS_FNMATCH_OLD),y)
- -CSRC := fnmatch_old.c
- -else
- -CSRC := fnmatch.c
- -endif
- +CSRC-y := $(if $(UCLIBC_HAS_FNMATCH_OLD),fnmatch_old.c,fnmatch.c)
-
- MISC_FNMATCH_DIR := $(top_srcdir)libc/misc/fnmatch
- MISC_FNMATCH_OUT := $(top_builddir)libc/misc/fnmatch
-
- -MISC_FNMATCH_SRC := $(patsubst %.c,$(MISC_FNMATCH_DIR)/%.c,$(CSRC))
- -MISC_FNMATCH_OBJ := $(patsubst %.c,$(MISC_FNMATCH_OUT)/%.o,$(CSRC))
- +MISC_FNMATCH_SRC := $(patsubst %.c,$(MISC_FNMATCH_DIR)/%.c,$(CSRC-y))
- +MISC_FNMATCH_OBJ := $(patsubst %.c,$(MISC_FNMATCH_OUT)/%.o,$(CSRC-y))
-
- libc-$(UCLIBC_HAS_FNMATCH) += $(MISC_FNMATCH_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/fts/fts.c uClibc/libc/misc/fts/fts.c
- --- uClibc-0.9.33.2/libc/misc/fts/fts.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/fts/fts.c 2014-02-15 14:18:15.000000000 +0100
- @@ -38,6 +38,7 @@
- #include <unistd.h>
-
- #ifdef __UCLIBC_HAS_LFS__
- +/* this is wrong, either you include this header as first, or not at all */
- # include <_lfs_64.h>
- #else
- # define stat64 stat
- @@ -576,7 +577,7 @@
- FTSENT *cur, *tail;
- DIR *dirp;
- void *oldaddr;
- - int cderrno, descend, len, level, nlinks, saved_errno,
- + int /*cderrno,*/ descend, len, level, nlinks, saved_errno,
- nostat, doadjust;
- size_t maxlen;
- char *cp;
- @@ -641,14 +642,14 @@
- * needed sorted entries or stat information, they had better be
- * checking FTS_NS on the returned nodes.
- */
- - cderrno = 0;
- + /* cderrno = 0; */
- if (nlinks || type == BREAD) {
- if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
- if (nlinks && type == BREAD)
- cur->fts_errno = errno;
- cur->fts_flags |= FTS_DONTCHDIR;
- descend = 0;
- - cderrno = errno;
- + /* cderrno = errno; */
- (void)closedir(dirp);
- dirp = NULL;
- } else
- diff -Nur uClibc-0.9.33.2/libc/misc/fts/Makefile.in uClibc/libc/misc/fts/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/fts/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/fts/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,13 +7,13 @@
- #
-
- subdirs += libc/misc/fts
- -CSRC := fts.c
- +CSRC-y := fts.c
-
- MISC_FTS_DIR := $(top_srcdir)libc/misc/fts
- MISC_FTS_OUT := $(top_builddir)libc/misc/fts
-
- -MISC_FTS_SRC := $(patsubst %.c,$(MISC_FTS_DIR)/%.c,$(CSRC))
- -MISC_FTS_OBJ := $(patsubst %.c,$(MISC_FTS_OUT)/%.o,$(CSRC))
- +MISC_FTS_SRC := $(patsubst %.c,$(MISC_FTS_DIR)/%.c,$(CSRC-y))
- +MISC_FTS_OBJ := $(patsubst %.c,$(MISC_FTS_OUT)/%.o,$(CSRC-y))
-
- libc-$(UCLIBC_HAS_FTS) += $(MISC_FTS_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/ftw/ftw64.c uClibc/libc/misc/ftw/ftw64.c
- --- uClibc-0.9.33.2/libc/misc/ftw/ftw64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/ftw/ftw64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FTW_NAME ftw64
- #define NFTW_NAME nftw64
- diff -Nur uClibc-0.9.33.2/libc/misc/ftw/ftw.c uClibc/libc/misc/ftw/ftw.c
- --- uClibc-0.9.33.2/libc/misc/ftw/ftw.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/ftw/ftw.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,15 +14,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-
- #include <features.h>
- +/* need errno.h before undefining _LIBC */
- +#include <errno.h>
- #ifdef __UCLIBC__
- #undef _LIBC
- #define HAVE_DIRENT_H 1
- @@ -32,6 +33,7 @@
- #endif
-
- #if __GNUC__
- +# undef alloca
- # define alloca __builtin_alloca
- #else
- # if HAVE_ALLOCA_H
- @@ -67,7 +69,6 @@
- # endif
- #endif
-
- -#include <errno.h>
- #include <ftw.h>
- #include <limits.h>
- #include <search.h>
- @@ -77,11 +78,7 @@
- #if HAVE_SYS_PARAM_H || defined _LIBC
- # include <sys/param.h>
- #endif
- -#ifdef _LIBC
- -# include <include/sys/stat.h>
- -#else
- -# include <sys/stat.h>
- -#endif
- +#include <sys/stat.h>
-
- #if !defined _LIBC && !HAVE_DECL_STPCPY && !defined stpcpy
- char *stpcpy ();
- diff -Nur uClibc-0.9.33.2/libc/misc/ftw/Makefile.in uClibc/libc/misc/ftw/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/ftw/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/ftw/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,16 +7,14 @@
-
- subdirs += libc/misc/ftw
-
- -CSRC := ftw.c
- -ifeq ($(UCLIBC_HAS_LFS),y)
- -CSRC += ftw64.c
- -endif
- +CSRC-y := ftw.c
- +CSRC-$(UCLIBC_HAS_LFS) += ftw64.c
-
- MISC_FTW_DIR := $(top_srcdir)libc/misc/ftw
- MISC_FTW_OUT := $(top_builddir)libc/misc/ftw
-
- -MISC_FTW_SRC := $(patsubst %.c,$(MISC_FTW_DIR)/%.c,$(CSRC))
- -MISC_FTW_OBJ := $(patsubst %.c,$(MISC_FTW_OUT)/%.o,$(CSRC))
- +MISC_FTW_SRC := $(patsubst %.c,$(MISC_FTW_DIR)/%.c,$(CSRC-y))
- +MISC_FTW_OBJ := $(patsubst %.c,$(MISC_FTW_OUT)/%.o,$(CSRC-y))
-
- libc-$(findstring y,$(UCLIBC_HAS_FTW)$(UCLIBC_HAS_NFTW)) += $(MISC_FTW_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/glob/glob.c uClibc/libc/misc/glob/glob.c
- --- uClibc-0.9.33.2/libc/misc/glob/glob.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/glob/glob.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #undef ENABLE_GLOB_BRACE_EXPANSION
- #undef ENABLE_GLOB_TILDE_EXPANSION
- diff -Nur uClibc-0.9.33.2/libc/misc/glob/Makefile.in uClibc/libc/misc/glob/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/glob/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/glob/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,23 +7,15 @@
-
- subdirs += libc/misc/glob
-
- -ifeq ($(UCLIBC_HAS_GNU_GLOB),y)
- -CSRC := glob.c
- -ifeq ($(UCLIBC_HAS_LFS),y)
- -CSRC += glob64.c
- -endif
- -else
- -CSRC := glob-susv3.c
- -ifeq ($(UCLIBC_HAS_LFS),y)
- -CSRC += glob64-susv3.c
- -endif
- -endif
- +VARIANT := $(if $(UCLIBC_HAS_GNU_GLOB),,-susv3)
- +CSRC-y := glob$(VARIANT).c
- +CSRC-$(UCLIBC_HAS_LFS) += glob64$(VARIANT).c
-
- MISC_GLOB_DIR := $(top_srcdir)libc/misc/glob
- MISC_GLOB_OUT := $(top_builddir)libc/misc/glob
-
- -MISC_GLOB_SRC := $(patsubst %.c,$(MISC_GLOB_DIR)/%.c,$(CSRC))
- -MISC_GLOB_OBJ := $(patsubst %.c,$(MISC_GLOB_OUT)/%.o,$(CSRC))
- +MISC_GLOB_SRC := $(patsubst %.c,$(MISC_GLOB_DIR)/%.c,$(CSRC-y))
- +MISC_GLOB_OBJ := $(patsubst %.c,$(MISC_GLOB_OUT)/%.o,$(CSRC-y))
-
- libc-$(UCLIBC_HAS_GLOB) += $(MISC_GLOB_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/gnu/Makefile.in uClibc/libc/misc/gnu/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/gnu/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/gnu/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,13 +7,14 @@
-
- subdirs += libc/misc/gnu
-
- -CSRC := obstack.c
- +CSRC-y :=
- +CSRC-$(UCLIBC_HAS_OBSTACK) := obstack.c obprintf.c
-
- MISC_GNU_DIR := $(top_srcdir)libc/misc/gnu
- MISC_GNU_OUT := $(top_builddir)libc/misc/gnu
-
- -MISC_GNU_SRC := $(MISC_GNU_DIR)/obstack.c
- -MISC_GNU_OBJ := $(MISC_GNU_OUT)/obstack.o
- +MISC_GNU_SRC := $(patsubst %.c,$(MISC_GNU_DIR)/%.c,$(CSRC-y))
- +MISC_GNU_OBJ := $(patsubst %.c,$(MISC_GNU_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_GNU_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/gnu/obprintf.c uClibc/libc/misc/gnu/obprintf.c
- --- uClibc-0.9.33.2/libc/misc/gnu/obprintf.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/misc/gnu/obprintf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,29 @@
- +/* Copyright (C) 2013 Gentoo Foundation
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <stdio.h>
- +#include <stdarg.h>
- +#include <obstack.h>
- +
- +int
- +obstack_vprintf (struct obstack *obstack, const char *format, va_list args)
- +{
- + int n;
- + char *s;
- + n = vasprintf(&s, format, args);
- + obstack_grow(obstack, s, n);
- + return n;
- +}
- +libc_hidden_def(obstack_vprintf)
- +
- +int
- +obstack_printf (struct obstack *obstack, const char *format, ...)
- +{
- + int n;
- + va_list ap;
- + va_start (ap, format);
- + n = obstack_vprintf (obstack, format, ap);
- + va_end (ap);
- + return n;
- +}
- diff -Nur uClibc-0.9.33.2/libc/misc/gnu/obstack.c uClibc/libc/misc/gnu/obstack.c
- --- uClibc-0.9.33.2/libc/misc/gnu/obstack.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/gnu/obstack.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- #ifdef HAVE_CONFIG_H
- @@ -30,11 +29,6 @@
- #else
- # define HAVE_INTTYPES_H 1
- # define HAVE_STDINT_H 1
- -# define SHLIB_COMPAT(x,y,z) 0
- -# undef libc_hidden_def
- -# define libc_hidden_def(x)
- -# undef strong_alias
- -# define strong_alias(x,y)
- #endif
- #else
- # include "obstack.h"
- @@ -112,19 +106,19 @@
- `print_and_abort'. */
- static void print_and_abort (void);
- static void (*__obstack_alloc_failed_handler) (void) = print_and_abort;
- -weak_alias(__obstack_alloc_failed_handler,obstack_alloc_failed_handler)
- +strong_alias(__obstack_alloc_failed_handler,obstack_alloc_failed_handler)
-
- /* Exit value used when `print_and_abort' is used. */
- # include <stdlib.h>
- # ifdef _LIBC
- static int __obstack_exit_failure = EXIT_FAILURE;
- -weak_alias(__obstack_exit_failure,obstack_exit_failure)
- +strong_alias(__obstack_exit_failure,obstack_exit_failure)
- # else
- # include "exitfail.h"
- # define __obstack_exit_failure exit_failure
- # endif
-
- -# ifdef _LIBC
- +# if 0
- # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
- /* A looong time ago (before 1994, anyway; we're not sure) this global variable
- was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
- @@ -328,9 +322,7 @@
- /* The new chunk certainly contains no empty object yet. */
- h->maybe_empty_object = 0;
- }
- -# ifdef _LIBC
- -libc_hidden_def (_obstack_newchunk)
- -# endif
- +libc_hidden_def(_obstack_newchunk)
-
- /* Return nonzero if object OBJ has been allocated from obstack H.
- This is here for debugging.
- @@ -393,7 +385,7 @@
- abort ();
- }
-
- -# ifdef _LIBC
- +# if 0
- /* Older versions of libc used a function _obstack_free intended to be
- called by non-GCC compilers. */
- strong_alias (obstack_free, _obstack_free)
- @@ -418,9 +410,6 @@
- # else
- # include "gettext.h"
- # endif
- -/* NLS: Disable gettext in obstack for now: */
- -# undef _
- -# define _(Str) (Str)
- # ifndef _
- # define _(msgid) gettext (msgid)
- # endif
- diff -Nur uClibc-0.9.33.2/libc/misc/internals/errno.c uClibc/libc/misc/internals/errno.c
- --- uClibc-0.9.33.2/libc/misc/internals/errno.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/internals/errno.c 2014-02-03 12:32:56.000000000 +0100
- @@ -1,21 +1,14 @@
- #include <features.h>
- +#include <errno.h>
- +#undef errno
-
- #ifdef __UCLIBC_HAS_TLS__
- __thread int errno;
- -__thread int h_errno;
- -
- extern __thread int __libc_errno __attribute__ ((alias ("errno"))) attribute_hidden;
- -extern __thread int __libc_h_errno __attribute__ ((alias ("h_errno"))) attribute_hidden;
- -#define h_errno __libc_h_errno
- -
- #else
- -#include "internal_errno.h"
- +extern int errno;
- int errno = 0;
- -int h_errno = 0;
- -#ifdef __UCLIBC_HAS_THREADS__
- -libc_hidden_def(errno)
- -weak_alias(errno, _errno)
- -libc_hidden_def(h_errno)
- -weak_alias(h_errno, _h_errno)
- -#endif
- +# ifdef __UCLIBC_HAS_THREADS__
- +strong_alias(errno,_errno)
- +# endif
- #endif
- diff -Nur uClibc-0.9.33.2/libc/misc/internals/__errno_location.c uClibc/libc/misc/internals/__errno_location.c
- --- uClibc-0.9.33.2/libc/misc/internals/__errno_location.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/internals/__errno_location.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,17 +4,16 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include "internal_errno.h"
- +#include <features.h>
- +#include <errno.h>
-
- -/* psm: moved to bits/errno.h: */
- -int *
- -#ifndef __UCLIBC_HAS_THREADS__
- -weak_const_function
- +#ifndef __UCLIBC_HAS_TLS__
- +# undef errno
- +extern int errno;
- #endif
- -__errno_location (void)
- +
- +int *__errno_location(void)
- {
- return &errno;
- }
- -#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */
- libc_hidden_weak(__errno_location)
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/internals/h_errno.c uClibc/libc/misc/internals/h_errno.c
- --- uClibc-0.9.33.2/libc/misc/internals/h_errno.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/misc/internals/h_errno.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,14 @@
- +#include <features.h>
- +#include <netdb.h>
- +#undef h_errno
- +
- +#ifdef __UCLIBC_HAS_TLS__
- +__thread int h_errno;
- +extern __thread int __libc_h_errno __attribute__ ((alias ("h_errno"))) attribute_hidden;
- +#else
- +extern int h_errno;
- +int h_errno = 0;
- +# ifdef __UCLIBC_HAS_THREADS__
- +strong_alias(h_errno,_h_errno)
- +# endif
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/internals/__h_errno_location.c uClibc/libc/misc/internals/__h_errno_location.c
- --- uClibc-0.9.33.2/libc/misc/internals/__h_errno_location.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/internals/__h_errno_location.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,9 +4,15 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include "internal_errno.h"
- +#include <features.h>
- +#include <netdb.h>
-
- -int * weak_const_function __h_errno_location (void)
- +#ifndef __UCLIBC_HAS_TLS__
- +# undef h_errno
- +extern int h_errno;
- +#endif
- +
- +int *__h_errno_location(void)
- {
- return &h_errno;
- }
- diff -Nur uClibc-0.9.33.2/libc/misc/internals/internal_errno.h uClibc/libc/misc/internals/internal_errno.h
- --- uClibc-0.9.33.2/libc/misc/internals/internal_errno.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/internals/internal_errno.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,21 +0,0 @@
- -/*
- - *
- - */
- -
- -#include <features.h>
- -#include <errno.h>
- -#include <netdb.h>
- -
- -#ifndef __UCLIBC_HAS_TLS__
- -
- -#undef errno
- -#undef h_errno
- -
- -extern int h_errno;
- -extern int errno;
- -
- -#ifdef __UCLIBC_HAS_THREADS__
- -libc_hidden_proto(h_errno)
- -libc_hidden_proto(errno)
- -#endif
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/internals/Makefile.in uClibc/libc/misc/internals/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/internals/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/internals/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,14 +7,14 @@
-
- subdirs += libc/misc/internals
-
- -CSRC := tempname.c errno.c __errno_location.c __h_errno_location.c \
- +CSRC-y := tempname.c errno.c h_errno.c __errno_location.c __h_errno_location.c \
- parse_config.c
-
- MISC_INTERNALS_DIR := $(top_srcdir)libc/misc/internals
- MISC_INTERNALS_OUT := $(top_builddir)libc/misc/internals
-
- -MISC_INTERNALS_SRC := $(patsubst %.c,$(MISC_INTERNALS_DIR)/%.c,$(CSRC))
- -MISC_INTERNALS_OBJ := $(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(CSRC))
- +MISC_INTERNALS_SRC := $(patsubst %.c,$(MISC_INTERNALS_DIR)/%.c,$(CSRC-y))
- +MISC_INTERNALS_OBJ := $(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(CSRC-y))
-
- CFLAGS-__uClibc_main.c := $(SSP_DISABLE_FLAGS)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/internals/parse_config.c uClibc/libc/misc/internals/parse_config.c
- --- uClibc-0.9.33.2/libc/misc/internals/parse_config.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/internals/parse_config.c 2014-02-03 12:32:56.000000000 +0100
- @@ -129,7 +129,7 @@
- return parser;
- }
-
- -parser_t attribute_hidden * FAST_FUNC config_open(const char *filename)
- +parser_t * FAST_FUNC config_open(const char *filename)
- {
- return config_open2(filename, fopen_or_warn_stdin);
- }
- @@ -142,7 +142,7 @@
- }
- #endif
-
- -void attribute_hidden FAST_FUNC config_close(parser_t *parser)
- +void FAST_FUNC config_close(parser_t *parser)
- {
- if (parser) {
- fclose(parser->fp);
- @@ -176,7 +176,7 @@
- (but more than 0) are found. Empty lines are always skipped (not warned about).
- */
- #undef config_read
- -int attribute_hidden FAST_FUNC config_read(parser_t *parser, char ***tokens,
- +int FAST_FUNC config_read(parser_t *parser, char ***tokens,
- unsigned flags, const char *delims)
- {
- char *line;
- diff -Nur uClibc-0.9.33.2/libc/misc/internals/tempname.c uClibc/libc/misc/internals/tempname.c
- --- uClibc-0.9.33.2/libc/misc/internals/tempname.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/internals/tempname.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* March 11, 2002 Manuel Novoa III
- *
- @@ -58,7 +57,7 @@
- for use with mk[s]temp. Will fail (-1) if DIR is non-null and
- doesn't exist, none of the searched dirs exists, or there's not
- enough space in TMPL. */
- -int attribute_hidden ___path_search (char *tmpl, size_t tmpl_len, const char *dir,
- +int ___path_search (char *tmpl, size_t tmpl_len, const char *dir,
- const char *pfx /*, int try_tmpdir*/)
- {
- /*const char *d; */
- diff -Nur uClibc-0.9.33.2/libc/misc/internals/__uClibc_main.c uClibc/libc/misc/internals/__uClibc_main.c
- --- uClibc-0.9.33.2/libc/misc/internals/__uClibc_main.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/internals/__uClibc_main.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,6 @@
- */
-
- #include <features.h>
- -#ifndef __UCLIBC_HAS_THREADS_NATIVE__
- -#define _ERRNO_H
- -#endif
- #include <unistd.h>
- #include <stdlib.h>
- #include <string.h>
- @@ -25,20 +22,23 @@
- #include <link.h>
- #include <bits/uClibc_page.h>
- #include <paths.h>
- -#include <unistd.h>
- -#include <asm/errno.h>
- +#include <errno.h>
- +#include <netdb.h>
- +#include <stdio.h>
- +#ifndef __ARCH_HAS_NO_LDSO__
- #include <fcntl.h>
- -#include <sys/stat.h>
- -#include <sys/sysmacros.h>
- +#endif
- #ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <errno.h>
- #include <pthread-functions.h>
- #include <not-cancel.h>
- #include <atomic.h>
- #endif
- #ifdef __UCLIBC_HAS_THREADS__
- #include <pthread.h>
- -#endif
- +#endif
- +#ifdef __UCLIBC_HAS_LOCALE__
- +#include <locale.h>
- +#endif
-
- #ifndef SHARED
- void *__libc_stack_end = NULL;
- @@ -116,12 +116,6 @@
- /*
- * Prototypes.
- */
- -extern int *weak_const_function __errno_location(void);
- -extern int *weak_const_function __h_errno_location(void);
- -extern void weak_function _stdio_init(void) attribute_hidden;
- -#ifdef __UCLIBC_HAS_LOCALE__
- -extern void weak_function _locale_init(void) attribute_hidden;
- -#endif
- #ifdef __UCLIBC_HAS_THREADS__
- #if !defined (__UCLIBC_HAS_THREADS_NATIVE__) || defined (SHARED)
- extern void weak_function __pthread_initialize_minimal(void);
- @@ -146,18 +140,24 @@
- # endif
- #endif
-
- -#if defined (__LDSO_STANDALONE_SUPPORT__) && defined (SHARED) && defined __sh__
- -extern unsigned long _dl_skip_args;
- +#ifdef SHARED
- +extern int _dl_secure;
- #endif
- +extern size_t _dl_pagesize;
-
- -attribute_hidden const char *__uclibc_progname = "";
- -#ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
- -const char *program_invocation_short_name = "";
- -const char *program_invocation_name = "";
- -#endif
- -#ifdef __UCLIBC_HAS___PROGNAME__
- -weak_alias (program_invocation_short_name, __progname)
- -weak_alias (program_invocation_name, __progname_full)
- +const char *__uclibc_progname = "";
- +#if !defined __UCLIBC_HAS___PROGNAME__ && defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
- +# define __progname program_invocation_short_name
- +# define __progname_full program_invocation_name
- +#endif
- +#if defined __UCLIBC_HAS___PROGNAME__ || (defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__)
- +const char *__progname = "";
- +/* psm: why have a visible __progname_full? */
- +const char *__progname_full = "";
- +# if defined __UCLIBC_HAS___PROGNAME__ && defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
- +weak_alias (__progname, program_invocation_short_name)
- +weak_alias (__progname_full, program_invocation_name)
- +# endif
- #endif
-
- /*
- @@ -167,7 +167,6 @@
- char **__environ = 0;
- weak_alias(__environ, environ)
-
- -/* TODO: don't export __pagesize; we cant now because libpthread uses it */
- size_t __pagesize = 0;
-
- #ifndef O_NOFOLLOW
- @@ -192,6 +191,7 @@
- }
- }
-
- +#ifndef SHARED
- static int __check_suid(void)
- {
- uid_t uid, euid;
- @@ -208,6 +208,7 @@
- return 0; /* we are not suid */
- }
- #endif
- +#endif
-
- /* __uClibc_init completely initialize uClibc so it is ready to use.
- *
- @@ -222,8 +223,7 @@
- * __uClibc_main.
- */
-
- -extern void __uClibc_init(void);
- -libc_hidden_proto(__uClibc_init)
- +extern void __uClibc_init(void) attribute_hidden;
- void __uClibc_init(void)
- {
- /* Don't recurse */
- @@ -276,7 +276,6 @@
- _stdio_init();
-
- }
- -libc_hidden_def(__uClibc_init)
-
- #ifdef __UCLIBC_CTOR_DTOR__
- void attribute_hidden (*__app_fini)(void) = NULL;
- @@ -284,8 +283,7 @@
-
- void attribute_hidden (*__rtld_fini)(void) = NULL;
-
- -extern void __uClibc_fini(void);
- -libc_hidden_proto(__uClibc_fini)
- +extern void __uClibc_fini(void) attribute_hidden;
- void __uClibc_fini(void)
- {
- #ifdef __UCLIBC_CTOR_DTOR__
- @@ -304,7 +302,6 @@
- if (__rtld_fini != NULL)
- (__rtld_fini)();
- }
- -libc_hidden_def(__uClibc_fini)
-
- #ifndef SHARED
- extern void __nptl_deallocate_tsd (void) __attribute ((weak));
- @@ -323,7 +320,7 @@
- char **argv, void (*app_init)(void), void (*app_fini)(void),
- void (*rtld_fini)(void), void *stack_end attribute_unused)
- {
- -#ifndef __ARCH_HAS_NO_LDSO__
- +#if !defined __ARCH_HAS_NO_LDSO__ && !defined SHARED
- unsigned long *aux_dat;
- ElfW(auxv_t) auxvt[AT_EGID + 1];
- #endif
- @@ -339,18 +336,6 @@
-
- __rtld_fini = rtld_fini;
-
- -#if defined __LDSO_STANDALONE_SUPPORT__ && defined SHARED && defined __sh__
- - /*
- - * Skip ld.so and its arguments
- - * Other archs except for SH do this in _dl_start before passing
- - * control to the application.
- - * FIXME: align SH _dl_start to other archs and remove this from here,
- - * so that we can keep the visibility hidden.
- - */
- - argc -= _dl_skip_args;
- - argv += _dl_skip_args;
- -#endif
- -
- /* The environment begins right after argv. */
- __environ = &argv[argc + 1];
-
- @@ -361,7 +346,7 @@
- __environ = &argv[argc];
- }
-
- -#ifndef __ARCH_HAS_NO_LDSO__
- +#if !defined __ARCH_HAS_NO_LDSO__ && !defined SHARED
- /* Pull stuff from the ELF header when possible */
- memset(auxvt, 0x00, sizeof(auxvt));
- aux_dat = (unsigned long*)__environ;
- @@ -376,13 +361,11 @@
- }
- aux_dat += 2;
- }
- -#ifndef SHARED
- /* Get the program headers (_dl_phdr) from the aux vector
- It will be used into __libc_setup_tls. */
-
- _dl_aux_init (auxvt);
- #endif
- -#endif
-
- /* We need to initialize uClibc. If we are dynamically linked this
- * may have already been completed by the shared lib loader. We call
- @@ -390,15 +373,20 @@
- __uClibc_init();
-
- #ifndef __ARCH_HAS_NO_LDSO__
- - /* Make certain getpagesize() gives the correct answer */
- - __pagesize = (auxvt[AT_PAGESZ].a_un.a_val)? auxvt[AT_PAGESZ].a_un.a_val : PAGE_SIZE;
- + /* Make certain getpagesize() gives the correct answer.
- + * _dl_pagesize is defined into ld.so if SHARED or into libc.a otherwise. */
- + __pagesize = _dl_pagesize;
-
- +#ifndef SHARED
- /* Prevent starting SUID binaries where the stdin. stdout, and
- * stderr file descriptors are not already opened. */
- if ((auxvt[AT_UID].a_un.a_val == (size_t)-1 && __check_suid()) ||
- (auxvt[AT_UID].a_un.a_val != (size_t)-1 &&
- (auxvt[AT_UID].a_un.a_val != auxvt[AT_EUID].a_un.a_val ||
- auxvt[AT_GID].a_un.a_val != auxvt[AT_EGID].a_un.a_val)))
- +#else
- + if (_dl_secure)
- +#endif
- {
- __check_one_fd (STDIN_FILENO, O_RDONLY | O_NOFOLLOW);
- __check_one_fd (STDOUT_FILENO, O_RDWR | O_NOFOLLOW);
- @@ -407,14 +395,14 @@
- #endif
-
- __uclibc_progname = *argv;
- -#ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
- +#if defined __UCLIBC_HAS___PROGNAME__ || (defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__)
- if (*argv != NULL) {
- - program_invocation_name = *argv;
- - program_invocation_short_name = strrchr(*argv, '/');
- - if (program_invocation_short_name != NULL)
- - ++program_invocation_short_name;
- + __progname_full = *argv;
- + __progname = strrchr(*argv, '/');
- + if (__progname != NULL)
- + ++__progname;
- else
- - program_invocation_short_name = program_invocation_name;
- + __progname = *argv;
- }
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/misc/locale/locale.c uClibc/libc/misc/locale/locale.c
- --- uClibc-0.9.33.2/libc/misc/locale/locale.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/locale/locale.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* Nov. 1, 2002
- @@ -85,19 +85,17 @@
- #endif
- #endif
-
- -/* Need to include this before locale.h and xlocale.h! */
- +/* Need to include this before locale.h! */
- #include <bits/uClibc_locale.h>
-
- #undef CODESET_LIST
- #define CODESET_LIST (__locale_mmap->codeset_list)
-
- #ifdef __UCLIBC_HAS_XLOCALE__
- -#include <xlocale.h>
- #include <locale.h>
- #else /* __UCLIBC_HAS_XLOCALE__ */
- /* We need this internally... */
- #define __UCLIBC_HAS_XLOCALE__ 1
- -#include <xlocale.h>
- #include <locale.h>
- #undef __UCLIBC_HAS_XLOCALE__
- #endif /* __UCLIBC_HAS_XLOCALE__ */
- @@ -908,7 +906,6 @@
- _locale_set_l((unsigned char*) C_LOCALE_SELECTOR, base);
- }
-
- -void _locale_init(void) attribute_hidden;
- void _locale_init(void)
- {
- /* TODO: mmap the locale file */
- @@ -1396,6 +1393,7 @@
- {
- return __curlocale_var; /* This is overriden by the thread version. */
- }
- +libc_hidden_weak(__curlocale)
-
- __locale_t weak_function __curlocale_set(__locale_t newloc)
- {
- @@ -1404,6 +1402,7 @@
- __curlocale_var = newloc;
- return oldloc;
- }
- +libc_hidden_weak(__curlocale_set)
-
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/misc/locale/Makefile.in uClibc/libc/misc/locale/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/locale/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/locale/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -8,19 +8,16 @@
- subdirs += libc/misc/locale
-
- # multi source locale.c
- -CSRC := setlocale.c localeconv.c _locale_init.c nl_langinfo.c
- -ifeq ($(UCLIBC_HAS_LOCALE),y)
- -CSRC += newlocale.c __locale_mbrtowc_l.c
- -endif
- -ifeq ($(UCLIBC_HAS_XLOCALE),y)
- -CSRC += nl_langinfo_l.c duplocale.c freelocale.c uselocale.c __curlocale.c
- -endif
- +CSRC-y := setlocale.c localeconv.c _locale_init.c nl_langinfo.c
- +CSRC-$(UCLIBC_HAS_LOCALE) += newlocale.c __locale_mbrtowc_l.c
- +CSRC-$(UCLIBC_HAS_XLOCALE) += nl_langinfo_l.c duplocale.c freelocale.c \
- + uselocale.c __curlocale.c
-
- MISC_LOCALE_DIR := $(top_srcdir)libc/misc/locale
- MISC_LOCALE_OUT := $(top_builddir)libc/misc/locale
-
- -MISC_LOCALE_SRC := $(patsubst %.c,$(MISC_LOCALE_DIR)/%.c,$(CSRC))
- -MISC_LOCALE_OBJ := $(patsubst %.c,$(MISC_LOCALE_OUT)/%.o,$(CSRC))
- +MISC_LOCALE_SRC := $(patsubst %.c,$(MISC_LOCALE_DIR)/%.c,$(CSRC-y))
- +MISC_LOCALE_OBJ := $(patsubst %.c,$(MISC_LOCALE_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_LOCALE_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/mntent/Makefile.in uClibc/libc/misc/mntent/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/mntent/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/mntent/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,13 +7,13 @@
-
- subdirs += libc/misc/mntent
-
- -CSRC := mntent.c
- +CSRC-y := mntent.c
-
- MISC_MNTENT_DIR := $(top_srcdir)libc/misc/mntent
- MISC_MNTENT_OUT := $(top_builddir)libc/misc/mntent
-
- -MISC_MNTENT_SRC := $(MISC_MNTENT_DIR)/mntent.c
- -MISC_MNTENT_OBJ := $(MISC_MNTENT_OUT)/mntent.o
- +MISC_MNTENT_SRC := $(patsubst %.c,$(MISC_MNTENT_DIR)/%.c,$(CSRC-y))
- +MISC_MNTENT_OBJ := $(patsubst %.c,$(MISC_MNTENT_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_MNTENT_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/pthread/tsd.c uClibc/libc/misc/pthread/tsd.c
- --- uClibc-0.9.33.2/libc/misc/pthread/tsd.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/pthread/tsd.c 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,5 @@
- /* libpthread sets _dl_error_catch_tsd to point to this function.
- - We define it here instead of in libpthread so t here instead of in libpthread so that it doesn't
- + We define it here instead of in libpthread so that it doesn't
- need to have a TLS segment of its own just for this one pointer. */
-
- void **__libc_dl_error_tsd(void) __attribute__ ((const));
- diff -Nur uClibc-0.9.33.2/libc/misc/regex/Makefile.in uClibc/libc/misc/regex/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/regex/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/regex/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,17 +7,14 @@
-
- subdirs += libc/misc/regex
-
- -ifeq ($(UCLIBC_HAS_REGEX_OLD),y)
- -CSRC := regex_old.c
- -else
- -CSRC := regex.c
- -endif
- +VARIANT := $(if $(UCLIBC_HAS_REGEX_OLD),_old)
- +CSRC-y := regex$(VARIANT).c
-
- MISC_REGEX_DIR := $(top_srcdir)libc/misc/regex
- MISC_REGEX_OUT := $(top_builddir)libc/misc/regex
-
- -MISC_REGEX_SRC := $(patsubst %.c,$(MISC_REGEX_DIR)/%.c,$(CSRC))
- -MISC_REGEX_OBJ := $(patsubst %.c,$(MISC_REGEX_OUT)/%.o,$(CSRC))
- +MISC_REGEX_SRC := $(patsubst %.c,$(MISC_REGEX_DIR)/%.c,$(CSRC-y))
- +MISC_REGEX_OBJ := $(patsubst %.c,$(MISC_REGEX_OUT)/%.o,$(CSRC-y))
-
- libc-$(UCLIBC_HAS_REGEX) += $(MISC_REGEX_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/regex/regcomp.c uClibc/libc/misc/regex/regcomp.c
- --- uClibc-0.9.33.2/libc/misc/regex/regcomp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/regex/regcomp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
- size_t length, reg_syntax_t syntax);
- @@ -91,7 +90,7 @@
- re_charset_t *mbcset,
- int *equiv_class_alloc,
- const unsigned char *name);
- -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
- +static reg_errcode_t build_charclass (__RE_TRANSLATE_TYPE trans,
- bitset_t sbcset,
- re_charset_t *mbcset,
- int *char_class_alloc,
- @@ -100,13 +99,13 @@
- #else /* not RE_ENABLE_I18N */
- static reg_errcode_t build_equiv_class (bitset_t sbcset,
- const unsigned char *name);
- -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
- +static reg_errcode_t build_charclass (__RE_TRANSLATE_TYPE trans,
- bitset_t sbcset,
- const unsigned char *class_name,
- reg_syntax_t syntax);
- #endif /* not RE_ENABLE_I18N */
- static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
- - RE_TRANSLATE_TYPE trans,
- + __RE_TRANSLATE_TYPE trans,
- const unsigned char *class_name,
- const unsigned char *extra,
- int non_match, reg_errcode_t *err);
- @@ -3414,11 +3413,11 @@
-
- static reg_errcode_t
- #ifdef RE_ENABLE_I18N
- -build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
- +build_charclass (__RE_TRANSLATE_TYPE trans, bitset_t sbcset,
- re_charset_t *mbcset, int *char_class_alloc,
- const unsigned char *class_name, reg_syntax_t syntax)
- #else
- -build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
- +build_charclass (__RE_TRANSLATE_TYPE trans, bitset_t sbcset,
- const unsigned char *class_name, reg_syntax_t syntax)
- #endif
- {
- @@ -3496,7 +3495,7 @@
- }
-
- static bin_tree_t *
- -build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
- +build_charclass_op (re_dfa_t *dfa, __RE_TRANSLATE_TYPE trans,
- const unsigned char *class_name,
- const unsigned char *extra, int non_match,
- reg_errcode_t *err)
- diff -Nur uClibc-0.9.33.2/libc/misc/regex/regex.c uClibc/libc/misc/regex/regex.c
- --- uClibc-0.9.33.2/libc/misc/regex/regex.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/regex/regex.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- @@ -30,7 +29,12 @@
- # include <stdlib.h>
- # ifdef __UCLIBC_HAS_WCHAR__
- # define RE_ENABLE_I18N
- +# define HAVE_WCHAR_H 1
- +# define HAVE_WCRTOMB 1
- +# define HAVE_MBRTOWC 1
- +# define HAVE_WCSCOLL 1
- # include <wchar.h>
- +# define HAVE_WCTYPE_H 1
- # include <wctype.h>
- # define __iswctype iswctype
- # define __wcrtomb wcrtomb
- @@ -38,6 +42,9 @@
- # define __wctype wctype
- # endif
- # include <ctype.h>
- +# ifdef __UCLIBC_HAS_LOCALE__
- +# define HAVE_LOCALE_H 1
- +# endif
- #endif
-
- /* Make sure noone compiles this code with a C++ compiler. */
- diff -Nur uClibc-0.9.33.2/libc/misc/regex/regexec.c uClibc/libc/misc/regex/regexec.c
- --- uClibc-0.9.33.2/libc/misc/regex/regexec.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/regex/regexec.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
- int n) internal_function;
- @@ -564,7 +563,7 @@
- re_match_context_t mctx;
- char *fastmap = (preg->fastmap != NULL && preg->fastmap_accurate
- && range && !preg->can_be_null) ? preg->fastmap : NULL;
- - RE_TRANSLATE_TYPE t = preg->translate;
- + __RE_TRANSLATE_TYPE t = preg->translate;
-
- memset (&mctx, '\0', sizeof (re_match_context_t));
- mctx.dfa = dfa;
- diff -Nur uClibc-0.9.33.2/libc/misc/regex/regex_internal.c uClibc/libc/misc/regex/regex_internal.c
- --- uClibc-0.9.33.2/libc/misc/regex/regex_internal.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/regex/regex_internal.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,13 +14,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- static void re_string_construct_common (const char *str, int len,
- re_string_t *pstr,
- - RE_TRANSLATE_TYPE trans, int icase,
- + __RE_TRANSLATE_TYPE trans, int icase,
- const re_dfa_t *dfa) internal_function;
- static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
- const re_node_set *nodes,
- @@ -38,7 +37,7 @@
- static reg_errcode_t
- internal_function
- re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len,
- - RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
- + __RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
- {
- reg_errcode_t ret;
- int init_buf_len;
- @@ -66,7 +65,7 @@
- static reg_errcode_t
- internal_function
- re_string_construct (re_string_t *pstr, const char *str, int len,
- - RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
- + __RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
- {
- reg_errcode_t ret;
- memset (pstr, '\0', sizeof (re_string_t));
- @@ -162,7 +161,7 @@
- static void
- internal_function
- re_string_construct_common (const char *str, int len, re_string_t *pstr,
- - RE_TRANSLATE_TYPE trans, int icase,
- + __RE_TRANSLATE_TYPE trans, int icase,
- const re_dfa_t *dfa)
- {
- pstr->raw_mbs = (const unsigned char *) str;
- diff -Nur uClibc-0.9.33.2/libc/misc/regex/regex_internal.h uClibc/libc/misc/regex/regex_internal.h
- --- uClibc-0.9.33.2/libc/misc/regex/regex_internal.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/regex/regex_internal.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,16 +14,14 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _REGEX_INTERNAL_H
- #define _REGEX_INTERNAL_H 1
-
- #include <assert.h>
- #include <ctype.h>
- -#include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-
- @@ -315,7 +313,7 @@
- the beginning of the input string. */
- unsigned int tip_context;
- /* The translation passed as a part of an argument of re_compile_pattern. */
- - RE_TRANSLATE_TYPE trans;
- + __RE_TRANSLATE_TYPE trans;
- /* Copy of re_dfa_t's word_char. */
- re_const_bitset_ptr_t word_char;
- /* 1 if REG_ICASE. */
- diff -Nur uClibc-0.9.33.2/libc/misc/regex/regex_old.c uClibc/libc/misc/regex/regex_old.c
- --- uClibc-0.9.33.2/libc/misc/regex/regex_old.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/regex/regex_old.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,25 +16,25 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* To exclude some unwanted junk.... */
- #undef emacs
- #include <features.h>
- /* unistd.h must be included with _LIBC defined: we need smallint */
- #include <unistd.h>
- +#include <stdio.h>
- #ifdef __UCLIBC__
- # undef _LIBC
- # define _REGEX_RE_COMP
- # define STDC_HEADERS
- -# define RE_TRANSLATE_TYPE char *
- +# define __RE_TRANSLATE_TYPE char *
- +# define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE
- #endif
- #include <stdlib.h>
- #include <stdint.h>
- #include <string.h>
- -#include <stdio.h>
-
- /* AIX requires this to be the first thing in the file. */
- #if defined _AIX && !defined REGEX_MALLOC
- @@ -64,10 +64,9 @@
- # include <wctype.h>
- # endif
-
- -# if defined _LIBC || defined __UCLIBC__
- +# ifdef _LIBC
- /* We have to keep the namespace clean. */
-
- -# ifndef __UCLIBC__
- # define btowc __btowc
-
- /* We are also using some library internals. */
- @@ -76,7 +75,6 @@
- # include <langinfo.h>
- # include <locale/coll-lookup.h>
- # endif
- -# endif
-
- /* This is for other GNU distributions with internationalized messages. */
- # if defined HAVE_LIBINTL_H || defined _LIBC
- @@ -177,6 +175,7 @@
-
- /* Get the interface, including the syntax bits. */
- # include <regex.h>
- +# define translate __REPB_PREFIX(translate)
-
- /* isalpha etc. are used for the character classes. */
- # include <ctype.h>
- @@ -1896,7 +1895,7 @@
- static reg_errcode_t wcs_compile_range (CHAR_T range_start,
- const CHAR_T **p_ptr,
- const CHAR_T *pend,
- - char *translate,
- + __RE_TRANSLATE_TYPE translate,
- reg_syntax_t syntax,
- UCHAR_T *b,
- CHAR_T *char_set);
- @@ -1905,7 +1904,7 @@
- static reg_errcode_t byte_compile_range (unsigned int range_start,
- const char **p_ptr,
- const char *pend,
- - char *translate,
- + __RE_TRANSLATE_TYPE translate,
- reg_syntax_t syntax,
- unsigned char *b);
- # endif /* WCHAR */
- @@ -2338,7 +2337,7 @@
- #endif /* WCHAR */
-
- /* How to translate the characters in the pattern. */
- - RE_TRANSLATE_TYPE translate = bufp->translate;
- + __RE_TRANSLATE_TYPE translate = bufp->translate;
-
- /* Address of the count-byte of the most recently inserted `exactn'
- command. This makes it possible to tell if a new exact-match
- @@ -4402,7 +4401,7 @@
- wcs_compile_range (
- CHAR_T range_start_char,
- const CHAR_T **p_ptr, const CHAR_T *pend,
- - RE_TRANSLATE_TYPE translate,
- + __RE_TRANSLATE_TYPE translate,
- reg_syntax_t syntax,
- CHAR_T *b, CHAR_T *char_set)
- {
- @@ -4488,7 +4487,7 @@
- byte_compile_range (
- unsigned int range_start_char,
- const char **p_ptr, const char *pend,
- - RE_TRANSLATE_TYPE translate,
- + __RE_TRANSLATE_TYPE translate,
- reg_syntax_t syntax,
- unsigned char *b)
- {
- @@ -5060,7 +5059,7 @@
- {
- int val;
- register char *fastmap = bufp->fastmap;
- - register RE_TRANSLATE_TYPE translate = bufp->translate;
- + register __RE_TRANSLATE_TYPE translate = bufp->translate;
- int total_size = size1 + size2;
- int endpos = startpos + range;
- #ifdef WCHAR
- @@ -5477,7 +5476,7 @@
- UCHAR_T *end,
- PREFIX(register_info_type) *reg_info);
- static int PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2,
- - int len, char *translate);
- + int len, __RE_TRANSLATE_TYPE translate);
- #else /* not INSIDE_RECURSION */
-
- /* re_match_2 matches the compiled pattern in BUFP against the
- @@ -5637,7 +5636,7 @@
- UCHAR_T *just_past_start_mem = 0;
-
- /* We use this to map every character in the string. */
- - RE_TRANSLATE_TYPE translate = bufp->translate;
- + __RE_TRANSLATE_TYPE translate = bufp->translate;
-
- /* Failure point stack. Each place that can handle a failure further
- down the line pushes a failure point on this stack. It consists of
- @@ -7212,6 +7211,10 @@
- POP_FAILURE_POINT (sdummy, pdummy,
- dummy_low_reg, dummy_high_reg,
- reg_dummy, reg_dummy, reg_info_dummy);
- +
- + /* Silence 'set but not used' warnings. */
- + (void) pdummy;
- + (void) sdummy;
- }
- /* Note fall through. */
-
- @@ -7802,7 +7805,7 @@
- PREFIX(bcmp_translate) (
- const CHAR_T *s1, const CHAR_T *s2,
- register int len,
- - RE_TRANSLATE_TYPE translate)
- + __RE_TRANSLATE_TYPE translate)
- {
- register const UCHAR_T *p1 = (const UCHAR_T *) s1;
- register const UCHAR_T *p2 = (const UCHAR_T *) s2;
- @@ -8002,8 +8005,8 @@
- unsigned i;
-
- preg->translate
- - = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
- - * sizeof (*(RE_TRANSLATE_TYPE)0));
- + = (__RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
- + * sizeof (*(__RE_TRANSLATE_TYPE)0));
- if (preg->translate == NULL)
- return (int) REG_ESPACE;
-
- diff -Nur uClibc-0.9.33.2/libc/misc/search/hsearch.c uClibc/libc/misc/search/hsearch.c
- --- uClibc-0.9.33.2/libc/misc/search/hsearch.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/search/hsearch.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <search.h>
-
- diff -Nur uClibc-0.9.33.2/libc/misc/search/_hsearch_r.c uClibc/libc/misc/search/_hsearch_r.c
- --- uClibc-0.9.33.2/libc/misc/search/_hsearch_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/search/_hsearch_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,12 +13,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- -#include <malloc.h>
- +#include <stdlib.h>
- #include <string.h>
-
- #include <search.h>
- diff -Nur uClibc-0.9.33.2/libc/misc/search/insremque.c uClibc/libc/misc/search/insremque.c
- --- uClibc-0.9.33.2/libc/misc/search/insremque.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/search/insremque.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <stddef.h>
- @@ -27,12 +26,20 @@
- void
- insque (void *elem, void *prev)
- {
- - struct qelem *next = ((struct qelem *) prev)->q_forw;
- - ((struct qelem *) prev)->q_forw = (struct qelem *) elem;
- - if (next != NULL)
- - next->q_back = (struct qelem *) elem;
- - ((struct qelem *) elem)->q_forw = next;
- - ((struct qelem *) elem)->q_back = (struct qelem *) prev;
- + if (prev == NULL)
- + {
- + ((struct qelem *) elem)->q_forw = NULL;
- + ((struct qelem *) elem)->q_back = NULL;
- + }
- + else
- + {
- + struct qelem *next = ((struct qelem *) prev)->q_forw;
- + ((struct qelem *) prev)->q_forw = (struct qelem *) elem;
- + if (next != NULL)
- + next->q_back = (struct qelem *) elem;
- + ((struct qelem *) elem)->q_forw = next;
- + ((struct qelem *) elem)->q_back = (struct qelem *) prev;
- + }
- }
-
- #endif
- diff -Nur uClibc-0.9.33.2/libc/misc/search/Makefile.in uClibc/libc/misc/search/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/search/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/search/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,25 +7,25 @@
-
- subdirs += libc/misc/search
-
- -CSRC := hsearch.c
- +CSRC-y := hsearch.c
-
- # multi source _tsearch.c
- -CSRC += tsearch.c tfind.c tdelete.c twalk.c tdestroy.c
- +CSRC-y += tsearch.c tfind.c tdelete.c twalk.c tdestroy.c
-
- # multi source _lsearch.c
- -CSRC += lfind.c lsearch.c
- +CSRC-y += lfind.c lsearch.c
-
- # multi source insremque.c
- -CSRC += insque.c remque.c
- +CSRC-y += insque.c remque.c
-
- # multi source _hsearch_r.c
- -CSRC += hcreate_r.c hdestroy_r.c hsearch_r.c
- +CSRC-y += hcreate_r.c hdestroy_r.c hsearch_r.c
-
- MISC_SEARCH_DIR := $(top_srcdir)libc/misc/search
- MISC_SEARCH_OUT := $(top_builddir)libc/misc/search
-
- -MISC_SEARCH_SRC := $(patsubst %.c,$(MISC_SEARCH_DIR)/%.c,$(CSRC))
- -MISC_SEARCH_OBJ := $(patsubst %.c,$(MISC_SEARCH_OUT)/%.o,$(CSRC))
- +MISC_SEARCH_SRC := $(patsubst %.c,$(MISC_SEARCH_DIR)/%.c,$(CSRC-y))
- +MISC_SEARCH_OBJ := $(patsubst %.c,$(MISC_SEARCH_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_SEARCH_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/search/_tsearch.c uClibc/libc/misc/search/_tsearch.c
- --- uClibc-0.9.33.2/libc/misc/search/_tsearch.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/search/_tsearch.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- /*
- * Tree search generalized from Knuth (6.2.2) Algorithm T just like
- @@ -50,7 +49,7 @@
- int (*compar)(); ordering function
- */
-
- -void *tsearch(__const void *key, void **vrootp, __compar_fn_t compar)
- +void *tsearch(const void *key, void **vrootp, __compar_fn_t compar)
- {
- register node *q;
- register node **rootp = (node **) vrootp;
- @@ -80,7 +79,7 @@
- #endif
-
- #ifdef L_tfind
- -void *tfind(__const void *key, void * __const *vrootp, __compar_fn_t compar)
- +void *tfind(const void *key, void * const *vrootp, __compar_fn_t compar)
- {
- register node **rootp = (node **) vrootp;
-
- @@ -107,7 +106,7 @@
- register node **rootp; address of the root of tree
- int (*compar)(); comparison function
- */
- -void *tdelete(__const void *key, void ** vrootp, __compar_fn_t compar)
- +void *tdelete(const void *key, void ** vrootp, __compar_fn_t compar)
- {
- node *p;
- register node *q;
- @@ -157,7 +156,7 @@
- register void (*action)(); Function to be called at each node
- register int level;
- */
- -static void trecurse(__const void *vroot, __action_fn_t action, int level)
- +static void trecurse(const void *vroot, __action_fn_t action, int level)
- {
- register node *root = (node *) vroot;
-
- @@ -180,9 +179,9 @@
- void (*action)(); Function to be called at each node
- PTR
- */
- -void twalk(__const void *vroot, __action_fn_t action)
- +void twalk(const void *vroot, __action_fn_t action)
- {
- - register __const node *root = (node *) vroot;
- + register const node *root = (node *) vroot;
-
- if (root != (node *)0 && action != (__action_fn_t) 0)
- trecurse(root, action, 0);
- diff -Nur uClibc-0.9.33.2/libc/misc/statfs/fstatfs64.c uClibc/libc/misc/statfs/fstatfs64.c
- --- uClibc-0.9.33.2/libc/misc/statfs/fstatfs64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/statfs/fstatfs64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <_lfs_64.h>
-
- @@ -23,8 +22,10 @@
- #include <string.h>
- #include <sys/statfs.h>
- #include <sys/statvfs.h>
- +#include <sys/syscall.h>
- #include <stddef.h>
-
- +#if defined __NR_fstatfs
- extern __typeof(fstatfs) __libc_fstatfs;
-
- /* Return information about the filesystem on which FD resides. */
- @@ -43,9 +44,24 @@
- buf->f_files = buf32.f_files;
- buf->f_ffree = buf32.f_ffree;
- buf->f_fsid = buf32.f_fsid;
- +# ifdef _STATFS_F_FRSIZE
- + buf->f_frsize = buf32.f_frsize;
- +# endif
- buf->f_namelen = buf32.f_namelen;
- memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
-
- return 0;
- }
- +#else
- +/*
- + * Use the fstatfs64 system call if fstatfs is not defined
- + * This is for backwards compatibility and it should be
- + * made default in the future
- + */
- +int fstatfs64(int fd, struct statfs64 *buf)
- +{
- + /* Signature has 2 arguments but syscalls wants 3 */
- + return INLINE_SYSCALL(fstatfs64, 3, fd, sizeof(*buf), buf);
- +}
- +#endif
- libc_hidden_def(fstatfs64)
- diff -Nur uClibc-0.9.33.2/libc/misc/statfs/fstatvfs64.c uClibc/libc/misc/statfs/fstatvfs64.c
- --- uClibc-0.9.33.2/libc/misc/statfs/fstatvfs64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/statfs/fstatvfs64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <_lfs_64.h>
-
- diff -Nur uClibc-0.9.33.2/libc/misc/statfs/fstatvfs.c uClibc/libc/misc/statfs/fstatvfs.c
- --- uClibc-0.9.33.2/libc/misc/statfs/fstatvfs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/statfs/fstatvfs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libc/misc/statfs/internal_statvfs.c uClibc/libc/misc/statfs/internal_statvfs.c
- --- uClibc-0.9.33.2/libc/misc/statfs/internal_statvfs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/statfs/internal_statvfs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,20 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +/* The kernel hints us if the f_flags is valid */
- +#define ST_VALID 0x0020
-
- /* Now fill in the fields we have information for. */
- buf->f_bsize = fsbuf.f_bsize;
- - /* Linux does not support f_frsize, so set it to the full block size. */
- +#ifdef _STATFS_F_FRSIZE
- + buf->f_frsize = fsbuf.f_frsize;
- +#else
- + /* No support for f_frsize so set it to the full block size. */
- buf->f_frsize = fsbuf.f_bsize;
- +#endif
- buf->f_blocks = fsbuf.f_blocks;
- buf->f_bfree = fsbuf.f_bfree;
- buf->f_bavail = fsbuf.f_bavail;
- @@ -28,7 +34,7 @@
- buf->f_ffree = fsbuf.f_ffree;
- if (sizeof (buf->f_fsid) == sizeof (fsbuf.f_fsid))
- buf->f_fsid = (fsbuf.f_fsid.__val[0]
- - | ((unsigned long int) fsbuf.f_fsid.__val[1]
- + | ((unsigned long long int) fsbuf.f_fsid.__val[1]
- << (8 * (sizeof (buf->f_fsid)
- - sizeof (fsbuf.f_fsid.__val[0])))));
- else
- @@ -39,10 +45,7 @@
- buf->__f_unused = 0;
- #endif
- buf->f_namemax = fsbuf.f_namelen;
- - memset (buf->__f_spare, '\0', 6 * sizeof (int));
- -
- - /* What remains to do is to fill the fields f_favail and f_flag. */
- -
- + memset (buf->__f_spare, '\0', sizeof(buf->__f_spare));
- /* XXX I have no idea how to compute f_favail. Any idea??? */
- buf->f_favail = buf->f_ffree;
-
- @@ -51,61 +54,63 @@
- file. The way we can test for matching filesystem is using the
- device number. */
- buf->f_flag = 0;
- - if (STAT (&st) >= 0)
- - {
- - int save_errno = errno;
- - struct mntent mntbuf;
- - FILE *mtab;
- -
- - mtab = setmntent ("/proc/mounts", "r");
- - if (mtab == NULL)
- - mtab = setmntent (_PATH_MOUNTED, "r");
- -
- - if (mtab != NULL)
- - {
- - char tmpbuf[1024];
- -
- - while (getmntent_r (mtab, &mntbuf, tmpbuf, sizeof (tmpbuf)))
- - {
- - struct stat fsst;
- -
- - /* Find out about the device the current entry is for. */
- - if (stat (mntbuf.mnt_dir, &fsst) >= 0
- - && st.st_dev == fsst.st_dev)
- - {
- - /* Bingo, we found the entry for the device FD is on.
- - Now interpret the option string. */
- - char *cp = mntbuf.mnt_opts;
- - char *opt;
- -
- - while ((opt = strsep (&cp, ",")) != NULL)
- - if (strcmp (opt, "ro") == 0)
- - buf->f_flag |= ST_RDONLY;
- - else if (strcmp (opt, "nosuid") == 0)
- - buf->f_flag |= ST_NOSUID;
- + if (STAT (&st) >= 0
- +#ifdef _STATFS_F_FLAGS
- + && (fsbuf.f_flags & ST_VALID) == 0
- +#endif
- + ) {
- + int save_errno = errno;
- + struct mntent mntbuf;
- + FILE *mtab;
- +
- + mtab = setmntent ("/proc/mounts", "r");
- + if (mtab == NULL)
- + mtab = setmntent (_PATH_MOUNTED, "r");
- + if (mtab != NULL) {
- + char tmpbuf[1024];
- +
- + while (getmntent_r (mtab, &mntbuf, tmpbuf, sizeof (tmpbuf))) {
- + struct stat fsst;
- +
- + /* Find out about the device the current entry is for. */
- + if (stat (mntbuf.mnt_dir, &fsst) >= 0
- + && st.st_dev == fsst.st_dev) {
- + /* Bingo, we found the entry for the device FD is on.
- + Now interpret the option string. */
- + char *cp = mntbuf.mnt_opts;
- + char *opt;
- +
- + while ((opt = strsep (&cp, ",")) != NULL)
- + if (strcmp (opt, "ro") == 0)
- + buf->f_flag |= ST_RDONLY;
- + else if (strcmp (opt, "nosuid") == 0)
- + buf->f_flag |= ST_NOSUID;
- #ifdef __USE_GNU
- - else if (strcmp (opt, "noexec") == 0)
- - buf->f_flag |= ST_NOEXEC;
- - else if (strcmp (opt, "nodev") == 0)
- - buf->f_flag |= ST_NODEV;
- - else if (strcmp (opt, "sync") == 0)
- - buf->f_flag |= ST_SYNCHRONOUS;
- - else if (strcmp (opt, "mand") == 0)
- - buf->f_flag |= ST_MANDLOCK;
- - else if (strcmp (opt, "noatime") == 0)
- - buf->f_flag |= ST_NOATIME;
- - else if (strcmp (opt, "nodiratime") == 0)
- - buf->f_flag |= ST_NODIRATIME;
- + else if (strcmp (opt, "noexec") == 0)
- + buf->f_flag |= ST_NOEXEC;
- + else if (strcmp (opt, "nodev") == 0)
- + buf->f_flag |= ST_NODEV;
- + else if (strcmp (opt, "sync") == 0)
- + buf->f_flag |= ST_SYNCHRONOUS;
- + else if (strcmp (opt, "mand") == 0)
- + buf->f_flag |= ST_MANDLOCK;
- + else if (strcmp (opt, "noatime") == 0)
- + buf->f_flag |= ST_NOATIME;
- + else if (strcmp (opt, "nodiratime") == 0)
- + buf->f_flag |= ST_NODIRATIME;
- + else if (strcmp (opt, "relatime") == 0)
- + buf->f_flag |= ST_RELATIME;
- #endif
- -
- - /* We can stop looking for more entries. */
- - break;
- + /* We can stop looking for more entries. */
- + break;
- + }
- }
- - }
- -
- - /* Close the file. */
- - endmntent (mtab);
- - }
- -
- - __set_errno (save_errno);
- - }
- + /* Close the file. */
- + endmntent (mtab);
- + }
- + __set_errno (save_errno);
- + }
- +#ifdef _STATFS_F_FLAGS
- + else
- + buf->f_flag = fsbuf.f_flags ^ ST_VALID;
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/statfs/Makefile.in uClibc/libc/misc/statfs/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/statfs/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/statfs/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,19 +7,16 @@
-
- subdirs += libc/misc/statfs
-
- -CSRC := statvfs.c fstatvfs.c
- -ifeq ($(UCLIBC_HAS_LFS),y)
- -ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
- -CSRC += fstatfs64.c statfs64.c
- -endif
- -CSRC += statvfs64.c fstatvfs64.c
- -endif
- +CSRC-y := statvfs.c fstatvfs.c
- +CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %.c,%64.c,$(CSRC-y))
- +CSRC-$(if $(findstring yy,$(UCLIBC_HAS_LFS)$(UCLIBC_LINUX_SPECIFIC)),y) += \
- + fstatfs64.c statfs64.c
-
- MISC_STATFS_DIR := $(top_srcdir)libc/misc/statfs
- MISC_STATFS_OUT := $(top_builddir)libc/misc/statfs
-
- -MISC_STATFS_SRC := $(patsubst %.c,$(MISC_STATFS_DIR)/%.c,$(CSRC))
- -MISC_STATFS_OBJ := $(patsubst %.c,$(MISC_STATFS_OUT)/%.o,$(CSRC))
- +MISC_STATFS_SRC := $(patsubst %.c,$(MISC_STATFS_DIR)/%.c,$(CSRC-y))
- +MISC_STATFS_OBJ := $(patsubst %.c,$(MISC_STATFS_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_STATFS_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/statfs/statfs64.c uClibc/libc/misc/statfs/statfs64.c
- --- uClibc-0.9.33.2/libc/misc/statfs/statfs64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/statfs/statfs64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,18 +13,19 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <_lfs_64.h>
-
- #include <string.h>
- #include <stddef.h>
- #include <sys/statfs.h>
- +#include <sys/syscall.h>
-
- extern __typeof(statfs) __libc_statfs;
-
- +#if defined __NR_statfs
- /* Return information about the filesystem on which FILE resides. */
- int statfs64 (const char *file, struct statfs64 *buf)
- {
- @@ -42,8 +43,21 @@
- buf->f_ffree = buf32.f_ffree;
- buf->f_fsid = buf32.f_fsid;
- buf->f_namelen = buf32.f_namelen;
- +#ifdef _STATFS_F_FRSIZE
- + buf->f_frsize = buf32.f_frsize;
- +#endif
- +#ifdef _STATFS_F_FLAGS
- + buf->f_flags = buf32.f_flags;
- +#endif
- memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
-
- return 0;
- }
- +#else
- +int statfs64 (const char *file, struct statfs64 *buf)
- +{
- + return INLINE_SYSCALL(statfs64, 3, file, sizeof(*buf), buf);
- +}
- +#endif
- +
- libc_hidden_def(statfs64)
- diff -Nur uClibc-0.9.33.2/libc/misc/statfs/statvfs64.c uClibc/libc/misc/statfs/statvfs64.c
- --- uClibc-0.9.33.2/libc/misc/statfs/statvfs64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/statfs/statvfs64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <_lfs_64.h>
-
- diff -Nur uClibc-0.9.33.2/libc/misc/statfs/statvfs.c uClibc/libc/misc/statfs/statvfs.c
- --- uClibc-0.9.33.2/libc/misc/statfs/statvfs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/statfs/statvfs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libc/misc/syslog/Makefile.in uClibc/libc/misc/syslog/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/syslog/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/syslog/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,13 +7,13 @@
-
- subdirs += libc/misc/syslog
-
- -CSRC := syslog.c
- +CSRC-y := syslog.c
-
- MISC_SYSLOG_DIR := $(top_srcdir)libc/misc/syslog
- MISC_SYSLOG_OUT := $(top_builddir)libc/misc/syslog
-
- -MISC_SYSLOG_SRC := $(patsubst %.c,$(MISC_SYSLOG_DIR)/%.c,$(CSRC))
- -MISC_SYSLOG_OBJ := $(patsubst %.c,$(MISC_SYSLOG_OUT)/%.o,$(CSRC))
- +MISC_SYSLOG_SRC := $(patsubst %.c,$(MISC_SYSLOG_DIR)/%.c,$(CSRC-y))
- +MISC_SYSLOG_OBJ := $(patsubst %.c,$(MISC_SYSLOG_OUT)/%.o,$(CSRC-y))
-
- ifeq ($(UCLIBC_HAS_SYSLOG),y)
- libc-y += $(MISC_SYSLOG_OBJ)
- diff -Nur uClibc-0.9.33.2/libc/misc/syslog/syslog.c uClibc/libc/misc/syslog/syslog.c
- --- uClibc-0.9.33.2/libc/misc/syslog/syslog.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/syslog/syslog.c 2014-02-03 12:32:56.000000000 +0100
- @@ -58,8 +58,6 @@
- * - Major code cleanup.
- */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/file.h>
- @@ -177,14 +175,17 @@
- openlog_intern(ident, logstat, logfac);
- __UCLIBC_MUTEX_UNLOCK(mylock);
- }
- -libc_hidden_def(openlog)
-
- /*
- * syslog, vsyslog --
- * print message on log file; output is intended for syslogd(8).
- */
- +static
- +#ifndef __USE_BSD
- +__always_inline
- +#endif
- void
- -vsyslog(int pri, const char *fmt, va_list ap)
- +__vsyslog(int pri, const char *fmt, va_list ap)
- {
- register char *p;
- char *last_chr, *head_end, *end, *stdp;
- @@ -303,7 +304,9 @@
- getout:
- __UCLIBC_MUTEX_UNLOCK(mylock);
- }
- -libc_hidden_def(vsyslog)
- +#ifdef __USE_BSD
- +strong_alias(__vsyslog,vsyslog)
- +#endif
-
- void
- syslog(int pri, const char *fmt, ...)
- @@ -311,7 +314,7 @@
- va_list ap;
-
- va_start(ap, fmt);
- - vsyslog(pri, fmt, ap);
- + __vsyslog(pri, fmt, ap);
- va_end(ap);
- }
- libc_hidden_def(syslog)
- @@ -326,7 +329,6 @@
- closelog_intern(0); /* 0: reset LogXXX globals to default */
- __UCLIBC_MUTEX_UNLOCK(mylock);
- }
- -libc_hidden_def(closelog)
-
- /* setlogmask -- set the log mask level */
- int setlogmask(int pmask)
- @@ -335,9 +337,9 @@
-
- omask = LogMask;
- if (pmask != 0) {
- - __UCLIBC_MUTEX_LOCK(mylock);
- +/* __UCLIBC_MUTEX_LOCK(mylock);*/
- LogMask = pmask;
- - __UCLIBC_MUTEX_UNLOCK(mylock);
- +/* __UCLIBC_MUTEX_UNLOCK(mylock);*/
- }
- return omask;
- }
- diff -Nur uClibc-0.9.33.2/libc/misc/sysvipc/ftok.c uClibc/libc/misc/sysvipc/ftok.c
- --- uClibc-0.9.33.2/libc/misc/sysvipc/ftok.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/sysvipc/ftok.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <sys/ipc.h>
- #include <sys/stat.h>
- diff -Nur uClibc-0.9.33.2/libc/misc/sysvipc/ipc.h uClibc/libc/misc/sysvipc/ipc.h
- --- uClibc-0.9.33.2/libc/misc/sysvipc/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/sysvipc/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -3,10 +3,14 @@
- #include <syscall.h>
- #include <bits/wordsize.h>
-
- -#if __WORDSIZE == 32 || defined __alpha__ || defined __mips__
- -# define __IPC_64 0x100
- +#ifndef __ARCH_HAS_DEPRECATED_SYSCALLS__
- +# define __IPC_64 0x0
- #else
- -# define __IPC_64 0x0
- +# if __WORDSIZE == 32 || defined __alpha__ || defined __mips__
- +# define __IPC_64 0x100
- +# else
- +# define __IPC_64 0x0
- +# endif
- #endif
-
- #ifdef __NR_ipc
- diff -Nur uClibc-0.9.33.2/libc/misc/sysvipc/Makefile.in uClibc/libc/misc/sysvipc/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/sysvipc/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/sysvipc/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,22 +7,22 @@
-
- subdirs += libc/misc/sysvipc
-
- -CSRC := ftok.c __syscall_ipc.c
- +CSRC-y := ftok.c __syscall_ipc.c
-
- # multi source sem.c
- -CSRC += semget.c semctl.c semop.c semtimedop.c
- +CSRC-y += semget.c semctl.c semop.c semtimedop.c
-
- # multi source shm.c
- -CSRC += shmat.c shmctl.c shmdt.c shmget.c
- +CSRC-y += shmat.c shmctl.c shmdt.c shmget.c
-
- # multi source msgq.c
- -CSRC += msgctl.c msgget.c msgrcv.c msgsnd.c
- +CSRC-y += msgctl.c msgget.c msgrcv.c msgsnd.c
-
- MISC_SYSVIPC_DIR := $(top_srcdir)libc/misc/sysvipc
- MISC_SYSVIPC_OUT := $(top_builddir)libc/misc/sysvipc
-
- -MISC_SYSVIPC_SRC := $(patsubst %.c,$(MISC_SYSVIPC_DIR)/%.c,$(CSRC))
- -MISC_SYSVIPC_OBJ := $(patsubst %.c,$(MISC_SYSVIPC_OUT)/%.o,$(CSRC))
- +MISC_SYSVIPC_SRC := $(patsubst %.c,$(MISC_SYSVIPC_DIR)/%.c,$(CSRC-y))
- +MISC_SYSVIPC_OBJ := $(patsubst %.c,$(MISC_SYSVIPC_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_SYSVIPC_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/sysvipc/sem.c uClibc/libc/misc/sysvipc/sem.c
- --- uClibc-0.9.33.2/libc/misc/sysvipc/sem.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/sysvipc/sem.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sys/sem.h>
- diff -Nur uClibc-0.9.33.2/libc/misc/sysvipc/shm.c uClibc/libc/misc/sysvipc/shm.c
- --- uClibc-0.9.33.2/libc/misc/sysvipc/shm.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/sysvipc/shm.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* SHMLBA uses it on most of the archs (not mips) */
- #define __getpagesize getpagesize
- @@ -54,13 +53,13 @@
- #ifdef L_shmctl
- /* Provide operations to control over shared memory segments. */
- #ifdef __NR_shmctl
- -#define __NR___libc_shmctl __NR_shmctl
- -static __inline__ _syscall3(int, __libc_shmctl, int, shmid, int, cmd, struct shmid_ds *, buf)
- +#define __NR___syscall_shmctl __NR_shmctl
- +static __always_inline _syscall3(int, __syscall_shmctl, int, shmid, int, cmd, struct shmid_ds *, buf)
- #endif
- int shmctl(int shmid, int cmd, struct shmid_ds *buf)
- {
- #ifdef __NR_shmctl
- - return __libc_shmctl(shmid, cmd | __IPC_64, buf);
- + return __syscall_shmctl(shmid, cmd | __IPC_64, buf);
- #else
- return __syscall_ipc(IPCOP_shmctl, shmid, cmd | __IPC_64, 0, buf, 0);
- #endif
- diff -Nur uClibc-0.9.33.2/libc/misc/time/ftime.c uClibc/libc/misc/time/ftime.c
- --- uClibc-0.9.33.2/libc/misc/time/ftime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/time/ftime.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/timeb.h>
- #include <sys/time.h>
- diff -Nur uClibc-0.9.33.2/libc/misc/time/Makefile.in uClibc/libc/misc/time/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/time/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/time/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,33 +7,24 @@
-
- subdirs += libc/misc/time
-
- -CSRC := adjtime.c
- -ifeq ($(UCLIBC_SUSV3_LEGACY),y)
- -CSRC += ftime.c
- -endif
- +CSRC-y := adjtime.c
- +CSRC-$(UCLIBC_SUSV3_LEGACY) += ftime.c
- # multi source time.c
- -CSRC += asctime.c asctime_r.c clock.c ctime.c ctime_r.c gmtime.c gmtime_r.c \
- +CSRC-y += asctime.c asctime_r.c clock.c ctime.c ctime_r.c gmtime.c gmtime_r.c \
- localtime.c localtime_r.c mktime.c strftime.c strptime.c tzset.c \
- _time_t2tm.c __time_tm.c _time_mktime.c dysize.c timegm.c \
- _time_mktime_tzi.c _time_localtime_tzi.c
- -ifeq ($(UCLIBC_HAS_FLOATS),y)
- -CSRC += difftime.c
- -endif
- -ifeq ($(UCLIBC_HAS_XLOCALE),y)
- -CSRC += strftime_l.c strptime_l.c
- -endif
- -ifeq ($(UCLIBC_HAS_WCHAR),y)
- -CSRC += wcsftime.c
- -ifeq ($(UCLIBC_HAS_XLOCALE),y)
- -CSRC += wcsftime_l.c
- -endif
- -endif
- +CSRC-$(UCLIBC_HAS_FLOATS) += difftime.c
- +CSRC-$(UCLIBC_HAS_XLOCALE) += strftime_l.c strptime_l.c
- +CSRC-$(UCLIBC_HAS_WCHAR) += wcsftime.c
- +CSRC-$(if $(findstring yy,$(UCLIBC_HAS_WCHAR)$(UCLIBC_HAS_XLOCALE)),y) += \
- + wcsftime_l.c
-
- MISC_TIME_DIR := $(top_srcdir)libc/misc/time
- MISC_TIME_OUT := $(top_builddir)libc/misc/time
-
- -MISC_TIME_SRC := $(patsubst %.c,$(MISC_TIME_DIR)/%.c,$(CSRC))
- -MISC_TIME_OBJ := $(patsubst %.c,$(MISC_TIME_OUT)/%.o,$(CSRC))
- +MISC_TIME_SRC := $(patsubst %.c,$(MISC_TIME_DIR)/%.c,$(CSRC-y))
- +MISC_TIME_OBJ := $(patsubst %.c,$(MISC_TIME_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_TIME_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/time/time.c uClibc/libc/misc/time/time.c
- --- uClibc-0.9.33.2/libc/misc/time/time.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/time/time.c 2014-02-03 12:32:56.000000000 +0100
- @@ -149,10 +149,6 @@
- #ifdef __UCLIBC_HAS_WCHAR__
- #include <wchar.h>
- #endif
- -#ifdef __UCLIBC_HAS_XLOCALE__
- -#include <xlocale.h>
- -#endif
- -
-
- #ifndef __isleap
- #define __isleap(y) ( !((y) % 4) && ( ((y) % 100) || !((y) % 400) ) )
- @@ -212,7 +208,7 @@
- char tzname[TZNAME_MAX+1];
- } rule_struct;
-
- -__UCLIBC_MUTEX_EXTERN(_time_tzlock);
- +__UCLIBC_MUTEX_EXTERN(_time_tzlock) attribute_hidden;
-
- extern rule_struct _time_tzinfo[2] attribute_hidden;
-
- @@ -605,11 +601,11 @@
- } ll_tzname_item_t;
-
- /* Structures form a list "UTC" -> "???" -> "tzname1" -> "tzname2"... */
- -struct {
- +static struct {
- struct ll_tzname_item *next;
- char tzname[4];
- } ll_tzname_UNKNOWN = { NULL, "???" };
- -const struct {
- +static const struct {
- struct ll_tzname_item *next;
- char tzname[4];
- } ll_tzname_UTC = { (void*)&ll_tzname_UNKNOWN, "UTC" };
- @@ -671,7 +667,7 @@
- isleap = __isleap(i);
- --i;
- day0 = (1
- - + i /* Normal years increment 1 wday. */
- + + i /* Normal years increment 1 wday. */
- + (i/4)
- - (i/100)
- + (i/400) ) % 7;
- @@ -684,20 +680,22 @@
- }
- } else if (r->rule_type == 'M') {
- /* Find 0-based day number for 1st of the month. */
- - day = 31*r->month - day_cor[r->month -1];
- + day = 31 * r->month - day_cor[r->month - 1];
- if (isleap && (day >= 59)) {
- ++day;
- }
- - monlen = 31 + day_cor[r->month -1] - day_cor[r->month];
- + monlen = 31 + day_cor[r->month - 1] - day_cor[r->month];
- if (isleap && (r->month == 2)) {
- ++monlen;
- }
- - /* Wweekday (0 is Sunday) of 1st of the month
- + /* Weekday (0 is Sunday) of 1st of the month
- * is (day0 + day) % 7. */
- - if ((mday = r->day - ((day0 + day) % 7)) >= 0) {
- - mday -= 7; /* Back up into prev month since r->week>0. */
- + mday = r->day - ((day0 + day) % 7);
- + if (mday >= 0) {
- + mday -= 7; /* Back up into prev month since r->week > 0. */
- }
- - if ((mday += 7 * r->week) >= monlen) {
- + mday += 7 * r->week;
- + if (mday >= monlen) {
- mday -= 7;
- }
- /* So, 0-based day number is... */
- @@ -2100,7 +2098,8 @@
- daylight = !!_time_tzinfo[1].tzname[0];
- timezone = _time_tzinfo[0].gmt_offset;
-
- -#if defined(__UCLIBC_HAS_TZ_FILE__) || defined(__UCLIBC_HAS_TZ_CACHING__)
- +#if (defined(__UCLIBC_HAS_TZ_FILE__) && !defined(__UCLIBC_HAS_TZ_FILE_READ_MANY__)) || \
- + defined(__UCLIBC_HAS_TZ_CACHING__)
- FAST_DONE:
- #endif
- __UCLIBC_MUTEX_UNLOCK(_time_tzlock);
- diff -Nur uClibc-0.9.33.2/libc/misc/ttyent/getttyent.c uClibc/libc/misc/ttyent/getttyent.c
- --- uClibc-0.9.33.2/libc/misc/ttyent/getttyent.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/ttyent/getttyent.c 2014-02-03 12:32:56.000000000 +0100
- @@ -30,12 +30,11 @@
- #include <features.h>
- #include <ttyent.h>
- #include <stdio.h>
- -#include <stdio_ext.h>
- #include <ctype.h>
- #include <string.h>
- #include <stdlib.h>
- #ifdef __UCLIBC_HAS_THREADS__
- -# include <pthread.h>
- +# include <stdio_ext.h>
- #endif
-
- static char zapchar;
- diff -Nur uClibc-0.9.33.2/libc/misc/ttyent/Makefile.in uClibc/libc/misc/ttyent/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/ttyent/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/ttyent/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,13 +7,13 @@
-
- subdirs += libc/misc/ttyent
-
- -CSRC := getttyent.c
- +CSRC-y := getttyent.c
-
- MISC_TTYENT_DIR := $(top_srcdir)libc/misc/ttyent
- MISC_TTYENT_OUT := $(top_builddir)libc/misc/ttyent
-
- -MISC_TTYENT_SRC := $(patsubst %.c,$(MISC_TTYENT_DIR)/%.c,$(CSRC))
- -MISC_TTYENT_OBJ := $(patsubst %.c,$(MISC_TTYENT_OUT)/%.o,$(CSRC))
- +MISC_TTYENT_SRC := $(patsubst %.c,$(MISC_TTYENT_DIR)/%.c,$(CSRC-y))
- +MISC_TTYENT_OBJ := $(patsubst %.c,$(MISC_TTYENT_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_TTYENT_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/utmp/Makefile.in uClibc/libc/misc/utmp/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/utmp/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/utmp/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,17 +7,14 @@
-
- subdirs += libc/misc/utmp
-
- -CSRC := utent.c wtent.c
- -
- -ifeq ($(UCLIBC_HAS_UTMPX),y)
- -CSRC += utxent.c
- -endif
- +CSRC-y := utent.c wtent.c
- +CSRC-$(UCLIBC_HAS_UTMPX) += utxent.c
-
- MISC_UTMP_DIR := $(top_srcdir)libc/misc/utmp
- MISC_UTMP_OUT := $(top_builddir)libc/misc/utmp
-
- -MISC_UTMP_SRC := $(patsubst %.c,$(MISC_UTMP_DIR)/%.c,$(CSRC))
- -MISC_UTMP_OBJ := $(patsubst %.c,$(MISC_UTMP_OUT)/%.o,$(CSRC))
- +MISC_UTMP_SRC := $(patsubst %.c,$(MISC_UTMP_DIR)/%.c,$(CSRC-y))
- +MISC_UTMP_OBJ := $(patsubst %.c,$(MISC_UTMP_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_UTMP_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/utmp/utent.c uClibc/libc/misc/utmp/utent.c
- --- uClibc-0.9.33.2/libc/misc/utmp/utent.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/utmp/utent.c 2014-02-03 12:32:56.000000000 +0100
- @@ -19,32 +19,22 @@
- #include <errno.h>
- #include <string.h>
- #include <utmp.h>
- +#ifdef __UCLIBC_HAS_UTMPX__
- +# include <utmpx.h>
- +#endif
- #include <not-cancel.h>
-
- #include <bits/uClibc_mutex.h>
- __UCLIBC_MUTEX_STATIC(utmplock, PTHREAD_MUTEX_INITIALIZER);
-
- -
- -/* Do not create extra unlocked functions if no locking is needed */
- -#if defined __UCLIBC_HAS_THREADS__
- -# define static_if_threaded static
- -#else
- -# define static_if_threaded /* nothing */
- -# define __setutent setutent
- -# define __getutent getutent
- -# define __getutid getutid
- -#endif
- -
- -
- /* Some global crap */
- static int static_fd = -1;
- static struct utmp static_utmp;
- static const char default_file_name[] = _PATH_UTMP;
- static const char *static_ut_name = default_file_name;
-
- -
- /* This function must be called with the LOCK held */
- -static_if_threaded void __setutent(void)
- +static void __setutent_unlocked(void)
- {
- if (static_fd < 0) {
- static_fd = open_not_cancel_2(static_ut_name, O_RDWR | O_CLOEXEC);
- @@ -63,17 +53,24 @@
- lseek(static_fd, 0, SEEK_SET);
- }
- #if defined __UCLIBC_HAS_THREADS__
- -void setutent(void)
- +static void __setutent(void)
- {
- __UCLIBC_MUTEX_LOCK(utmplock);
- - __setutent();
- + __setutent_unlocked();
- __UCLIBC_MUTEX_UNLOCK(utmplock);
- }
- +#else
- +static void __setutent(void);
- +strong_alias(__setutent_unlocked,__setutent)
- +#endif
- +strong_alias(__setutent,setutent)
- +
- +#ifdef __UCLIBC_HAS_UTMPX__
- +strong_alias(__setutent,setutxent)
- #endif
- -libc_hidden_def(setutent)
-
- /* This function must be called with the LOCK held */
- -static_if_threaded struct utmp *__getutent(void)
- +static struct utmp *__getutent_unlocked(void)
- {
- if (static_fd < 0) {
- __setutent();
- @@ -89,19 +86,29 @@
- return NULL;
- }
- #if defined __UCLIBC_HAS_THREADS__
- -struct utmp *getutent(void)
- +static struct utmp *__getutent(void)
- {
- struct utmp *ret;
-
- __UCLIBC_MUTEX_LOCK(utmplock);
- - ret = __getutent();
- + ret = __getutent_unlocked();
- __UCLIBC_MUTEX_UNLOCK(utmplock);
- return ret;
- }
- +#else
- +static struct utmp *__getutent(void);
- +strong_alias(__getutent_unlocked,__getutent)
- +#endif
- +strong_alias(__getutent,getutent)
- +
- +#ifdef __UCLIBC_HAS_UTMPX__
- +struct utmpx *getutxent(void)
- +{
- + return (struct utmpx *) __getutent ();
- +}
- #endif
- -libc_hidden_def(getutent)
-
- -void endutent(void)
- +static void __endutent(void)
- {
- __UCLIBC_MUTEX_LOCK(utmplock);
- if (static_fd >= 0)
- @@ -109,10 +116,14 @@
- static_fd = -1;
- __UCLIBC_MUTEX_UNLOCK(utmplock);
- }
- -libc_hidden_def(endutent)
- +strong_alias(__endutent,endutent)
- +
- +#ifdef __UCLIBC_HAS_UTMPX__
- +strong_alias(__endutent,endutxent)
- +#endif
-
- /* This function must be called with the LOCK held */
- -static_if_threaded struct utmp *__getutid(const struct utmp *utmp_entry)
- +static struct utmp *__getutid_unlocked(const struct utmp *utmp_entry)
- {
- struct utmp *lutmp;
- unsigned type;
- @@ -122,7 +133,7 @@
- type = utmp_entry->ut_type - 1;
- type /= 4;
-
- - while ((lutmp = __getutent()) != NULL) {
- + while ((lutmp = __getutent_unlocked()) != NULL) {
- if (type == 0 && lutmp->ut_type == utmp_entry->ut_type) {
- /* one of RUN_LVL, BOOT_TIME, NEW_TIME, OLD_TIME */
- return lutmp;
- @@ -136,24 +147,34 @@
- return NULL;
- }
- #if defined __UCLIBC_HAS_THREADS__
- -struct utmp *getutid(const struct utmp *utmp_entry)
- +static struct utmp *__getutid(const struct utmp *utmp_entry)
- {
- struct utmp *ret;
-
- __UCLIBC_MUTEX_LOCK(utmplock);
- - ret = __getutid(utmp_entry);
- + ret = __getutid_unlocked(utmp_entry);
- __UCLIBC_MUTEX_UNLOCK(utmplock);
- return ret;
- }
- +#else
- +static struct utmp *__getutid(const struct utmp *utmp_entry);
- +strong_alias(__getutid_unlocked,__getutid)
- +#endif
- +strong_alias(__getutid,getutid)
- +
- +#ifdef __UCLIBC_HAS_UTMPX__
- +struct utmpx *getutxid(const struct utmpx *utmp_entry)
- +{
- + return (struct utmpx *) __getutid ((const struct utmp *) utmp_entry);
- +}
- #endif
- -libc_hidden_def(getutid)
-
- -struct utmp *getutline(const struct utmp *utmp_entry)
- +static struct utmp *__getutline(const struct utmp *utmp_entry)
- {
- struct utmp *lutmp;
-
- __UCLIBC_MUTEX_LOCK(utmplock);
- - while ((lutmp = __getutent()) != NULL) {
- + while ((lutmp = __getutent_unlocked()) != NULL) {
- if (lutmp->ut_type == USER_PROCESS || lutmp->ut_type == LOGIN_PROCESS) {
- if (strncmp(lutmp->ut_line, utmp_entry->ut_line, sizeof(lutmp->ut_line)) == 0) {
- break;
- @@ -163,16 +184,23 @@
- __UCLIBC_MUTEX_UNLOCK(utmplock);
- return lutmp;
- }
- -libc_hidden_def(getutline)
- +strong_alias(__getutline,getutline)
- +
- +#ifdef __UCLIBC_HAS_UTMPX__
- +struct utmpx *getutxline(const struct utmpx *utmp_entry)
- +{
- + return (struct utmpx *) __getutline ((const struct utmp *) utmp_entry);
- +}
- +#endif
-
- -struct utmp *pututline(const struct utmp *utmp_entry)
- +static struct utmp *__pututline(const struct utmp *utmp_entry)
- {
- __UCLIBC_MUTEX_LOCK(utmplock);
- /* Ignore the return value. That way, if they've already positioned
- the file pointer where they want it, everything will work out. */
- lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
-
- - if (__getutid(utmp_entry) != NULL)
- + if (__getutid_unlocked(utmp_entry) != NULL)
- lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
- else
- lseek(static_fd, (off_t) 0, SEEK_END);
- @@ -182,9 +210,16 @@
- __UCLIBC_MUTEX_UNLOCK(utmplock);
- return (struct utmp *)utmp_entry;
- }
- -libc_hidden_def(pututline)
- +strong_alias(__pututline,pututline)
- +
- +#ifdef __UCLIBC_HAS_UTMPX__
- +struct utmpx *pututxline (const struct utmpx *utmp_entry)
- +{
- + return (struct utmpx *) __pututline ((const struct utmp *) utmp_entry);
- +}
- +#endif
-
- -int utmpname(const char *new_ut_name)
- +static int __utmpname(const char *new_ut_name)
- {
- __UCLIBC_MUTEX_LOCK(utmplock);
- if (new_ut_name != NULL) {
- @@ -205,4 +240,8 @@
- __UCLIBC_MUTEX_UNLOCK(utmplock);
- return 0; /* or maybe return -(static_ut_name != new_ut_name)? */
- }
- -libc_hidden_def(utmpname)
- +strong_alias(__utmpname,utmpname)
- +
- +#ifdef __UCLIBC_HAS_UTMPX__
- +strong_alias(__utmpname,utmpxname)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/utmp/utxent.c uClibc/libc/misc/utmp/utxent.c
- --- uClibc-0.9.33.2/libc/misc/utmp/utxent.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/utmp/utxent.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,6 +13,7 @@
- #include <utmpx.h>
- #include <utmp.h>
-
- +#if 0 /* moved to utent.c */
- void setutxent(void)
- {
- setutent ();
- @@ -48,10 +49,12 @@
- return utmpname (new_ut_name);
- }
-
- +/* moved to wtent.c */
- void updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
- {
- updwtmp (wtmpx_file, (const struct utmp *) utmpx);
- }
- +#endif
-
- /* Copy the information in UTMPX to UTMP. */
- void getutmp (const struct utmpx *utmpx, struct utmp *utmp)
- @@ -104,4 +107,3 @@
- utmpx->ut_time = utmp->ut_time;
- #endif
- }
- -
- diff -Nur uClibc-0.9.33.2/libc/misc/utmp/wtent.c uClibc/libc/misc/utmp/wtent.c
- --- uClibc-0.9.33.2/libc/misc/utmp/wtent.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/utmp/wtent.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,9 @@
- #include <time.h>
- #include <unistd.h>
- #include <utmp.h>
- +#ifdef __UCLIBC_HAS_UTMPX__
- +# include <utmpx.h>
- +#endif
- #include <fcntl.h>
- #include <sys/file.h>
- #include <not-cancel.h>
- @@ -33,11 +36,11 @@
- }
- #endif
-
- -void updwtmp(const char *wtmp_file, const struct utmp *lutmp)
- +static void __updwtmp(const char *wtmp_file, const struct utmp *lutmp)
- {
- int fd;
-
- - fd = open_not_cancel(wtmp_file, O_APPEND | O_WRONLY, 0);
- + fd = open_not_cancel_2(wtmp_file, O_APPEND | O_WRONLY);
- if (fd >= 0) {
- if (lockf(fd, F_LOCK, 0) == 0) {
- write_not_cancel(fd, lutmp, sizeof(struct utmp));
- @@ -46,4 +49,11 @@
- }
- }
- }
- -libc_hidden_def(updwtmp)
- +strong_alias(__updwtmp,updwtmp)
- +
- +#ifdef __UCLIBC_HAS_UTMPX__
- +void updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
- +{
- + __updwtmp (wtmpx_file, (const struct utmp *) utmpx);
- +}
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/misc/wchar/Makefile.in uClibc/libc/misc/wchar/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/wchar/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/wchar/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -19,19 +19,17 @@
- subdirs += libc/misc/wchar
-
- # multi source wchar.c
- -CSRC := btowc.c wctob.c mbsinit.c mbrlen.c mbrtowc.c wcrtomb.c mbsrtowcs.c \
- +CSRC-y := btowc.c wctob.c mbsinit.c mbrlen.c mbrtowc.c wcrtomb.c mbsrtowcs.c \
- wcsrtombs.c _wchar_utf8sntowcs.c _wchar_wcsntoutf8s.c \
- mbsnrtowcs.c wcsnrtombs.c wcwidth.c wcswidth.c
-
- -ifeq ($(UCLIBC_HAS_LOCALE),y)
- -CSRC += iconv.c
- -endif
- +CSRC-$(UCLIBC_HAS_LOCALE) += iconv.c
-
- MISC_WCHAR_DIR := $(top_srcdir)libc/misc/wchar
- MISC_WCHAR_OUT := $(top_builddir)libc/misc/wchar
-
- -MISC_WCHAR_SRC := $(patsubst %.c,$(MISC_WCHAR_DIR)/%.c,$(CSRC))
- -MISC_WCHAR_OBJ := $(patsubst %.c,$(MISC_WCHAR_OUT)/%.o,$(CSRC))
- +MISC_WCHAR_SRC := $(patsubst %.c,$(MISC_WCHAR_DIR)/%.c,$(CSRC-y))
- +MISC_WCHAR_OBJ := $(patsubst %.c,$(MISC_WCHAR_OUT)/%.o,$(CSRC-y))
-
- libc-$(UCLIBC_HAS_WCHAR) += $(MISC_WCHAR_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/wchar/wchar.c uClibc/libc/misc/wchar/wchar.c
- --- uClibc-0.9.33.2/libc/misc/wchar/wchar.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/wchar/wchar.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
- @@ -1196,6 +1196,9 @@
- #endif
-
- #if defined L_iconv || defined L_iconv_main
- +# ifdef L_iconv_main
- +static
- +# endif
- const unsigned char __iconv_codesets[] =
- "\x0a\xe0""WCHAR_T\x00" /* superset of UCS-4 but platform-endian */
- #if __BYTE_ORDER == __BIG_ENDIAN
- diff -Nur uClibc-0.9.33.2/libc/misc/wctype/Makefile.in uClibc/libc/misc/wctype/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/wctype/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/wctype/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -14,19 +14,15 @@
- iswxdigit.c iswblank.c wctrans.c towctrans.c \
- wctype.c iswctype.c towlower.c towupper.c
-
- -CSRC :=
- -ifeq ($(UCLIBC_HAS_WCHAR),y)
- -CSRC += $(COM_SRC)
- -endif
- -ifeq ($(UCLIBC_HAS_XLOCALE),y)
- -CSRC += $(patsubst %.c,%_l.c,$(COM_SRC))
- -endif
- +CSRC-y :=
- +CSRC-$(UCLIBC_HAS_WCHAR) += $(COM_SRC)
- +CSRC-$(UCLIBC_HAS_XLOCALE) += $(patsubst %.c,%_l.c,$(COM_SRC))
-
- MISC_WCTYPE_DIR := $(top_srcdir)libc/misc/wctype
- MISC_WCTYPE_OUT := $(top_builddir)libc/misc/wctype
-
- -MISC_WCTYPE_SRC := $(patsubst %.c,$(MISC_WCTYPE_DIR)/%.c,$(CSRC))
- -MISC_WCTYPE_OBJ := $(patsubst %.c,$(MISC_WCTYPE_OUT)/%.o,$(CSRC))
- +MISC_WCTYPE_SRC := $(patsubst %.c,$(MISC_WCTYPE_DIR)/%.c,$(CSRC-y))
- +MISC_WCTYPE_OBJ := $(patsubst %.c,$(MISC_WCTYPE_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(MISC_WCTYPE_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/wctype/_wctype.c uClibc/libc/misc/wctype/_wctype.c
- --- uClibc-0.9.33.2/libc/misc/wctype/_wctype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/wctype/_wctype.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
- @@ -41,10 +41,6 @@
- # error xlocale functionality is not supported in stub locale mode.
- #endif
-
- -#ifdef __UCLIBC_HAS_XLOCALE__
- -# include <xlocale.h>
- -#endif
- -
- /* We know wide char support is enabled. We wouldn't be here otherwise. */
-
- /* Define this if you want to unify the towupper and towlower code in the
- diff -Nur uClibc-0.9.33.2/libc/misc/wordexp/Makefile.in uClibc/libc/misc/wordexp/Makefile.in
- --- uClibc-0.9.33.2/libc/misc/wordexp/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/wordexp/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,13 +7,13 @@
-
- subdirs += libc/misc/wordexp
-
- -CSRC := wordexp.c
- +CSRC-y := wordexp.c
-
- MISC_WORDEXP_DIR := $(top_srcdir)libc/misc/wordexp
- MISC_WORDEXP_OUT := $(top_builddir)libc/misc/wordexp
-
- -MISC_WORDEXP_SRC := $(patsubst %.c,$(MISC_WORDEXP_DIR)/%.c,$(CSRC))
- -MISC_WORDEXP_OBJ := $(patsubst %.c,$(MISC_WORDEXP_OUT)/%.o,$(CSRC))
- +MISC_WORDEXP_SRC := $(patsubst %.c,$(MISC_WORDEXP_DIR)/%.c,$(CSRC-y))
- +MISC_WORDEXP_OBJ := $(patsubst %.c,$(MISC_WORDEXP_OUT)/%.o,$(CSRC-y))
-
- libc-$(UCLIBC_HAS_WORDEXP) += $(MISC_WORDEXP_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/misc/wordexp/wordexp.c uClibc/libc/misc/wordexp/wordexp.c
- --- uClibc-0.9.33.2/libc/misc/wordexp/wordexp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/misc/wordexp/wordexp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,11 +16,11 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <bits/kernel-features.h>
- +#include <ctype.h>
- #include <sys/types.h>
- #include <sys/wait.h>
- #include <fcntl.h>
- @@ -36,6 +36,10 @@
- #include <glob.h>
- #include <wordexp.h>
-
- +#ifndef __ARCH_USE_MMU__
- +# define fork vfork
- +#endif
- +
- #define __WORDEXP_FULL
-
- /*
- diff -Nur uClibc-0.9.33.2/libc/pwd_grp/lckpwdf.c uClibc/libc/pwd_grp/lckpwdf.c
- --- uClibc-0.9.33.2/libc/pwd_grp/lckpwdf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/pwd_grp/lckpwdf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <fcntl.h>
- @@ -51,6 +50,7 @@
- struct sigaction new_act; /* New signal action. */
- struct flock fl; /* Information struct for locking. */
- int result;
- + int rv = -1;
-
- if (lock_fd != -1)
- /* Still locked by own process. */
- @@ -111,11 +111,13 @@
- if (result < 0) {
- close(lock_fd);
- lock_fd = -1;
- + goto DONE;
- }
- + rv = 0;
-
- DONE:
- __UCLIBC_MUTEX_UNLOCK(mylock);
- - return 0; /* TODO: return result? */
- + return rv;
- }
-
-
- diff -Nur uClibc-0.9.33.2/libc/pwd_grp/Makefile.in uClibc/libc/pwd_grp/Makefile.in
- --- uClibc-0.9.33.2/libc/pwd_grp/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/pwd_grp/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -10,20 +10,17 @@
- PWDGRP_DIR := $(top_srcdir)libc/pwd_grp
- PWDGRP_OUT := $(top_builddir)libc/pwd_grp
-
- -CSRC := $(notdir $(wildcard $(PWDGRP_DIR)/*.c))
- -CSRC := $(filter-out pwd_grp.c pwd_grp_internal.c,$(CSRC))
- -
- -ifneq ($(UCLIBC_HAS_SHADOW),y)
- -SHADOW_CSRC := \
- - fgetspent_r.c fgetspent.c getspent_r.c getspent.c \
- +CSRC-y := $(notdir $(wildcard $(PWDGRP_DIR)/*.c))
- +CSRC- := pwd_grp.c pwd_grp_internal.c # multi-source and helper
- +CSRC-$(UCLIBC_HAS_SHADOW) += fgetspent_r.c fgetspent.c getspent_r.c getspent.c \
- getspnam_r.c getspnam.c lckpwdf.c putspent.c \
- sgetspent_r.c sgetspent.c __parsespent.c
- # getspuid_r.c getspuid.c
- -CSRC := $(filter-out $(SHADOW_CSRC),$(CSRC))
- -endif
-
- -PWDGRP_SRC := $(patsubst %.c,$(PWDGRP_DIR)/%.c,$(CSRC))
- -PWDGRP_OBJ := $(patsubst %.c,$(PWDGRP_OUT)/%.o,$(CSRC))
- +CSRC-y := $(filter-out $(CSRC-),$(CSRC-y))
- +
- +PWDGRP_SRC := $(patsubst %.c,$(PWDGRP_DIR)/%.c,$(CSRC-y))
- +PWDGRP_OBJ := $(patsubst %.c,$(PWDGRP_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(PWDGRP_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/pwd_grp/pwd_grp.c uClibc/libc/pwd_grp/pwd_grp.c
- --- uClibc-0.9.33.2/libc/pwd_grp/pwd_grp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/pwd_grp/pwd_grp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -354,6 +354,7 @@
- getpwnam_r(name, &resultbuf, buffer, sizeof(buffer), &result);
- return result;
- }
- +libc_hidden_def(getpwnam)
-
- #endif
- /**********************************************************************/
- diff -Nur uClibc-0.9.33.2/libc/pwd_grp/pwd_grp_internal.c uClibc/libc/pwd_grp/pwd_grp_internal.c
- --- uClibc-0.9.33.2/libc/pwd_grp/pwd_grp_internal.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/pwd_grp/pwd_grp_internal.c 2014-02-03 12:32:56.000000000 +0100
- @@ -34,9 +34,6 @@
- #ifdef __UCLIBC_HAS_SHADOW__
- #include <shadow.h>
- #endif
- -#ifdef __UCLIBC_HAS_THREADS__
- -#include <pthread.h>
- -#endif
-
- /**********************************************************************/
- /* Sizes for statically allocated buffers. */
- diff -Nur uClibc-0.9.33.2/libc/signal/allocrtsig.c uClibc/libc/signal/allocrtsig.c
- --- uClibc-0.9.33.2/libc/signal/allocrtsig.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/allocrtsig.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,13 +14,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <signal.h>
- -#include <sys/types.h>
- #include <sys/syscall.h>
-
- /* Only enable rt signals when it is supported at compile time */
- @@ -34,6 +32,13 @@
- #else
- # ifdef __UCLIBC_HAS_THREADS_NATIVE__
- static int current_rtmin = __SIGRTMIN + 2;
- +# elif defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__
- +/* psm: might be good for LT old as well, do not want to break it for now */
- +/* Sanity check */
- +# if !defined __SIGRTMIN || (__SIGRTMAX - __SIGRTMIN) < 3
- +# error "This must not happen"
- +# endif
- +static int current_rtmin = __SIGRTMIN + 3;
- # else
- static int current_rtmin = __SIGRTMIN;
- # endif
- @@ -52,6 +57,7 @@
- return current_rtmax;
- }
-
- +#if 0
- /* Allocate real-time signal with highest/lowest available
- priority. Please note that we don't use a lock since we assume
- this function to be called at program start. */
- @@ -64,3 +70,4 @@
-
- return high ? current_rtmin++ : current_rtmax--;
- }
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/signal/killpg.c uClibc/libc/signal/killpg.c
- --- uClibc-0.9.33.2/libc/signal/killpg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/killpg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,14 +12,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
-
- -
- /* Send SIG to all processes in process group PGRP.
- If PGRP is zero, send SIG to all processes in
- the current process's process group. */
- diff -Nur uClibc-0.9.33.2/libc/signal/Makefile.in uClibc/libc/signal/Makefile.in
- --- uClibc-0.9.33.2/libc/signal/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -8,20 +8,18 @@
- subdirs += libc/signal
-
- CSRC-y := allocrtsig.c killpg.c raise.c sigaction.c sigaddset.c sigandset.c \
- - sigblock.c sigdelset.c sigempty.c sigfillset.c siggetmask.c \
- + sigdelset.c sigempty.c sigfillset.c \
- sigisempty.c sigismem.c sigjmp.c signal.c \
- - sigorset.c sigsetmask.c sigsetops.c sigwait.c
- + sigorset.c sigsetops.c sigwait.c
- CSRC-$(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL) += \
- sighold.c sigignore.c sigrelse.c sigset.c
- CSRC-$(UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL) += sysv_signal.c
- CSRC-$(UCLIBC_SUSV4_LEGACY) += sigintr.c sigpause.c
-
- -ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- -CSRC-y:=$(filter-out raise.c,$(CSRC-y))
- -endif
- +CSRC-$(UCLIBC_HAS_THREADS_NATIVE):=$(filter-out raise.c,$(CSRC-y))
-
- -ifneq ($(strip $(ARCH_OBJS)),)
- -CSRC-y := $(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC-y))
- +ifneq ($(strip $(ARCH_OBJS-y)),)
- +CSRC-y := $(filter-out $(notdir $(ARCH_OBJS-y:.o=.c)),$(CSRC-y))
- endif
-
- ifneq ($(UCLIBC_HAS_BACKTRACE),)
- diff -Nur uClibc-0.9.33.2/libc/signal/raise.c uClibc/libc/signal/raise.c
- --- uClibc-0.9.33.2/libc/signal/raise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/raise.c 2014-02-03 12:32:56.000000000 +0100
- @@ -3,9 +3,7 @@
- */
-
- #include <unistd.h>
- -#include <string.h>
- #include <signal.h>
- -#include <sys/types.h>
-
- int raise(int signo)
- {
- diff -Nur uClibc-0.9.33.2/libc/signal/sigaction.c uClibc/libc/signal/sigaction.c
- --- uClibc-0.9.33.2/libc/signal/sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,23 +12,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- -#include <errno.h>
- #include <signal.h>
- -#include <string.h>
- #include <sys/syscall.h>
-
- -#include <bits/kernel_sigaction.h>
- -
- -#ifndef LIBC_SIGACTION
- -extern __typeof(sigaction) __libc_sigaction;
- -#endif
- -
- -
- #if defined __NR_rt_sigaction
-
- /* If ACT is not NULL, change the action for SIG to *ACT.
- @@ -47,6 +36,9 @@
- }
-
- #else
- +# define __need_NULL
- +# include <stddef.h>
- +# include <bits/kernel_sigaction.h>
-
- /* If ACT is not NULL, change the action for SIG to *ACT.
- If OACT is not NULL, put the old action for SIG in *OACT. */
- diff -Nur uClibc-0.9.33.2/libc/signal/sigaddset.c uClibc/libc/signal/sigaddset.c
- --- uClibc-0.9.33.2/libc/signal/sigaddset.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigaddset.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,11 +12,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include "sigsetops.h"
- +#define __need_NULL
- +#include <stddef.h>
- +#include <signal.h>
- +#include <errno.h>
-
- /* Add SIGNO to SET. */
- int
- diff -Nur uClibc-0.9.33.2/libc/signal/sigandset.c uClibc/libc/signal/sigandset.c
- --- uClibc-0.9.33.2/libc/signal/sigandset.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigandset.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libc/signal/sigblock.c uClibc/libc/signal/sigblock.c
- --- uClibc-0.9.33.2/libc/signal/sigblock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigblock.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,18 +12,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#define __UCLIBC_HIDE_DEPRECATED__
- -#include <errno.h>
- +/*#define __UCLIBC_HIDE_DEPRECATED__*/
- #include <signal.h>
-
- #include "sigset-cvt-mask.h"
-
- /* Block signals in MASK, returning the old mask. */
- -int sigblock (int mask)
- +static int sigblock (int mask)
- {
- sigset_t set, oset;
-
- @@ -31,4 +29,3 @@
- sigprocmask (SIG_BLOCK, &set, &oset); /* can't fail */
- return sigset_get_old_mask (&oset);
- }
- -libc_hidden_def(sigblock)
- diff -Nur uClibc-0.9.33.2/libc/signal/sigdelset.c uClibc/libc/signal/sigdelset.c
- --- uClibc-0.9.33.2/libc/signal/sigdelset.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigdelset.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,11 +12,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include "sigsetops.h"
- +#define __need_NULL
- +#include <stddef.h>
- +#include <signal.h>
- +#include <errno.h>
-
- /* Add SIGNO to SET. */
- int sigdelset (sigset_t *set, int signo)
- diff -Nur uClibc-0.9.33.2/libc/signal/sigempty.c uClibc/libc/signal/sigempty.c
- --- uClibc-0.9.33.2/libc/signal/sigempty.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigempty.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,14 +12,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <errno.h>
- #include <signal.h>
- -#include <string.h>
- -
- +#if 0
- +#define __need_NULL
- +#include <stddef.h>
- +#include <errno.h>
- +#endif
-
- /* Clear all signals from SET. */
- int sigemptyset (sigset_t *set)
- @@ -36,4 +37,3 @@
-
- return 0;
- }
- -libc_hidden_def(sigemptyset)
- diff -Nur uClibc-0.9.33.2/libc/signal/sigfillset.c uClibc/libc/signal/sigfillset.c
- --- uClibc-0.9.33.2/libc/signal/sigfillset.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigfillset.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,17 +12,18 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <errno.h>
- #include <signal.h>
- -#include <string.h>
- #ifdef __UCLIBC_HAS_THREADS_NATIVE__
- # include <pthreadP.h> /* SIGCANCEL */
- #endif
- -
- +#if 0
- +#define __need_NULL
- +#include <stddef.h>
- +#include <errno.h>
- +#endif
-
- /* Set all signals in SET. */
- int
- @@ -49,4 +50,3 @@
-
- return 0;
- }
- -libc_hidden_def(sigfillset)
- diff -Nur uClibc-0.9.33.2/libc/signal/siggetmask.c uClibc/libc/signal/siggetmask.c
- --- uClibc-0.9.33.2/libc/signal/siggetmask.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/siggetmask.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __UCLIBC_HIDE_DEPRECATED__
- #include <signal.h>
-
- -
- int
- siggetmask (void)
- {
- diff -Nur uClibc-0.9.33.2/libc/signal/sighold.c uClibc/libc/signal/sighold.c
- --- uClibc-0.9.33.2/libc/signal/sighold.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sighold.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,15 +14,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __need_NULL
- #include <stddef.h>
- #include <signal.h>
-
- -
- int sighold (int sig)
- {
- sigset_t set;
- diff -Nur uClibc-0.9.33.2/libc/signal/sigignore.c uClibc/libc/signal/sigignore.c
- --- uClibc-0.9.33.2/libc/signal/sigignore.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigignore.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,16 +14,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <errno.h>
- #define __need_NULL
- #include <stddef.h>
- #include <signal.h>
- -#include <string.h> /* For the real memset prototype. */
- -
- +#include <string.h>
-
- int sigignore (int sig)
- {
- diff -Nur uClibc-0.9.33.2/libc/signal/sigintr.c uClibc/libc/signal/sigintr.c
- --- uClibc-0.9.33.2/libc/signal/sigintr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigintr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,20 +12,19 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <stddef.h>
- #include <signal.h>
- -#include <errno.h>
- -
-
- /* If INTERRUPT is nonzero, make signal SIG interrupt system calls
- (causing them to fail with EINTR); if INTERRUPT is zero, make system
- calls be restarted after signal SIG. */
- #ifdef SA_RESTART
- -extern sigset_t _sigintr attribute_hidden; /* Defined in signal.c. */
- +# define __need_NULL
- +# include <stddef.h>
- +#else
- +# include <errno.h>
- #endif
-
- int siginterrupt (int sig, int interrupt)
- diff -Nur uClibc-0.9.33.2/libc/signal/sigisempty.c uClibc/libc/signal/sigisempty.c
- --- uClibc-0.9.33.2/libc/signal/sigisempty.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigisempty.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libc/signal/sigismem.c uClibc/libc/signal/sigismem.c
- --- uClibc-0.9.33.2/libc/signal/sigismem.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigismem.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,11 +12,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include "sigsetops.h"
- +#define __need_NULL
- +#include <stddef.h>
- +#include <signal.h>
- +#include <errno.h>
-
- /* Return 1 if SIGNO is in SET, 0 if not. */
- int sigismember (const sigset_t *set, int signo)
- diff -Nur uClibc-0.9.33.2/libc/signal/sigjmp.c uClibc/libc/signal/sigjmp.c
- --- uClibc-0.9.33.2/libc/signal/sigjmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigjmp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,21 +12,18 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- +#define __need_NULL
- #include <stddef.h>
- #include <setjmp.h>
- #include <signal.h>
- -#include <libc-internal.h>
- -
-
- /* This function is called by the `sigsetjmp' macro
- before doing a `__setjmp' on ENV[0].__jmpbuf.
- Always return zero. */
-
- -int __sigjmp_save (sigjmp_buf env, int savemask) attribute_hidden;
- int __sigjmp_save (sigjmp_buf env, int savemask)
- {
- env[0].__mask_was_saved = (savemask &&
- diff -Nur uClibc-0.9.33.2/libc/signal/signal.c uClibc/libc/signal/signal.c
- --- uClibc-0.9.33.2/libc/signal/signal.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/signal.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,15 +14,14 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- #include <string.h> /* For the real memset prototype. */
-
- -sigset_t _sigintr attribute_hidden; /* Set by siginterrupt. */
- +sigset_t _sigintr; /* Set by siginterrupt. */
-
- /* Set the handler for the signal SIG to HANDLER,
- returning the old handler, or SIG_ERR on error. */
- diff -Nur uClibc-0.9.33.2/libc/signal/sigorset.c uClibc/libc/signal/sigorset.c
- --- uClibc-0.9.33.2/libc/signal/sigorset.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigorset.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libc/signal/sigpause.c uClibc/libc/signal/sigpause.c
- --- uClibc-0.9.33.2/libc/signal/sigpause.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigpause.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,25 +13,19 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#define __UCLIBC_HIDE_DEPRECATED__
- -/* psm: need the BSD version of sigpause here */
- -#include <errno.h>
- -#define __FAVOR_BSD
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- #include <signal.h>
- -#include <stddef.h> /* For NULL. */
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- -#endif
- +#define __need_NULL
- +#include <stddef.h>
- +#include <cancel.h>
-
- #include "sigset-cvt-mask.h"
-
- /* Set the mask of blocked signals to MASK,
- wait for a signal to arrive, and then restore the mask. */
- -int __sigpause (int sig_or_mask, int is_sig)
- +static int __sigpause (int sig_or_mask, int is_sig)
- {
- sigset_t set;
-
- @@ -49,29 +43,21 @@
- /* Note the sigpause() is a cancellation point. But since we call
- sigsuspend() which itself is a cancellation point we do not have
- to do anything here. */
- - return sigsuspend (&set);
- + /* uClibc note: not true on uClibc, we call the non-cancellable version */
- + return __NC(sigsuspend)(&set);
- }
- -libc_hidden_def(__sigpause)
-
- -#undef sigpause
- +int __bsd_sigpause(int mask);
- +int __bsd_sigpause(int mask)
- +{
- + return __sigpause(mask, 0);
- +}
-
- /* We have to provide a default version of this function since the
- standards demand it. The version which is a bit more reasonable is
- the BSD version. So make this the default. */
- -int sigpause (int mask)
- +static int __NC(sigpause)(int sig)
- {
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - if (SINGLE_THREAD_P)
- - return __sigpause (mask, 0);
- -
- - int oldtype = LIBC_CANCEL_ASYNC ();
- -
- - int result = __sigpause (mask, 0);
- -
- - LIBC_CANCEL_RESET (oldtype);
- -
- - return result;
- -#else
- - return __sigpause (mask, 0);
- -#endif
- + return __sigpause(sig, 1);
- }
- +CANCELLABLE_SYSCALL(int, sigpause, (int sig), (sig))
- diff -Nur uClibc-0.9.33.2/libc/signal/sigrelse.c uClibc/libc/signal/sigrelse.c
- --- uClibc-0.9.33.2/libc/signal/sigrelse.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigrelse.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,15 +14,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __need_NULL
- #include <stddef.h>
- #include <signal.h>
-
- -
- int sigrelse (int sig)
- {
- sigset_t set;
- diff -Nur uClibc-0.9.33.2/libc/signal/sigset.c uClibc/libc/signal/sigset.c
- --- uClibc-0.9.33.2/libc/signal/sigset.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigset.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,16 +12,14 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #define __need_NULL
- #include <stddef.h>
- #include <signal.h>
- -#include <string.h> /* For the real memset prototype. */
- -
- +#include <string.h>
-
- /* Set the disposition for SIG. */
- __sighandler_t sigset (int sig, __sighandler_t disp)
- diff -Nur uClibc-0.9.33.2/libc/signal/sigset-cvt-mask.h uClibc/libc/signal/sigset-cvt-mask.h
- --- uClibc-0.9.33.2/libc/signal/sigset-cvt-mask.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigset-cvt-mask.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SIGSET_CVT_MASK_H
- +#define _SIGSET_CVT_MASK_H
-
- #include <string.h>
-
- @@ -36,3 +38,5 @@
- {
- return (unsigned int) set->__val[0];
- }
- +
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/signal/sigsetmask.c uClibc/libc/signal/sigsetmask.c
- --- uClibc-0.9.33.2/libc/signal/sigsetmask.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigsetmask.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,18 +12,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#define __UCLIBC_HIDE_DEPRECATED__
- -#include <errno.h>
- +/*#define __UCLIBC_HIDE_DEPRECATED__*/
- #include <signal.h>
-
- #include "sigset-cvt-mask.h"
-
- /* Set the mask of blocked signals to MASK, returning the old mask. */
- -int
- +static int
- sigsetmask (int mask)
- {
- sigset_t set, oset;
- @@ -32,4 +30,3 @@
- sigprocmask (SIG_SETMASK, &set, &oset); /* can't fail */
- return sigset_get_old_mask (&oset);
- }
- -libc_hidden_def(sigsetmask)
- diff -Nur uClibc-0.9.33.2/libc/signal/sigsetops.h uClibc/libc/signal/sigsetops.h
- --- uClibc-0.9.33.2/libc/signal/sigsetops.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigsetops.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,33 +0,0 @@
- -/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -/* Definitions relevant to functions that operate on `sigset_t's. */
- -
- -#include <errno.h>
- -#include <signal.h>
- -#include <string.h>
- -
- -#define BITS (_NSIG - 1)
- -#define ELT(signo) (((signo) - 1) / BITS)
- -#define MASK(signo) (1 << (((signo) - 1) % BITS))
- -
- -#undef sigemptyset
- -#undef sigfillset
- -#undef sigaddset
- -#undef sigdelset
- -#undef sigismember
- diff -Nur uClibc-0.9.33.2/libc/signal/sigwait.c uClibc/libc/signal/sigwait.c
- --- uClibc-0.9.33.2/libc/signal/sigwait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sigwait.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,96 +15,42 @@
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA. */
- -
- -#include <errno.h>
- + * License along with the GNU C Library; see the file COPYING.LIB. If
- + * not, see <http://www.gnu.org/licenses/>.
- + */
- +
- +#define __need_NULL
- +#include <stddef.h>
- +#include <sys/syscall.h>
- #include <signal.h>
- -#include <string.h>
- -#include <unistd.h>
- +#include <cancel.h>
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -# include <sysdep-cancel.h>
- +#if defined __NR_rt_sigtimedwait && defined __UCLIBC_HAS_REALTIME__
-
- -# ifdef __NR_rt_sigtimedwait
- +#include <string.h>
-
- /* Return any pending signal or wait for one for the given time. */
- -static int do_sigwait(const sigset_t *set, int *sig)
- +static int __NC(sigwait)(const sigset_t *set, int *sig)
- {
- int ret;
-
- -# ifdef SIGCANCEL
- - sigset_t tmpset;
- - if (set != NULL
- - && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
- -# ifdef SIGSETXID
- - || __builtin_expect (__sigismember (set, SIGSETXID), 0)
- -# endif
- - ))
- - {
- - /* Create a temporary mask without the bit for SIGCANCEL set. */
- - // We are not copying more than we have to.
- - memcpy(&tmpset, set, _NSIG / 8);
- - __sigdelset(&tmpset, SIGCANCEL);
- -# ifdef SIGSETXID
- - __sigdelset(&tmpset, SIGSETXID);
- -# endif
- - set = &tmpset;
- - }
- -# endif
- -
- - /* XXX The size argument hopefully will have to be changed to the
- - real size of the user-level sigset_t. */
- - INTERNAL_SYSCALL_DECL(err);
- do
- - ret = INTERNAL_SYSCALL (rt_sigtimedwait, err, 4, set, NULL,
- - NULL, _NSIG / 8);
- - while (INTERNAL_SYSCALL_ERROR_P (ret, err)
- - && INTERNAL_SYSCALL_ERRNO (ret, err) == EINTR);
- - if (! INTERNAL_SYSCALL_ERROR_P (ret, err))
- - {
- + /* we might as well use sigtimedwait and do not care about cancellation */
- + ret = __NC(sigtimedwait)(set, NULL, NULL);
- + while (ret == -1 && errno == EINTR);
- + if (ret != -1) {
- *sig = ret;
- ret = 0;
- - }
- -else
- - ret = INTERNAL_SYSCALL_ERRNO (ret, err);
- + } else
- + ret = errno;
-
- return ret;
- }
-
- -int sigwait (const sigset_t *set, int *sig)
- -{
- - if(SINGLE_THREAD_P)
- - return do_sigwait(set, sig);
- -
- - int oldtype = LIBC_CANCEL_ASYNC();
- -
- - int result = do_sigwait(set, sig);
- +#else /* __NR_rt_sigtimedwait */
-
- - LIBC_CANCEL_RESET(oldtype);
- -
- - return result;
- -}
- -# else /* __NR_rt_sigtimedwait */
- -# error We must have rt_sigtimedwait defined!!!
- -# endif
- -#else /* __UCLIBC_HAS_THREADS_NATIVE__ */
- -
- -# if defined __UCLIBC_HAS_REALTIME__
- -
- -int sigwait (const sigset_t *set, int *sig)
- -{
- - int ret = 1;
- - if ((ret = sigwaitinfo(set, NULL)) != -1) {
- - *sig = ret;
- - return 0;
- - }
- - return 1;
- -}
- -
- -# else /* __UCLIBC_HAS_REALTIME__ */
- /* variant without REALTIME extensions */
- +#include <unistd.h> /* smallint */
-
- static smallint was_sig; /* obviously not thread-safe */
-
- @@ -113,7 +59,7 @@
- was_sig = sig;
- }
-
- -int sigwait (const sigset_t *set, int *sig)
- +static int __NC(sigwait)(const sigset_t *set, int *sig)
- {
- sigset_t tmp_mask;
- struct sigaction saved[NSIG];
- @@ -147,7 +93,7 @@
- }
-
- /* Now we can wait for signals. */
- - sigsuspend (&tmp_mask);
- + __NC(sigsuspend)(&tmp_mask);
-
- restore_handler:
- save_errno = errno;
- @@ -163,5 +109,6 @@
- *sig = was_sig;
- return was_sig == -1 ? -1 : 0;
- }
- -# endif /* __UCLIBC_HAS_REALTIME__ */
- -#endif /* __UCLIBC_HAS_THREADS_NATIVE__ */
- +#endif /* __NR_rt_sigtimedwait */
- +
- +CANCELLABLE_SYSCALL(int, sigwait, (const sigset_t *set, int *sig), (set, sig))
- diff -Nur uClibc-0.9.33.2/libc/signal/sysv_signal.c uClibc/libc/signal/sysv_signal.c
- --- uClibc-0.9.33.2/libc/signal/sysv_signal.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/signal/sysv_signal.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,14 +12,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- -#include <string.h> /* For the real memset prototype. */
- -
-
- /* Tolerate non-threads versions of Posix */
- #ifndef SA_ONESHOT
- diff -Nur uClibc-0.9.33.2/libc/stdio/_fpmaxtostr.c uClibc/libc/stdio/_fpmaxtostr.c
- --- uClibc-0.9.33.2/libc/stdio/_fpmaxtostr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/_fpmaxtostr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -1,6 +1,7 @@
- -/* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
- +/*
- + * Copyright (C) 2000,2001,2003,2004 Manuel Novoa III <mjn3@codepoet.org>
- *
- - * GNU Library General Public License (LGPL) version 2 or later.
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- *
- * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
- */
- @@ -9,15 +10,9 @@
- #include <printf.h>
- #include <float.h>
- #include <locale.h>
- -#include <bits/uClibc_fpmax.h>
- +#include "_fpmaxtostr.h"
-
- -
- -typedef size_t (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len,
- - intptr_t buf);
- -
- -
- -/* Copyright (C) 2000, 2001, 2003 Manuel Novoa III
- - *
- +/*
- * Function:
- *
- * ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
- @@ -40,7 +35,6 @@
- * It should also be fairly portable, as no assumptions are made about the
- * bit-layout of doubles. Of course, that does make it less efficient than
- * it could be.
- - *
- */
-
- /*****************************************************************************/
- @@ -67,9 +61,6 @@
-
- #define NUM_HEX_DIGITS ((FPMAX_MANT_DIG + 3)/ 4)
-
- -/* WARNING: Adjust _fp_out_wide() below if this changes! */
- -/* With 32 bit ints, we can get 9 decimal digits per block. */
- -#define DIGITS_PER_BLOCK 9
- #define HEX_DIGITS_PER_BLOCK 8
-
- /* Maximum number of subcases to output double is...
- @@ -87,15 +78,9 @@
-
- /*****************************************************************************/
-
- -#define NUM_DIGIT_BLOCKS ((DECIMAL_DIG+DIGITS_PER_BLOCK-1)/DIGITS_PER_BLOCK)
- #define NUM_HEX_DIGIT_BLOCKS \
- ((NUM_HEX_DIGITS+HEX_DIGITS_PER_BLOCK-1)/HEX_DIGITS_PER_BLOCK)
-
- -/* WARNING: Adjust _fp_out_wide() below if this changes! */
- -
- -/* extra space for '-', '.', 'e+###', and nul */
- -#define BUF_SIZE ( 3 + NUM_DIGIT_BLOCKS * DIGITS_PER_BLOCK )
- -
- /*****************************************************************************/
-
- static const char fmt[] = "inf\0INF\0nan\0NAN\0.\0,";
- @@ -200,8 +185,6 @@
- #define FPO_STR_PREC 'p'
-
- ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
- - __fp_outfunc_t fp_outfunc) attribute_hidden;
- -ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
- __fp_outfunc_t fp_outfunc)
- {
- #ifdef __UCLIBC_HAS_HEXADECIMAL_FLOATS__
- @@ -219,8 +202,8 @@
- #ifdef __UCLIBC_HAS_GLIBC_DIGIT_GROUPING__
- int num_groups = 0;
- int initial_group; /* This does not need to be initialized. */
- - int tslen; /* This does not need to be initialized. */
- - int nblk2; /* This does not need to be initialized. */
- + int tslen; /* This does not need to be initialized. */
- + int nblk2; /* This does not need to be initialized. */
- const char *ts; /* This does not need to be initialized. */
- #endif /* __UCLIBC_HAS_GLIBC_DIGIT_GROUPING__ */
- int round, o_exp;
- diff -Nur uClibc-0.9.33.2/libc/stdio/_fpmaxtostr.h uClibc/libc/stdio/_fpmaxtostr.h
- --- uClibc-0.9.33.2/libc/stdio/_fpmaxtostr.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/stdio/_fpmaxtostr.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,49 @@
- +/* vi: set sw=4 ts=4: */
- +/*
- + * Copyright (C) 2000,2001,2003,2004 Manuel Novoa III <mjn3@codepoet.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + *
- + * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
- + */
- +
- +#ifndef _FPMAXTOSTR_H
- +#define _FPMAXTOSTR_H 1
- +
- +#include <features.h>
- +#ifdef __UCLIBC_HAS_FLOATS__
- +
- +#define __need_size_t
- +#include <stddef.h>
- +#include <stdint.h>
- +#include <stdio.h>
- +#include <printf.h>
- +#include <sys/types.h>
- +#include <float.h>
- +#include <bits/uClibc_fpmax.h>
- +
- +/* WARNING: Adjust _fp_out_wide() in _vfprintf.c if this changes! */
- +/* With 32 bit ints, we can get 9 decimal digits per block. */
- +#define DIGITS_PER_BLOCK 9
- +
- +#define NUM_DIGIT_BLOCKS ((DECIMAL_DIG+DIGITS_PER_BLOCK-1)/DIGITS_PER_BLOCK)
- +
- +/* WARNING: Adjust _fp_out_wide() in _vfprintf.c if this changes! */
- +/* extra space for '-', '.', 'e+###', and nul */
- +#define BUF_SIZE ( 3 + NUM_DIGIT_BLOCKS * DIGITS_PER_BLOCK )
- +
- +/* psm: why do these internals differ? */
- +#ifdef __USE_OLD_VFPRINTF__
- +typedef void (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len, intptr_t buf);
- +
- +extern size_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
- + __fp_outfunc_t fp_outfunc) attribute_hidden;
- +#else
- +typedef size_t (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len, intptr_t buf);
- +
- +extern ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
- + __fp_outfunc_t fp_outfunc) attribute_hidden;
- +#endif
- +
- +#endif /* __UCLIBC_HAS_FLOATS__ */
- +#endif /* _FPMAXTOSTR_H */
- diff -Nur uClibc-0.9.33.2/libc/stdio/fputc.c uClibc/libc/stdio/fputc.c
- --- uClibc-0.9.33.2/libc/stdio/fputc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/fputc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -72,16 +72,13 @@
- libc_hidden_def(__fputc_unlocked)
-
- strong_alias(__fputc_unlocked,fputc_unlocked)
- -libc_hidden_def(fputc_unlocked)
-
- strong_alias(__fputc_unlocked,putc_unlocked)
- -libc_hidden_def(putc_unlocked)
- #ifndef __UCLIBC_HAS_THREADS__
- strong_alias(__fputc_unlocked,fputc)
- libc_hidden_def(fputc)
-
- strong_alias(__fputc_unlocked,putc)
- -libc_hidden_def(putc)
- #endif
-
- #elif defined __UCLIBC_HAS_THREADS__
- @@ -101,6 +98,5 @@
- libc_hidden_def(fputc)
-
- strong_alias(fputc,putc)
- -libc_hidden_def(putc)
-
- #endif
- diff -Nur uClibc-0.9.33.2/libc/stdio/fputwc.c uClibc/libc/stdio/fputwc.c
- --- uClibc-0.9.33.2/libc/stdio/fputwc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/fputwc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -19,6 +19,7 @@
- strong_alias(fputwc_unlocked,putwc_unlocked)
- #ifndef __UCLIBC_HAS_THREADS__
- strong_alias(fputwc_unlocked,fputwc)
- +libc_hidden_def(fputwc)
- strong_alias(fputwc_unlocked,putwc)
- #endif
-
- @@ -37,6 +38,7 @@
-
- return retval;
- }
- +libc_hidden_def(fputwc)
-
- strong_alias(fputwc,putwc)
-
- diff -Nur uClibc-0.9.33.2/libc/stdio/fseeko.c uClibc/libc/stdio/fseeko.c
- --- uClibc-0.9.33.2/libc/stdio/fseeko.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/fseeko.c 2014-02-03 12:32:56.000000000 +0100
- @@ -77,5 +77,5 @@
- libc_hidden_def(fseeko64)
- #else
- libc_hidden_def(fseek)
- -strong_alias(fseek,fseeko)
- +strong_alias_untyped(fseek,fseeko)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/stdio/ftello.c uClibc/libc/stdio/ftello.c
- --- uClibc-0.9.33.2/libc/stdio/ftello.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/ftello.c 2014-02-03 12:32:56.000000000 +0100
- @@ -53,5 +53,5 @@
- libc_hidden_def(ftello64)
- #else
- libc_hidden_def(ftell)
- -strong_alias(ftell,ftello)
- +strong_alias_untyped(ftell,ftello)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/stdio/_load_inttype.c uClibc/libc/stdio/_load_inttype.c
- --- uClibc-0.9.33.2/libc/stdio/_load_inttype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/_load_inttype.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,7 +8,6 @@
- #include "_stdio.h"
- #include <printf.h>
-
- -uintmax_t _load_inttype(int desttype, register const void *src, int uflag) attribute_hidden;
- uintmax_t _load_inttype(int desttype, register const void *src, int uflag)
- {
- if (uflag >= 0) { /* unsigned */
- diff -Nur uClibc-0.9.33.2/libc/stdio/Makefile.in uClibc/libc/stdio/Makefile.in
- --- uClibc-0.9.33.2/libc/stdio/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -11,7 +11,7 @@
- subdirs += libc/stdio
-
- # SUSv3 functions
- -CSRC := \
- +CSRC-y := \
- fclose.c fcloseall.c fdopen.c fgetpos.c fopen.c freopen.c \
- fseeko.c fsetpos.c ftello.c getdelim.c getline.c gets.c getw.c \
- perror.c puts.c putw.c remove.c rewind.c setbuf.c setbuffer.c \
- @@ -19,92 +19,80 @@
- printf.c vprintf.c vsprintf.c fprintf.c snprintf.c dprintf.c \
- asprintf.c sprintf.c vasprintf.c vdprintf.c vsnprintf.c \
- tmpfile.c popen.c ctermid.c
- +CSRC-$(UCLIBC_HAS_LFS) += fgetpos64.c fopen64.c freopen64.c \
- + fseeko64.c fsetpos64.c ftello64.c
- +CSRC-$(UCLIBC_SUSV4_LEGACY) += tmpnam.c tmpnam_r.c tempnam.c
-
- -ifeq ($(UCLIBC_HAS_LFS),y)
- -CSRC += fgetpos64.c fopen64.c freopen64.c fseeko64.c fsetpos64.c ftello64.c
- -endif
- -ifeq ($(UCLIBC_SUSV4_LEGACY),y)
- -CSRC += tmpnam.c tmpnam_r.c tempnam.c
- -endif
- -
- -# getc -> alias for fgetc
- -# putc -> alias for fputc
- -# rename is a syscall
- -
- -# Implementation support functions
- -CSRC += \
- +# internal support functions
- +CSRC-y += \
- _READ.c _WRITE.c _adjust_pos.c _fopen.c _fwrite.c \
- _rfill.c _stdio.c _trans2r.c _trans2w.c _wcommit.c \
- _cs_funcs.c _load_inttype.c _store_inttype.c _uintmaxtostr.c
- -ifeq ($(UCLIBC_HAS_FLOATS),y)
- -CSRC += _fpmaxtostr.c
- -endif
- +CSRC-$(UCLIBC_HAS_FLOATS) += _fpmaxtostr.c
-
- # stdio_ext.h functions
- -CSRC += \
- +CSRC-y += \
- __fbufsize.c __flbf.c __fpending.c __fpurge.c __freadable.c \
- __freading.c __fsetlocking.c __fwritable.c __fwriting.c _flushlbf.c
-
- # Other glibc extensions
- -ifeq ($(UCLIBC_HAS_GLIBC_CUSTOM_STREAMS),y)
- -CSRC += fopencookie.c fmemopen.c open_memstream.c
- -endif
- +CSRC-$(UCLIBC_HAS_GLIBC_CUSTOM_STREAMS) += fopencookie.c fmemopen.c \
- + open_memstream.c
-
- # pthread functions
- -CSRC += flockfile.c ftrylockfile.c funlockfile.c
- +CSRC-y += flockfile.c ftrylockfile.c funlockfile.c
-
- # Functions with unlocked versions
- -CUSRC := \
- +CUSRC-y := \
- clearerr.c feof.c ferror.c fflush.c fgetc.c fgets.c fileno.c \
- fputc.c fputs.c fread.c fwrite.c getchar.c putchar.c
- # getc_unlocked -> alias for fgetc_unlocked
- # putc_unlocked -> alias for fputc_unlocked
-
- # vfprintf and support functions
- -ifneq ($(USE_OLD_VFPRINTF),y)
- +ifeq ($(USE_OLD_VFPRINTF),y)
- +VF_CSRC := old_vfprintf.c
- +else
- +# multi source _vfprintf.c
- VF_CSRC := \
- vfprintf.c \
- _vfprintf_internal.c \
- _ppfs_init.c _ppfs_prepargs.c _ppfs_setargs.c _ppfs_parsespec.c \
- register_printf_function.c parse_printf_format.c
- -CSRC += $(VF_CSRC)
- -else
- -CSRC += old_vfprintf.c
- endif
- +CSRC-y += $(VF_CSRC)
-
- # vfscanf and support functions plus other *scanf funcs
- -CSRC += \
- +CSRC-y += \
- vfscanf.c __scan_cookie.c __psfs_parse_spec.c __psfs_do_numeric.c \
- scanf.c sscanf.c fscanf.c vscanf.c vsscanf.c
-
- -ifeq ($(UCLIBC_HAS_WCHAR),y)
- -CSRC += _wfwrite.c fwprintf.c swprintf.c vswprintf.c vwprintf.c wprintf.c \
- +CSRC-$(UCLIBC_HAS_WCHAR) += \
- + _wfwrite.c fwprintf.c swprintf.c vswprintf.c vwprintf.c wprintf.c \
- fwide.c ungetwc.c
- -CUSRC += fgetwc.c getwchar.c fgetws.c fputwc.c putwchar.c fputws.c
- +CUSRC-$(UCLIBC_HAS_WCHAR) += \
- + fgetwc.c getwchar.c fgetws.c fputwc.c putwchar.c fputws.c
- # getwc (fgetwc alias) getwc_unlocked (fgetwc_unlocked alias)
- # putwc (fputwc alias) putwc_unlocked (fputwc_unlocked alias)
- -CSRC += vfwprintf.c _vfwprintf_internal.c
- -CSRC += wscanf.c swscanf.c fwscanf.c vwscanf.c vswscanf.c vfwscanf.c
- -endif
- -
- -CUSRC_UNLOCKED := $(patsubst %.c,%_unlocked.c,$(CUSRC))
- +CSRC-$(UCLIBC_HAS_WCHAR) += vfwprintf.c _vfwprintf_internal.c \
- + wscanf.c swscanf.c fwscanf.c vwscanf.c vswscanf.c vfwscanf.c
-
- -CSRC += $(CUSRC) $(CUSRC_UNLOCKED)
- +CUSRC_UNLOCKED := $(patsubst %.c,%_unlocked.c,$(CUSRC-y))
- +CSRC-y += $(CUSRC-y) $(CUSRC_UNLOCKED)
-
- STDIO_DIR := $(top_srcdir)libc/stdio
- STDIO_OUT := $(top_builddir)libc/stdio
-
- -STDIO_SRC := $(patsubst %.c,$(STDIO_DIR)/%.c,$(CSRC))
- -STDIO_OBJ := $(patsubst %.c,$(STDIO_OUT)/%.o,$(CSRC))
- +STDIO_SRC := $(patsubst %.c,$(STDIO_DIR)/%.c,$(CSRC-y))
- +STDIO_OBJ := $(patsubst %.c,$(STDIO_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(STDIO_OBJ)
-
- ifneq ($(USE_OLD_VFPRINTF),y)
- libc-nomulti-y += $(patsubst %.c,$(STDIO_OUT)/%.o,$(VF_CSRC))
- endif
- -ifeq ($(UCLIBC_HAS_WCHAR),y)
- -libc-nomulti-y += $(STDIO_OUT)/vfwprintf.o $(STDIO_OUT)/vfwscanf.o
- -endif
- +libc-nomulti-$(UCLIBC_HAS_WCHAR) += $(STDIO_OUT)/vfwprintf.o \
- + $(STDIO_OUT)/vfwscanf.o
-
- objclean-y += CLEAN_libc/stdio
-
- diff -Nur uClibc-0.9.33.2/libc/stdio/old_vfprintf.c uClibc/libc/stdio/old_vfprintf.c
- --- uClibc-0.9.33.2/libc/stdio/old_vfprintf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/old_vfprintf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -127,9 +127,7 @@
-
- /**************************************************************************/
-
- -#define _ISOC99_SOURCE /* for ULLONG primarily... */
- #include "_stdio.h"
- -/* #include <stdio.h> */
- #include <stdarg.h>
- #include <limits.h>
- #include <stdint.h>
- @@ -137,14 +135,9 @@
- #include <errno.h>
- #include <ctype.h>
- #include <bits/uClibc_uintmaxtostr.h>
- -#include <printf.h>
-
- -#ifdef __UCLIBC_HAS_THREADS__
- -#include <pthread.h>
- -#endif /* __UCLIBC_HAS_THREADS__ */
- +#include "_fpmaxtostr.h"
-
- -
- -/* #undef __UCLIBC_HAS_FLOATS__ */
- /* #undef WANT_FLOAT_ERROR */
- /* #define WANT_FLOAT_ERROR 1 */
-
- @@ -208,14 +201,6 @@
- #endif /* __STDIO_BUFFERS */
-
- #ifdef __UCLIBC_HAS_FLOATS__
- -#include <float.h>
- -#include <bits/uClibc_fpmax.h>
- -
- -typedef void (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len,
- - intptr_t buf);
- -
- -extern size_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
- - __fp_outfunc_t fp_outfunc) attribute_hidden;
-
- static void _charpad(FILE * __restrict stream, int padchar, size_t numpad)
- {
- @@ -259,9 +244,6 @@
-
- /**********************************************************************/
-
- -extern void _store_inttype(void *dest, int desttype, uintmax_t val) attribute_hidden;
- -extern uintmax_t _load_inttype(int desttype, const void *src, int uflag) attribute_hidden;
- -
- /*
- * In order to ease translation to what arginfo and _print_info._flags expect,
- * we map: 0:int 1:char 2:longlong 4:long 8:short
- diff -Nur uClibc-0.9.33.2/libc/stdio/open_memstream.c uClibc/libc/stdio/open_memstream.c
- --- uClibc-0.9.33.2/libc/stdio/open_memstream.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/open_memstream.c 2014-02-03 12:32:56.000000000 +0100
- @@ -128,7 +128,7 @@
- * (ie replace the FILE buffer with the cookie buffer and update FILE bufstart,
- * etc. whenever we seek). */
-
- -FILE *open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc)
- +FILE *open_memstream(char **bufloc, size_t *sizeloc)
- {
- register __oms_cookie *cookie;
- register FILE *fp;
- diff -Nur uClibc-0.9.33.2/libc/stdio/popen.c uClibc/libc/stdio/popen.c
- --- uClibc-0.9.33.2/libc/stdio/popen.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/popen.c 2014-02-03 12:32:56.000000000 +0100
- @@ -26,15 +26,6 @@
- #warning "hmm... susv3 says Pipe streams are byte-oriented."
- #endif /* __UCLIBC_MJN3_ONLY__ */
-
- -
- -/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
- -#include <sys/syscall.h>
- -#if ! defined __NR_vfork
- -# define vfork fork
- -# define VFORK_LOCK ((void) 0)
- -# define VFORK_UNLOCK ((void) 0)
- -#endif
- -
- #ifndef VFORK_LOCK
- __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_MUTEX_INITIALIZER);
- # define VFORK_LOCK __UCLIBC_MUTEX_LOCK(mylock)
- @@ -138,7 +129,7 @@
- int pclose(FILE *stream)
- {
- struct popen_list_item *p;
- - int stat;
- + int status;
- pid_t pid;
-
- /* First, find the list entry corresponding to stream and remove it
- @@ -173,8 +164,8 @@
- /* SUSv3 specificly requires that pclose not return before the child
- * terminates, in order to disallow pclose from returning on EINTR. */
- do {
- - if (waitpid(pid, &stat, 0) >= 0) {
- - return stat;
- + if (waitpid(pid, &status, 0) >= 0) {
- + return status;
- }
- if (errno != EINTR) {
- break;
- diff -Nur uClibc-0.9.33.2/libc/stdio/putwchar.c uClibc/libc/stdio/putwchar.c
- --- uClibc-0.9.33.2/libc/stdio/putwchar.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/putwchar.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,7 +9,6 @@
-
- #ifdef __DO_UNLOCKED
-
- -
- wint_t putwchar_unlocked(wchar_t wc)
- {
- return fputwc_unlocked(wc, stdout);
- @@ -21,11 +20,9 @@
-
- #elif defined __UCLIBC_HAS_THREADS__
-
- -/* psm: should this be fputwc? */
- -
- wint_t putwchar(wchar_t wc)
- {
- - return fputc(wc, stdout);
- + return fputwc(wc, stdout);
- }
-
- #endif
- diff -Nur uClibc-0.9.33.2/libc/stdio/_scanf.c uClibc/libc/stdio/_scanf.c
- --- uClibc-0.9.33.2/libc/stdio/_scanf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/_scanf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* Aug 1, 2003
- @@ -43,7 +43,6 @@
- * standards and from an official C standard defect report.
- */
-
- -#define _ISOC99_SOURCE /* for LLONG_MAX primarily... */
- #include <features.h>
- #include "_stdio.h"
- #include <stdlib.h>
- @@ -77,14 +76,6 @@
- #include <bits/uClibc_fpmax.h>
- #endif /* __UCLIBC_HAS_FLOATS__ */
-
- -#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
- -#ifdef L_vfscanf
- -/* only emit this once */
- -#warning Forcing undef of __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ until implemented!
- -#endif
- -#undef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
- -#endif
- -
- #undef __STDIO_HAS_VSSCANF
- #if defined(__STDIO_BUFFERS) || !defined(__UCLIBC_HAS_WCHAR__) || defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__)
- #define __STDIO_HAS_VSSCANF 1
- @@ -99,8 +90,6 @@
-
- #endif
-
- -extern void _store_inttype(void *dest, int desttype, uintmax_t val);
- -
- #if defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX)
-
- extern unsigned long long
- @@ -209,7 +198,7 @@
-
- #ifdef __STDIO_BUFFERS
-
- -int vsscanf(__const char *sp, __const char *fmt, va_list ap)
- +int vsscanf(const char *sp, const char *fmt, va_list ap)
- {
- FILE f;
-
- @@ -253,7 +242,7 @@
-
- #elif !defined(__UCLIBC_HAS_WCHAR__)
-
- -int vsscanf(__const char *sp, __const char *fmt, va_list ap)
- +int vsscanf(const char *sp, const char *fmt, va_list ap)
- {
- __FILE_vsscanf f;
-
- @@ -292,7 +281,7 @@
-
- #elif defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__)
-
- -int vsscanf(__const char *sp, __const char *fmt, va_list ap)
- +int vsscanf(const char *sp, const char *fmt, va_list ap)
- {
- FILE *f;
- int rv = EOF;
- @@ -388,9 +377,9 @@
- FILE f;
-
- f.__bufstart =
- - f.__bufpos = (char *) str;
- + f.__bufpos = (unsigned char *) str;
- f.__bufread =
- - f.__bufend = (char *)(str + wcslen(str));
- + f.__bufend = (unsigned char *)(str + wcslen(str));
- __STDIO_STREAM_DISABLE_GETC(&f);
- __STDIO_STREAM_DISABLE_PUTC(&f);
-
- @@ -433,18 +422,19 @@
-
-
- /* float layout 0123456789012345678901 repeat n for "l[" */
- -#define SPEC_CHARS "npxXoudifFeEgGaACSncs["
- -/* npxXoudif eEgG CS cs[ */
- +#define SPEC_CHARS "npxXoudifFeEgGaACSnmcs["
- +/* npxXoudif eEgG CS cs[ */
- +/* NOTE: the 'm' flag must come before any convs that support it */
-
- -/* NOTE: Ordering is important! In particular, CONV_LEFTBRACKET
- - * must immediately precede CONV_c. */
- +/* NOTE: Ordering is important! The CONV_{C,S,LEFTBRACKET} must map
- + simply to their lowercase equivalents. */
-
- enum {
- CONV_n = 0,
- CONV_p,
- CONV_x, CONV_X, CONV_o, CONV_u, CONV_d, CONV_i,
- CONV_f, CONV_F, CONV_e, CONV_E, CONV_g, CONV_G, CONV_a, CONV_A,
- - CONV_C, CONV_S, CONV_LEFTBRACKET, CONV_c, CONV_s, CONV_leftbracket,
- + CONV_C, CONV_S, CONV_LEFTBRACKET, CONV_m, CONV_c, CONV_s, CONV_leftbracket,
- CONV_percent, CONV_whitespace /* not in SPEC_* and no flags */
- };
-
- @@ -474,7 +464,7 @@
- FLAG_SURPRESS = 0x10, /* MUST BE 1ST!! See DO_FLAGS. */
- FLAG_THOUSANDS = 0x20,
- FLAG_I18N = 0x40, /* only works for d, i, u */
- - FLAG_MALLOC = 0x80, /* only works for s, S, and [ (and l[)*/
- + FLAG_MALLOC = 0x80, /* only works for c, s, S, and [ (and l[)*/
- };
-
-
- @@ -491,7 +481,7 @@
- /* fFeEgGaA */ (0x0c|FLAG_SURPRESS|FLAG_THOUSANDS|FLAG_I18N), \
- /* C */ ( 0|FLAG_SURPRESS), \
- /* S and l[ */ ( 0|FLAG_SURPRESS|FLAG_MALLOC), \
- - /* c */ (0x04|FLAG_SURPRESS), \
- + /* c */ (0x04|FLAG_SURPRESS|FLAG_MALLOC), \
- /* s and [ */ (0x04|FLAG_SURPRESS|FLAG_MALLOC), \
- }
-
- @@ -904,17 +894,17 @@
- if (*psfs->fmt == *p) {
- int p_m_spec_chars = p - spec_chars;
-
- -#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
- -#error implement gnu a flag
- - if ((*p == 'a')
- - && ((psfs->fmt[1] == '[') || ((psfs->fmt[1]|0x20) == 's'))
- - ) { /* Assumes ascii for 's' and 'S' test. */
- - psfs->flags |= FLAG_MALLOC;
- + if (*p == 'm' &&
- + (psfs->fmt[1] == '[' || psfs->fmt[1] == 'c' ||
- + /* Assumes ascii for 's' and 'S' test. */
- + (psfs->fmt[1] | 0x20) == 's'))
- + {
- + if (psfs->store)
- + psfs->flags |= FLAG_MALLOC;
- ++psfs->fmt;
- ++p;
- - continue; /* The related conversions follow 'a'. */
- + continue; /* The related conversions follow 'm'. */
- }
- -#endif /* __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ */
-
- for (p = spec_ranges; p_m_spec_chars > *p ; ++p) {}
- if (((psfs->dataargtype >> 8) | psfs->flags)
- @@ -928,7 +918,7 @@
- psfs->dataargtype = PA_FLAG_LONG;
- } else if ((p_m_spec_chars >= CONV_c)
- && (psfs->dataargtype & PA_FLAG_LONG)) {
- - p_m_spec_chars -= 3; /* lc -> C, ls -> S, l[ -> ?? */
- + p_m_spec_chars -= CONV_c - CONV_C; /* lc -> C, ls -> S, l[ -> ?? */
- }
-
- psfs->conv_num = p_m_spec_chars;
- @@ -1265,12 +1255,6 @@
- while (*wf && __isascii(*wf) && (b < buf + sizeof(buf) - 1)) {
- *b++ = *wf++;
- }
- -#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
- -#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.
- - if ((*b == 'a') && ((*wf == '[') || ((*wf|0x20) == 's'))) {
- - goto DONE; /* Spec was excessively long. */
- - }
- -#endif /* __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ */
- *b = 0;
- if (b == buf) { /* Bad conversion specifier! */
- goto DONE;
- @@ -1390,13 +1374,36 @@
- }
-
- if (psfs.conv_num == CONV_s) {
- + /* We might have to handle the allocation ourselves */
- + int len;
- + /* With 'm', we actually got a pointer to a pointer */
- + unsigned char **ptr = (void *)b;
- +
- + i = 0;
- + if (psfs.flags & FLAG_MALLOC) {
- + len = 0;
- + b = NULL;
- + } else
- + len = -1;
- +
- /* Yes, believe it or not, a %s conversion can store nuls. */
- while ((__scan_getc(&sc) >= 0) && !isspace(sc.cc)) {
- zero_conversions = 0;
- - *b = sc.cc;
- - b += psfs.store;
- + if (i == len) {
- + /* Pick a size that won't trigger a lot of
- + * mallocs early on ... */
- + len += 256;
- + b = realloc(b, len + 1);
- + }
- + b[i] = sc.cc;
- + i += psfs.store;
- fail = 0;
- }
- +
- + if (psfs.flags & FLAG_MALLOC)
- + *ptr = b;
- + /* The code below takes care of terminating NUL */
- + b += i;
- } else {
- #ifdef __UCLIBC_HAS_WCHAR__
- assert((psfs.conv_num == CONV_LEFTBRACKET) || \
- diff -Nur uClibc-0.9.33.2/libc/stdio/_stdio.c uClibc/libc/stdio/_stdio.c
- --- uClibc-0.9.33.2/libc/stdio/_stdio.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/_stdio.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,7 +7,6 @@
-
- #include "_stdio.h"
-
- -
- /* This is pretty much straight from uClibc, but with one important
- * difference.
- *
- @@ -185,7 +184,7 @@
- /**********************************************************************/
-
- /* We assume here that we are the only remaining thread. */
- -void attribute_hidden _stdio_term(void)
- +void _stdio_term(void)
- {
- #if defined(__STDIO_BUFFERS) || defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__)
- register FILE *ptr;
- @@ -252,7 +251,7 @@
- }
-
- #if defined __STDIO_BUFFERS || !defined __UCLIBC__
- -void attribute_hidden _stdio_init(void)
- +void _stdio_init(void)
- {
- #ifdef __STDIO_BUFFERS
- int old_errno = errno;
- @@ -277,10 +276,6 @@
- #error Assumption violated about __MASK_READING and __FLAG_UNGOT
- #endif
-
- -#ifdef __UCLIBC_HAS_THREADS__
- -#include <pthread.h>
- -#endif
- -
- #ifndef NDEBUG
-
- void attribute_hidden _stdio_validate_FILE(const FILE *stream)
- diff -Nur uClibc-0.9.33.2/libc/stdio/_stdio.h uClibc/libc/stdio/_stdio.h
- --- uClibc-0.9.33.2/libc/stdio/_stdio.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/_stdio.h 2014-02-03 12:32:56.000000000 +0100
- @@ -39,6 +39,9 @@
-
-
- #ifdef __UCLIBC_HAS_THREADS__
- +extern void __stdio_init_mutex(__UCLIBC_MUTEX_TYPE *m) attribute_hidden;
- +
- +extern volatile int _stdio_openlist_use_count attribute_hidden; /* _stdio_openlist_del_lock */
- #define __STDIO_OPENLIST_INC_USE \
- do { \
- __STDIO_THREADLOCK_OPENLIST_DEL; \
- @@ -51,6 +54,7 @@
- #define __STDIO_OPENLIST_DEC_USE \
- _stdio_openlist_dec_use()
-
- +extern int _stdio_openlist_del_count attribute_hidden; /* _stdio_openlist_del_lock */
- #define __STDIO_OPENLIST_INC_DEL_CNT \
- do { \
- __STDIO_THREADLOCK_OPENLIST_DEL; \
- @@ -308,6 +312,9 @@
- extern int __stdio_trans2r_o(FILE *__restrict stream, int oflag) attribute_hidden;
- extern int __stdio_trans2w_o(FILE *__restrict stream, int oflag) attribute_hidden;
-
- +extern uintmax_t _load_inttype(int desttype, register const void *src, int uflag) attribute_hidden;
- +extern void _store_inttype(void *dest, int desttype, uintmax_t val) attribute_hidden;
- +
- /**********************************************************************/
- #ifdef __STDIO_BUFFERS
-
- diff -Nur uClibc-0.9.33.2/libc/stdio/_store_inttype.c uClibc/libc/stdio/_store_inttype.c
- --- uClibc-0.9.33.2/libc/stdio/_store_inttype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/_store_inttype.c 2014-02-03 12:32:56.000000000 +0100
- @@ -28,7 +28,6 @@
-
- /* We assume int may be short or long, but short and long are different. */
-
- -void _store_inttype(register void *dest, int desttype, uintmax_t val) attribute_hidden;
- void _store_inttype(register void *dest, int desttype, uintmax_t val)
- {
- if (desttype == __PA_FLAG_CHAR) { /* assume char not int */
- diff -Nur uClibc-0.9.33.2/libc/stdio/tempnam.c uClibc/libc/stdio/tempnam.c
- --- uClibc-0.9.33.2/libc/stdio/tempnam.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/tempnam.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libc/stdio/tmpfile.c uClibc/libc/stdio/tmpfile.c
- --- uClibc-0.9.33.2/libc/stdio/tmpfile.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/tmpfile.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/libc/stdio/tmpnam.c uClibc/libc/stdio/tmpnam.c
- --- uClibc-0.9.33.2/libc/stdio/tmpnam.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/tmpnam.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libc/stdio/tmpnam_r.c uClibc/libc/stdio/tmpnam_r.c
- --- uClibc-0.9.33.2/libc/stdio/tmpnam_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/tmpnam_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include "../misc/internals/tempname.h"
- diff -Nur uClibc-0.9.33.2/libc/stdio/_uintmaxtostr.c uClibc/libc/stdio/_uintmaxtostr.c
- --- uClibc-0.9.33.2/libc/stdio/_uintmaxtostr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/_uintmaxtostr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,7 +5,6 @@
- * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
- */
-
- -#define _ISOC99_SOURCE /* for ULLONG primarily... */
- #include "_stdio.h"
- #include <limits.h>
- #include <locale.h>
- diff -Nur uClibc-0.9.33.2/libc/stdio/_vfprintf.c uClibc/libc/stdio/_vfprintf.c
- --- uClibc-0.9.33.2/libc/stdio/_vfprintf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdio/_vfprintf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* This code needs a lot of clean up. Some of that is on hold until uClibc
- @@ -88,7 +88,6 @@
- * treats this as an error.
- */
-
- -#define _ISOC99_SOURCE /* for ULLONG primarily... */
- #include <features.h>
- #include "_stdio.h"
- #include <stdlib.h>
- @@ -101,7 +100,6 @@
- #include <stdint.h>
- #include <errno.h>
- #include <locale.h>
- -#include <printf.h>
-
- #ifdef __UCLIBC_HAS_THREADS__
- # include <stdio_ext.h>
- @@ -126,30 +124,16 @@
- /**********************************************************************/
- /* These provide some control over printf's feature set */
-
- -/* This is undefined below depeding on uClibc's configuration. */
- -#define __STDIO_PRINTF_FLOAT 1
- +/* Now controlled by uClibc_config.h. */
- +/* #define __UCLIBC_HAS_FLOATS__ 1 */
-
- -/* Now controlled by uClibc_stdio.h. */
- +/* Now controlled by uClibc_config.h. */
- /* #define __UCLIBC_HAS_PRINTF_M_SPEC__ */
-
-
- /**********************************************************************/
-
- -#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_FLOATS__)
- -# undef __STDIO_PRINTF_FLOAT
- -#endif
- -
- -#ifdef __BCC__
- -# undef __STDIO_PRINTF_FLOAT
- -#endif
- -
- -#ifdef __STDIO_PRINTF_FLOAT
- -# include <float.h>
- -# include <bits/uClibc_fpmax.h>
- -#else
- -# undef L__fpmaxtostr
- -#endif
- -
- +#include "_fpmaxtostr.h"
-
- #undef __STDIO_HAS_VSNPRINTF
- #if defined(__STDIO_BUFFERS) || defined(__USE_OLD_VFPRINTF__) || defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__)
- @@ -158,7 +142,7 @@
-
- /**********************************************************************/
-
- -/* Now controlled by uClibc_stdio.h. */
- +/* Now controlled by uClibc_config.h. */
- /* #define __UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__ */
-
- #ifdef __UCLIBC_MJN3_ONLY__
- @@ -361,7 +345,7 @@
- # ifdef ULLONG_MAX
- unsigned long long ull;
- # endif
- -# ifdef __STDIO_PRINTF_FLOAT
- +# ifdef __UCLIBC_HAS_FLOATS__
- double d;
- long double ld;
- # endif
- @@ -398,22 +382,11 @@
- /* TODO: fix printf to return 0 and set errno if format error. Standard says
- only returns -1 if sets error indicator for the stream. */
-
- -#ifdef __STDIO_PRINTF_FLOAT
- -typedef size_t (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len,
- - intptr_t buf);
- -
- -extern ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
- - __fp_outfunc_t fp_outfunc) attribute_hidden;
- -#endif
- -
- extern int _ppfs_init(ppfs_t *ppfs, const char *fmt0) attribute_hidden; /* validates */
- extern void _ppfs_prepargs(ppfs_t *ppfs, va_list arg) attribute_hidden; /* sets posargptrs */
- extern void _ppfs_setargs(ppfs_t *ppfs) attribute_hidden; /* sets argptrs for current spec */
- extern int _ppfs_parsespec(ppfs_t *ppfs) attribute_hidden; /* parses specifier */
-
- -extern void _store_inttype(void *dest, int desttype, uintmax_t val) attribute_hidden;
- -extern uintmax_t _load_inttype(int desttype, const void *src, int uflag) attribute_hidden;
- -
- /**********************************************************************/
- #ifdef L_parse_printf_format
-
- @@ -564,7 +537,7 @@
- ppfs->fmtpos = fmt0; /* rewind */
- }
-
- -#ifdef NL_MAX_ARG
- +#ifdef NL_ARGMAX
- /* If we have positional args, make sure we know all the types. */
- {
- register int *p = ppfs->argtype;
- @@ -576,7 +549,7 @@
- ++p;
- }
- }
- -#endif /* NL_MAX_ARG */
- +#endif /* NL_ARGMAX */
-
- return 0;
- }
- @@ -653,7 +626,7 @@
- /* we're assuming wchar_t is at least an int */
- GET_VA_ARG(p,wc,wchar_t,ppfs->arg);
- break;
- -#ifdef __STDIO_PRINTF_FLOAT
- +#ifdef __UCLIBC_HAS_FLOATS__
- /* PA_FLOAT */
- case PA_DOUBLE:
- GET_VA_ARG(p,d,double,ppfs->arg);
- @@ -661,12 +634,12 @@
- case (PA_DOUBLE|PA_FLAG_LONG_DOUBLE):
- GET_VA_ARG(p,ld,long double,ppfs->arg);
- break;
- -#else /* __STDIO_PRINTF_FLOAT */
- +#else /* __UCLIBC_HAS_FLOATS__ */
- case PA_DOUBLE:
- case (PA_DOUBLE|PA_FLAG_LONG_DOUBLE):
- assert(0);
- continue;
- -#endif /* __STDIO_PRINTF_FLOAT */
- +#endif /* __UCLIBC_HAS_FLOATS__ */
- default:
- /* TODO -- really need to ensure this can't happen */
- assert(ppfs->argtype[i-1] & PA_FLAG_PTR);
- @@ -743,7 +716,7 @@
- PA_INT|PA_FLAG_LONG,
- PA_INT|PA_FLAG_LONG_LONG,
- PA_WCHAR,
- -#ifdef __STDIO_PRINTF_FLOAT
- +#ifdef __UCLIBC_HAS_FLOATS__
- /* PA_FLOAT, */
- PA_DOUBLE,
- PA_DOUBLE|PA_FLAG_LONG_DOUBLE,
- @@ -766,7 +739,7 @@
- PROMOTED_SIZE_OF(long), /* TODO -- is this correct? (above too) */
- #endif
- PROMOTED_SIZE_OF(wchar_t),
- -#ifdef __STDIO_PRINTF_FLOAT
- +#ifdef __UCLIBC_HAS_FLOATS__
- /* PROMOTED_SIZE_OF(float), */
- PROMOTED_SIZE_OF(double),
- PROMOTED_SIZE_OF(long double),
- @@ -1199,7 +1172,7 @@
- #define _outnstr(stream, string, len) ((len > 0) ? __stdio_fwrite((const unsigned char *)(string), len, stream) : 0)
- #define FP_OUT _fp_out_narrow
-
- -#ifdef __STDIO_PRINTF_FLOAT
- +#ifdef __UCLIBC_HAS_FLOATS__
-
- static size_t _fp_out_narrow(FILE *fp, intptr_t type, intptr_t len, intptr_t buf)
- {
- @@ -1219,7 +1192,7 @@
- return r + OUTNSTR(fp, (const char *) buf, len);
- }
-
- -#endif /* __STDIO_PRINTF_FLOAT */
- +#endif /* __UCLIBC_HAS_FLOATS__ */
-
- #else /* L__vfprintf_internal */
-
- @@ -1229,7 +1202,7 @@
- #define STRLEN wcslen
- #define _PPFS_init _ppwfs_init
- /* Pulls in fseek: */
- -#define OUTPUT(F,S) fputws(S,F)
- +#define OUTPUT(F,S) fputws_unlocked(S,F)
- /* TODO: #define OUTPUT(F,S) _wstdio_fwrite((S),wcslen(S),(F)) */
- #define _outnwcs(stream, wstring, len) _wstdio_fwrite((const wchar_t *)(wstring), len, stream)
- #define FP_OUT _fp_out_wide
- @@ -1261,16 +1234,7 @@
- return wclen - todo;
- }
-
- -#ifdef __STDIO_PRINTF_FLOAT
- -
- -#ifdef __UCLIBC_MJN3_ONLY__
- -#warning TODO: Move defines from _fpmaxtostr. Put them in a common header.
- -#endif
- -
- -/* The following defines are from _fpmaxtostr.*/
- -#define DIGITS_PER_BLOCK 9
- -#define NUM_DIGIT_BLOCKS ((DECIMAL_DIG+DIGITS_PER_BLOCK-1)/DIGITS_PER_BLOCK)
- -#define BUF_SIZE ( 3 + NUM_DIGIT_BLOCKS * DIGITS_PER_BLOCK )
- +#ifdef __UCLIBC_HAS_FLOATS__
-
- static size_t _fp_out_wide(FILE *fp, intptr_t type, intptr_t len, intptr_t buf)
- {
- @@ -1318,7 +1282,7 @@
- return r;
- }
-
- -#endif /* __STDIO_PRINTF_FLOAT */
- +#endif /* __UCLIBC_HAS_FLOATS__ */
-
- static int _ppwfs_init(register ppfs_t *ppfs, const wchar_t *fmt0)
- {
- @@ -1608,7 +1572,7 @@
- }
- numfill = ((numfill > SLEN) ? numfill - SLEN : 0);
- } else if (ppfs->conv_num <= CONV_A) { /* floating point */
- -#ifdef __STDIO_PRINTF_FLOAT
- +#ifdef __UCLIBC_HAS_FLOATS__
- ssize_t nf;
- nf = _fpmaxtostr(stream,
- (__fpmax_t)
- @@ -1622,7 +1586,7 @@
- *count += nf;
-
- return 0;
- -#else /* __STDIO_PRINTF_FLOAT */
- +#else /* __UCLIBC_HAS_FLOATS__ */
- return -1; /* TODO -- try to continue? */
- #endif
- } else if (ppfs->conv_num <= CONV_S) { /* wide char or string */
- diff -Nur uClibc-0.9.33.2/libc/stdlib/a64l.c uClibc/libc/stdlib/a64l.c
- --- uClibc-0.9.33.2/libc/stdlib/a64l.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/a64l.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/abort.c uClibc/libc/stdlib/abort.c
- --- uClibc-0.9.33.2/libc/stdlib/abort.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/abort.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- /* Hacked up for uClibc by Erik Andersen */
-
- @@ -47,9 +46,6 @@
- # warning "no abort instruction defined for your arch"
- #endif
-
- -#ifdef __UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT__
- -extern void weak_function _stdio_term(void) attribute_hidden;
- -#endif
- static smallint been_there_done_that = 0;
-
- /* Be prepared in case multiple threads try to abort() */
- diff -Nur uClibc-0.9.33.2/libc/stdlib/arc4random.c uClibc/libc/stdlib/arc4random.c
- --- uClibc-0.9.33.2/libc/stdlib/arc4random.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/arc4random.c 2014-02-03 12:32:56.000000000 +0100
- @@ -1,24 +1,29 @@
- -/* $$$: arc4random.c 2005/02/08 robert */
- -/* $NetBSD: arc4random.c,v 1.5.2.1 2004/03/26 22:52:50 jmc Exp $ */
- -/* $OpenBSD: arc4random.c,v 1.6 2001/06/05 05:05:38 pvalchev Exp $ */
- -
- /*
- - * Arc4 random number generator for OpenBSD.
- - * Copyright 1996 David Mazieres <dm@lcs.mit.edu>.
- + * Copyright (c) 1996, David Mazieres <dm@uun.org>
- *
- - * Modification and redistribution in source and binary forms is
- - * permitted provided that due credit is given to the author and the
- - * OpenBSD project by leaving this copyright notice intact.
- + * Permission to use, copy, modify, and distribute this software for any
- + * purpose with or without fee is hereby granted, provided that the above
- + * copyright notice and this permission notice appear in all copies.
- + *
- + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
- /*
- + * Arc4 random number generator for OpenBSD.
- + *
- * This code is derived from section 17.1 of Applied Cryptography,
- * second edition, which describes a stream cipher allegedly
- * compatible with RSA Labs "RC4" cipher (the actual description of
- * which is a trade secret). The same algorithm is used as a stream
- * cipher called "arcfour" in Tatu Ylonen's ssh package.
- *
- - * Here the stream cipher has been modified always to include the time
- + * Here the stream cipher has been modified always to include entropy
- * when initializing the state. That makes it impossible to
- * regenerate the same random sequence twice, so this can't be used
- * for encryption, but will generate good random numbers.
- @@ -26,32 +31,26 @@
- * RC4 is a registered trademark of RSA Laboratories.
- */
-
- +/* $OpenBSD: arc4random.c,v 1.16 2007/02/12 19:58:47 otto Exp $ */
- +
- #include <features.h>
- +
- #include <fcntl.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <sys/types.h>
- -#include <sys/param.h>
- #include <sys/time.h>
- -#ifdef __ARC4RANDOM_USE_ERANDOM__
- -#include <sys/sysctl.h>
- -#endif
- -
-
- struct arc4_stream {
- - uint8_t i;
- - uint8_t j;
- - uint8_t s[256];
- + u_int8_t i;
- + u_int8_t j;
- + u_int8_t s[256];
- };
-
- -static int rs_initialized;
- +static smallint rs_initialized;
- static struct arc4_stream rs;
- -
- -static __inline__ void arc4_init(struct arc4_stream *);
- -static __inline__ void arc4_addrandom(struct arc4_stream *, u_char *, int);
- -static void arc4_stir(struct arc4_stream *);
- -static __inline__ uint8_t arc4_getbyte(struct arc4_stream *);
- -static __inline__ uint32_t arc4_getword(struct arc4_stream *);
- +static pid_t arc4_stir_pid;
- +static int arc4_count;
-
- static __inline__ void
- arc4_init(struct arc4_stream *as)
- @@ -64,11 +63,25 @@
- as->j = 0;
- }
-
- +static __inline__ u_int8_t
- +arc4_getbyte(struct arc4_stream *as)
- +{
- + u_int8_t si, sj;
- +
- + as->i = (as->i + 1);
- + si = as->s[as->i];
- + as->j = (as->j + si);
- + sj = as->s[as->j];
- + as->s[as->i] = sj;
- + as->s[as->j] = si;
- + return (as->s[(si + sj) & 0xff]);
- +}
- +
- static __inline__ void
- arc4_addrandom(struct arc4_stream *as, u_char *dat, int datlen)
- {
- int n;
- - uint8_t si;
- + u_int8_t si;
-
- as->i--;
- for (n = 0; n < 256; n++) {
- @@ -84,71 +97,88 @@
- static void
- arc4_stir(struct arc4_stream *as)
- {
- - int fd;
- - struct {
- - struct timeval tv;
- - uint rnd[(128 - sizeof(struct timeval)) / sizeof(uint)];
- - } rdat;
- int n;
- + u_char rnd[128];
- + struct timeval tv;
- +
- +#ifndef __ARC4RANDOM_USES_NODEV__
- + int fd;
-
- - gettimeofday(&rdat.tv, NULL);
- fd = open("/dev/urandom", O_RDONLY);
- if (fd != -1) {
- - read(fd, rdat.rnd, sizeof(rdat.rnd));
- + read(fd, rnd, sizeof(rnd));
- close(fd);
- }
- -#ifdef __ARC4RANDOM_USE_ERANDOM__
- + /* Did the pseudo-random device fail? Use gettimeofday(). */
- + else
- +#endif
- + if (gettimeofday(&tv, NULL) != (-1)) {
- +
- + /* Initialize the first element so it's hopefully not '0',
- + * to help out the next loop. Tossing in some prime numbers
- + * probably can't hurt. */
- + rnd[0] = (tv.tv_sec % 10000) * 3 + tv.tv_usec * 7 + \
- + (getpid() % 1000) * 13;
- +
- + for (n = 1; n < 127 ; n++) {
- +
- + /* Take advantage of the stack space. Only initialize
- + * elements equal to '0'. This will make the rnd[]
- + * array much less vulnerable to timing attacks. Here
- + * we'll stir getpid() into the value of the previous
- + * element. Approximately 1 in 128 elements will still
- + * become '0'. */
- +
- + if (rnd[n] == 0) {
- + rnd[n] = ((rnd[n - 1] + n) ^ \
- + ((getpid() % 1000) * 17));
- + }
- + }
- + }
- else {
- - int mib[3];
- - uint i;
- - size_t len;
- -
- - /* Device could not be opened, we might be chrooted, take
- - * randomness from sysctl. */
- -
- - mib[0] = CTL_KERN;
- - mib[1] = KERN_RANDOM;
- - mib[2] = RANDOM_ERANDOM;
- -
- - for (i = 0; i < sizeof(rdat.rnd) / sizeof(uint); i++) {
- - len = sizeof(uint);
- - if (sysctl(mib, 3, &rdat.rnd[i], &len, NULL, 0) == -1)
- - break;
- + /* gettimeofday() failed? Do the same thing as above, but only
- + * with getpid(). */
- +
- + rnd[0] = (getpid() % 1000) * 19;
- + for (n = 1; n < 127 ; n++) {
- + if (rnd[n] == 0) {
- + rnd[n] = ((rnd[n - 1] + n) ^ \
- + ((getpid() % 1000) * 23));
- + }
- }
- }
- -#endif
-
- - arc4_addrandom(as, (void *) &rdat, sizeof(rdat));
- + arc4_stir_pid = getpid();
- + arc4_addrandom(as, rnd, sizeof(rnd));
-
- /*
- - * Throw away the first N words of output, as suggested in the
- - * paper "Weaknesses in the Key Scheduling Algorithm of RC4"
- - * by Fluher, Mantin, and Shamir.
- + * Discard early keystream, as per recommendations in:
- * http://www.wisdom.weizmann.ac.il/~itsik/RC4/Papers/Rc4_ksa.ps
- - * N = 256 in our case.
- */
- - for (n = 0; n < 256 * 4; n++)
- - arc4_getbyte(as);
- + for (n = 0; n < 256; n++)
- + (void)arc4_getbyte(as);
- + arc4_count = 1600000;
- }
-
- -static __inline__ uint8_t
- -arc4_getbyte(struct arc4_stream *as)
- +#if 0
- +static void __arc4random_stir(void);
- +/*
- + * __arc4_getbyte() is a libc private function intended for use
- + * with malloc.
- + */
- +u_int8_t
- +__arc4_getbyte(void)
- {
- - uint8_t si, sj;
- -
- - as->i = (as->i + 1);
- - si = as->s[as->i];
- - as->j = (as->j + si);
- - sj = as->s[as->j];
- - as->s[as->i] = sj;
- - as->s[as->j] = si;
- - return (as->s[(si + sj) & 0xff]);
- + if (--arc4_count == 0 || !rs_initialized)
- + __arc4random_stir();
- + return arc4_getbyte(&rs);
- }
- +#endif
-
- -static __inline__ uint32_t
- +static __inline__ u_int32_t
- arc4_getword(struct arc4_stream *as)
- {
- - uint32_t val;
- + u_int32_t val;
- val = arc4_getbyte(as) << 24;
- val |= arc4_getbyte(as) << 16;
- val |= arc4_getbyte(as) << 8;
- @@ -175,23 +205,11 @@
- arc4_addrandom(&rs, dat, datlen);
- }
-
- -uint32_t
- +u_int32_t
- arc4random(void)
- {
- - if (!rs_initialized)
- + arc4_count -= 4;
- + if (arc4_count <= 0 || !rs_initialized || arc4_stir_pid != getpid())
- __arc4random_stir();
- return arc4_getword(&rs);
- }
- -
- -#if 0
- -/*-------- Test code --------*/
- -#include <stdlib.h>
- -#include <stdio.h>
- -
- -int main(void) {
- - int random_number;
- - random_number = arc4random() % 65536;
- - printf("%d\n", random_number);
- - return 0;
- -}
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/stdlib/_atexit.c uClibc/libc/stdlib/_atexit.c
- --- uClibc-0.9.33.2/libc/stdlib/_atexit.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/_atexit.c 2014-02-03 12:32:56.000000000 +0100
- @@ -40,11 +40,12 @@
- #include <features.h>
- #include <unistd.h>
- #include <stdlib.h>
- +#include <stdio.h>
- #include <errno.h>
- #include <atomic.h>
-
- #include <bits/uClibc_mutex.h>
- -__UCLIBC_MUTEX_EXTERN(__atexit_lock);
- +__UCLIBC_MUTEX_EXTERN(__atexit_lock) attribute_hidden;
-
-
-
- @@ -240,6 +241,16 @@
-
- __UCLIBC_MUTEX_LOCK(__atexit_lock);
-
- + /*
- + * Reuse free slots at the end of the list.
- + * This avoids eating memory when dlopen and dlclose modules multiple times.
- + */
- + while (__exit_count > 0) {
- + if (__exit_function_table[__exit_count-1].type == ef_free) {
- + --__exit_count;
- + } else break;
- + }
- +
- #ifdef __UCLIBC_DYNAMIC_ATEXIT__
- /* If we are out of function table slots, make some more */
- if (__exit_slots < __exit_count+1) {
- @@ -318,8 +329,7 @@
- attribute_hidden void (*__exit_cleanup)(int) = 0;
- __UCLIBC_MUTEX_INIT(__atexit_lock, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
-
- -extern void __uClibc_fini(void);
- -libc_hidden_proto(__uClibc_fini)
- +extern void __uClibc_fini(void) attribute_hidden;
-
- /*
- * Normal program termination
- diff -Nur uClibc-0.9.33.2/libc/stdlib/bsd_getpt.c uClibc/libc/stdlib/bsd_getpt.c
- --- uClibc-0.9.33.2/libc/stdlib/bsd_getpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/bsd_getpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- @@ -40,7 +39,7 @@
- const char __libc_ptyname2[] attribute_hidden = PTYNAME2;
-
- /* Open a master pseudo terminal and return its file descriptor. */
- -int
- +static __inline__ int
- __getpt (void)
- {
- char buf[sizeof (_PATH_PTY) + 2];
- diff -Nur uClibc-0.9.33.2/libc/stdlib/drand48.c uClibc/libc/stdlib/drand48.c
- --- uClibc-0.9.33.2/libc/stdlib/drand48.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/drand48.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/drand48-iter.c uClibc/libc/stdlib/drand48-iter.c
- --- uClibc-0.9.33.2/libc/stdlib/drand48-iter.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/drand48-iter.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/drand48_r.c uClibc/libc/stdlib/drand48_r.c
- --- uClibc-0.9.33.2/libc/stdlib/drand48_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/drand48_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <math.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/erand48.c uClibc/libc/stdlib/erand48.c
- --- uClibc-0.9.33.2/libc/stdlib/erand48.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/erand48.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/erand48_r.c uClibc/libc/stdlib/erand48_r.c
- --- uClibc-0.9.33.2/libc/stdlib/erand48_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/erand48_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <ieee754.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/getpt.c uClibc/libc/stdlib/getpt.c
- --- uClibc-0.9.33.2/libc/stdlib/getpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/getpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- @@ -43,12 +42,12 @@
-
- #if !defined __UNIX98PTY_ONLY__ && defined __UCLIBC_HAS_GETPT__
- /* Prototype for function that opens BSD-style master pseudo-terminals. */
- -extern int __bsd_getpt (void) attribute_hidden;
- +static __inline__ int __bsd_getpt (void);
- #endif
-
- /* Open a master pseudo terminal and return its file descriptor. */
- -int
- -posix_openpt (int flags)
- +static int
- +__posix_openpt (int flags)
- {
- #define have_no_dev_ptmx (1<<0)
- #define devpts_mounted (1<<1)
- @@ -112,14 +111,14 @@
- #endif
- return -1;
- }
- -libc_hidden_def(posix_openpt)
- +strong_alias(__posix_openpt,posix_openpt)
- #undef have_no_dev_ptmx
- #undef devpts_mounted
-
- #if defined __USE_GNU && defined __UCLIBC_HAS_GETPT__
- int getpt (void)
- {
- - return posix_openpt(O_RDWR);
- + return __posix_openpt(O_RDWR);
- }
-
- #if !defined __UNIX98PTY_ONLY__ && defined __UCLIBC_HAS_GETPT__
- diff -Nur uClibc-0.9.33.2/libc/stdlib/grantpt.c uClibc/libc/stdlib/grantpt.c
- --- uClibc-0.9.33.2/libc/stdlib/grantpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/grantpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <stdlib.h>
- @@ -33,25 +32,18 @@
- /* Prototype for function that changes ownership and access permission
- for slave pseudo terminals that do not live on a `devpts'
- filesystem. */
- -int __unix_grantpt (int fd);
- +static int __unix_grantpt (int fd);
-
- /* Prototype for private function that gets the name of the slave
- pseudo terminal in a safe way. */
- static int pts_name (int fd, char **pts, size_t buf_len);
- extern __typeof(statfs) __libc_statfs;
- -#endif
-
- /* Change the ownership and access permission of the slave pseudo
- terminal associated with the master pseudo terminal specified
- by FD. */
- -int
- -#if !defined __ASSUME_DEVPTS__
- -grantpt (int fd)
- -#else
- -grantpt (attribute_unused int fd)
- -#endif
- +int grantpt (int fd)
- {
- -#if !defined __ASSUME_DEVPTS__
- struct statfs fsbuf;
- char _buf[PATH_MAX];
- char *buf = _buf;
- @@ -65,12 +57,19 @@
- /* If the slave pseudo terminal lives on a `devpts' filesystem, the
- ownership and access permission are already set. */
- if (fsbuf.f_type != DEVPTS_SUPER_MAGIC && fsbuf.f_type != DEVFS_SUPER_MAGIC)
- - return __unix_grantpt (fd);
- -#endif
- + return __unix_grantpt (fd);
- +
- return 0;
- }
-
- -#if !defined __ASSUME_DEVPTS__
- # define grantpt __unix_grantpt
- # include "unix_grantpt.c"
- +
- +#else
- +
- +int grantpt (attribute_unused int fd)
- +{
- + return 0;
- +}
- +
- #endif
- diff -Nur uClibc-0.9.33.2/libc/stdlib/jrand48.c uClibc/libc/stdlib/jrand48.c
- --- uClibc-0.9.33.2/libc/stdlib/jrand48.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/jrand48.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/jrand48_r.c uClibc/libc/stdlib/jrand48_r.c
- --- uClibc-0.9.33.2/libc/stdlib/jrand48_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/jrand48_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/l64a.c uClibc/libc/stdlib/l64a.c
- --- uClibc-0.9.33.2/libc/stdlib/l64a.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/l64a.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/lcong48.c uClibc/libc/stdlib/lcong48.c
- --- uClibc-0.9.33.2/libc/stdlib/lcong48.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/stdlib/lcong48.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,29 @@
- +/* vi: set sw=4 ts=4: */
- +/* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */
- +
- +#include <features.h>
- +
- +#if defined __USE_SVID || defined __USE_XOPEN
- +#include <stdint.h>
- +#include <stdlib.h>
- +#include <string.h>
- +
- +static int __lcong48_r (unsigned short int param[7], struct drand48_data *buffer)
- +{
- + /* Store the given values. */
- + memcpy (buffer->__x, ¶m[0], sizeof (buffer->__x));
- + buffer->__a = ((uint64_t) param[5] << 32 | (uint32_t) param[4] << 16 | param[3]);
- + buffer->__c = param[6];
- + buffer->__init = 1;
- +
- + return 0;
- +}
- +# ifdef __USE_MISC
- +strong_alias(__lcong48_r,lcong48_r)
- +# endif
- +
- +void lcong48 (unsigned short int param[7])
- +{
- + (void) __lcong48_r (param, &__libc_drand48_data);
- +}
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/stdlib/ldiv.c uClibc/libc/stdlib/ldiv.c
- --- uClibc-0.9.33.2/libc/stdlib/ldiv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/ldiv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/lldiv.c uClibc/libc/stdlib/lldiv.c
- --- uClibc-0.9.33.2/libc/stdlib/lldiv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/lldiv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/lrand48.c uClibc/libc/stdlib/lrand48.c
- --- uClibc-0.9.33.2/libc/stdlib/lrand48.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/lrand48.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/lrand48_r.c uClibc/libc/stdlib/lrand48_r.c
- --- uClibc-0.9.33.2/libc/stdlib/lrand48_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/lrand48_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/Makefile.in uClibc/libc/stdlib/Makefile.in
- --- uClibc-0.9.33.2/libc/stdlib/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -12,16 +12,17 @@
- include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in
-
- CSRC-y := \
- - abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c \
- + abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c mkostemp.c \
- rand.c random.c random_r.c setenv.c div.c ldiv.c lldiv.c \
- getpt.c drand48-iter.c jrand48.c \
- - jrand48_r.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
- + jrand48_r.c lcong48.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
- nrand48_r.c rand_r.c srand48.c srand48_r.c seed48.c seed48_r.c \
- - valloc.c a64l.c l64a.c __uc_malloc.c
- + a64l.c l64a.c __uc_malloc.c
- +CSRC-$(UCLIBC_SUSV2_LEGACY) += valloc.c
- CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_memalign.c
- CSRC-$(UCLIBC_HAS_PTY) += grantpt.c unlockpt.c ptsname.c
- CSRC-$(UCLIBC_HAS_ARC4RANDOM) += arc4random.c
- -CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c
- +CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c mkostemp64.c
- CSRC-$(UCLIBC_HAS_FLOATS) += drand48.c drand48_r.c erand48.c erand48_r.c
- CSRC-$(if $(findstring yy,$(UCLIBC_HAS_FLOATS)$(UCLIBC_SUSV3_LEGACY)),y) += \
- gcvt.c
- @@ -33,7 +34,7 @@
-
- # multi source stdlib.c
- CSRC-y += abs.c labs.c atoi.c atol.c strtol.c strtoul.c _stdlib_strto_l.c \
- - qsort.c qsort_r.c bsearch.c \
- + qsort.c qsort_r.c bsearch.c rpmatch.c \
- llabs.c atoll.c strtoll.c strtoull.c _stdlib_strto_ll.c
- # (aliases) strtoq.o strtouq.o
- CSRC-$(UCLIBC_HAS_FLOATS) += atof.c
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/calloc.c uClibc/libc/stdlib/malloc/calloc.c
- --- uClibc-0.9.33.2/libc/stdlib/malloc/calloc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc/calloc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,8 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/free.c uClibc/libc/stdlib/malloc/free.c
- --- uClibc-0.9.33.2/libc/stdlib/malloc/free.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc/free.c 2014-02-03 12:32:56.000000000 +0100
- @@ -28,7 +28,7 @@
- static void
- __free_to_heap (void *mem, struct heap_free_area **heap
- #ifdef HEAP_USE_LOCKING
- - , malloc_mutex_t *heap_lock
- + , __UCLIBC_MUTEX_TYPE *heap_lock
- #endif
- )
- {
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/heap.h uClibc/libc/stdlib/malloc/heap.h
- --- uClibc-0.9.33.2/libc/stdlib/malloc/heap.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc/heap.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,18 +13,13 @@
-
- #include <features.h>
-
- -
- -/* On multi-threaded systems, the heap includes a lock. */
- +#include <bits/uClibc_mutex.h>
- #ifdef __UCLIBC_HAS_THREADS__
- -# include <bits/uClibc_mutex.h>
- # define HEAP_USE_LOCKING
- -# define __heap_lock(heap_lock) __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE(*(heap_lock))
- -# define __heap_unlock(heap_lock) __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE(*(heap_lock))
- -#else
- -# define __heap_lock(heap_lock)
- -# define __heap_unlock(heap_lock)
- #endif
-
- +#define __heap_lock(heap_lock) __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE(*(heap_lock))
- +#define __heap_unlock(heap_lock) __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE(*(heap_lock))
-
- /* The heap allocates in multiples of, and aligned to, HEAP_GRANULARITY.
- HEAP_GRANULARITY must be a power of 2. Malloc depends on this being the
- @@ -35,11 +30,9 @@
-
-
-
- -/* The HEAP_INIT macro can be used as a static initializer for a heap
- - variable. The HEAP_INIT_WITH_FA variant is used to initialize a heap
- +/* The HEAP_INIT_WITH_FA variant is used to initialize a heap
- with an initial static free-area; its argument FA should be declared
- using HEAP_DECLARE_STATIC_FREE_AREA. */
- -# define HEAP_INIT 0
- # define HEAP_INIT_WITH_FA(fa) &fa._fa
-
- /* A free-list area `header'. These are actually stored at the _ends_ of
- @@ -92,34 +85,21 @@
- #define HEAP_MIN_FREE_AREA_SIZE \
- HEAP_ADJUST_SIZE (sizeof (struct heap_free_area) + 32)
-
- -
- -/* branch-prediction macros; they may already be defined by libc. */
- -#ifndef likely
- -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
- -#define likely(cond) __builtin_expect(!!(int)(cond), 1)
- -#define unlikely(cond) __builtin_expect((int)(cond), 0)
- -#else
- -#define likely(cond) (cond)
- -#define unlikely(cond) (cond)
- -#endif
- -#endif /* !likely */
- -
- -
- /* Define HEAP_DEBUGGING to cause the heap routines to emit debugging info
- to stderr when the variable __heap_debug is set to true. */
- #ifdef HEAP_DEBUGGING
- -extern int __heap_debug;
- +extern int __heap_debug attribute_hidden;
- #define HEAP_DEBUG(heap, str) (__heap_debug ? __heap_dump (heap, str) : 0)
- #else
- #define HEAP_DEBUG(heap, str) (void)0
- #endif
-
- /* Output a text representation of HEAP to stderr, labelling it with STR. */
- -extern void __heap_dump (struct heap_free_area *heap, const char *str);
- +extern void __heap_dump (struct heap_free_area *heap, const char *str) attribute_hidden;
-
- /* Do some consistency checks on HEAP. If they fail, output an error
- message to stderr, and exit. STR is printed with the failure message. */
- -extern void __heap_check (struct heap_free_area *heap, const char *str);
- +extern void __heap_check (struct heap_free_area *heap, const char *str) attribute_hidden;
-
-
- /* Delete the free-area FA from HEAP. */
- @@ -216,16 +196,16 @@
- /* Allocate and return a block at least *SIZE bytes long from HEAP.
- *SIZE is adjusted to reflect the actual amount allocated (which may be
- greater than requested). */
- -extern void *__heap_alloc (struct heap_free_area **heap, size_t *size);
- +extern void *__heap_alloc (struct heap_free_area **heap, size_t *size) attribute_hidden;
-
- /* Allocate SIZE bytes at address MEM in HEAP. Return the actual size
- allocated, or 0 if we failed. */
- -extern size_t __heap_alloc_at (struct heap_free_area **heap, void *mem, size_t size);
- +extern size_t __heap_alloc_at (struct heap_free_area **heap, void *mem, size_t size) attribute_hidden;
-
- /* Return the memory area MEM of size SIZE to HEAP.
- Returns the heap free area into which the memory was placed. */
- extern struct heap_free_area *__heap_free (struct heap_free_area **heap,
- - void *mem, size_t size);
- + void *mem, size_t size) attribute_hidden;
-
- /* Return true if HEAP contains absolutely no memory. */
- #define __heap_is_empty(heap) (! (heap))
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/Makefile.in uClibc/libc/stdlib/malloc/Makefile.in
- --- uClibc-0.9.33.2/libc/stdlib/malloc/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -9,12 +9,12 @@
-
- subdirs += libc/stdlib/malloc
-
- -CSRC := malloc.c calloc.c free.c realloc.c memalign.c \
- +CSRC-y := malloc.c calloc.c free.c realloc.c memalign.c \
- heap_alloc.c heap_alloc_at.c heap_free.c
-
- # Turn on malloc debugging if requested
- +CSRC-$(UCLIBC_MALLOC_DEBUGGING) += malloc_debug.c heap_debug.c
- ifeq ($(UCLIBC_MALLOC_DEBUGGING),y)
- -CSRC += malloc_debug.c heap_debug.c
- CFLAGS += -DMALLOC_DEBUGGING -DHEAP_DEBUGGING
- ifeq ($(UCLIBC_UCLINUX_BROKEN_MUNMAP),y)
- CFLAGS += -DMALLOC_MMB_DEBUGGING
- @@ -24,8 +24,8 @@
- STDLIB_MALLOC_DIR := $(top_srcdir)libc/stdlib/malloc
- STDLIB_MALLOC_OUT := $(top_builddir)libc/stdlib/malloc
-
- -STDLIB_MALLOC_SRC := $(patsubst %.c,$(STDLIB_MALLOC_DIR)/%.c,$(CSRC))
- -STDLIB_MALLOC_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_OUT)/%.o,$(CSRC))
- +STDLIB_MALLOC_SRC := $(patsubst %.c,$(STDLIB_MALLOC_DIR)/%.c,$(CSRC-y))
- +STDLIB_MALLOC_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_OUT)/%.o,$(CSRC-y))
-
- libc-$(MALLOC) += $(STDLIB_MALLOC_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/malloc.c uClibc/libc/stdlib/malloc/malloc.c
- --- uClibc-0.9.33.2/libc/stdlib/malloc/malloc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc/malloc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -26,12 +26,12 @@
- HEAP_DECLARE_STATIC_FREE_AREA (initial_fa, 256);
- struct heap_free_area *__malloc_heap = HEAP_INIT_WITH_FA (initial_fa);
- #ifdef HEAP_USE_LOCKING
- -malloc_mutex_t __malloc_heap_lock = PTHREAD_MUTEX_INITIALIZER;
- +__UCLIBC_MUTEX_INIT(__malloc_heap_lock,PTHREAD_MUTEX_INITIALIZER);
- #endif
-
- #if defined(MALLOC_USE_LOCKING) && defined(MALLOC_USE_SBRK)
- /* A lock protecting our use of sbrk. */
- -malloc_mutex_t __malloc_sbrk_lock;
- +__UCLIBC_MUTEX(__malloc_sbrk_lock);
- #endif /* MALLOC_USE_LOCKING && MALLOC_USE_SBRK */
-
-
- @@ -46,7 +46,7 @@
- HEAP_DECLARE_STATIC_FREE_AREA (initial_mmb_fa, 48); /* enough for 3 mmbs */
- struct heap_free_area *__malloc_mmb_heap = HEAP_INIT_WITH_FA (initial_mmb_fa);
- #ifdef HEAP_USE_LOCKING
- -malloc_mutex_t __malloc_mmb_heap_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
- +__UCLIBC_MUTEX_INIT(__malloc_mmb_heap_lock,PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
- #endif
- #endif /* __UCLIBC_UCLINUX_BROKEN_MUNMAP__ */
-
- @@ -59,7 +59,7 @@
- static void *
- __malloc_from_heap (size_t size, struct heap_free_area **heap
- #ifdef HEAP_USE_LOCKING
- - , malloc_mutex_t *heap_lock
- + , __UCLIBC_MUTEX_TYPE *heap_lock
- #endif
- )
- {
- @@ -124,7 +124,7 @@
- MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
- #else
- block = mmap ((void *)0, block_size, PROT_READ | PROT_WRITE,
- - MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZE, 0, 0);
- + MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED, 0, 0);
- #endif
-
- #endif /* MALLOC_USE_SBRK */
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/malloc.h uClibc/libc/stdlib/malloc/malloc.h
- --- uClibc-0.9.33.2/libc/stdlib/malloc/malloc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc/malloc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -20,8 +20,7 @@
- (__alignof__ (double) > sizeof (size_t) ? __alignof__ (double) : sizeof (size_t))
-
- /* The system pagesize... */
- -extern size_t __pagesize;
- -#define MALLOC_PAGE_SIZE __pagesize
- +#define MALLOC_PAGE_SIZE sysconf(_SC_PAGESIZE)
-
- /* The minimum size of block we request from the the system to extend the
- heap for small allocations (we may request a bigger block if necessary to
- @@ -128,69 +127,46 @@
- /* Return the size of a malloc allocation, given the user address. */
- #define MALLOC_SIZE(addr) (*(size_t *)MALLOC_BASE(addr))
-
- +#include <bits/uClibc_mutex.h>
-
- -/* Locking for multithreaded apps. */
- #ifdef __UCLIBC_HAS_THREADS__
- -
- -# include <bits/uClibc_mutex.h>
- -
- # define MALLOC_USE_LOCKING
- +#endif
-
- -typedef __UCLIBC_MUTEX_TYPE malloc_mutex_t;
- -# define MALLOC_MUTEX_INIT __UCLIBC_MUTEX_INITIALIZER
- -
- -# ifdef MALLOC_USE_SBRK
- +#ifdef MALLOC_USE_SBRK
- /* This lock is used to serialize uses of the `sbrk' function (in both
- malloc and free, sbrk may be used several times in succession, and
- things will break if these multiple calls are interleaved with another
- thread's use of sbrk!). */
- -extern malloc_mutex_t __malloc_sbrk_lock;
- +__UCLIBC_MUTEX_EXTERN(__malloc_sbrk_lock) attribute_hidden;
- # define __malloc_lock_sbrk() __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE (__malloc_sbrk_lock)
- # define __malloc_unlock_sbrk() __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE (__malloc_sbrk_lock)
- -# endif /* MALLOC_USE_SBRK */
- -
- -#else /* !__UCLIBC_HAS_THREADS__ */
- -
- -/* Without threads, mutex operations are a nop. */
- +#else
- # define __malloc_lock_sbrk() (void)0
- # define __malloc_unlock_sbrk() (void)0
- -
- -#endif /* __UCLIBC_HAS_THREADS__ */
- -
- -
- -/* branch-prediction macros; they may already be defined by libc. */
- -#ifndef likely
- -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
- -#define likely(cond) __builtin_expect(!!(int)(cond), 1)
- -#define unlikely(cond) __builtin_expect((int)(cond), 0)
- -#else
- -#define likely(cond) (cond)
- -#define unlikely(cond) (cond)
- -#endif
- -#endif /* !likely */
- -
- +#endif /* MALLOC_USE_SBRK */
-
- /* Define MALLOC_DEBUGGING to cause malloc to emit debugging info to stderr
- when the variable __malloc_debug is set to true. */
- #ifdef MALLOC_DEBUGGING
-
- -extern void __malloc_debug_init (void);
- +extern void __malloc_debug_init (void) attribute_hidden;
-
- /* The number of spaces in a malloc debug indent level. */
- #define MALLOC_DEBUG_INDENT_SIZE 3
-
- -extern int __malloc_debug, __malloc_check;
- +extern int __malloc_debug attribute_hidden, __malloc_check attribute_hidden;
-
- # define MALLOC_DEBUG(indent, fmt, args...) \
- (__malloc_debug ? __malloc_debug_printf (indent, fmt , ##args) : 0)
- # define MALLOC_DEBUG_INDENT(indent) \
- (__malloc_debug ? __malloc_debug_indent (indent) : 0)
-
- -extern int __malloc_debug_cur_indent;
- +extern int __malloc_debug_cur_indent attribute_hidden;
-
- /* Print FMT and args indented at the current debug print level, followed
- by a newline, and change the level by INDENT. */
- -extern void __malloc_debug_printf (int indent, const char *fmt, ...);
- +extern void __malloc_debug_printf (int indent, const char *fmt, ...) attribute_hidden;
-
- /* Change the current debug print level by INDENT, and return the value. */
- #define __malloc_debug_indent(indent) (__malloc_debug_cur_indent += indent)
- @@ -220,10 +196,18 @@
-
-
- /* The malloc heap. */
- -extern struct heap_free_area *__malloc_heap;
- +extern struct heap_free_area *__malloc_heap attribute_hidden;
- #ifdef __UCLIBC_HAS_THREADS__
- -extern malloc_mutex_t __malloc_heap_lock;
- -#ifdef __UCLIBC_UCLINUX_BROKEN_MUNMAP__
- -extern malloc_mutex_t __malloc_mmb_heap_lock;
- -#endif
- +__UCLIBC_MUTEX_EXTERN(__malloc_heap_lock)
- +# ifndef __LINUXTHREADS_OLD__
- + attribute_hidden
- +# endif
- + ;
- +# ifdef __UCLIBC_UCLINUX_BROKEN_MUNMAP__
- +__UCLIBC_MUTEX_EXTERN(__malloc_mmb_heap_lock)
- +# ifndef __LINUXTHREADS_OLD__
- + attribute_hidden
- +# endif
- + ;
- +# endif
- #endif
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/memalign.c uClibc/libc/stdlib/malloc/memalign.c
- --- uClibc-0.9.33.2/libc/stdlib/malloc/memalign.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc/memalign.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,7 +14,6 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <sys/mman.h>
- -#include <sys/param.h> /* MAX */
-
- #include "malloc.h"
- #include "heap.h"
- @@ -30,6 +29,8 @@
- */
-
- void *memalign (size_t alignment, size_t size);
- +/* XXX shadow outer malloc.h */
- +libc_hidden_proto(memalign)
- void *
- memalign (size_t alignment, size_t size)
- {
- @@ -92,3 +93,4 @@
-
- return MALLOC_SETUP (base, end_addr - (unsigned long)base);
- }
- +libc_hidden_def(memalign)
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-simple/alloc.c uClibc/libc/stdlib/malloc-simple/alloc.c
- --- uClibc-0.9.33.2/libc/stdlib/malloc-simple/alloc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc-simple/alloc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,6 +17,7 @@
- #include <sys/mman.h>
- #include <malloc.h>
-
- +extern int weak_function __libc_free_aligned(void *ptr) attribute_hidden;
-
- #ifdef L_malloc
- void *malloc(size_t size)
- @@ -36,7 +37,7 @@
- #ifdef __ARCH_USE_MMU__
- # define MMAP_FLAGS MAP_PRIVATE | MAP_ANONYMOUS
- #else
- -# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZE
- +# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED
- #endif
-
- result = mmap((void *) 0, size + sizeof(size_t), PROT_READ | PROT_WRITE,
- @@ -63,7 +64,7 @@
- result = malloc(size);
-
- #ifndef __ARCH_USE_MMU__
- - /* mmap'd with MAP_UNINITIALIZE, we have to blank memory ourselves */
- + /* mmap'd with MAP_UNINITIALIZED, we have to blank memory ourselves */
- if (result != NULL) {
- memset(result, 0, size);
- }
- @@ -95,7 +96,6 @@
- #endif
-
- #ifdef L_free
- -extern int weak_function __libc_free_aligned(void *ptr);
- void free(void *ptr)
- {
- if (unlikely(ptr == NULL))
- @@ -123,7 +123,7 @@
- __ptr_t aligned; /* The address that memaligned returned. */
- __ptr_t exact; /* The address that malloc returned. */
- };
- -struct alignlist *_aligned_blocks;
- +static struct alignlist *_aligned_blocks;
-
- /* Return memory to the heap. */
- int __libc_free_aligned(void *ptr)
- @@ -182,4 +182,5 @@
-
- return result;
- }
- +libc_hidden_def(memalign)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-simple/Makefile.in uClibc/libc/stdlib/malloc-simple/Makefile.in
- --- uClibc-0.9.33.2/libc/stdlib/malloc-simple/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc-simple/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -10,11 +10,13 @@
- STDLIB_MALLOC_SIMPLE_DIR := $(top_srcdir)libc/stdlib/malloc-simple
- STDLIB_MALLOC_SIMPLE_OUT := $(top_builddir)libc/stdlib/malloc-simple
-
- -CSRC := $(notdir $(wildcard $(STDLIB_MALLOC_SIMPLE_DIR)/*.c))
- -CSRC := $(filter-out alloc.c,$(CSRC))
- +CSRC-y := $(notdir $(wildcard $(STDLIB_MALLOC_SIMPLE_DIR)/*.c))
- +# multi source alloc.c
- +CSRC- := alloc.c
- +CSRC-y := $(filter-out $(CSRC-),$(CSRC-y))
-
- -STDLIB_MALLOC_SIMPLE_SRC := $(patsubst %.c,$(STDLIB_MALLOC_SIMPLE_DIR)/%.c,$(CSRC))
- -STDLIB_MALLOC_SIMPLE_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_SIMPLE_OUT)/%.o,$(CSRC))
- +STDLIB_MALLOC_SIMPLE_SRC := $(patsubst %.c,$(STDLIB_MALLOC_SIMPLE_DIR)/%.c,$(CSRC-y))
- +STDLIB_MALLOC_SIMPLE_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_SIMPLE_OUT)/%.o,$(CSRC-y))
-
- libc-$(MALLOC_SIMPLE) += $(STDLIB_MALLOC_SIMPLE_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-standard/Makefile.in uClibc/libc/stdlib/malloc-standard/Makefile.in
- --- uClibc-0.9.33.2/libc/stdlib/malloc-standard/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc-standard/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -7,15 +7,13 @@
-
- subdirs += libc/stdlib/malloc-standard
-
- -# calloc.c can be found at uClibc/libc/stdlib/calloc.c
- -# valloc.c can be found at uClibc/libc/stdlib/valloc.c
- -CSRC := malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c
- -
- STDLIB_MALLOC_STANDARD_DIR := $(top_srcdir)libc/stdlib/malloc-standard
- STDLIB_MALLOC_STANDARD_OUT := $(top_builddir)libc/stdlib/malloc-standard
-
- -STDLIB_MALLOC_STANDARD_SRC := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_DIR)/%.c,$(CSRC))
- -STDLIB_MALLOC_STANDARD_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_OUT)/%.o,$(CSRC))
- +CSRC-y := $(notdir $(wildcard $(STDLIB_MALLOC_STANDARD_DIR)/*.c))
- +
- +STDLIB_MALLOC_STANDARD_SRC := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_DIR)/%.c,$(CSRC-y))
- +STDLIB_MALLOC_STANDARD_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_OUT)/%.o,$(CSRC-y))
-
- libc-$(MALLOC_STANDARD) += $(STDLIB_MALLOC_STANDARD_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-standard/mallinfo.c uClibc/libc/stdlib/malloc-standard/mallinfo.c
- --- uClibc-0.9.33.2/libc/stdlib/malloc-standard/mallinfo.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc-standard/mallinfo.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,6 +15,7 @@
- */
-
- #include "malloc.h"
- +#include <stdio.h> /* fprintf */
-
-
- /* ------------------------------ mallinfo ------------------------------ */
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-standard/malloc.h uClibc/libc/stdlib/malloc-standard/malloc.h
- --- uClibc-0.9.33.2/libc/stdlib/malloc-standard/malloc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc-standard/malloc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -26,7 +26,11 @@
-
-
-
- -__UCLIBC_MUTEX_EXTERN(__malloc_lock);
- +__UCLIBC_MUTEX_EXTERN(__malloc_lock)
- +#if defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__
- + attribute_hidden
- +#endif
- + ;
- #define __MALLOC_LOCK __UCLIBC_MUTEX_LOCK(__malloc_lock)
- #define __MALLOC_UNLOCK __UCLIBC_MUTEX_UNLOCK(__malloc_lock)
-
- @@ -349,13 +353,13 @@
- #endif
-
- #ifdef __ARCH_USE_MMU__
- -# define _MAP_UNINITIALIZE 0
- +# define _MAP_UNINITIALIZED 0
- #else
- -# define _MAP_UNINITIALIZE MAP_UNINITIALIZE
- +# define _MAP_UNINITIALIZED MAP_UNINITIALIZED
- #endif
-
- #define MMAP(addr, size, prot) \
- - (mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS|_MAP_UNINITIALIZE, 0, 0))
- + (mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS|_MAP_UNINITIALIZED, 0, 0))
-
-
- /* ----------------------- Chunk representations ----------------------- */
- @@ -910,7 +914,7 @@
- malloc relies on the property that malloc_state is initialized to
- all zeroes (as is true of C statics).
- */
- -extern struct malloc_state __malloc_state; /* never directly referenced */
- +extern struct malloc_state __malloc_state attribute_hidden; /* never directly referenced */
-
- /*
- All uses of av_ are via get_malloc_state().
- @@ -947,12 +951,12 @@
- #define check_malloced_chunk(P,N) __do_check_malloced_chunk(P,N)
- #define check_malloc_state() __do_check_malloc_state()
-
- -extern void __do_check_chunk(mchunkptr p);
- -extern void __do_check_free_chunk(mchunkptr p);
- -extern void __do_check_inuse_chunk(mchunkptr p);
- -extern void __do_check_remalloced_chunk(mchunkptr p, size_t s);
- -extern void __do_check_malloced_chunk(mchunkptr p, size_t s);
- -extern void __do_check_malloc_state(void);
- +extern void __do_check_chunk(mchunkptr p) attribute_hidden;
- +extern void __do_check_free_chunk(mchunkptr p) attribute_hidden;
- +extern void __do_check_inuse_chunk(mchunkptr p) attribute_hidden;
- +extern void __do_check_remalloced_chunk(mchunkptr p, size_t s) attribute_hidden;
- +extern void __do_check_malloced_chunk(mchunkptr p, size_t s) attribute_hidden;
- +extern void __do_check_malloc_state(void) attribute_hidden;
-
- #include <assert.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-standard/memalign.c uClibc/libc/stdlib/malloc-standard/memalign.c
- --- uClibc-0.9.33.2/libc/stdlib/malloc-standard/memalign.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/malloc-standard/memalign.c 2014-02-03 12:32:56.000000000 +0100
- @@ -127,4 +127,4 @@
- __MALLOC_UNLOCK;
- return retval;
- }
- -
- +libc_hidden_def(memalign)
- diff -Nur uClibc-0.9.33.2/libc/stdlib/mkdtemp.c uClibc/libc/stdlib/mkdtemp.c
- --- uClibc-0.9.33.2/libc/stdlib/mkdtemp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/mkdtemp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/mkostemp64.c uClibc/libc/stdlib/mkostemp64.c
- --- uClibc-0.9.33.2/libc/stdlib/mkostemp64.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/stdlib/mkostemp64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,31 @@
- +/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <fcntl.h>
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include "../misc/internals/tempname.h"
- +
- +/* Generate a unique temporary file name from TEMPLATE.
- + The last six characters of TEMPLATE must be "XXXXXX";
- + they are replaced with a string that makes the filename unique.
- + Then open the file and return a fd. */
- +int
- +mkostemp64 (char *template, int flags)
- +{
- + return __gen_tempname (template, __GT_BIGFILE, flags | O_LARGEFILE);
- +}
- diff -Nur uClibc-0.9.33.2/libc/stdlib/mkostemp.c uClibc/libc/stdlib/mkostemp.c
- --- uClibc-0.9.33.2/libc/stdlib/mkostemp.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/stdlib/mkostemp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,30 @@
- +/* Copyright (C) 1998-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include "../misc/internals/tempname.h"
- +
- +/* Generate a unique temporary file name from TEMPLATE.
- + The last six characters of TEMPLATE must be "XXXXXX";
- + they are replaced with a string that makes the filename unique.
- + Then open the file and return a fd. */
- +int
- +mkostemp (char *template, int flags)
- +{
- + return __gen_tempname (template, __GT_FILE, flags);
- +}
- diff -Nur uClibc-0.9.33.2/libc/stdlib/mkstemp64.c uClibc/libc/stdlib/mkstemp64.c
- --- uClibc-0.9.33.2/libc/stdlib/mkstemp64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/mkstemp64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/mkstemp.c uClibc/libc/stdlib/mkstemp.c
- --- uClibc-0.9.33.2/libc/stdlib/mkstemp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/mkstemp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/mktemp.c uClibc/libc/stdlib/mktemp.c
- --- uClibc-0.9.33.2/libc/stdlib/mktemp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/mktemp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/mrand48.c uClibc/libc/stdlib/mrand48.c
- --- uClibc-0.9.33.2/libc/stdlib/mrand48.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/mrand48.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/mrand48_r.c uClibc/libc/stdlib/mrand48_r.c
- --- uClibc-0.9.33.2/libc/stdlib/mrand48_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/mrand48_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/nrand48.c uClibc/libc/stdlib/nrand48.c
- --- uClibc-0.9.33.2/libc/stdlib/nrand48.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/nrand48.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/nrand48_r.c uClibc/libc/stdlib/nrand48_r.c
- --- uClibc-0.9.33.2/libc/stdlib/nrand48_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/nrand48_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/posix_memalign.c uClibc/libc/stdlib/posix_memalign.c
- --- uClibc-0.9.33.2/libc/stdlib/posix_memalign.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/posix_memalign.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- - *
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/ptsname.c uClibc/libc/stdlib/ptsname.c
- --- uClibc-0.9.33.2/libc/stdlib/ptsname.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/ptsname.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/pty-private.h uClibc/libc/stdlib/pty-private.h
- --- uClibc-0.9.33.2/libc/stdlib/pty-private.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/pty-private.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PTY_PRIVATE_H
- #define _PTY_PRIVATE_H 1
- diff -Nur uClibc-0.9.33.2/libc/stdlib/rand_r.c uClibc/libc/stdlib/rand_r.c
- --- uClibc-0.9.33.2/libc/stdlib/rand_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/rand_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/rpmatch.c uClibc/libc/stdlib/rpmatch.c
- --- uClibc-0.9.33.2/libc/stdlib/rpmatch.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/stdlib/rpmatch.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,7 @@
- +/* Copyright (C) 2012 Bernhard Reutner-Fischer <uclibc@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1+, see the file COPYING.LIB in this tarball.
- + */
- +
- +#define L_rpmatch
- +#include "stdlib.c"
- diff -Nur uClibc-0.9.33.2/libc/stdlib/seed48.c uClibc/libc/stdlib/seed48.c
- --- uClibc-0.9.33.2/libc/stdlib/seed48.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/seed48.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/seed48_r.c uClibc/libc/stdlib/seed48_r.c
- --- uClibc-0.9.33.2/libc/stdlib/seed48_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/seed48_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/setenv.c uClibc/libc/stdlib/setenv.c
- --- uClibc-0.9.33.2/libc/stdlib/setenv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/setenv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>.
-
- modified for uClibc by Erik Andersen <andersen@codepoet.org>
- */
- diff -Nur uClibc-0.9.33.2/libc/stdlib/srand48.c uClibc/libc/stdlib/srand48.c
- --- uClibc-0.9.33.2/libc/stdlib/srand48.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/srand48.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/srand48_r.c uClibc/libc/stdlib/srand48_r.c
- --- uClibc-0.9.33.2/libc/stdlib/srand48_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/srand48_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include <limits.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/stdlib.c uClibc/libc/stdlib/stdlib.c
- --- uClibc-0.9.33.2/libc/stdlib/stdlib.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/stdlib.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
- @@ -32,58 +32,8 @@
- * Add wscto{inttype} functions.
- */
-
- -#define _ISOC99_SOURCE /* for ULLONG primarily... */
- #include <limits.h>
- #include <stdint.h>
- -/* Work around gcc's refusal to create aliases.
- - * TODO: Add in a define to disable the aliases? */
- -
- -#if UINT_MAX == ULONG_MAX
- -#ifdef L_labs
- -#define abs __ignore_abs
- -#endif
- -#ifdef L_atol
- -#define atoi __ignore_atoi
- -#endif
- -#endif
- -#if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
- -#ifdef L_labs
- -#define llabs __ignore_llabs
- -#endif
- -#ifdef L_atol
- -#define atoll __ignore_atoll
- -#endif
- -#ifdef L_strtol
- -#define strtoll __ignore_strtoll
- -#endif
- -#ifdef L_strtoul
- -#define strtoull __ignore_strtoull
- -#endif
- -#ifdef L_wcstol
- -#define wcstoll __ignore_wcstoll
- -#endif
- -#ifdef L_wcstoul
- -#define wcstoull __ignore_wcstoull
- -#endif
- -#ifdef L_strtol_l
- -#define strtoll_l __ignore_strtoll_l
- -#endif
- -#ifdef L_strtoul_l
- -#define strtoull_l __ignore_strtoull_l
- -#endif
- -#ifdef L_wcstol_l
- -#define wcstoll_l __ignore_wcstoll_l
- -#endif
- -#ifdef L_wcstoul_l
- -#define wcstoull_l __ignore_wcstoull_l
- -#endif
- -#endif
- -#if defined(ULLONG_MAX) && (ULLONG_MAX == UINTMAX_MAX)
- -#if defined L_labs || defined L_llabs
- -#define imaxabs __ignore_imaxabs
- -#endif
- -#endif
- -
- #include <stdint.h>
- #include <inttypes.h>
- #include <ctype.h>
- @@ -100,10 +50,6 @@
- #include <wctype.h>
- #include <bits/uClibc_uwchar.h>
-
- -#ifdef __UCLIBC_HAS_XLOCALE__
- -#include <xlocale.h>
- -#endif /* __UCLIBC_HAS_XLOCALE__ */
- -
- /* TODO: clean up the following... */
-
- #if WCHAR_MAX > 0xffffUL
- @@ -226,21 +172,15 @@
- }
-
- #if UINT_MAX == ULONG_MAX
- -#undef abs
- -extern __typeof(labs) abs;
- -strong_alias(labs,abs)
- +strong_alias_untyped(labs,abs)
- #endif
-
- #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
- -#undef llabs
- -extern __typeof(labs) llabs;
- -strong_alias(labs,llabs)
- +strong_alias_untyped(labs,llabs)
- #endif
-
- #if ULONG_MAX == UINTMAX_MAX
- -#undef imaxabs
- -extern __typeof(labs) imaxabs;
- -strong_alias(labs,imaxabs)
- +strong_alias_untyped(labs,imaxabs)
- #endif
-
- #endif
- @@ -255,9 +195,7 @@
- }
-
- #if (ULLONG_MAX == UINTMAX_MAX)
- -#undef imaxabs
- -extern __typeof(llabs) imaxabs;
- -strong_alias(llabs,imaxabs)
- +strong_alias_untyped(llabs,imaxabs)
- #endif
-
- #endif /* defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX) */
- @@ -288,18 +226,12 @@
- }
-
- #if UINT_MAX == ULONG_MAX
- -#undef atoi
- -extern __typeof(atol) atoi;
- -/* the one in stdlib.h is not enough due to prototype mismatch */
- -libc_hidden_proto(atoi)
- -strong_alias(atol,atoi)
- +strong_alias_untyped(atol,atoi)
- libc_hidden_def(atoi)
- #endif
-
- #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
- -#undef atoll
- -extern __typeof(atol) atoll;
- -strong_alias(atol,atoll)
- +strong_alias_untyped(atol,atoll)
- #endif
-
- #endif
- @@ -318,9 +250,16 @@
-
- #endif
- /**********************************************************************/
- +#ifdef L_rpmatch
- +int rpmatch (const char *__response)
- +{
- + return (__response[0] == 'y' || __response[0] == 'Y') ? 1 :
- + (__response[0] == 'n' || __response[0] == 'N') ? 0 : -1;
- +}
- +#endif
- +/**********************************************************************/
- #if defined(L_strtol) || defined(L_strtol_l)
-
- -libc_hidden_proto(__XL_NPP(strtol))
- long __XL_NPP(strtol)(const char * __restrict str, char ** __restrict endptr,
- int base __LOCALE_PARAM)
- {
- @@ -333,17 +272,7 @@
- #endif
-
- #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
- -#ifdef L_strtol_l
- -#undef strtoll_l
- -#else
- -#undef strtoll
- -#endif
- -extern __typeof(__XL_NPP(strtol)) __XL_NPP(strtoll);
- -/* the one in stdlib.h is not enough due to prototype mismatch */
- -#ifdef L_strtol
- -libc_hidden_proto(__XL_NPP(strtoll))
- -#endif
- -strong_alias(__XL_NPP(strtol),__XL_NPP(strtoll))
- +strong_alias_untyped(__XL_NPP(strtol),__XL_NPP(strtoll))
- #ifdef L_strtol
- libc_hidden_def(__XL_NPP(strtoll))
- strong_alias(strtol,strtoq)
- @@ -389,13 +318,7 @@
- #endif
-
- #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
- -#ifdef L_strtoul_l
- -#undef strtoull_l
- -#else
- -#undef strtoull
- -#endif
- -extern __typeof(__XL_NPP(strtoul)) __XL_NPP(strtoull);
- -strong_alias(__XL_NPP(strtoul),__XL_NPP(strtoull))
- +strong_alias_untyped(__XL_NPP(strtoul),__XL_NPP(strtoull))
- #if !defined(L_strtoul_l)
- strong_alias(strtoul,strtouq)
- #endif
- @@ -744,16 +667,7 @@
- #endif /* defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX) */
-
- #endif
- -/**********************************************************************/
- -/* Made _Exit() an alias for _exit(), as per C99. */
- -/* #ifdef L__Exit */
- -/* void _Exit(int status) */
- -/* { */
- -/* _exit(status); */
- -/* } */
-
- -/* #endif */
- -/**********************************************************************/
- #ifdef L_bsearch
-
- void *bsearch(const void *key, const void *base, size_t /* nmemb */ high,
- @@ -1067,13 +981,7 @@
- #endif
-
- #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
- -#ifdef L_wcstol_l
- -#undef wcstoll_l
- -#else
- -#undef wcstoll
- -#endif
- -extern __typeof(__XL_NPP(wcstol)) __XL_NPP(wcstoll);
- -strong_alias(__XL_NPP(wcstol),__XL_NPP(wcstoll))
- +strong_alias_untyped(__XL_NPP(wcstol),__XL_NPP(wcstoll))
- #endif
-
- #endif
- @@ -1114,13 +1022,7 @@
- #endif
-
- #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
- -#ifdef L_wcstoul_l
- -#undef wcstoull_l
- -#else
- -#undef wcstoull
- -#endif
- -extern __typeof(__XL_NPP(wcstoul)) __XL_NPP(wcstoull);
- -strong_alias(__XL_NPP(wcstoul),__XL_NPP(wcstoull))
- +strong_alias_untyped(__XL_NPP(wcstoul),__XL_NPP(wcstoull))
- #endif
-
- #endif
- diff -Nur uClibc-0.9.33.2/libc/stdlib/_strtod.c uClibc/libc/stdlib/_strtod.c
- --- uClibc-0.9.33.2/libc/stdlib/_strtod.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/_strtod.c 2014-02-03 12:32:56.000000000 +0100
- @@ -95,7 +95,6 @@
-
- /**********************************************************************/
-
- -#define _ISOC99_SOURCE 1
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- @@ -112,10 +111,6 @@
- # include <bits/uClibc_uwchar.h>
- #endif
-
- -#ifdef __UCLIBC_HAS_XLOCALE__
- -# include <xlocale.h>
- -#endif
- -
- /* Handle _STRTOD_HEXADECIMAL_FLOATS via uClibc config now. */
- #undef _STRTOD_HEXADECIMAL_FLOATS
- #ifdef __UCLIBC_HAS_HEXADECIMAL_FLOATS__
- @@ -509,7 +504,6 @@
- #endif
-
-
- -libc_hidden_proto(__XL_NPP(strtof))
- float __XL_NPP(strtof)(const Wchar *str, Wchar **endptr __LOCALE_PARAM )
- {
- #if FPMAX_TYPE == 1
- @@ -526,7 +520,6 @@
- return y;
- #endif
- }
- -libc_hidden_def(__XL_NPP(strtof))
-
- #endif
- #endif
- diff -Nur uClibc-0.9.33.2/libc/stdlib/system.c uClibc/libc/stdlib/system.c
- --- uClibc-0.9.33.2/libc/stdlib/system.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/system.c 2014-02-03 12:32:56.000000000 +0100
- @@ -24,11 +24,6 @@
- * need to figure out why still
- */
- #if !defined __UCLIBC_HAS_THREADS_NATIVE__ || defined __sparc__
- -/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
- -#include <sys/syscall.h>
- -#ifndef __NR_vfork
- -# define vfork fork
- -#endif
-
- int __libc_system(const char *command)
- {
- @@ -66,7 +61,7 @@
- __printf("Waiting for child %d\n", pid);
- #endif
-
- - if (wait4(pid, &wait_val, 0, 0) == -1)
- + if (__wait4_nocancel(pid, &wait_val, 0, 0) == -1)
- wait_val = -1;
-
- out:
- diff -Nur uClibc-0.9.33.2/libc/stdlib/__uc_malloc.c uClibc/libc/stdlib/__uc_malloc.c
- --- uClibc-0.9.33.2/libc/stdlib/__uc_malloc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/__uc_malloc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with this library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA.
- +not, see <http://www.gnu.org/licenses/>.
-
- */
-
- diff -Nur uClibc-0.9.33.2/libc/stdlib/unix_grantpt.c uClibc/libc/stdlib/unix_grantpt.c
- --- uClibc-0.9.33.2/libc/stdlib/unix_grantpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/unix_grantpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- @@ -31,12 +30,6 @@
- #include "pty-private.h"
-
-
- -/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
- -#include <sys/syscall.h>
- -#if ! defined __NR_vfork
- -#define vfork fork
- -#endif
- -
- /* Return the result of ptsname_r in the buffer pointed to by PTS,
- which should be of length BUF_LEN. If it is too long to fit in
- this buffer, a sufficiently long buffer is allocated using malloc,
- diff -Nur uClibc-0.9.33.2/libc/stdlib/unlockpt.c uClibc/libc/stdlib/unlockpt.c
- --- uClibc-0.9.33.2/libc/stdlib/unlockpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/unlockpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/stdlib/valloc.c uClibc/libc/stdlib/valloc.c
- --- uClibc-0.9.33.2/libc/stdlib/valloc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/stdlib/valloc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with this library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA.
- +not, see <http://www.gnu.org/licenses/>.
-
- The author may be reached (Email) at the address mike@@ai.mit.edu,
- or (US mail) as Mike Haertel c/o Free Software Foundation. */
- diff -Nur uClibc-0.9.33.2/libc/string/arc/Makefile uClibc/libc/string/arc/Makefile
- --- uClibc-0.9.33.2/libc/string/arc/Makefile 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/arc/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,13 @@
- +# Makefile for uClibc
- +#
- +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
- +#
- +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +top_srcdir:=../../../
- +top_builddir:=../../../
- +all: objs
- +include $(top_builddir)Rules.mak
- +include ../Makefile.in
- +include $(top_srcdir)Makerules
- diff -Nur uClibc-0.9.33.2/libc/string/arc/memcmp.S uClibc/libc/string/arc/memcmp.S
- --- uClibc-0.9.33.2/libc/string/arc/memcmp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/arc/memcmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,128 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + * Copyright (C) 2007 ARC International (UK) LTD
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sysdep.h>
- +#include <features.h>
- +
- +#ifdef __LITTLE_ENDIAN__
- +#define WORD2 r2
- +#define SHIFT r3
- +#else /* BIG ENDIAN */
- +#define WORD2 r3
- +#define SHIFT r2
- +#endif
- +
- +ENTRY(memcmp)
- + or r12,r0,r1
- + asl_s r12,r12,30
- + sub r3,r2,1
- + brls r2,r12,.Lbytewise
- + ld r4,[r0,0]
- + ld r5,[r1,0]
- + lsr.f lp_count,r3,3
- + lpne .Loop_end
- + ld_s WORD2,[r0,4]
- + ld_s r12,[r1,4]
- + brne r4,r5,.Leven
- + ld.a r4,[r0,8]
- + ld.a r5,[r1,8]
- + brne WORD2,r12,.Lodd
- +.Loop_end:
- + asl_s SHIFT,SHIFT,3
- + bhs_s .Last_cmp
- + brne r4,r5,.Leven
- + ld r4,[r0,4]
- + ld r5,[r1,4]
- +#ifdef __LITTLE_ENDIAN__
- + nop_s
- + ; one more load latency cycle
- +.Last_cmp:
- + xor r0,r4,r5
- + bset r0,r0,SHIFT
- + sub_s r1,r0,1
- + bic_s r1,r1,r0
- + norm r1,r1
- + b.d .Leven_cmp
- + and r1,r1,24
- +.Leven:
- + xor r0,r4,r5
- + sub_s r1,r0,1
- + bic_s r1,r1,r0
- + norm r1,r1
- + ; slow track insn
- + and r1,r1,24
- +.Leven_cmp:
- + asl r2,r4,r1
- + asl r12,r5,r1
- + lsr_s r2,r2,1
- + lsr_s r12,r12,1
- + j_s.d [blink]
- + sub r0,r2,r12
- + .balign 4
- +.Lodd:
- + xor r0,WORD2,r12
- + sub_s r1,r0,1
- + bic_s r1,r1,r0
- + norm r1,r1
- + ; slow track insn
- + and r1,r1,24
- + asl_s r2,r2,r1
- + asl_s r12,r12,r1
- + lsr_s r2,r2,1
- + lsr_s r12,r12,1
- + j_s.d [blink]
- + sub r0,r2,r12
- +#else /* BIG ENDIAN */
- +.Last_cmp:
- + neg_s SHIFT,SHIFT
- + lsr r4,r4,SHIFT
- + lsr r5,r5,SHIFT
- + ; slow track insn
- +.Leven:
- + sub.f r0,r4,r5
- + mov.ne r0,1
- + j_s.d [blink]
- + bset.cs r0,r0,31
- +.Lodd:
- + cmp_s WORD2,r12
- + mov_s r0,1
- + j_s.d [blink]
- + bset.cs r0,r0,31
- +#endif /* ENDIAN */
- + .balign 4
- +.Lbytewise:
- + breq r2,0,.Lnil
- + ldb r4,[r0,0]
- + ldb r5,[r1,0]
- + lsr.f lp_count,r3
- + lpne .Lbyte_end
- + ldb_s r3,[r0,1]
- + ldb r12,[r1,1]
- + brne r4,r5,.Lbyte_even
- + ldb.a r4,[r0,2]
- + ldb.a r5,[r1,2]
- + brne r3,r12,.Lbyte_odd
- +.Lbyte_end:
- + bcc .Lbyte_even
- + brne r4,r5,.Lbyte_even
- + ldb_s r3,[r0,1]
- + ldb_s r12,[r1,1]
- +.Lbyte_odd:
- + j_s.d [blink]
- + sub r0,r3,r12
- +.Lbyte_even:
- + j_s.d [blink]
- + sub r0,r4,r5
- +.Lnil:
- + j_s.d [blink]
- + mov r0,0
- +END(memcmp)
- +libc_hidden_def(memcmp)
- +
- +#ifdef __UCLIBC_SUSV3_LEGACY__
- +strong_alias(memcmp,bcmp)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/string/arc/memcpy.S uClibc/libc/string/arc/memcpy.S
- --- uClibc-0.9.33.2/libc/string/arc/memcpy.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/arc/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,71 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + * Copyright (C) 2007 ARC International (UK) LTD
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sysdep.h>
- +
- +/* This memcpy implementation does not support objects of 1GB or larger -
- + the check for alignment does not work then. */
- +/* We assume that most sources and destinations are aligned, and
- + that also lengths are mostly a multiple of four, although to a lesser
- + extent. */
- +ENTRY(memcpy)
- + or r3,r0,r1
- + asl_s r3,r3,30
- + mov_s r5,r0
- + brls.d r2,r3,.Lcopy_bytewise
- + sub.f r3,r2,1
- + ld_s r12,[r1,0]
- + asr.f lp_count,r3,3
- + bbit0.d r3,2,.Lnox4
- + bmsk_s r2,r2,1
- + st.ab r12,[r5,4]
- + ld.a r12,[r1,4]
- +.Lnox4:
- + lppnz .Lendloop
- + ld_s r3,[r1,4]
- + st.ab r12,[r5,4]
- + ld.a r12,[r1,8]
- + st.ab r3,[r5,4]
- +.Lendloop:
- + breq r2,0,.Last_store
- + ld r3,[r5,0]
- +#ifdef __LITTLE_ENDIAN__
- + add3 r2,-1,r2
- + ; uses long immediate
- + xor_s r12,r12,r3
- + bmsk r12,r12,r2
- + xor_s r12,r12,r3
- +#else /* BIG ENDIAN */
- + sub3 r2,31,r2
- + ; uses long immediate
- + xor_s r3,r3,r12
- + bmsk r3,r3,r2
- + xor_s r12,r12,r3
- +#endif /* ENDIAN */
- +.Last_store:
- + j_s.d [blink]
- + st r12,[r5,0]
- +
- + .balign 4
- +.Lcopy_bytewise:
- + jcs [blink]
- + ldb_s r12,[r1,0]
- + lsr.f lp_count,r3
- + bhs_s .Lnox1
- + stb.ab r12,[r5,1]
- + ldb.a r12,[r1,1]
- +.Lnox1:
- + lppnz .Lendbloop
- + ldb_s r3,[r1,1]
- + stb.ab r12,[r5,1]
- + ldb.a r12,[r1,2]
- + stb.ab r3,[r5,1]
- +.Lendbloop:
- + j_s.d [blink]
- + stb r12,[r5,0]
- +END(memcpy)
- +libc_hidden_def(memcpy)
- diff -Nur uClibc-0.9.33.2/libc/string/arc/memset.S uClibc/libc/string/arc/memset.S
- --- uClibc-0.9.33.2/libc/string/arc/memset.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/arc/memset.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,51 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + * Copyright (C) 2007 ARC International (UK) LTD
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sysdep.h>
- +
- +#define SMALL 7 /* Must be at least 6 to deal with alignment/loop issues. */
- +
- +ENTRY(memset)
- +
- + mov_s r4,r0
- + or r12,r0,r2
- + bmsk.f r12,r12,1
- + extb_s r1,r1
- + asl r3,r1,8
- + beq.d .Laligned
- + or_s r1,r1,r3
- + brls r2,SMALL,.Ltiny
- + add r3,r2,r0
- + stb r1,[r3,-1]
- + bclr_s r3,r3,0
- + stw r1,[r3,-2]
- + bmsk.f r12,r0,1
- + add_s r2,r2,r12
- + sub.ne r2,r2,4
- + stb.ab r1,[r4,1]
- + and r4,r4,-2
- + stw.ab r1,[r4,2]
- + and r4,r4,-4
- +.Laligned: ; This code address should be aligned for speed.
- + asl r3,r1,16
- + lsr.f lp_count,r2,2
- + or_s r1,r1,r3
- + lpne .Loop_end
- + st.ab r1,[r4,4]
- +.Loop_end:
- + j_s [blink]
- +
- +
- + .balign 4
- +.Ltiny:
- + mov.f lp_count,r2
- + lpne .Ltiny_end
- + stb.ab r1,[r4,1]
- +.Ltiny_end:
- + j_s [blink]
- +END(memset)
- +libc_hidden_def(memset)
- diff -Nur uClibc-0.9.33.2/libc/string/arc/strchr.S uClibc/libc/string/arc/strchr.S
- --- uClibc-0.9.33.2/libc/string/arc/strchr.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/arc/strchr.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,138 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + * Copyright (C) 2007 ARC International (UK) LTD
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sysdep.h>
- +#include <features.h>
- +
- +/* ARC700 has a relatively long pipeline and branch prediction, so we want
- + to avoid branches that are hard to predict. On the other hand, the
- + presence of the norm instruction makes it easier to operate on whole
- + words branch-free. */
- +
- +ENTRY(strchr)
- + extb_s r1,r1
- + asl r5,r1,8
- + bmsk r2,r0,1
- + or r5,r5,r1
- + mov_s r3,0x01010101
- + breq.d r2,r0,.Laligned
- + asl r4,r5,16
- + sub_s r0,r0,r2
- + asl r7,r2,3
- + ld_s r2,[r0]
- +#ifdef __LITTLE_ENDIAN__
- + asl r7,r3,r7
- +#else
- + lsr r7,r3,r7
- +#endif
- + or r5,r5,r4
- + ror r4,r3
- + sub r12,r2,r7
- + bic_s r12,r12,r2
- + and r12,r12,r4
- + brne.d r12,0,.Lfound0_ua
- + xor r6,r2,r5
- + ld.a r2,[r0,4]
- + sub r12,r6,r7
- + bic r12,r12,r6
- +#ifdef __LITTLE_ENDIAN__
- + and r7,r12,r4
- + breq r7,0,.Loop ; For speed, we want this branch to be unaligned.
- + b .Lfound_char ; Likewise this one.
- +#else
- + and r12,r12,r4
- + breq r12,0,.Loop ; For speed, we want this branch to be unaligned.
- + lsr_s r12,r12,7
- + bic r2,r7,r6
- + b.d .Lfound_char_b
- + and_s r2,r2,r12
- +#endif
- +; /* We require this code address to be unaligned for speed... */
- +.Laligned:
- + ld_s r2,[r0]
- + or r5,r5,r4
- + ror r4,r3
- +; /* ... so that this code address is aligned, for itself and ... */
- +.Loop:
- + sub r12,r2,r3
- + bic_s r12,r12,r2
- + and r12,r12,r4
- + brne.d r12,0,.Lfound0
- + xor r6,r2,r5
- + ld.a r2,[r0,4]
- + sub r12,r6,r3
- + bic r12,r12,r6
- + and r7,r12,r4
- + breq r7,0,.Loop /* ... so that this branch is unaligned. */
- + ; Found searched-for character. r0 has already advanced to next word.
- +#ifdef __LITTLE_ENDIAN__
- +/* We only need the information about the first matching byte
- + (i.e. the least significant matching byte) to be exact,
- + hence there is no problem with carry effects. */
- +.Lfound_char:
- + sub r3,r7,1
- + bic r3,r3,r7
- + norm r2,r3
- + sub_s r0,r0,1
- + asr_s r2,r2,3
- + j.d [blink]
- + sub_s r0,r0,r2
- +
- + .balign 4
- +.Lfound0_ua:
- + mov r3,r7
- +.Lfound0:
- + sub r3,r6,r3
- + bic r3,r3,r6
- + and r2,r3,r4
- + or_s r12,r12,r2
- + sub_s r3,r12,1
- + bic_s r3,r3,r12
- + norm r3,r3
- + add_s r0,r0,3
- + asr_s r12,r3,3
- + asl.f 0,r2,r3
- + sub_s r0,r0,r12
- + j_s.d [blink]
- + mov.pl r0,0
- +#else /* BIG ENDIAN */
- +.Lfound_char:
- + lsr r7,r7,7
- +
- + bic r2,r7,r6
- +.Lfound_char_b:
- + norm r2,r2
- + sub_s r0,r0,4
- + asr_s r2,r2,3
- + j.d [blink]
- + add_s r0,r0,r2
- +
- +.Lfound0_ua:
- + mov_s r3,r7
- +.Lfound0:
- + asl_s r2,r2,7
- + or r7,r6,r4
- + bic_s r12,r12,r2
- + sub r2,r7,r3
- + or r2,r2,r6
- + bic r12,r2,r12
- + bic.f r3,r4,r12
- + norm r3,r3
- +
- + add.pl r3,r3,1
- + asr_s r12,r3,3
- + asl.f 0,r2,r3
- + add_s r0,r0,r12
- + j_s.d [blink]
- + mov.mi r0,0
- +#endif /* ENDIAN */
- +END(strchr)
- +libc_hidden_def(strchr)
- +
- +#ifdef __UCLIBC_SUSV3_LEGACY__
- +strong_alias(strchr,index)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/string/arc/strcmp.S uClibc/libc/string/arc/strcmp.S
- --- uClibc-0.9.33.2/libc/string/arc/strcmp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/arc/strcmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,102 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + * Copyright (C) 2007 ARC International (UK) LTD
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <features.h>
- +#include <sysdep.h>
- +
- +/* This is optimized primarily for the ARC700.
- + It would be possible to speed up the loops by one cycle / word
- + respective one cycle / byte by forcing double source 1 alignment, unrolling
- + by a factor of two, and speculatively loading the second word / byte of
- + source 1; however, that would increase the overhead for loop setup / finish,
- + and strcmp might often terminate early. */
- +
- +ENTRY(strcmp)
- + or r2,r0,r1
- + bmsk_s r2,r2,1
- + brne r2,0,.Lcharloop
- + mov_s r12,0x01010101
- + ror r5,r12
- +.Lwordloop:
- + ld.ab r2,[r0,4]
- + ld.ab r3,[r1,4]
- + nop_s
- + sub r4,r2,r12
- + bic r4,r4,r2
- + and r4,r4,r5
- + brne r4,0,.Lfound0
- + breq r2,r3,.Lwordloop
- +#ifdef __LITTLE_ENDIAN__
- + xor r0,r2,r3 ; mask for difference
- + sub_s r1,r0,1
- + bic_s r0,r0,r1 ; mask for least significant difference bit
- + sub r1,r5,r0
- + xor r0,r5,r1 ; mask for least significant difference byte
- + and_s r2,r2,r0
- + and_s r3,r3,r0
- +#endif /* LITTLE ENDIAN */
- + cmp_s r2,r3
- + mov_s r0,1
- + j_s.d [blink]
- + bset.lo r0,r0,31
- +
- + .balign 4
- +#ifdef __LITTLE_ENDIAN__
- +.Lfound0:
- + xor r0,r2,r3 ; mask for difference
- + or r0,r0,r4 ; or in zero indicator
- + sub_s r1,r0,1
- + bic_s r0,r0,r1 ; mask for least significant difference bit
- + sub r1,r5,r0
- + xor r0,r5,r1 ; mask for least significant difference byte
- + and_s r2,r2,r0
- + and_s r3,r3,r0
- + sub.f r0,r2,r3
- + mov.hi r0,1
- + j_s.d [blink]
- + bset.lo r0,r0,31
- +#else /* BIG ENDIAN */
- + /* The zero-detection above can mis-detect 0x01 bytes as zeroes
- + because of carry-propagateion from a lower significant zero byte.
- + We can compensate for this by checking that bit0 is zero.
- + This compensation is not necessary in the step where we
- + get a low estimate for r2, because in any affected bytes
- + we already have 0x00 or 0x01, which will remain unchanged
- + when bit 7 is cleared. */
- + .balign 4
- +.Lfound0:
- + lsr r0,r4,8
- + lsr_s r1,r2
- + bic_s r2,r2,r0 ; get low estimate for r2 and get ...
- + bic_s r0,r0,r1 ; <this is the adjusted mask for zeros>
- + or_s r3,r3,r0 ; ... high estimate r3 so that r2 > r3 will ...
- + cmp_s r3,r2 ; ... be independent of trailing garbage
- + or_s r2,r2,r0 ; likewise for r3 > r2
- + bic_s r3,r3,r0
- + rlc r0,0 ; r0 := r2 > r3 ? 1 : 0
- + cmp_s r2,r3
- + j_s.d [blink]
- + bset.lo r0,r0,31
- +#endif /* ENDIAN */
- +
- + .balign 4
- +.Lcharloop:
- + ldb.ab r2,[r0,1]
- + ldb.ab r3,[r1,1]
- + nop_s
- + breq r2,0,.Lcmpend
- + breq r2,r3,.Lcharloop
- +.Lcmpend:
- + j_s.d [blink]
- + sub r0,r2,r3
- +END(strcmp)
- +libc_hidden_def(strcmp)
- +
- +#ifndef __UCLIBC_HAS_LOCALE__
- +strong_alias(strcmp,strcoll)
- +libc_hidden_def(strcoll)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/string/arc/strcpy.S uClibc/libc/string/arc/strcpy.S
- --- uClibc-0.9.33.2/libc/string/arc/strcpy.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/arc/strcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,71 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + * Copyright (C) 2007 ARC International (UK) LTD
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +
- +#include <sysdep.h>
- +
- +/* If dst and src are 4 byte aligned, copy 8 bytes at a time.
- + If the src is 4, but not 8 byte aligned, we first read 4 bytes to get
- + it 8 byte aligned. Thus, we can do a little read-ahead, without
- + dereferencing a cache line that we should not touch.
- + Note that short and long instructions have been scheduled to avoid
- + branch stalls.
- + The beq_s to r3z could be made unaligned & long to avoid a stall
- + there, but the it is not likely to be taken often, and it
- + would also be likey to cost an unaligned mispredict at the next call. */
- +
- +ENTRY(strcpy)
- + or r2,r0,r1
- + bmsk_s r2,r2,1
- + brne.d r2,0,charloop
- + mov_s r10,r0
- + ld_s r3,[r1,0]
- + mov r8,0x01010101
- + bbit0.d r1,2,loop_start
- + ror r12,r8
- + sub r2,r3,r8
- + bic_s r2,r2,r3
- + tst_s r2,r12
- + bne r3z
- + mov_s r4,r3
- + .balign 4
- +loop:
- + ld.a r3,[r1,4]
- + st.ab r4,[r10,4]
- +loop_start:
- + ld.a r4,[r1,4]
- + sub r2,r3,r8
- + bic_s r2,r2,r3
- + tst_s r2,r12
- + bne_s r3z
- + st.ab r3,[r10,4]
- + sub r2,r4,r8
- + bic r2,r2,r4
- + tst r2,r12
- + beq loop
- + mov_s r3,r4
- +#ifdef __LITTLE_ENDIAN__
- +r3z: bmsk.f r1,r3,7
- + lsr_s r3,r3,8
- +#else
- +r3z: lsr.f r1,r3,24
- + asl_s r3,r3,8
- +#endif
- + bne.d r3z
- + stb.ab r1,[r10,1]
- + j_s [blink]
- +
- + .balign 4
- +charloop:
- + ldb.ab r3,[r1,1]
- +
- +
- + brne.d r3,0,charloop
- + stb.ab r3,[r10,1]
- + j [blink]
- +END(strcpy)
- +libc_hidden_def(strcpy)
- diff -Nur uClibc-0.9.33.2/libc/string/arc/strlen.S uClibc/libc/string/arc/strlen.S
- --- uClibc-0.9.33.2/libc/string/arc/strlen.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/arc/strlen.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,84 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + * Copyright (C) 2007 ARC International (UK) LTD
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +
- +#include <sysdep.h>
- +
- +ENTRY(strlen)
- + or r3,r0,7
- + ld r2,[r3,-7]
- + ld.a r6,[r3,-3]
- + mov r4,0x01010101
- + ; uses long immediate
- +#ifdef __LITTLE_ENDIAN__
- + asl_s r1,r0,3
- + btst_s r0,2
- + asl r7,r4,r1
- + ror r5,r4
- + sub r1,r2,r7
- + bic_s r1,r1,r2
- + mov.eq r7,r4
- + sub r12,r6,r7
- + bic r12,r12,r6
- + or.eq r12,r12,r1
- + and r12,r12,r5
- + brne r12,0,.Learly_end
- +#else /* BIG ENDIAN */
- + ror r5,r4
- + btst_s r0,2
- + mov_s r1,31
- + sub3 r7,r1,r0
- + sub r1,r2,r4
- + bic_s r1,r1,r2
- + bmsk r1,r1,r7
- + sub r12,r6,r4
- + bic r12,r12,r6
- + bmsk.ne r12,r12,r7
- + or.eq r12,r12,r1
- + and r12,r12,r5
- + brne r12,0,.Learly_end
- +#endif /* ENDIAN */
- +
- +.Loop:
- + ld_s r2,[r3,4]
- + ld.a r6,[r3,8]
- + ; stall for load result
- + sub r1,r2,r4
- + bic_s r1,r1,r2
- + sub r12,r6,r4
- + bic r12,r12,r6
- + or r12,r12,r1
- + and r12,r12,r5
- + breq r12,0,.Loop
- +.Lend:
- + and.f r1,r1,r5
- + sub.ne r3,r3,4
- + mov.eq r1,r12
- +#ifdef __LITTLE_ENDIAN__
- + sub_s r2,r1,1
- + bic_s r2,r2,r1
- + norm r1,r2
- + sub_s r0,r0,3
- + lsr_s r1,r1,3
- + sub r0,r3,r0
- + j_s.d [blink]
- + sub r0,r0,r1
- +#else /* BIG ENDIAN */
- + lsr_s r1,r1,7
- + mov.eq r2,r6
- + bic_s r1,r1,r2
- + norm r1,r1
- + sub r0,r3,r0
- + lsr_s r1,r1,3
- + j_s.d [blink]
- + add r0,r0,r1
- +#endif /* ENDIAN */
- +.Learly_end:
- + b.d .Lend
- + sub_s.ne r1,r1,r1
- +END(strlen)
- +libc_hidden_def(strlen)
- diff -Nur uClibc-0.9.33.2/libc/string/arm/memset.S uClibc/libc/string/arm/memset.S
- --- uClibc-0.9.33.2/libc/string/arm/memset.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/arm/memset.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <sys/syscall.h>
- diff -Nur uClibc-0.9.33.2/libc/string/arm/strlen.S uClibc/libc/string/arm/strlen.S
- --- uClibc-0.9.33.2/libc/string/arm/strlen.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/arm/strlen.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <endian.h>
- diff -Nur uClibc-0.9.33.2/libc/string/avr32/Makefile uClibc/libc/string/avr32/Makefile
- --- uClibc-0.9.33.2/libc/string/avr32/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/avr32/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
- # details.
- #
- # You should have received a copy of the GNU Library General Public License
- -# along with this program; if not, write to the Free Software Foundation, Inc.,
- -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- +# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
- top_srcdir := ../../../
- top_builddir := ../../../
- diff -Nur uClibc-0.9.33.2/libc/string/basename.c uClibc/libc/string/basename.c
- --- uClibc-0.9.33.2/libc/string/basename.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/basename.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,7 +5,7 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include "_string.h"
- +#include <string.h>
-
- #ifdef __USE_GNU
-
- @@ -24,5 +24,4 @@
-
- return (char *) p;
- }
- -libc_hidden_def(basename)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/string/bcopy.c uClibc/libc/string/bcopy.c
- --- uClibc-0.9.33.2/libc/string/bcopy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/bcopy.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,11 +5,9 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include "_string.h"
- +#include <string.h>
-
- #ifdef __UCLIBC_SUSV3_LEGACY__
- -
- -
- void bcopy(const void *s2, void *s1, size_t n)
- {
- #if 1
- diff -Nur uClibc-0.9.33.2/libc/string/bzero.c uClibc/libc/string/bzero.c
- --- uClibc-0.9.33.2/libc/string/bzero.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/bzero.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,7 +5,7 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include "_string.h"
- +#include <string.h>
-
- #ifdef __UCLIBC_SUSV3_LEGACY__
- void bzero(void *s, size_t n)
- diff -Nur uClibc-0.9.33.2/libc/string/_collate.c uClibc/libc/string/_collate.c
- --- uClibc-0.9.33.2/libc/string/_collate.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/_collate.c 2014-02-03 12:32:56.000000000 +0100
- @@ -159,7 +159,7 @@
- #define N (1)
- #else /* WANT_WIDE */
- wchar_t WC;
- - size_t n0, nx;
- + size_t n0, nx = 0;
- #define N n0
-
- #endif /* WANT_WIDE */
- diff -Nur uClibc-0.9.33.2/libc/string/cris/memcopy.h uClibc/libc/string/cris/memcopy.h
- --- uClibc-0.9.33.2/libc/string/cris/memcopy.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/cris/memcopy.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include "../generic/memcopy.h"
-
- diff -Nur uClibc-0.9.33.2/libc/string/cris/memmove.c uClibc/libc/string/cris/memmove.c
- --- uClibc-0.9.33.2/libc/string/cris/memmove.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/cris/memmove.c 2014-02-03 12:32:56.000000000 +0100
- @@ -18,9 +18,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/dirname.c uClibc/libc/string/dirname.c
- --- uClibc-0.9.33.2/libc/string/dirname.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/dirname.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,7 +5,8 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include "_string.h"
- +#define __need_NULL
- +#include <stddef.h>
- #include <libgen.h>
-
- char *dirname(char *path)
- diff -Nur uClibc-0.9.33.2/libc/string/ffsll.c uClibc/libc/string/ffsll.c
- --- uClibc-0.9.33.2/libc/string/ffsll.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ffsll.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libc/string/frv/memcpy.S uClibc/libc/string/frv/memcpy.S
- --- uClibc-0.9.33.2/libc/string/frv/memcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/frv/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- #include <features.h>
- diff -Nur uClibc-0.9.33.2/libc/string/frv/memset.S uClibc/libc/string/frv/memset.S
- --- uClibc-0.9.33.2/libc/string/frv/memset.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/frv/memset.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- #include <features.h>
- diff -Nur uClibc-0.9.33.2/libc/string/generic/memchr.c uClibc/libc/string/generic/memchr.c
- --- uClibc-0.9.33.2/libc/string/generic/memchr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/memchr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,9 +17,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/string/generic/memcmp.c uClibc/libc/string/generic/memcmp.c
- --- uClibc-0.9.33.2/libc/string/generic/memcmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/memcmp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include "memcopy.h"
- diff -Nur uClibc-0.9.33.2/libc/string/generic/memcopy.h uClibc/libc/string/generic/memcopy.h
- --- uClibc-0.9.33.2/libc/string/generic/memcopy.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/memcopy.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The strategy of the memory functions is:
-
- diff -Nur uClibc-0.9.33.2/libc/string/generic/memcpy.c uClibc/libc/string/generic/memcpy.c
- --- uClibc-0.9.33.2/libc/string/generic/memcpy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/memcpy.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include "memcopy.h"
- diff -Nur uClibc-0.9.33.2/libc/string/generic/memmem.c uClibc/libc/string/generic/memmem.c
- --- uClibc-0.9.33.2/libc/string/generic/memmem.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/memmem.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include <stddef.h>
- diff -Nur uClibc-0.9.33.2/libc/string/generic/memmove.c uClibc/libc/string/generic/memmove.c
- --- uClibc-0.9.33.2/libc/string/generic/memmove.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/memmove.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/generic/memrchr.c uClibc/libc/string/generic/memrchr.c
- --- uClibc-0.9.33.2/libc/string/generic/memrchr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/memrchr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -18,9 +18,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/string/generic/memset.c uClibc/libc/string/generic/memset.c
- --- uClibc-0.9.33.2/libc/string/generic/memset.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/memset.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include "memcopy.h"
- diff -Nur uClibc-0.9.33.2/libc/string/generic/pagecopy.h uClibc/libc/string/generic/pagecopy.h
- --- uClibc-0.9.33.2/libc/string/generic/pagecopy.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/pagecopy.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file defines the macro:
-
- diff -Nur uClibc-0.9.33.2/libc/string/generic/rawmemchr.c uClibc/libc/string/generic/rawmemchr.c
- --- uClibc-0.9.33.2/libc/string/generic/rawmemchr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/rawmemchr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,9 +17,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strcat.c uClibc/libc/string/generic/strcat.c
- --- uClibc-0.9.33.2/libc/string/generic/strcat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strcat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include "memcopy.h"
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strchr.c uClibc/libc/string/generic/strchr.c
- --- uClibc-0.9.33.2/libc/string/generic/strchr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strchr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,9 +17,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strchrnul.c uClibc/libc/string/generic/strchrnul.c
- --- uClibc-0.9.33.2/libc/string/generic/strchrnul.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strchrnul.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,9 +17,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strcmp.c uClibc/libc/string/generic/strcmp.c
- --- uClibc-0.9.33.2/libc/string/generic/strcmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strcmp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strcpy.c uClibc/libc/string/generic/strcpy.c
- --- uClibc-0.9.33.2/libc/string/generic/strcpy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strcpy.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strcspn.c uClibc/libc/string/generic/strcspn.c
- --- uClibc-0.9.33.2/libc/string/generic/strcspn.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strcspn.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strlen.c uClibc/libc/string/generic/strlen.c
- --- uClibc-0.9.33.2/libc/string/generic/strlen.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strlen.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strncat.c uClibc/libc/string/generic/strncat.c
- --- uClibc-0.9.33.2/libc/string/generic/strncat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strncat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strncmp.c uClibc/libc/string/generic/strncmp.c
- --- uClibc-0.9.33.2/libc/string/generic/strncmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strncmp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include "memcopy.h"
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strncpy.c uClibc/libc/string/generic/strncpy.c
- --- uClibc-0.9.33.2/libc/string/generic/strncpy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strncpy.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include "memcopy.h"
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strnlen.c uClibc/libc/string/generic/strnlen.c
- --- uClibc-0.9.33.2/libc/string/generic/strnlen.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strnlen.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,9 +17,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strrchr.c uClibc/libc/string/generic/strrchr.c
- --- uClibc-0.9.33.2/libc/string/generic/strrchr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strrchr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strsep.c uClibc/libc/string/generic/strsep.c
- --- uClibc-0.9.33.2/libc/string/generic/strsep.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strsep.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strspn.c uClibc/libc/string/generic/strspn.c
- --- uClibc-0.9.33.2/libc/string/generic/strspn.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strspn.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strstr.c uClibc/libc/string/generic/strstr.c
- --- uClibc-0.9.33.2/libc/string/generic/strstr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strstr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * My personal strstr() implementation that beats most other algorithms.
- diff -Nur uClibc-0.9.33.2/libc/string/generic/strtok_r.c uClibc/libc/string/generic/strtok_r.c
- --- uClibc-0.9.33.2/libc/string/generic/strtok_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/generic/strtok_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/__glibc_strerror_r.c uClibc/libc/string/__glibc_strerror_r.c
- --- uClibc-0.9.33.2/libc/string/__glibc_strerror_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/__glibc_strerror_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,9 +5,13 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- +/* get rid of REDIRECT */
- +#define strerror_r __hide_strerror_r
- +
- #include <features.h>
- #include <string.h>
-
- +#undef strerror_r
-
- char *__glibc_strerror_r(int errnum, char *strerrbuf, size_t buflen)
- {
- @@ -16,3 +20,6 @@
- return strerrbuf;
- }
- libc_hidden_def(__glibc_strerror_r)
- +#if !defined __USE_XOPEN2K || defined __USE_GNU
- +strong_alias(__glibc_strerror_r,strerror_r)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/bcopy.S uClibc/libc/string/ia64/bcopy.S
- --- uClibc-0.9.33.2/libc/string/ia64/bcopy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/bcopy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -#include "sysdep.h"
- +#include <sysdep.h>
-
- #ifdef __UCLIBC_SUSV3_LEGACY__
-
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/bzero.S uClibc/libc/string/ia64/bzero.S
- --- uClibc-0.9.33.2/libc/string/ia64/bzero.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/bzero.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: dest
-
- @@ -32,7 +31,7 @@
- Since a stf.spill f0 can store 16B in one go, we use this instruction
- to get peak speed. */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
-
- #ifdef __UCLIBC_SUSV3_LEGACY__
-
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/memccpy.S uClibc/libc/string/ia64/memccpy.S
- --- uClibc-0.9.33.2/libc/string/ia64/memccpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/memccpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: a pointer to the next byte after char in dest or NULL
-
- @@ -31,7 +30,7 @@
- This implementation assumes that it is safe to do read ahead
- in the src block, without getting beyond its limit. */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define OP_T_THRES 16
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/memchr.S uClibc/libc/string/ia64/memchr.S
- --- uClibc-0.9.33.2/libc/string/ia64/memchr.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/memchr.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: the address of the first occurence of chr in str or NULL
-
- @@ -40,7 +39,7 @@
- All the loops in this function could have had the internal branch removed
- if br.ctop and br.cloop could be predicated :-(. */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define saved_pr r15
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/memcmp.S uClibc/libc/string/ia64/memcmp.S
- --- uClibc-0.9.33.2/libc/string/ia64/memcmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/memcmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: the result of the comparison
-
- @@ -33,7 +32,7 @@
-
- and all the mux1 instructions should be replaced by plain mov's. */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define OP_T_THRES 16
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/memcpy.S uClibc/libc/string/ia64/memcpy.S
- --- uClibc-0.9.33.2/libc/string/ia64/memcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: dest
-
- @@ -37,7 +36,7 @@
-
- #define USE_LFETCH
- #define USE_FLP
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define LFETCH_DIST 500
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/memmove.S uClibc/libc/string/ia64/memmove.S
- --- uClibc-0.9.33.2/libc/string/ia64/memmove.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/memmove.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: dest
-
- @@ -33,7 +32,7 @@
- sh1 must be computed using an extra instruction: sub sh1 = 64, sh1
- or the UM.be bit should be cleared at the beginning and set at the end. */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define OP_T_THRES 16
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/memset.S uClibc/libc/string/ia64/memset.S
- --- uClibc-0.9.33.2/libc/string/ia64/memset.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/memset.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: dest
-
- @@ -33,7 +32,7 @@
- Since a stf.spill f0 can store 16B in one go, we use this instruction
- to get peak speed when value = 0. */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define dest in0
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/softpipe.h uClibc/libc/string/ia64/softpipe.h
- --- uClibc-0.9.33.2/libc/string/ia64/softpipe.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/softpipe.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The latency of a memory load assumed by the assembly implementation
- of the mem and str functions. Since we don't have any clue about
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/strchr.S uClibc/libc/string/ia64/strchr.S
- --- uClibc-0.9.33.2/libc/string/ia64/strchr.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/strchr.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: the address of the first occurence of chr in str or NULL
-
- @@ -30,7 +29,7 @@
- This implementation assumes little endian mode. For big endian mode,
- the instruction czx1.r should be replaced by czx1.l. */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define saved_lc r18
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/strcmp.S uClibc/libc/string/ia64/strcmp.S
- --- uClibc-0.9.33.2/libc/string/ia64/strcmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/strcmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: the result of the comparison
-
- @@ -27,7 +26,7 @@
- Unlike memcmp(), this function is optimized for mismatches within the
- first few characters. */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define s1 in0
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/strcpy.S uClibc/libc/string/ia64/strcpy.S
- --- uClibc-0.9.33.2/libc/string/ia64/strcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/strcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: dest
-
- @@ -31,7 +30,7 @@
- shr.u tmp = r[0], sh2 // tmp = w1 >> sh2
- */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define saved_lc r15
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/strlen.S uClibc/libc/string/ia64/strlen.S
- --- uClibc-0.9.33.2/libc/string/ia64/strlen.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/strlen.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: the length of the input string
-
- @@ -33,7 +32,7 @@
- This implementation assumes little endian mode. For big endian mode,
- the instruction czx1.r should be replaced by czx1.l. */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define saved_lc r18
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/strncmp.S uClibc/libc/string/ia64/strncmp.S
- --- uClibc-0.9.33.2/libc/string/ia64/strncmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/strncmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: the result of the comparison
-
- @@ -28,7 +27,7 @@
- Unlike memcmp(), this function is optimized for mismatches within the
- first few characters. */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define s1 in0
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/strncpy.S uClibc/libc/string/ia64/strncpy.S
- --- uClibc-0.9.33.2/libc/string/ia64/strncpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/strncpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Return: dest
-
- @@ -29,7 +28,7 @@
- In this form, it assumes little endian mode.
- */
-
- -#include "sysdep.h"
- +#include <sysdep.h>
- #undef ret
-
- #define saved_lc r15
- diff -Nur uClibc-0.9.33.2/libc/string/ia64/sysdep.h uClibc/libc/string/ia64/sysdep.h
- --- uClibc-0.9.33.2/libc/string/ia64/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/ia64/sysdep.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,168 +0,0 @@
- -/* Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- - Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
- - Based on code originally written by David Mosberger-Tang
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#ifndef _LINUX_IA64_SYSDEP_H
- -#define _LINUX_IA64_SYSDEP_H 1
- -
- -#include <features.h>
- -#include <asm/unistd.h>
- -
- -#ifdef __ASSEMBLER__
- -
- -/* Macros to help writing .prologue directives in assembly code. */
- -#define ASM_UNW_PRLG_RP 0x8
- -#define ASM_UNW_PRLG_PFS 0x4
- -#define ASM_UNW_PRLG_PSP 0x2
- -#define ASM_UNW_PRLG_PR 0x1
- -#define ASM_UNW_PRLG_GRSAVE(ninputs) (32+(ninputs))
- -
- -#ifdef __STDC__
- -#define C_LABEL(name) name :
- -#else
- -#define C_LABEL(name) name/**/:
- -#endif
- -
- -#define CALL_MCOUNT
- -
- -#define ENTRY(name) \
- - .text; \
- - .align 32; \
- - .proc C_SYMBOL_NAME(name); \
- - .global C_SYMBOL_NAME(name); \
- - C_LABEL(name) \
- - CALL_MCOUNT
- -
- -#define LEAF(name) \
- - .text; \
- - .align 32; \
- - .proc C_SYMBOL_NAME(name); \
- - .global name; \
- - C_LABEL(name)
- -
- -/* Mark the end of function SYM. */
- -#undef END
- -#define END(sym) .endp C_SYMBOL_NAME(sym)
- -
- -/* For Linux we can use the system call table in the header file
- - /usr/include/asm/unistd.h
- - of the kernel. But these symbols do not follow the SYS_* syntax
- - so we have to redefine the `SYS_ify' macro here. */
- -#undef SYS_ify
- -#ifdef __STDC__
- -# define SYS_ify(syscall_name) __NR_##syscall_name
- -#else
- -# define SYS_ify(syscall_name) __NR_/**/syscall_name
- -#endif
- -
- -/* Linux uses a negative return value to indicate syscall errors, unlike
- - most Unices, which use the condition codes' carry flag.
- -
- - Since version 2.1 the return value of a system call might be negative
- - even if the call succeeded. E.g., the `lseek' system call might return
- - a large offset. Therefore we must not anymore test for < 0, but test
- - for a real error by making sure the value in %d0 is a real error
- - number. Linus said he will make sure the no syscall returns a value
- - in -1 .. -4095 as a valid result so we can savely test with -4095. */
- -
- -/* We don't want the label for the error handler to be visible in the symbol
- - table when we define it here. */
- -#define SYSCALL_ERROR_LABEL __syscall_error
- -
- -#undef PSEUDO
- -#define PSEUDO(name, syscall_name, args) \
- - ENTRY(name) \
- - DO_CALL (SYS_ify(syscall_name)); \
- - cmp.eq p6,p0=-1,r10; \
- -(p6) br.cond.spnt.few __syscall_error;
- -
- -#define DO_CALL_VIA_BREAK(num) \
- - mov r15=num; \
- - break __BREAK_SYSCALL
- -
- -#ifdef IA64_USE_NEW_STUB
- -# ifdef SHARED
- -# define DO_CALL(num) \
- - .prologue; \
- - adds r2 = SYSINFO_OFFSET, r13;; \
- - ld8 r2 = [r2]; \
- - .save ar.pfs, r11; \
- - mov r11 = ar.pfs;; \
- - .body; \
- - mov r15 = num; \
- - mov b7 = r2; \
- - br.call.sptk.many b6 = b7;; \
- - .restore sp; \
- - mov ar.pfs = r11; \
- - .prologue; \
- - .body
- -# else /* !SHARED */
- -# define DO_CALL(num) \
- - .prologue; \
- - mov r15 = num; \
- - movl r2 = _dl_sysinfo;; \
- - ld8 r2 = [r2]; \
- - .save ar.pfs, r11; \
- - mov r11 = ar.pfs;; \
- - .body; \
- - mov b7 = r2; \
- - br.call.sptk.many b6 = b7;; \
- - .restore sp; \
- - mov ar.pfs = r11; \
- - .prologue; \
- - .body
- -# endif
- -#else
- -# define DO_CALL(num) DO_CALL_VIA_BREAK(num)
- -#endif
- -
- -#undef PSEUDO_END
- -#define PSEUDO_END(name) .endp C_SYMBOL_NAME(name);
- -
- -#undef PSEUDO_NOERRNO
- -#define PSEUDO_NOERRNO(name, syscall_name, args) \
- - ENTRY(name) \
- - DO_CALL (SYS_ify(syscall_name));
- -
- -#undef PSEUDO_END_NOERRNO
- -#define PSEUDO_END_NOERRNO(name) .endp C_SYMBOL_NAME(name);
- -
- -#undef PSEUDO_ERRVAL
- -#define PSEUDO_ERRVAL(name, syscall_name, args) \
- - ENTRY(name) \
- - DO_CALL (SYS_ify(syscall_name)); \
- - cmp.eq p6,p0=-1,r10; \
- -(p6) mov r10=r8;
- -
- -
- -#undef PSEUDO_END_ERRVAL
- -#define PSEUDO_END_ERRVAL(name) .endp C_SYMBOL_NAME(name);
- -
- -#undef END
- -#define END(name) \
- - .size C_SYMBOL_NAME(name), . - C_SYMBOL_NAME(name) ; \
- - .endp C_SYMBOL_NAME(name)
- -
- -#define ret br.ret.sptk.few b0
- -#define ret_NOERRNO ret
- -#define ret_ERRVAL ret
- -
- -#endif /* not __ASSEMBLER__ */
- -
- -#endif /* linux/ia64/sysdep.h */
- diff -Nur uClibc-0.9.33.2/libc/string/memmove.c uClibc/libc/string/memmove.c
- --- uClibc-0.9.33.2/libc/string/memmove.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/memmove.c 2014-02-03 12:32:56.000000000 +0100
- @@ -34,5 +34,5 @@
- }
-
- #ifndef WANT_WIDE
- -libc_hidden_def(Wmemmove)
- +libc_hidden_def(memmove)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/string/metag/Makefile uClibc/libc/string/metag/Makefile
- --- uClibc-0.9.33.2/libc/string/metag/Makefile 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/metag/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,13 @@
- +# Makefile for uClibc
- +#
- +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
- +#
- +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +top_srcdir:=../../../
- +top_builddir:=../../../
- +all: objs
- +include $(top_builddir)Rules.mak
- +include ../Makefile.in
- +include $(top_srcdir)Makerules
- diff -Nur uClibc-0.9.33.2/libc/string/metag/memchr.S uClibc/libc/string/metag/memchr.S
- --- uClibc-0.9.33.2/libc/string/metag/memchr.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/metag/memchr.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,156 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +!
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- + .text
- + .global _memchr
- + .type _memchr,function
- +! D0Ar6 src
- +! D0Ar2 c
- +! D1Ar3 n
- +_memchr:
- + CMP D1Ar3, #0
- + BEQ $Lexit_fail
- + !! convert c to unsigned char
- + AND D0Ar2,D0Ar2,#0xff
- + MOV D0Ar6, D1Ar1
- + MOV D1Ar5, D0Ar6
- + !! test alignment
- + AND D1Ar5, D1Ar5, #7
- + CMP D1Ar5, #0
- + BNZ $Lunaligned_loop
- + !! length must be greater than or equal to 8 for aligned loop
- + CMP D1Ar3, #8
- + BGE $Laligned_setup
- +$Lunaligned_loop:
- + !! get 1 char from s
- + GETB D0Re0, [D0Ar6++]
- + !! increase alignment counter
- + ADD D1Ar5, D1Ar5, #1
- + !! decrement n
- + SUB D1Ar3, D1Ar3, #1
- + !! exit if we have a match
- + CMP D0Re0, D0Ar2
- + BZ $Lexit_success1
- + !! exit if we have hit the end of the string
- + CMP D1Ar3, #0
- + BZ $Lexit_fail
- + !! fall through if the buffer is aligned now
- + CMP D1Ar5, #8
- + BNE $Lunaligned_loop
- + !! fall through if there is more than 8 bytes left
- + CMP D1Ar3, #8
- + BLT $Lunaligned_loop
- +$Laligned_setup:
- + !! fill the c into 4 bytes
- + MOV D0Ar4, D0Ar2
- + LSL D0Ar4, D0Ar4, #8
- + ADD D0Ar4, D0Ar4, D0Ar2
- + LSL D0Ar4, D0Ar4, #8
- + ADD D0Ar4, D0Ar4, D0Ar2
- + LSL D0Ar4, D0Ar4, #8
- + ADD D0Ar4, D0Ar4, D0Ar2
- + !! divide n by 8
- + MOV D1Ar5, D1Ar3
- + LSR D1Ar5, D1Ar5, #3
- +$Laligned_loop:
- + !! get 8 chars from s
- + GETL D0Re0, D1Re0, [D0Ar6++]
- + !! decrement loop counter
- + SUB D1Ar5, D1Ar5, #1
- + !! test first 4 chars
- + XOR D0Re0, D0Re0, D0Ar4
- + !! test second 4 chars
- + MOV D0Ar2, D1Re0
- + XOR D1Re0, D0Ar2, D0Ar4
- + !! check for matches in the first 4 chars
- + MOV D0Ar2, D0Re0
- + ADDT D0Re0, D0Re0, #HI(0xfefefeff)
- + ADD D0Re0, D0Re0, #LO(0xfefefeff)
- + XOR D0Ar2, D0Ar2, #-1
- + AND D0Re0, D0Re0, D0Ar2
- + ANDMT D0Re0, D0Re0, #HI(0x80808080)
- + ANDMB D0Re0, D0Re0, #LO(0x80808080)
- + CMP D0Re0, #0
- + BNZ $Lmatch_word1
- + !! check for matches in the second 4 chars
- + MOV D1Ar1, D1Re0
- + ADDT D1Re0, D1Re0, #HI(0xfefefeff)
- + ADD D1Re0, D1Re0, #LO(0xfefefeff)
- + XOR D1Ar1, D1Ar1, #-1
- + AND D1Re0, D1Re0, D1Ar1
- + ANDMT D1Re0, D1Re0, #HI(0x80808080)
- + ANDMB D1Re0, D1Re0, #LO(0x80808080)
- + CMP D1Re0, #0
- + BNZ $Lmatch_word2
- + !! check if we have reached the end of the buffer
- + CMP D1Ar5, #0
- + BNE $Laligned_loop
- + !! exit if there are no chars left to check
- + AND D1Ar3, D1Ar3, #7
- + CMP D1Ar3, #0
- + BZ $Lexit_fail
- + !! recover c
- + AND D0Ar2, D0Ar4, #0xff
- +$Lbyte_loop:
- + !! get 1 char from s
- + GETB D0Re0, [D0Ar6++]
- + !! decrement n
- + SUB D1Ar3, D1Ar3, #1
- + !! exit if we have a match
- + CMP D0Re0, D0Ar2
- + BZ $Lexit_success1
- + !! fall through if we have run out of chars
- + CMP D1Ar3, #0
- + BNE $Lbyte_loop
- +
- +$Lexit_fail:
- + MOV D0Re0, #0
- + B $Lend
- +
- +$Lmatch_word1:
- + !! move the match word into D1Re0
- + MOV D1Re0, D0Re0
- + !! roll back the buffer pointer by 4 chars
- + SUB D0Ar6, D0Ar6, #4
- +$Lmatch_word2:
- + !! roll back the buffer pointer by 4 chars
- + SUB D0Ar6, D0Ar6, #4
- + !! exit if lowest byte is 0
- + MOV D1Ar1, D1Re0
- + AND D1Ar1, D1Ar1, #0xff
- + CMP D1Ar1, #0
- + BNE $Lexit_success2
- + !! advance buffer pointer to the next char
- + ADD D0Ar6, D0Ar6, #1
- + !! shift in the next lowest byte
- + LSR D1Re0, D1Re0, #8
- + !! exit if lowest byte is 0
- + MOV D1Ar1, D1Re0
- + AND D1Ar1, D1Ar1, #0xff
- + CMP D1Ar1, #0
- + BNE $Lexit_success2
- + !! advance buffer pointer to the next char
- + ADD D0Ar6, D0Ar6, #1
- + !! shift in the next lowest byte
- + LSR D1Re0, D1Re0, #8
- + !! exit if lowest byte is 0
- + MOV D1Ar1, D1Re0
- + AND D1Ar1, D1Ar1, #0xff
- + CMP D1Ar1, #0
- + BNE $Lexit_success2
- + !! the match must be in the last byte, exit
- + ADD D0Ar6, D0Ar6, #1
- + B $Lexit_success2
- +
- +$Lexit_success1:
- + SUB D0Ar6, D0Ar6, #1
- +$Lexit_success2:
- + !! return the buffer pointer
- + MOV D0Re0, D0Ar6
- +$Lend:
- + MOV PC, D1RtP
- +
- + .size _memchr,.-_memchr
- +
- +libc_hidden_def(memchr)
- diff -Nur uClibc-0.9.33.2/libc/string/metag/memcpy.S uClibc/libc/string/metag/memcpy.S
- --- uClibc-0.9.33.2/libc/string/metag/memcpy.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/metag/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,189 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- + .text
- + .global _memcpy
- + .type _memcpy,function
- +! D1Ar1 dst
- +! D0Ar2 src
- +! D1Ar3 cnt
- +! D0Re0 dst
- +_memcpy:
- + CMP D1Ar3, #16
- + MOV A1.2, D0Ar2 ! source pointer
- + MOV A0.2, D1Ar1 ! destination pointer
- + MOV A0.3, D1Ar1 ! for return value
- +! If there are less than 16 bytes to copy use the byte copy loop
- + BGE $Llong_copy
- +
- +$Lbyte_copy:
- +! Simply copy a byte at a time
- + SUBS TXRPT, D1Ar3, #1
- + BLT $Lend
- +$Lloop_byte:
- + GETB D1Re0, [A1.2++]
- + SETB [A0.2++], D1Re0
- + BR $Lloop_byte
- +
- +$Lend:
- +! Finally set return value and return
- + MOV D0Re0, A0.3
- + MOV PC, D1RtP
- +
- +$Llong_copy:
- + ANDS D1Ar5, D1Ar1, #7 ! test destination alignment
- + BZ $Laligned_dst
- +
- +! The destination address is not 8 byte aligned. We will copy bytes from
- +! the source to the destination until the remaining data has an 8 byte
- +! destination address alignment (i.e we should never copy more than 7
- +! bytes here).
- +$Lalign_dst:
- + GETB D0Re0, [A1.2++]
- + ADD D1Ar5, D1Ar5, #1 ! dest is aligned when D1Ar5 reaches #8
- + SUB D1Ar3, D1Ar3, #1 ! decrement count of remaining bytes
- + SETB [A0.2++], D0Re0
- + CMP D1Ar5, #8
- + BNE $Lalign_dst
- +
- +! We have at least (16 - 7) = 9 bytes to copy - calculate the number of 8 byte
- +! blocks, then jump to the unaligned copy loop or fall through to the aligned
- +! copy loop as appropriate.
- +$Laligned_dst:
- + MOV D0Ar4, A1.2
- + LSR D1Ar5, D1Ar3, #3 ! D1Ar5 = number of 8 byte blocks
- + ANDS D0Ar4, D0Ar4, #7 ! test source alignment
- + BNZ $Lunaligned_copy ! if unaligned, use unaligned copy loop
- +
- +! Both source and destination are 8 byte aligned - the easy case.
- +$Laligned_copy:
- + LSRS D1Ar5, D1Ar3, #5 ! D1Ar5 = number of 32 byte blocks
- + BZ $Lbyte_copy
- + SUB TXRPT, D1Ar5, #1
- +
- +$Laligned_32:
- + GETL D0Re0, D1Re0, [A1.2++]
- + GETL D0Ar6, D1Ar5, [A1.2++]
- + SETL [A0.2++], D0Re0, D1Re0
- + SETL [A0.2++], D0Ar6, D1Ar5
- + GETL D0Re0, D1Re0, [A1.2++]
- + GETL D0Ar6, D1Ar5, [A1.2++]
- + SETL [A0.2++], D0Re0, D1Re0
- + SETL [A0.2++], D0Ar6, D1Ar5
- + BR $Laligned_32
- +
- +! If there are any remaining bytes use the byte copy loop, otherwise we are done
- + ANDS D1Ar3, D1Ar3, #0x1f
- + BNZ $Lbyte_copy
- + B $Lend
- +
- +! The destination is 8 byte aligned but the source is not, and there are 8
- +! or more bytes to be copied.
- +$Lunaligned_copy:
- +! Adjust the source pointer (A1.2) to the 8 byte boundary before its
- +! current value
- + MOV D0Ar4, A1.2
- + MOV D0Ar6, A1.2
- + ANDMB D0Ar4, D0Ar4, #0xfff8
- + MOV A1.2, D0Ar4
- +! Save the number of bytes of mis-alignment in D0Ar4 for use later
- + SUBS D0Ar6, D0Ar6, D0Ar4
- + MOV D0Ar4, D0Ar6
- +! if there is no mis-alignment after all, use the aligned copy loop
- + BZ $Laligned_copy
- +
- +! prefetch 8 bytes
- + GETL D0Re0, D1Re0, [A1.2]
- +
- + SUB TXRPT, D1Ar5, #1
- +
- +! There are 3 mis-alignment cases to be considered. Less than 4 bytes, exactly
- +! 4 bytes, and more than 4 bytes.
- + CMP D0Ar6, #4
- + BLT $Lunaligned_1_2_3 ! use 1-3 byte mis-alignment loop
- + BZ $Lunaligned_4 ! use 4 byte mis-alignment loop
- +
- +! The mis-alignment is more than 4 bytes
- +$Lunaligned_5_6_7:
- + SUB D0Ar6, D0Ar6, #4
- +! Calculate the bit offsets required for the shift operations necesssary
- +! to align the data.
- +! D0Ar6 = bit offset, D1Ar5 = (32 - bit offset)
- + MULW D0Ar6, D0Ar6, #8
- + MOV D1Ar5, #32
- + SUB D1Ar5, D1Ar5, D0Ar6
- +! Move data 4 bytes before we enter the main loop
- + MOV D0Re0, D1Re0
- +
- +$Lloop_5_6_7:
- + GETL D0Ar2, D1Ar1, [++A1.2]
- +! form 64-bit data in D0Re0, D1Re0
- + LSR D0Re0, D0Re0, D0Ar6
- + MOV D1Re0, D0Ar2
- + LSL D1Re0, D1Re0, D1Ar5
- + ADD D0Re0, D0Re0, D1Re0
- +
- + LSR D0Ar2, D0Ar2, D0Ar6
- + LSL D1Re0, D1Ar1, D1Ar5
- + ADD D1Re0, D1Re0, D0Ar2
- +
- + SETL [A0.2++], D0Re0, D1Re0
- + MOV D0Re0, D1Ar1
- + BR $Lloop_5_6_7
- +
- + B $Lunaligned_end
- +
- +$Lunaligned_1_2_3:
- +! Calculate the bit offsets required for the shift operations necesssary
- +! to align the data.
- +! D0Ar6 = bit offset, D1Ar5 = (32 - bit offset)
- + MULW D0Ar6, D0Ar6, #8
- + MOV D1Ar5, #32
- + SUB D1Ar5, D1Ar5, D0Ar6
- +
- +$Lloop_1_2_3:
- +! form 64-bit data in D0Re0,D1Re0
- + LSR D0Re0, D0Re0, D0Ar6
- + LSL D1Ar1, D1Re0, D1Ar5
- + ADD D0Re0, D0Re0, D1Ar1
- + MOV D0Ar2, D1Re0
- + LSR D0FrT, D0Ar2, D0Ar6
- + GETL D0Ar2, D1Ar1, [++A1.2]
- +
- + MOV D1Re0, D0Ar2
- + LSL D1Re0, D1Re0, D1Ar5
- + ADD D1Re0, D1Re0, D0FrT
- +
- + SETL [A0.2++], D0Re0, D1Re0
- + MOV D0Re0, D0Ar2
- + MOV D1Re0, D1Ar1
- + BR $Lloop_1_2_3
- +
- + B $Lunaligned_end
- +
- +! The 4 byte mis-alignment case - this does not require any shifting, just a
- +! shuffling of registers.
- +$Lunaligned_4:
- + MOV D0Re0, D1Re0
- +$Lloop_4:
- + GETL D0Ar2, D1Ar1, [++A1.2]
- + MOV D1Re0, D0Ar2
- + SETL [A0.2++], D0Re0, D1Re0
- + MOV D0Re0, D1Ar1
- + BR $Lloop_4
- +
- +$Lunaligned_end:
- +! If there are no remaining bytes to copy, we are done.
- + ANDS D1Ar3, D1Ar3, #7
- + BZ $Lend
- +! Re-adjust the source pointer (A1.2) back to the actual (unaligned) byte
- +! address of the remaining bytes, and fall through to the byte copy loop.
- + MOV D0Ar6, A1.2
- + ADD D1Ar5, D0Ar4, D0Ar6
- + MOV A1.2, D1Ar5
- + B $Lbyte_copy
- +
- + .size _memcpy,.-_memcpy
- +
- +libc_hidden_def(memcpy)
- diff -Nur uClibc-0.9.33.2/libc/string/metag/memmove.S uClibc/libc/string/metag/memmove.S
- --- uClibc-0.9.33.2/libc/string/metag/memmove.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/metag/memmove.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,350 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +
- + .text
- + .global _memmove
- + .type _memmove,function
- +! D1Ar1 dst
- +! D0Ar2 src
- +! D1Ar3 cnt
- +! D0Re0 dst
- +_memmove:
- + CMP D1Ar3, #0
- + MOV D0Re0, D1Ar1
- + BZ $LEND2
- + MSETL [A0StP], D0.5, D0.6, D0.7
- + MOV D1Ar5, D0Ar2
- + CMP D1Ar1, D1Ar5
- + BLT $Lforwards_copy
- + SUB D0Ar4, D1Ar1, D1Ar3
- + ADD D0Ar4, D0Ar4, #1
- + CMP D0Ar2, D0Ar4
- + BLT $Lforwards_copy
- + ! should copy backwards
- + MOV D1Re0, D0Ar2
- + ! adjust pointer to the end of mem
- + ADD D0Ar2, D1Re0, D1Ar3
- + ADD D1Ar1, D1Ar1, D1Ar3
- +
- + MOV A1.2, D0Ar2
- + MOV A0.2, D1Ar1
- + CMP D1Ar3, #8
- + BLT $Lbbyte_loop
- +
- + MOV D0Ar4, D0Ar2
- + MOV D1Ar5, D1Ar1
- +
- + ! test 8 byte alignment
- + ANDS D1Ar5, D1Ar5, #7
- + BNE $Lbdest_unaligned
- +
- + ANDS D0Ar4, D0Ar4, #7
- + BNE $Lbsrc_unaligned
- +
- + LSR D1Ar5, D1Ar3, #3
- +
- +$Lbaligned_loop:
- + GETL D0Re0, D1Re0, [--A1.2]
- + SETL [--A0.2], D0Re0, D1Re0
- + SUBS D1Ar5, D1Ar5, #1
- + BNE $Lbaligned_loop
- +
- + ANDS D1Ar3, D1Ar3, #7
- + BZ $Lbbyte_loop_exit
- +$Lbbyte_loop:
- + GETB D1Re0, [--A1.2]
- + SETB [--A0.2], D1Re0
- + SUBS D1Ar3, D1Ar3, #1
- + BNE $Lbbyte_loop
- +$Lbbyte_loop_exit:
- + MOV D0Re0, A0.2
- +$LEND:
- + SUB A0.2, A0StP, #24
- + MGETL D0.5, D0.6, D0.7, [A0.2]
- + SUB A0StP, A0StP, #24
- +$LEND2:
- + MOV PC, D1RtP
- +
- +$Lbdest_unaligned:
- + GETB D0Re0, [--A1.2]
- + SETB [--A0.2], D0Re0
- + SUBS D1Ar5, D1Ar5, #1
- + SUB D1Ar3, D1Ar3, #1
- + BNE $Lbdest_unaligned
- + CMP D1Ar3, #8
- + BLT $Lbbyte_loop
- +$Lbsrc_unaligned:
- + LSR D1Ar5, D1Ar3, #3
- + ! adjust A1.2
- + MOV D0Ar4, A1.2
- + ! save original address
- + MOV D0Ar6, A1.2
- +
- + ADD D0Ar4, D0Ar4, #7
- + ANDMB D0Ar4, D0Ar4, #0xfff8
- + ! new address is the 8-byte aligned one above the original
- + MOV A1.2, D0Ar4
- +
- + ! A0.2 dst 64-bit is aligned
- + ! measure the gap size
- + SUB D0Ar6, D0Ar4, D0Ar6
- + MOVS D0Ar4, D0Ar6
- + ! keep this information for the later adjustment
- + ! both aligned
- + BZ $Lbaligned_loop
- +
- + ! prefetch
- + GETL D0Re0, D1Re0, [--A1.2]
- +
- + CMP D0Ar6, #4
- + BLT $Lbunaligned_1_2_3
- + ! 32-bit aligned
- + BZ $Lbaligned_4
- +
- + SUB D0Ar6, D0Ar6, #4
- + ! D1.6 stores the gap size in bits
- + MULW D1.6, D0Ar6, #8
- + MOV D0.6, #32
- + ! D0.6 stores the complement of the gap size
- + SUB D0.6, D0.6, D1.6
- +
- +$Lbunaligned_5_6_7:
- + GETL D0.7, D1.7, [--A1.2]
- + ! form 64-bit data in D0Re0, D1Re0
- + MOV D1Re0, D0Re0
- + ! D1Re0 << gap-size
- + LSL D1Re0, D1Re0, D1.6
- + MOV D0Re0, D1.7
- + ! D0Re0 >> complement
- + LSR D0Re0, D0Re0, D0.6
- + MOV D1.5, D0Re0
- + ! combine the both
- + ADD D1Re0, D1Re0, D1.5
- +
- + MOV D1.5, D1.7
- + LSL D1.5, D1.5, D1.6
- + MOV D0Re0, D0.7
- + LSR D0Re0, D0Re0, D0.6
- + MOV D0.5, D1.5
- + ADD D0Re0, D0Re0, D0.5
- +
- + SETL [--A0.2], D0Re0, D1Re0
- + MOV D0Re0, D0.7
- + MOV D1Re0, D1.7
- + SUBS D1Ar5, D1Ar5, #1
- + BNE $Lbunaligned_5_6_7
- +
- + ANDS D1Ar3, D1Ar3, #7
- + BZ $Lbbyte_loop_exit
- + ! Adjust A1.2
- + ! A1.2 <- A1.2 +8 - gapsize
- + ADD A1.2, A1.2, #8
- + SUB A1.2, A1.2, D0Ar4
- + B $Lbbyte_loop
- +
- +$Lbunaligned_1_2_3:
- + MULW D1.6, D0Ar6, #8
- + MOV D0.6, #32
- + SUB D0.6, D0.6, D1.6
- +
- +$Lbunaligned_1_2_3_loop:
- + GETL D0.7, D1.7, [--A1.2]
- + ! form 64-bit data in D0Re0, D1Re0
- + LSL D1Re0, D1Re0, D1.6
- + ! save D0Re0 for later use
- + MOV D0.5, D0Re0
- + LSR D0Re0, D0Re0, D0.6
- + MOV D1.5, D0Re0
- + ADD D1Re0, D1Re0, D1.5
- +
- + ! orignal data in D0Re0
- + MOV D1.5, D0.5
- + LSL D1.5, D1.5, D1.6
- + MOV D0Re0, D1.7
- + LSR D0Re0, D0Re0, D0.6
- + MOV D0.5, D1.5
- + ADD D0Re0, D0Re0, D0.5
- +
- + SETL [--A0.2], D0Re0, D1Re0
- + MOV D0Re0, D0.7
- + MOV D1Re0, D1.7
- + SUBS D1Ar5, D1Ar5, #1
- + BNE $Lbunaligned_1_2_3_loop
- +
- + ANDS D1Ar3, D1Ar3, #7
- + BZ $Lbbyte_loop_exit
- + ! Adjust A1.2
- + ADD A1.2, A1.2, #8
- + SUB A1.2, A1.2, D0Ar4
- + B $Lbbyte_loop
- +
- +$Lbaligned_4:
- + GETL D0.7, D1.7, [--A1.2]
- + MOV D1Re0, D0Re0
- + MOV D0Re0, D1.7
- + SETL [--A0.2], D0Re0, D1Re0
- + MOV D0Re0, D0.7
- + MOV D1Re0, D1.7
- + SUBS D1Ar5, D1Ar5, #1
- + BNE $Lbaligned_4
- + ANDS D1Ar3, D1Ar3, #7
- + BZ $Lbbyte_loop_exit
- + ! Adjust A1.2
- + ADD A1.2, A1.2, #8
- + SUB A1.2, A1.2, D0Ar4
- + B $Lbbyte_loop
- +
- +$Lforwards_copy:
- + MOV A1.2, D0Ar2
- + MOV A0.2, D1Ar1
- + CMP D1Ar3, #8
- + BLT $Lfbyte_loop
- +
- + MOV D0Ar4, D0Ar2
- + MOV D1Ar5, D1Ar1
- +
- + ANDS D1Ar5, D1Ar5, #7
- + BNE $Lfdest_unaligned
- +
- + ANDS D0Ar4, D0Ar4, #7
- + BNE $Lfsrc_unaligned
- +
- + LSR D1Ar5, D1Ar3, #3
- +
- +$Lfaligned_loop:
- + GETL D0Re0, D1Re0, [A1.2++]
- + SUBS D1Ar5, D1Ar5, #1
- + SETL [A0.2++], D0Re0, D1Re0
- + BNE $Lfaligned_loop
- +
- + ANDS D1Ar3, D1Ar3, #7
- + BZ $Lfbyte_loop_exit
- +$Lfbyte_loop:
- + GETB D1Re0, [A1.2++]
- + SETB [A0.2++], D1Re0
- + SUBS D1Ar3, D1Ar3, #1
- + BNE $Lfbyte_loop
- +$Lfbyte_loop_exit:
- + MOV D0Re0, D1Ar1
- + B $LEND
- +
- +$Lfdest_unaligned:
- + GETB D0Re0, [A1.2++]
- + ADD D1Ar5, D1Ar5, #1
- + SUB D1Ar3, D1Ar3, #1
- + SETB [A0.2++], D0Re0
- + CMP D1Ar5, #8
- + BNE $Lfdest_unaligned
- + CMP D1Ar3, #8
- + BLT $Lfbyte_loop
- +$Lfsrc_unaligned:
- + ! adjust A1.2
- + LSR D1Ar5, D1Ar3, #3
- +
- + MOV D0Ar4, A1.2
- + MOV D0Ar6, A1.2
- + ANDMB D0Ar4, D0Ar4, #0xfff8
- + MOV A1.2, D0Ar4
- +
- + ! A0.2 dst 64-bit is aligned
- + SUB D0Ar6, D0Ar6, D0Ar4
- + ! keep the information for the later adjustment
- + MOVS D0Ar4, D0Ar6
- +
- + ! both aligned
- + BZ $Lfaligned_loop
- +
- + ! prefetch
- + GETL D0Re0, D1Re0, [A1.2]
- +
- + CMP D0Ar6, #4
- + BLT $Lfunaligned_1_2_3
- + BZ $Lfaligned_4
- +
- + SUB D0Ar6, D0Ar6, #4
- + MULW D0.6, D0Ar6, #8
- + MOV D1.6, #32
- + SUB D1.6, D1.6, D0.6
- +
- +$Lfunaligned_5_6_7:
- + GETL D0.7, D1.7, [++A1.2]
- + ! form 64-bit data in D0Re0, D1Re0
- + MOV D0Re0, D1Re0
- + LSR D0Re0, D0Re0, D0.6
- + MOV D1Re0, D0.7
- + LSL D1Re0, D1Re0, D1.6
- + MOV D0.5, D1Re0
- + ADD D0Re0, D0Re0, D0.5
- +
- + MOV D0.5, D0.7
- + LSR D0.5, D0.5, D0.6
- + MOV D1Re0, D1.7
- + LSL D1Re0, D1Re0, D1.6
- + MOV D1.5, D0.5
- + ADD D1Re0, D1Re0, D1.5
- +
- + SETL [A0.2++], D0Re0, D1Re0
- + MOV D0Re0, D0.7
- + MOV D1Re0, D1.7
- + SUBS D1Ar5, D1Ar5, #1
- + BNE $Lfunaligned_5_6_7
- +
- + ANDS D1Ar3, D1Ar3, #7
- + BZ $Lfbyte_loop_exit
- + ! Adjust A1.2
- + ADD A1.2, A1.2, D0Ar4
- + B $Lfbyte_loop
- +
- +$Lfunaligned_1_2_3:
- + MULW D0.6, D0Ar6, #8
- + MOV D1.6, #32
- + SUB D1.6, D1.6, D0.6
- +
- +$Lfunaligned_1_2_3_loop:
- + GETL D0.7, D1.7, [++A1.2]
- + ! form 64-bit data in D0Re0, D1Re0
- + LSR D0Re0, D0Re0, D0.6
- + MOV D1.5, D1Re0
- + LSL D1Re0, D1Re0, D1.6
- + MOV D0.5, D1Re0
- + ADD D0Re0, D0Re0, D0.5
- +
- + MOV D0.5, D1.5
- + LSR D0.5, D0.5, D0.6
- + MOV D1Re0, D0.7
- + LSL D1Re0, D1Re0, D1.6
- + MOV D1.5, D0.5
- + ADD D1Re0, D1Re0, D1.5
- +
- + SETL [A0.2++], D0Re0, D1Re0
- + MOV D0Re0, D0.7
- + MOV D1Re0, D1.7
- + SUBS D1Ar5, D1Ar5, #1
- + BNE $Lfunaligned_1_2_3_loop
- +
- + ANDS D1Ar3, D1Ar3, #7
- + BZ $Lfbyte_loop_exit
- + ! Adjust A1.2
- + ADD A1.2, A1.2, D0Ar4
- + B $Lfbyte_loop
- +
- +$Lfaligned_4:
- + GETL D0.7, D1.7, [++A1.2]
- + MOV D0Re0, D1Re0
- + MOV D1Re0, D0.7
- + SETL [A0.2++], D0Re0, D1Re0
- + MOV D0Re0, D0.7
- + MOV D1Re0, D1.7
- + SUBS D1Ar5, D1Ar5, #1
- + BNE $Lfaligned_4
- + ANDS D1Ar3, D1Ar3, #7
- + BZ $Lfbyte_loop_exit
- + ! Adjust A1.2
- + ADD A1.2, A1.2, D0Ar4
- + B $Lfbyte_loop
- +
- + .size _memmove,.-_memmove
- +
- +libc_hidden_def(memmove)
- diff -Nur uClibc-0.9.33.2/libc/string/metag/memset.S uClibc/libc/string/metag/memset.S
- --- uClibc-0.9.33.2/libc/string/metag/memset.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/metag/memset.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,90 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +
- + .text
- + .global _memset
- + .type _memset,function
- +! D1Ar1 dst
- +! D0Ar2 c
- +! D1Ar3 cnt
- +! D0Re0 dst
- +_memset:
- + AND D0Ar2,D0Ar2,#0xFF ! Ensure a byte input value
- + MULW D0Ar2,D0Ar2,#0x0101 ! Duplicate byte value into 0-15
- + ANDS D0Ar4,D1Ar1,#7 ! Extract bottom LSBs of dst
- + LSL D0Re0,D0Ar2,#16 ! Duplicate byte value into 16-31
- + ADD A0.2,D0Ar2,D0Re0 ! Duplicate byte value into 4 (A0.2)
- + MOV D0Re0,D1Ar1 ! Return dst
- + BZ $LLongStub ! if start address is aligned
- + ! start address is not aligned on an 8 byte boundary, so we
- + ! need the number of bytes up to the next 8 byte address
- + ! boundary, or the length of the string if less than 8, in D1Ar5
- + MOV D0Ar2,#8 ! Need 8 - N in D1Ar5 ...
- + SUB D1Ar5,D0Ar2,D0Ar4 ! ... subtract N
- + CMP D1Ar3,D1Ar5
- + MOVMI D1Ar5,D1Ar3
- + B $LByteStub ! dst is mis-aligned, do $LByteStub
- +
- +!
- +! Preamble to LongLoop which generates 4*8 bytes per interation (5 cycles)
- +!
- +$LLongStub:
- + LSRS D0Ar2,D1Ar3,#5
- + AND D1Ar3,D1Ar3,#0x1F
- + MOV A1.2,A0.2
- + BEQ $LLongishStub
- + SUB TXRPT,D0Ar2,#1
- + CMP D1Ar3,#0
- +$LLongLoop:
- + SETL [D1Ar1++],A0.2,A1.2
- + SETL [D1Ar1++],A0.2,A1.2
- + SETL [D1Ar1++],A0.2,A1.2
- + SETL [D1Ar1++],A0.2,A1.2
- + BR $LLongLoop
- + BZ $Lexit
- +!
- +! Preamble to LongishLoop which generates 1*8 bytes per interation (2 cycles)
- +!
- +$LLongishStub:
- + LSRS D0Ar2,D1Ar3,#3
- + AND D1Ar3,D1Ar3,#0x7
- + MOV D1Ar5,D1Ar3
- + BEQ $LByteStub
- + SUB TXRPT,D0Ar2,#1
- + CMP D1Ar3,#0
- +$LLongishLoop:
- + SETL [D1Ar1++],A0.2,A1.2
- + BR $LLongishLoop
- + BZ $Lexit
- +!
- +! This does a byte structured burst of up to 7 bytes
- +!
- +! D1Ar1 should point to the location required
- +! D1Ar3 should be the remaining total byte count
- +! D1Ar5 should be burst size (<= D1Ar3)
- +!
- +$LByteStub:
- + SUBS D1Ar3,D1Ar3,D1Ar5 ! Reduce count
- + ADD D1Ar1,D1Ar1,D1Ar5 ! Advance pointer to end of area
- + MULW D1Ar5,D1Ar5,#4 ! Scale to (1*4), (2*4), (3*4)
- + SUB D1Ar5,D1Ar5,#(8*4) ! Rebase to -(7*4), -(6*4), -(5*4), ...
- + MOV A1.2,D1Ar5
- + SUB PC,CPC1,A1.2 ! Jump into table below
- + SETB [D1Ar1+#(-7)],A0.2
- + SETB [D1Ar1+#(-6)],A0.2
- + SETB [D1Ar1+#(-5)],A0.2
- + SETB [D1Ar1+#(-4)],A0.2
- + SETB [D1Ar1+#(-3)],A0.2
- + SETB [D1Ar1+#(-2)],A0.2
- + SETB [D1Ar1+#(-1)],A0.2
- +!
- +! Return if all data has been output, otherwise do $LLongStub
- +!
- + BNZ $LLongStub
- +$Lexit:
- + MOV PC,D1RtP
- + .size _memset,.-_memset
- +
- +libc_hidden_def(memset)
- diff -Nur uClibc-0.9.33.2/libc/string/metag/strchr.S uClibc/libc/string/metag/strchr.S
- --- uClibc-0.9.33.2/libc/string/metag/strchr.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/metag/strchr.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,167 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +
- +#include <features.h>
- +
- + .text
- + .global _strchr
- + .type _strchr, function
- +! D1Ar1 src
- +! D0Ar2 c
- +_strchr:
- + AND D0Ar2,D0Ar2,#0xff ! Drop all but 8 bits of c
- + MOV D1Ar5, D1Ar1 ! Copy src to D1Ar5
- + AND D1Ar5, D1Ar5, #7 ! Check 64 bit alignment
- + CMP D1Ar5, #0
- + BZ $Laligned64bit ! Jump to 64 bit aligned strchr
- +$Lalign64bit:
- + GETB D0Re0, [D1Ar1++] ! Get the next character
- + ADD D1Ar5, D1Ar5, #1 ! Increment alignment counter
- + CMP D0Re0, D0Ar2 ! Is the char c
- + BZ $Lcharatprevious ! If so exit returning position
- + CMP D0Re0, #0 ! End of string?
- + BZ $Lnotfound ! If so exit
- + CMP D1Ar5, #8 ! Are we aligned 64bit yet?
- + BNZ $Lalign64bit ! If not keep aligning
- +$Laligned64bit: ! src is 64bit aligned
- + MOV D0Ar4, D0Ar2 ! put c into D0Ar4
- + LSL D0Ar4, D0Ar4, #8 ! Shift it up
- + ADD D0Ar4, D0Ar4, D0Ar2 ! another c
- + LSL D0Ar4, D0Ar4, #8 ! shift
- + ADD D0Ar4, D0Ar4, D0Ar2 ! another c
- + LSL D0Ar4, D0Ar4, #8 ! shift
- + ADD D0Ar4, D0Ar4, D0Ar2 ! 4 copies of c
- +$Lcheck8bytes:
- + GETL D0Re0, D1Re0, [D1Ar1++] ! grab 16 bytes
- + MOV A0.3, D0Re0 ! save for later use
- + ! first word
- + ! check for \0
- + MOV D0Ar2, D0Re0 ! D0Ar2 is a scratch now
- + ADDT D0Re0, D0Re0, #HI(0xfefefeff) ! Do 4 1-byte compares
- + ADD D0Re0, D0Re0, #LO(0xfefefeff)
- + XOR D0Ar2, D0Ar2, #-1
- + AND D0Re0, D0Re0, D0Ar2
- + ANDMT D0Re0, D0Re0, #HI(0x80808080)
- + ANDMB D0Re0, D0Re0, #LO(0x80808080)
- + CMP D0Re0, #0
- + BNZ $Lnullinword1 ! found \0 (or c if c==\0)
- +
- + ! Check for c
- + MOV D0Re0, A0.3 ! restore the first word
- + XOR D0Re0, D0Re0, D0Ar4
- + MOV D0Ar2, D0Re0 ! DO 4 1-byte compares
- + ADDT D0Re0, D0Re0, #HI(0xfefefeff)
- + ADD D0Re0, D0Re0, #LO(0xfefefeff)
- + XOR D0Ar2, D0Ar2, #-1
- + AND D0Re0, D0Re0, D0Ar2
- + ANDMT D0Re0, D0Re0, #HI(0x80808080)
- + ANDMB D0Re0, D0Re0, #LO(0x80808080)
- + CMP D0Re0, #0
- + BNZ $Lcharinword1 ! found c
- +
- + ! second word
- + ! check for \0
- + MOV A0.3, D1Re0 ! save for later use
- + MOV D1Ar3, D1Re0
- + ADDT D1Re0, D1Re0, #HI(0xfefefeff) ! Do 4 1-byte compares
- + ADD D1Re0, D1Re0, #LO(0xfefefeff)
- + XOR D1Ar3, D1Ar3, #-1
- + AND D1Re0, D1Re0, D1Ar3
- + ANDMT D1Re0, D1Re0, #HI(0x80808080)
- + ANDMB D1Re0, D1Re0, #LO(0x80808080)
- + CMP D1Re0, #0
- + BNZ $Lnullinword2 ! Found \0 (or c if c==\0)
- +
- + MOV D0.4, A0.3 ! restore the second word
- + XOR D1Re0, D0.4, D0Ar4 ! test c
- +
- + MOV D1Ar3, D1Re0
- + ADDT D1Re0, D1Re0, #HI(0xfefefeff) ! Do 4 1-byte compares
- + ADD D1Re0, D1Re0, #LO(0xfefefeff)
- + XOR D1Ar3, D1Ar3, #-1
- + AND D1Re0, D1Re0, D1Ar3
- + ANDMT D1Re0, D1Re0, #HI(0x80808080)
- + ANDMB D1Re0, D1Re0, #LO(0x80808080)
- + CMP D1Re0, #0
- + BNZ $Lcharinword2 ! found c
- +
- + B $Lcheck8bytes ! Keep checking
- +
- +$Lnullinword1: ! found \0 somewhere, check for c too
- + SUB D1Ar1, D1Ar1, #4
- +$Lnullinword2:
- + SUB D1Ar1, D1Ar1, #4
- + AND D0Ar2, D0Ar4, #0xff ! restore c
- + MOV D0Re0, A0.3 ! restore the word
- + MOV D0.4, D0Re0 ! for shifting later
- + AND D0Re0, D0Re0, #0xff ! take first byte of word
- + CMP D0Re0, D0Ar2
- + BZ $Lcharatcurrent ! found c
- + CMP D0Re0, #0!
- + BZ $Lnotfound ! found \0
- +
- + ADD D1Ar1, D1Ar1, #1
- + LSR D0.4, D0.4, #8
- + MOV D0Re0, D0.4
- + AND D0Re0, D0Re0, #0xff ! take second byte of word
- + CMP D0Re0, D0Ar2
- + BZ $Lcharatcurrent ! found c
- + CMP D0Re0, #0
- + BZ $Lnotfound ! found \0
- +
- + ADD D1Ar1, D1Ar1, #1
- + LSR D0.4, D0.4, #8
- + MOV D0Re0, D0.4
- + AND D0Re0, D0Re0, #0xff ! take third byte of word
- + CMP D0Re0, D0Ar2
- + BZ $Lcharatcurrent ! found c
- + CMP D0Re0, #0
- + BZ $Lnotfound ! found \0
- +
- + ADD D1Ar1, D1Ar1, #1 ! move to 4th byte
- + CMP D0Ar2, #0 ! If c was \0
- + BZ $Lcharatcurrent ! c has been found!
- +
- +$Lnotfound:
- + MOV D0Re0, #0 ! End of string c not found
- + B $Lend
- +
- +$Lcharinword1: ! found c in first word
- + MOV D1Re0, D0Re0
- + SUB D1Ar1, D1Ar1, #4
- +$Lcharinword2: ! found c in second word
- + SUB D1Ar1, D1Ar1, #4
- +
- + AND D0Re0, D1Re0, #0xff ! First byte
- + CMP D0Re0, #0 ! Test c (zero indicates c due
- + ! to the 4 1-byte compare code)
- + BNE $Lcharatcurrent
- + ADD D1Ar1, D1Ar1, #1
- +
- + LSR D1Re0, D1Re0, #8
- + AND D0Re0, D1Re0, #0xff ! Second byte
- + CMP D0Re0, #0 ! Test c (indicated by zero)
- + BNE $Lcharatcurrent
- + ADD D1Ar1, D1Ar1, #1
- +
- + LSR D1Re0, D1Re0, #8
- + AND D0Re0, D1Re0, #0xff ! Third byte
- + CMP D0Re0, #0 ! Test c (indicated by zero)
- + BNE $Lcharatcurrent
- + ADD D1Ar1, D1Ar1, #1 ! Must be the fourth byte
- + B $Lcharatcurrent
- +
- +$Lcharatprevious:
- + SUB D1Ar1, D1Ar1, #1 ! Fix-up pointer
- +$Lcharatcurrent:
- + MOV D0Re0, D1Ar1 ! Return the string pointer
- +$Lend:
- + MOV PC, D1RtP
- + .size _strchr,.-_strchr
- +
- +libc_hidden_def(strchr)
- +#ifdef __UCLIBC_SUSV3_LEGACY__
- +strong_alias(strchr,index)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/string/metag/strcmp.S uClibc/libc/string/metag/strcmp.S
- --- uClibc-0.9.33.2/libc/string/metag/strcmp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/metag/strcmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,65 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +
- +#include <features.h>
- +
- + .text
- + .global _strcmp
- + .type _strcmp,function
- +!D1Ar1 s1
- +!D0Ar2 s2
- +_strcmp:
- + TST D1Ar1,#3
- + TSTZ D0Ar2,#3
- + MOVT D1Re0,#0x0101
- + ADD D1Re0,D1Re0,#0x0101
- + BNZ $Lstrcmp_slow
- + GETD D1Ar3,[D1Ar1+#4++] ! Load 32-bits from s1
- + GETD D1Ar5,[D0Ar2+#4++] ! Load 32-bits from s2
- + LSL D0FrT,D1Re0,#7 ! D0FrT = 0x80808080
- +$Lstrcmp4_loop:
- + SUB D0Re0,D1Ar3,D1Re0 ! D1Re0 = 0x01010101
- + MOV D0Ar6,D1Ar3
- + SUBS D0Ar4,D1Ar3,D1Ar5 ! Calculate difference
- + XOR D0Ar6,D0Ar6,#-1
- + GETD D1Ar3,[D1Ar1+#4++] ! Load 32-bits from s1
- + AND D0Re0,D0Re0,D0Ar6
- + ANDSZ D0Ar6,D0Re0,D0FrT ! D0FrT = 0x80808080
- + GETD D1Ar5,[D0Ar2+#4++] ! Load 32-bits from s2
- + BZ $Lstrcmp4_loop
- + AND D0Ar6, D0Re0, D0FrT ! D0FrT = 0x80808080
- +!
- +! Either they are different or they both contain a NULL + junk
- +!
- +$Lstrcmp4_end:
- + LSLS D0Re0,D0Ar4,#24 ! Was Byte[0] the same?
- + LSLSZ D0Ar2,D0Ar6,#24 ! Yes: AND they where not zero?
- + LSLSZ D0Re0,D0Ar4,#16 ! Yes: Was Byte[1] the same?
- + LSLSZ D0Ar2,D0Ar6,#16 ! Yes: AND they where not zero?
- + LSLSZ D0Re0,D0Ar4,#8 ! Tes: Was Byte[2] the same?
- + LSLSZ D0Ar2,D0Ar6,#8 ! Yes: AND they where not zero?
- + MOVZ D0Re0,D0Ar4 ! Yes: Must by Byte[3] thats the result
- + ASR D0Re0,D0Re0,#24 ! Sign extend result to integer
- + MOV PC,D1RtP
- +!
- +! Misaligned case, byte at a time
- +!
- +$Lstrcmp_slow:
- + GETB D1Ar3,[D1Ar1++] ! Load char from s1
- + GETB D1Ar5,[D0Ar2++] ! Load char from s2
- + CMP D1Ar3,#1 ! Null -> C and NZ, rest -> NC (\1->Z)
- + CMPNC D1Ar3,D1Ar5 ! NOT Null: Same -> Z, else -> NZ
- + BZ $Lstrcmp_slow ! NOT Null and Same: Loop
- + SUB D0Re0,D1Ar3,D1Ar5 ! Generate result
- + MOV PC,D1RtP
- +
- + .size _strcmp,.-_strcmp
- +
- +
- +libc_hidden_def(strcmp)
- +#ifndef __UCLIBC_HAS_LOCALE__
- +strong_alias(strcmp,strcoll)
- +libc_hidden_def(strcoll)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/string/metag/strcpy.S uClibc/libc/string/metag/strcpy.S
- --- uClibc-0.9.33.2/libc/string/metag/strcpy.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/string/metag/strcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,94 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +
- + .text
- + .global _strcpy
- + .type _strcpy,function
- +! D1Ar1 dst
- +! D0Ar2 src
- +
- +_strcpy:
- + MOV A1.2, D1Ar1
- +
- + ! test 4 byte alignment of src
- + ANDS D0Ar4, D0Ar2, #3
- + BNZ $Lbyteloop
- +
- + ! test 4 byte alignment of dest
- + ANDS D1Ar5, D1Ar1, #3
- + BNZ $Lbyteloop
- +
- + ! load mask values for aligned loops
- + MOVT D1Ar3, #HI(0xfefefeff)
- + ADD D1Ar3, D1Ar3, #LO(0xfefefeff)
- + MOVT D0FrT, #HI(0x80808080)
- + ADD D0FrT, D0FrT, #LO(0x80808080)
- +
- + ! test 8 byte alignment of src
- + ANDS D0Ar4, D0Ar2, #7
- + BNZ $Lwordloop
- +
- + ! test 8 byte alignment of dest
- + ANDS D1Ar5, D1Ar1, #7
- + BNZ $Lwordloop
- +
- +$L8byteloop:
- + GETL D1Ar5, D0Ar6, [D0Ar2++]
- + MOV D1Re0, D1Ar5
- + MOV D0Re0, D1Ar5
- + ADD D1Re0, D1Re0, D1Ar3
- + XOR D0Re0, D0Re0, #-1
- + AND D1Re0, D1Re0, D0Re0
- + ANDS D1Re0, D1Re0, D0FrT
- + BNZ $Lnullfound ! NULL in first word
- +
- + MOV D1Re0, D0Ar6
- + MOV D0Re0, D0Ar6
- + ADD D1Re0, D1Re0, D1Ar3
- + XOR D0Re0, D0Re0, #-1
- + AND D1Re0, D1Re0, D0Re0
- + ANDS D1Re0, D1Re0, D0FrT
- + BNZ $Lnullfound2 ! NULL in the second word
- +
- + SETL [A1.2++], D1Ar5, D0Ar6
- + B $L8byteloop
- +
- +$Lwordloop:
- + GETD D0Ar6, [D0Ar2++]
- + MOV D1Re0, D0Ar6
- + MOV D0Re0, D0Ar6
- + ADD D1Re0, D1Re0, D1Ar3
- + XOR D0Re0, D0Re0, #-1
- + AND D1Re0, D1Re0, D0Re0
- + ANDS D1Re0, D1Re0, D0FrT
- + MOV D1Ar5, D0Ar6
- + BNZ $Lnullfound
- + SETD [A1.2++], D0Ar6
- + B $Lwordloop
- +
- +$Lnullfound2:
- + SETD [A1.2++], D1Ar5
- + MOV D1Ar5, D0Ar6
- +
- +$Lnullfound:
- + SETB [A1.2++], D1Ar5
- + ANDS D0Ar6, D1Ar5, #0xff
- + LSR D1Ar5, D1Ar5, #8
- + BNZ $Lnullfound
- + B $Lend
- +
- +$Lbyteloop:
- + GETB D0Ar6, [D0Ar2++]
- + SETB [A1.2++], D0Ar6
- + CMP D0Ar6, #0
- + BNZ $Lbyteloop
- +
- +$Lend:
- + MOV D0Re0, D1Ar1
- + MOV PC, D1RtP
- +
- + .size _strcpy,.-_strcpy
- +
- +libc_hidden_def(strcpy)
- diff -Nur uClibc-0.9.33.2/libc/string/microblaze/memcpy.S uClibc/libc/string/microblaze/memcpy.S
- --- uClibc-0.9.33.2/libc/string/microblaze/memcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/microblaze/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -34,6 +34,14 @@
- .type memcpy, @function
- .ent memcpy
-
- +#ifdef __MICROBLAZEEL__
- +# define BSLLI bsrli
- +# define BSRLI bslli
- +#else
- +# define BSLLI bslli
- +# define BSRLI bsrli
- +#endif
- +
- memcpy:
- fast_memcpy_ascending:
- /* move d to return register as value of function */
- @@ -85,48 +93,48 @@
- beqi r9, a_block_u2 /* t1 was 2 => 2 byte offset */
-
- a_block_u3:
- - bslli r11, r11, 24 /* h = h << 24 */
- + BSLLI r11, r11, 24 /* h = h << 24 */
- a_bu3_loop:
- lwi r12, r8, 4 /* v = *(as + 4) */
- - bsrli r9, r12, 8 /* t1 = v >> 8 */
- + BSRLI r9, r12, 8 /* t1 = v >> 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 0 /* *(d + 0) = t1 */
- - bslli r11, r12, 24 /* h = v << 24 */
- + BSLLI r11, r12, 24 /* h = v << 24 */
- lwi r12, r8, 8 /* v = *(as + 8) */
- - bsrli r9, r12, 8 /* t1 = v >> 8 */
- + BSRLI r9, r12, 8 /* t1 = v >> 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 4 /* *(d + 4) = t1 */
- - bslli r11, r12, 24 /* h = v << 24 */
- + BSLLI r11, r12, 24 /* h = v << 24 */
- lwi r12, r8, 12 /* v = *(as + 12) */
- - bsrli r9, r12, 8 /* t1 = v >> 8 */
- + BSRLI r9, r12, 8 /* t1 = v >> 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 8 /* *(d + 8) = t1 */
- - bslli r11, r12, 24 /* h = v << 24 */
- + BSLLI r11, r12, 24 /* h = v << 24 */
- lwi r12, r8, 16 /* v = *(as + 16) */
- - bsrli r9, r12, 8 /* t1 = v >> 8 */
- + BSRLI r9, r12, 8 /* t1 = v >> 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 12 /* *(d + 12) = t1 */
- - bslli r11, r12, 24 /* h = v << 24 */
- + BSLLI r11, r12, 24 /* h = v << 24 */
- lwi r12, r8, 20 /* v = *(as + 20) */
- - bsrli r9, r12, 8 /* t1 = v >> 8 */
- + BSRLI r9, r12, 8 /* t1 = v >> 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 16 /* *(d + 16) = t1 */
- - bslli r11, r12, 24 /* h = v << 24 */
- + BSLLI r11, r12, 24 /* h = v << 24 */
- lwi r12, r8, 24 /* v = *(as + 24) */
- - bsrli r9, r12, 8 /* t1 = v >> 8 */
- + BSRLI r9, r12, 8 /* t1 = v >> 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 20 /* *(d + 20) = t1 */
- - bslli r11, r12, 24 /* h = v << 24 */
- + BSLLI r11, r12, 24 /* h = v << 24 */
- lwi r12, r8, 28 /* v = *(as + 28) */
- - bsrli r9, r12, 8 /* t1 = v >> 8 */
- + BSRLI r9, r12, 8 /* t1 = v >> 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 24 /* *(d + 24) = t1 */
- - bslli r11, r12, 24 /* h = v << 24 */
- + BSLLI r11, r12, 24 /* h = v << 24 */
- lwi r12, r8, 32 /* v = *(as + 32) */
- - bsrli r9, r12, 8 /* t1 = v >> 8 */
- + BSRLI r9, r12, 8 /* t1 = v >> 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 28 /* *(d + 28) = t1 */
- - bslli r11, r12, 24 /* h = v << 24 */
- + BSLLI r11, r12, 24 /* h = v << 24 */
- addi r8, r8, 32 /* as = as + 32 */
- addi r4, r4, -32 /* n = n - 32 */
- bneid r4, a_bu3_loop /* while (n) loop */
- @@ -134,48 +142,48 @@
- bri a_block_done
-
- a_block_u1:
- - bslli r11, r11, 8 /* h = h << 8 */
- + BSLLI r11, r11, 8 /* h = h << 8 */
- a_bu1_loop:
- lwi r12, r8, 4 /* v = *(as + 4) */
- - bsrli r9, r12, 24 /* t1 = v >> 24 */
- + BSRLI r9, r12, 24 /* t1 = v >> 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 0 /* *(d + 0) = t1 */
- - bslli r11, r12, 8 /* h = v << 8 */
- + BSLLI r11, r12, 8 /* h = v << 8 */
- lwi r12, r8, 8 /* v = *(as + 8) */
- - bsrli r9, r12, 24 /* t1 = v >> 24 */
- + BSRLI r9, r12, 24 /* t1 = v >> 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 4 /* *(d + 4) = t1 */
- - bslli r11, r12, 8 /* h = v << 8 */
- + BSLLI r11, r12, 8 /* h = v << 8 */
- lwi r12, r8, 12 /* v = *(as + 12) */
- - bsrli r9, r12, 24 /* t1 = v >> 24 */
- + BSRLI r9, r12, 24 /* t1 = v >> 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 8 /* *(d + 8) = t1 */
- - bslli r11, r12, 8 /* h = v << 8 */
- + BSLLI r11, r12, 8 /* h = v << 8 */
- lwi r12, r8, 16 /* v = *(as + 16) */
- - bsrli r9, r12, 24 /* t1 = v >> 24 */
- + BSRLI r9, r12, 24 /* t1 = v >> 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 12 /* *(d + 12) = t1 */
- - bslli r11, r12, 8 /* h = v << 8 */
- + BSLLI r11, r12, 8 /* h = v << 8 */
- lwi r12, r8, 20 /* v = *(as + 20) */
- - bsrli r9, r12, 24 /* t1 = v >> 24 */
- + BSRLI r9, r12, 24 /* t1 = v >> 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 16 /* *(d + 16) = t1 */
- - bslli r11, r12, 8 /* h = v << 8 */
- + BSLLI r11, r12, 8 /* h = v << 8 */
- lwi r12, r8, 24 /* v = *(as + 24) */
- - bsrli r9, r12, 24 /* t1 = v >> 24 */
- + BSRLI r9, r12, 24 /* t1 = v >> 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 20 /* *(d + 20) = t1 */
- - bslli r11, r12, 8 /* h = v << 8 */
- + BSLLI r11, r12, 8 /* h = v << 8 */
- lwi r12, r8, 28 /* v = *(as + 28) */
- - bsrli r9, r12, 24 /* t1 = v >> 24 */
- + BSRLI r9, r12, 24 /* t1 = v >> 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 24 /* *(d + 24) = t1 */
- - bslli r11, r12, 8 /* h = v << 8 */
- + BSLLI r11, r12, 8 /* h = v << 8 */
- lwi r12, r8, 32 /* v = *(as + 32) */
- - bsrli r9, r12, 24 /* t1 = v >> 24 */
- + BSRLI r9, r12, 24 /* t1 = v >> 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 28 /* *(d + 28) = t1 */
- - bslli r11, r12, 8 /* h = v << 8 */
- + BSLLI r11, r12, 8 /* h = v << 8 */
- addi r8, r8, 32 /* as = as + 32 */
- addi r4, r4, -32 /* n = n - 32 */
- bneid r4, a_bu1_loop /* while (n) loop */
- @@ -183,48 +191,48 @@
- bri a_block_done
-
- a_block_u2:
- - bslli r11, r11, 16 /* h = h << 16 */
- + BSLLI r11, r11, 16 /* h = h << 16 */
- a_bu2_loop:
- lwi r12, r8, 4 /* v = *(as + 4) */
- - bsrli r9, r12, 16 /* t1 = v >> 16 */
- + BSRLI r9, r12, 16 /* t1 = v >> 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 0 /* *(d + 0) = t1 */
- - bslli r11, r12, 16 /* h = v << 16 */
- + BSLLI r11, r12, 16 /* h = v << 16 */
- lwi r12, r8, 8 /* v = *(as + 8) */
- - bsrli r9, r12, 16 /* t1 = v >> 16 */
- + BSRLI r9, r12, 16 /* t1 = v >> 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 4 /* *(d + 4) = t1 */
- - bslli r11, r12, 16 /* h = v << 16 */
- + BSLLI r11, r12, 16 /* h = v << 16 */
- lwi r12, r8, 12 /* v = *(as + 12) */
- - bsrli r9, r12, 16 /* t1 = v >> 16 */
- + BSRLI r9, r12, 16 /* t1 = v >> 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 8 /* *(d + 8) = t1 */
- - bslli r11, r12, 16 /* h = v << 16 */
- + BSLLI r11, r12, 16 /* h = v << 16 */
- lwi r12, r8, 16 /* v = *(as + 16) */
- - bsrli r9, r12, 16 /* t1 = v >> 16 */
- + BSRLI r9, r12, 16 /* t1 = v >> 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 12 /* *(d + 12) = t1 */
- - bslli r11, r12, 16 /* h = v << 16 */
- + BSLLI r11, r12, 16 /* h = v << 16 */
- lwi r12, r8, 20 /* v = *(as + 20) */
- - bsrli r9, r12, 16 /* t1 = v >> 16 */
- + BSRLI r9, r12, 16 /* t1 = v >> 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 16 /* *(d + 16) = t1 */
- - bslli r11, r12, 16 /* h = v << 16 */
- + BSLLI r11, r12, 16 /* h = v << 16 */
- lwi r12, r8, 24 /* v = *(as + 24) */
- - bsrli r9, r12, 16 /* t1 = v >> 16 */
- + BSRLI r9, r12, 16 /* t1 = v >> 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 20 /* *(d + 20) = t1 */
- - bslli r11, r12, 16 /* h = v << 16 */
- + BSLLI r11, r12, 16 /* h = v << 16 */
- lwi r12, r8, 28 /* v = *(as + 28) */
- - bsrli r9, r12, 16 /* t1 = v >> 16 */
- + BSRLI r9, r12, 16 /* t1 = v >> 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 24 /* *(d + 24) = t1 */
- - bslli r11, r12, 16 /* h = v << 16 */
- + BSLLI r11, r12, 16 /* h = v << 16 */
- lwi r12, r8, 32 /* v = *(as + 32) */
- - bsrli r9, r12, 16 /* t1 = v >> 16 */
- + BSRLI r9, r12, 16 /* t1 = v >> 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 28 /* *(d + 28) = t1 */
- - bslli r11, r12, 16 /* h = v << 16 */
- + BSLLI r11, r12, 16 /* h = v << 16 */
- addi r8, r8, 32 /* as = as + 32 */
- addi r4, r4, -32 /* n = n - 32 */
- bneid r4, a_bu2_loop /* while (n) loop */
- @@ -263,13 +271,13 @@
- beqi r9, a_word_u2 /* t1 was 2 => 2 byte offset */
-
- a_word_u3:
- - bslli r11, r11, 24 /* h = h << 24 */
- + BSLLI r11, r11, 24 /* h = h << 24 */
- a_wu3_loop:
- lw r12, r8, r10 /* v = *(as + offset) */
- - bsrli r9, r12, 8 /* t1 = v >> 8 */
- + BSRLI r9, r12, 8 /* t1 = v >> 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- sw r9, r5, r10 /* *(d + offset) = t1 */
- - bslli r11, r12, 24 /* h = v << 24 */
- + BSLLI r11, r12, 24 /* h = v << 24 */
- addi r4, r4,-4 /* n = n - 4 */
- bneid r4, a_wu3_loop /* while (n) loop */
- addi r10, r10, 4 /* offset = ofset + 4 (IN DELAY SLOT) */
- @@ -277,13 +285,13 @@
- bri a_word_done
-
- a_word_u1:
- - bslli r11, r11, 8 /* h = h << 8 */
- + BSLLI r11, r11, 8 /* h = h << 8 */
- a_wu1_loop:
- lw r12, r8, r10 /* v = *(as + offset) */
- - bsrli r9, r12, 24 /* t1 = v >> 24 */
- + BSRLI r9, r12, 24 /* t1 = v >> 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- sw r9, r5, r10 /* *(d + offset) = t1 */
- - bslli r11, r12, 8 /* h = v << 8 */
- + BSLLI r11, r12, 8 /* h = v << 8 */
- addi r4, r4,-4 /* n = n - 4 */
- bneid r4, a_wu1_loop /* while (n) loop */
- addi r10, r10, 4 /* offset = ofset + 4 (IN DELAY SLOT) */
- @@ -291,13 +299,13 @@
- bri a_word_done
-
- a_word_u2:
- - bslli r11, r11, 16 /* h = h << 16 */
- + BSLLI r11, r11, 16 /* h = h << 16 */
- a_wu2_loop:
- lw r12, r8, r10 /* v = *(as + offset) */
- - bsrli r9, r12, 16 /* t1 = v >> 16 */
- + BSRLI r9, r12, 16 /* t1 = v >> 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- sw r9, r5, r10 /* *(d + offset) = t1 */
- - bslli r11, r12, 16 /* h = v << 16 */
- + BSLLI r11, r12, 16 /* h = v << 16 */
- addi r4, r4,-4 /* n = n - 4 */
- bneid r4, a_wu2_loop /* while (n) loop */
- addi r10, r10, 4 /* offset = ofset + 4 (IN DELAY SLOT) */
- diff -Nur uClibc-0.9.33.2/libc/string/microblaze/memmove.S uClibc/libc/string/microblaze/memmove.S
- --- uClibc-0.9.33.2/libc/string/microblaze/memmove.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/microblaze/memmove.S 2014-02-03 12:32:56.000000000 +0100
- @@ -33,6 +33,14 @@
- .type memmove, @function
- .ent memmove
-
- +#ifdef __MICROBLAZEEL__
- +# define BSLLI bsrli
- +# define BSRLI bslli
- +#else
- +# define BSLLI bslli
- +# define BSRLI bsrli
- +#endif
- +
- memmove:
- cmpu r4, r5, r6 /* n = s - d */
- bgei r4, HIDDEN_JUMPTARGET(memcpy)
- @@ -112,150 +120,150 @@
- beqi r9,d_block_u2 /* t1 was 2 => 2 byte offset */
-
- d_block_u3:
- - bsrli r11, r11, 8 /* h = h >> 8 */
- + BSRLI r11, r11, 8 /* h = h >> 8 */
- d_bu3_loop:
- addi r8, r8, -32 /* as = as - 32 */
- addi r5, r5, -32 /* d = d - 32 */
- lwi r12, r8, 28 /* v = *(as + 28) */
- - bslli r9, r12, 24 /* t1 = v << 24 */
- + BSLLI r9, r12, 24 /* t1 = v << 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 28 /* *(d + 28) = t1 */
- - bsrli r11, r12, 8 /* h = v >> 8 */
- + BSRLI r11, r12, 8 /* h = v >> 8 */
- lwi r12, r8, 24 /* v = *(as + 24) */
- - bslli r9, r12, 24 /* t1 = v << 24 */
- + BSLLI r9, r12, 24 /* t1 = v << 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 24 /* *(d + 24) = t1 */
- - bsrli r11, r12, 8 /* h = v >> 8 */
- + BSRLI r11, r12, 8 /* h = v >> 8 */
- lwi r12, r8, 20 /* v = *(as + 20) */
- - bslli r9, r12, 24 /* t1 = v << 24 */
- + BSLLI r9, r12, 24 /* t1 = v << 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 20 /* *(d + 20) = t1 */
- - bsrli r11, r12, 8 /* h = v >> 8 */
- + BSRLI r11, r12, 8 /* h = v >> 8 */
- lwi r12, r8, 16 /* v = *(as + 16) */
- - bslli r9, r12, 24 /* t1 = v << 24 */
- + BSLLI r9, r12, 24 /* t1 = v << 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 16 /* *(d + 16) = t1 */
- - bsrli r11, r12, 8 /* h = v >> 8 */
- + BSRLI r11, r12, 8 /* h = v >> 8 */
- lwi r12, r8, 12 /* v = *(as + 12) */
- - bslli r9, r12, 24 /* t1 = v << 24 */
- + BSLLI r9, r12, 24 /* t1 = v << 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 12 /* *(d + 112) = t1 */
- - bsrli r11, r12, 8 /* h = v >> 8 */
- + BSRLI r11, r12, 8 /* h = v >> 8 */
- lwi r12, r8, 8 /* v = *(as + 8) */
- - bslli r9, r12, 24 /* t1 = v << 24 */
- + BSLLI r9, r12, 24 /* t1 = v << 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 8 /* *(d + 8) = t1 */
- - bsrli r11, r12, 8 /* h = v >> 8 */
- + BSRLI r11, r12, 8 /* h = v >> 8 */
- lwi r12, r8, 4 /* v = *(as + 4) */
- - bslli r9, r12, 24 /* t1 = v << 24 */
- + BSLLI r9, r12, 24 /* t1 = v << 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 4 /* *(d + 4) = t1 */
- - bsrli r11, r12, 8 /* h = v >> 8 */
- + BSRLI r11, r12, 8 /* h = v >> 8 */
- lwi r12, r8, 0 /* v = *(as + 0) */
- - bslli r9, r12, 24 /* t1 = v << 24 */
- + BSLLI r9, r12, 24 /* t1 = v << 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 0 /* *(d + 0) = t1 */
- addi r4, r4, -32 /* n = n - 32 */
- bneid r4, d_bu3_loop /* while (n) loop */
- - bsrli r11, r12, 8 /* h = v >> 8 (IN DELAY SLOT) */
- + BSRLI r11, r12, 8 /* h = v >> 8 (IN DELAY SLOT) */
- bri d_block_done
-
- d_block_u1:
- - bsrli r11, r11, 24 /* h = h >> 24 */
- + BSRLI r11, r11, 24 /* h = h >> 24 */
- d_bu1_loop:
- addi r8, r8, -32 /* as = as - 32 */
- addi r5, r5, -32 /* d = d - 32 */
- lwi r12, r8, 28 /* v = *(as + 28) */
- - bslli r9, r12, 8 /* t1 = v << 8 */
- + BSLLI r9, r12, 8 /* t1 = v << 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 28 /* *(d + 28) = t1 */
- - bsrli r11, r12, 24 /* h = v >> 24 */
- + BSRLI r11, r12, 24 /* h = v >> 24 */
- lwi r12, r8, 24 /* v = *(as + 24) */
- - bslli r9, r12, 8 /* t1 = v << 8 */
- + BSLLI r9, r12, 8 /* t1 = v << 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 24 /* *(d + 24) = t1 */
- - bsrli r11, r12, 24 /* h = v >> 24 */
- + BSRLI r11, r12, 24 /* h = v >> 24 */
- lwi r12, r8, 20 /* v = *(as + 20) */
- - bslli r9, r12, 8 /* t1 = v << 8 */
- + BSLLI r9, r12, 8 /* t1 = v << 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 20 /* *(d + 20) = t1 */
- - bsrli r11, r12, 24 /* h = v >> 24 */
- + BSRLI r11, r12, 24 /* h = v >> 24 */
- lwi r12, r8, 16 /* v = *(as + 16) */
- - bslli r9, r12, 8 /* t1 = v << 8 */
- + BSLLI r9, r12, 8 /* t1 = v << 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 16 /* *(d + 16) = t1 */
- - bsrli r11, r12, 24 /* h = v >> 24 */
- + BSRLI r11, r12, 24 /* h = v >> 24 */
- lwi r12, r8, 12 /* v = *(as + 12) */
- - bslli r9, r12, 8 /* t1 = v << 8 */
- + BSLLI r9, r12, 8 /* t1 = v << 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 12 /* *(d + 112) = t1 */
- - bsrli r11, r12, 24 /* h = v >> 24 */
- + BSRLI r11, r12, 24 /* h = v >> 24 */
- lwi r12, r8, 8 /* v = *(as + 8) */
- - bslli r9, r12, 8 /* t1 = v << 8 */
- + BSLLI r9, r12, 8 /* t1 = v << 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 8 /* *(d + 8) = t1 */
- - bsrli r11, r12, 24 /* h = v >> 24 */
- + BSRLI r11, r12, 24 /* h = v >> 24 */
- lwi r12, r8, 4 /* v = *(as + 4) */
- - bslli r9, r12, 8 /* t1 = v << 8 */
- + BSLLI r9, r12, 8 /* t1 = v << 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 4 /* *(d + 4) = t1 */
- - bsrli r11, r12, 24 /* h = v >> 24 */
- + BSRLI r11, r12, 24 /* h = v >> 24 */
- lwi r12, r8, 0 /* v = *(as + 0) */
- - bslli r9, r12, 8 /* t1 = v << 8 */
- + BSLLI r9, r12, 8 /* t1 = v << 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 0 /* *(d + 0) = t1 */
- addi r4, r4, -32 /* n = n - 32 */
- bneid r4, d_bu1_loop /* while (n) loop */
- - bsrli r11, r12, 24 /* h = v >> 24 (IN DELAY SLOT) */
- + BSRLI r11, r12, 24 /* h = v >> 24 (IN DELAY SLOT) */
- bri d_block_done
-
- d_block_u2:
- - bsrli r11, r11, 16 /* h = h >> 16 */
- + BSRLI r11, r11, 16 /* h = h >> 16 */
- d_bu2_loop:
- addi r8, r8, -32 /* as = as - 32 */
- addi r5, r5, -32 /* d = d - 32 */
- lwi r12, r8, 28 /* v = *(as + 28) */
- - bslli r9, r12, 16 /* t1 = v << 16 */
- + BSLLI r9, r12, 16 /* t1 = v << 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 28 /* *(d + 28) = t1 */
- - bsrli r11, r12, 16 /* h = v >> 16 */
- + BSRLI r11, r12, 16 /* h = v >> 16 */
- lwi r12, r8, 24 /* v = *(as + 24) */
- - bslli r9, r12, 16 /* t1 = v << 16 */
- + BSLLI r9, r12, 16 /* t1 = v << 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 24 /* *(d + 24) = t1 */
- - bsrli r11, r12, 16 /* h = v >> 16 */
- + BSRLI r11, r12, 16 /* h = v >> 16 */
- lwi r12, r8, 20 /* v = *(as + 20) */
- - bslli r9, r12, 16 /* t1 = v << 16 */
- + BSLLI r9, r12, 16 /* t1 = v << 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 20 /* *(d + 20) = t1 */
- - bsrli r11, r12, 16 /* h = v >> 16 */
- + BSRLI r11, r12, 16 /* h = v >> 16 */
- lwi r12, r8, 16 /* v = *(as + 16) */
- - bslli r9, r12, 16 /* t1 = v << 16 */
- + BSLLI r9, r12, 16 /* t1 = v << 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 16 /* *(d + 16) = t1 */
- - bsrli r11, r12, 16 /* h = v >> 16 */
- + BSRLI r11, r12, 16 /* h = v >> 16 */
- lwi r12, r8, 12 /* v = *(as + 12) */
- - bslli r9, r12, 16 /* t1 = v << 16 */
- + BSLLI r9, r12, 16 /* t1 = v << 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 12 /* *(d + 112) = t1 */
- - bsrli r11, r12, 16 /* h = v >> 16 */
- + BSRLI r11, r12, 16 /* h = v >> 16 */
- lwi r12, r8, 8 /* v = *(as + 8) */
- - bslli r9, r12, 16 /* t1 = v << 16 */
- + BSLLI r9, r12, 16 /* t1 = v << 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 8 /* *(d + 8) = t1 */
- - bsrli r11, r12, 16 /* h = v >> 16 */
- + BSRLI r11, r12, 16 /* h = v >> 16 */
- lwi r12, r8, 4 /* v = *(as + 4) */
- - bslli r9, r12, 16 /* t1 = v << 16 */
- + BSLLI r9, r12, 16 /* t1 = v << 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 4 /* *(d + 4) = t1 */
- - bsrli r11, r12, 16 /* h = v >> 16 */
- + BSRLI r11, r12, 16 /* h = v >> 16 */
- lwi r12, r8, 0 /* v = *(as + 0) */
- - bslli r9, r12, 16 /* t1 = v << 16 */
- + BSLLI r9, r12, 16 /* t1 = v << 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- swi r9, r5, 0 /* *(d + 0) = t1 */
- addi r4, r4, -32 /* n = n - 32 */
- bneid r4, d_bu2_loop /* while (n) loop */
- - bsrli r11, r12, 16 /* h = v >> 16 (IN DELAY SLOT) */
- + BSRLI r11, r12, 16 /* h = v >> 16 (IN DELAY SLOT) */
-
- d_block_done:
- addi r4, r0, 4 /* n = 4 */
- @@ -290,41 +298,41 @@
- beqi r9,d_word_u2 /* t1 was 2 => 2 byte offset */
-
- d_word_u3:
- - bsrli r11, r11, 8 /* h = h >> 8 */
- + BSRLI r11, r11, 8 /* h = h >> 8 */
- d_wu3_loop:
- addi r4, r4,-4 /* n = n - 4 */
- lw r12, r8, r4 /* v = *(as + n) */
- - bslli r9, r12, 24 /* t1 = v << 24 */
- + BSLLI r9, r12, 24 /* t1 = v << 24 */
- or r9, r11, r9 /* t1 = h | t1 */
- sw r9, r5, r4 /* *(d + n) = t1 */
- bneid r4, d_wu3_loop /* while (n) loop */
- - bsrli r11, r12, 8 /* h = v >> 8 (IN DELAY SLOT) */
- + BSRLI r11, r12, 8 /* h = v >> 8 (IN DELAY SLOT) */
-
- bri d_word_done
-
- d_word_u1:
- - bsrli r11, r11, 24 /* h = h >> 24 */
- + BSRLI r11, r11, 24 /* h = h >> 24 */
- d_wu1_loop:
- addi r4, r4,-4 /* n = n - 4 */
- lw r12, r8, r4 /* v = *(as + n) */
- - bslli r9, r12, 8 /* t1 = v << 8 */
- + BSLLI r9, r12, 8 /* t1 = v << 8 */
- or r9, r11, r9 /* t1 = h | t1 */
- sw r9, r5, r4 /* *(d + n) = t1 */
- bneid r4, d_wu1_loop /* while (n) loop */
- - bsrli r11, r12, 24 /* h = v >> 24 (IN DELAY SLOT) */
- + BSRLI r11, r12, 24 /* h = v >> 24 (IN DELAY SLOT) */
-
- bri d_word_done
-
- d_word_u2:
- - bsrli r11, r11, 16 /* h = h >> 16 */
- + BSRLI r11, r11, 16 /* h = h >> 16 */
- d_wu2_loop:
- addi r4, r4,-4 /* n = n - 4 */
- lw r12, r8, r4 /* v = *(as + n) */
- - bslli r9, r12, 16 /* t1 = v << 16 */
- + BSLLI r9, r12, 16 /* t1 = v << 16 */
- or r9, r11, r9 /* t1 = h | t1 */
- sw r9, r5, r4 /* *(d + n) = t1 */
- bneid r4, d_wu2_loop /* while (n) loop */
- - bsrli r11, r12, 16 /* h = v >> 16 (IN DELAY SLOT) */
- + BSRLI r11, r12, 16 /* h = v >> 16 (IN DELAY SLOT) */
-
- d_word_done:
-
- diff -Nur uClibc-0.9.33.2/libc/string/mips/memcpy.S uClibc/libc/string/mips/memcpy.S
- --- uClibc-0.9.33.2/libc/string/mips/memcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/mips/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- -/*#include <sysdep.h>*/
- +#include <sysdep.h>
- #include <endian.h>
- -#include "sysdep.h"
-
- /* void *memcpy(void *s1, const void *s2, size_t n); */
-
- diff -Nur uClibc-0.9.33.2/libc/string/mips/memset.S uClibc/libc/string/mips/memset.S
- --- uClibc-0.9.33.2/libc/string/mips/memset.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/mips/memset.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- -/*#include <sysdep.h>*/
- +#include <sysdep.h>
- #include <endian.h>
- -#include "sysdep.h"
-
- /* void *memset(void *s, int c, size_t n). */
-
- diff -Nur uClibc-0.9.33.2/libc/string/mips/sysdep.h uClibc/libc/string/mips/sysdep.h
- --- uClibc-0.9.33.2/libc/string/mips/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/mips/sysdep.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,45 +0,0 @@
- -/* Adapted from glibc's sysdeps/unix/mips/sysdep.h */
- -
- -/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003
- - Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- - Contributed by Brendan Kehoe (brendan@zen.org).
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#ifdef __ASSEMBLER__
- -
- -#include <sgidefs.h>
- -#include <sys/regdef.h>
- -
- -#define ENTRY(name) \
- - .globl name; \
- - .align 2; \
- - .ent name,0; \
- - name/* use a comment rather than ## to workaround bug in gcc-3.4.x */:
- -
- -#undef END
- -#define END(function) \
- - .end function; \
- - .size function,.-function
- -
- -#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_ABIO64
- -# define L(label) $L ## label
- -#else
- -# define L(label) .L ## label
- -#endif
- -
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/memchr.S uClibc/libc/string/sparc/sparc32/memchr.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc32/memchr.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc32/memchr.S 2014-02-03 12:32:56.000000000 +0100
- @@ -24,9 +24,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- .text
- .align 4
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/memcpy.S uClibc/libc/string/sparc/sparc32/memcpy.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc32/memcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc32/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -17,9 +17,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/memset.S uClibc/libc/string/sparc/sparc32/memset.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc32/memset.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc32/memset.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/stpcpy.S uClibc/libc/string/sparc/sparc32/stpcpy.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc32/stpcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc32/stpcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
- to find out if any byte in xword could be zero. This is fast, but
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/strcat.S uClibc/libc/string/sparc/sparc32/strcat.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc32/strcat.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc32/strcat.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
- to find out if any byte in xword could be zero. This is fast, but
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/strchr.S uClibc/libc/string/sparc/sparc32/strchr.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc32/strchr.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc32/strchr.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
- to find out if any byte in xword could be zero. This is fast, but
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/strcmp.S uClibc/libc/string/sparc/sparc32/strcmp.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc32/strcmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc32/strcmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
- to find out if any byte in xword could be zero. This is fast, but
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/strcpy.S uClibc/libc/string/sparc/sparc32/strcpy.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc32/strcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc32/strcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
- to find out if any byte in xword could be zero. This is fast, but
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/strlen.S uClibc/libc/string/sparc/sparc32/strlen.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc32/strlen.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc32/strlen.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
- to find out if any byte in xword could be zero. This is fast, but
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/memchr.S uClibc/libc/string/sparc/sparc64/memchr.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc64/memchr.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc64/memchr.S 2014-02-03 12:32:56.000000000 +0100
- @@ -24,9 +24,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <asm/asi.h>
- #ifndef XCC
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/memcpy.S uClibc/libc/string/sparc/sparc64/memcpy.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc64/memcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc64/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <asm/asi.h>
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/memset.S uClibc/libc/string/sparc/sparc64/memset.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc64/memset.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc64/memset.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <asm/asi.h>
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/sparcv9b/memcpy.S uClibc/libc/string/sparc/sparc64/sparcv9b/memcpy.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc64/sparcv9b/memcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc64/sparcv9b/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/stpcpy.S uClibc/libc/string/sparc/sparc64/stpcpy.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc64/stpcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc64/stpcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <asm/asi.h>
- #ifndef XCC
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/strcat.S uClibc/libc/string/sparc/sparc64/strcat.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc64/strcat.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc64/strcat.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <asm/asi.h>
- #ifndef XCC
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/strchr.S uClibc/libc/string/sparc/sparc64/strchr.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc64/strchr.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc64/strchr.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <asm/asi.h>
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/strcmp.S uClibc/libc/string/sparc/sparc64/strcmp.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc64/strcmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc64/strcmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <asm/asi.h>
- #ifndef XCC
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/strcpy.S uClibc/libc/string/sparc/sparc64/strcpy.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc64/strcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc64/strcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <asm/asi.h>
- #ifndef XCC
- diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/strlen.S uClibc/libc/string/sparc/sparc64/strlen.S
- --- uClibc-0.9.33.2/libc/string/sparc/sparc64/strlen.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/sparc/sparc64/strlen.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <asm/asi.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/strchrnul.c uClibc/libc/string/strchrnul.c
- --- uClibc-0.9.33.2/libc/string/strchrnul.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/strchrnul.c 2014-02-03 12:32:56.000000000 +0100
- @@ -22,6 +22,6 @@
- return (Wchar *) s;
- }
- # ifndef WANT_WIDE
- -libc_hidden_def(Wstrchrnul)
- +libc_hidden_def(strchrnul)
- # endif
- #endif
- diff -Nur uClibc-0.9.33.2/libc/string/strverscmp.c uClibc/libc/string/strverscmp.c
- --- uClibc-0.9.33.2/libc/string/strverscmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/strverscmp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -19,9 +19,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include <ctype.h>
- diff -Nur uClibc-0.9.33.2/libc/string/x86_64/memcpy.S uClibc/libc/string/x86_64/memcpy.S
- --- uClibc-0.9.33.2/libc/string/x86_64/memcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/x86_64/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "_glibc_inc.h"
-
- diff -Nur uClibc-0.9.33.2/libc/string/x86_64/memset.S uClibc/libc/string/x86_64/memset.S
- --- uClibc-0.9.33.2/libc/string/x86_64/memset.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/x86_64/memset.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "_glibc_inc.h"
-
- diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strcat.S uClibc/libc/string/x86_64/strcat.S
- --- uClibc-0.9.33.2/libc/string/x86_64/strcat.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/x86_64/strcat.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "_glibc_inc.h"
-
- diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strchr.S uClibc/libc/string/x86_64/strchr.S
- --- uClibc-0.9.33.2/libc/string/x86_64/strchr.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/x86_64/strchr.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "_glibc_inc.h"
-
- diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strcmp.S uClibc/libc/string/x86_64/strcmp.S
- --- uClibc-0.9.33.2/libc/string/x86_64/strcmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/x86_64/strcmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "_glibc_inc.h"
-
- diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strcpy.S uClibc/libc/string/x86_64/strcpy.S
- --- uClibc-0.9.33.2/libc/string/x86_64/strcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/x86_64/strcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "_glibc_inc.h"
-
- diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strcspn.S uClibc/libc/string/x86_64/strcspn.S
- --- uClibc-0.9.33.2/libc/string/x86_64/strcspn.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/x86_64/strcspn.S 2014-02-03 12:32:56.000000000 +0100
- @@ -19,9 +19,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "_glibc_inc.h"
-
- diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strlen.S uClibc/libc/string/x86_64/strlen.S
- --- uClibc-0.9.33.2/libc/string/x86_64/strlen.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/x86_64/strlen.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "_glibc_inc.h"
-
- diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strspn.S uClibc/libc/string/x86_64/strspn.S
- --- uClibc-0.9.33.2/libc/string/x86_64/strspn.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/x86_64/strspn.S 2014-02-03 12:32:56.000000000 +0100
- @@ -19,9 +19,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "_glibc_inc.h"
-
- diff -Nur uClibc-0.9.33.2/libc/string/__xpg_basename.c uClibc/libc/string/__xpg_basename.c
- --- uClibc-0.9.33.2/libc/string/__xpg_basename.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/__xpg_basename.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,7 +5,6 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include "_string.h"
- #include <libgen.h>
-
- char *__xpg_basename(register char *path)
- @@ -34,3 +33,7 @@
-
- return first;
- }
- +#ifndef __USE_GNU
- +# undef basename
- +weak_alias(__xpg_basename,basename)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/string/__xpg_strerror_r.c uClibc/libc/string/__xpg_strerror_r.c
- --- uClibc-0.9.33.2/libc/string/__xpg_strerror_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/__xpg_strerror_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,8 +5,8 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -/* Make sure we get proper strerror_r() prototype */
- -#define strerror_r _hidestrerror_r
- +/* get rid of REDIRECT */
- +#define strerror_r __hide_strerror_r
-
- #include <features.h>
- #include <errno.h>
- @@ -15,7 +15,6 @@
-
- #undef strerror_r
-
- -
- #ifdef __UCLIBC_HAS_ERRNO_MESSAGES__
-
- extern const char _string_syserrmsgs[] attribute_hidden;
- @@ -273,4 +272,6 @@
-
- #endif /* __UCLIBC_HAS_ERRNO_MESSAGES__ */
- libc_hidden_def(__xpg_strerror_r)
- -weak_alias(__xpg_strerror_r, strerror_r)
- +#if defined __USE_XOPEN2K && !defined __USE_GNU
- +strong_alias(__xpg_strerror_r,strerror_r)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/string/xtensa/memcpy.S uClibc/libc/string/xtensa/memcpy.S
- --- uClibc-0.9.33.2/libc/string/xtensa/memcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/xtensa/memcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,11 +13,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include "../../sysdeps/linux/xtensa/sysdep.h"
- +#include <sysdep.h>
- #include <bits/xtensa-config.h>
-
- .macro src_b r, w0, w1
- diff -Nur uClibc-0.9.33.2/libc/string/xtensa/memset.S uClibc/libc/string/xtensa/memset.S
- --- uClibc-0.9.33.2/libc/string/xtensa/memset.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/xtensa/memset.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,11 +13,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include "../../sysdeps/linux/xtensa/sysdep.h"
- +#include <sysdep.h>
- #include <bits/xtensa-config.h>
-
- /* Do not use .literal_position in the ENTRY macro. */
- diff -Nur uClibc-0.9.33.2/libc/string/xtensa/strcmp.S uClibc/libc/string/xtensa/strcmp.S
- --- uClibc-0.9.33.2/libc/string/xtensa/strcmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/xtensa/strcmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,11 +13,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include "../../sysdeps/linux/xtensa/sysdep.h"
- +#include <sysdep.h>
- #include <bits/xtensa-config.h>
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/libc/string/xtensa/strcpy.S uClibc/libc/string/xtensa/strcpy.S
- --- uClibc-0.9.33.2/libc/string/xtensa/strcpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/xtensa/strcpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,11 +13,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include "../../sysdeps/linux/xtensa/sysdep.h"
- +#include <sysdep.h>
- #include <bits/xtensa-config.h>
-
- #ifdef __XTENSA_EB__
- diff -Nur uClibc-0.9.33.2/libc/string/xtensa/strlen.S uClibc/libc/string/xtensa/strlen.S
- --- uClibc-0.9.33.2/libc/string/xtensa/strlen.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/xtensa/strlen.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,11 +13,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include "../../sysdeps/linux/xtensa/sysdep.h"
- +#include <sysdep.h>
- #include <bits/xtensa-config.h>
-
- #ifdef __XTENSA_EB__
- diff -Nur uClibc-0.9.33.2/libc/string/xtensa/strncpy.S uClibc/libc/string/xtensa/strncpy.S
- --- uClibc-0.9.33.2/libc/string/xtensa/strncpy.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/string/xtensa/strncpy.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,11 +13,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include "../../sysdeps/linux/xtensa/sysdep.h"
- +#include <sysdep.h>
- #include <bits/xtensa-config.h>
-
- #ifdef __XTENSA_EB__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/atomic.h uClibc/libc/sysdeps/linux/alpha/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdint.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/dirent.h uClibc/libc/sysdeps/linux/alpha/bits/dirent.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/dirent.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/dirent.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_DIRENT_H
- #define _BITS_DIRENT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/eventfd.h uClibc/libc/sysdeps/linux/alpha/bits/eventfd.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/eventfd.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/alpha/bits/eventfd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,31 @@
- +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SYS_EVENTFD_H
- +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
- +#endif
- +
- +/* Flags for eventfd. */
- +enum
- + {
- + EFD_SEMAPHORE = 000000001,
- +#define EFD_SEMAPHORE EFD_SEMAPHORE
- + EFD_CLOEXEC = 010000000,
- +#define EFD_CLOEXEC EFD_CLOEXEC
- + EFD_NONBLOCK = 000000004
- +#define EFD_NONBLOCK EFD_NONBLOCK
- + };
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/fcntl.h uClibc/libc/sysdeps/linux/alpha/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/fenv.h uClibc/libc/sysdeps/linux/alpha/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- @@ -107,15 +106,15 @@
- /* If the default argument is used we use this value. Note that due to
- architecture-specified page mappings, no user-space pointer will ever
- have its two high bits set. Co-opt one. */
- -#define FE_DFL_ENV ((__const fenv_t *) 0x8800000000000000UL)
- +#define FE_DFL_ENV ((const fenv_t *) 0x8800000000000000UL)
-
- #ifdef __USE_GNU
- /* Floating-point environment where none of the exceptions are masked. */
- -# define FE_NOMASK_ENV ((__const fenv_t *) 0x880000000000003eUL)
- +# define FE_NOMASK_ENV ((const fenv_t *) 0x880000000000003eUL)
-
- /* Floating-point environment with (processor-dependent) non-IEEE floating
- point. In this case, mapping denormals to zero. */
- -# define FE_NONIEEE_ENV ((__const fenv_t *) 0x8800000000003000UL)
- +# define FE_NONIEEE_ENV ((const fenv_t *) 0x8800000000003000UL)
- #endif
-
- /* The system calls to talk to the kernel's FP code. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/ioctls.h uClibc/libc/sysdeps/linux/alpha/bits/ioctls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/ioctls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/ioctls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IOCTL_H
- # error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/ipc.h uClibc/libc/sysdeps/linux/alpha/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h uClibc/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h 2014-02-03 12:32:56.000000000 +0100
- @@ -9,12 +9,4 @@
- unsigned int sa_flags;
- };
-
- -/* In uclibc, userspace struct sigaction is identical to
- - * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
- - * See sigaction.h
- - */
- -
- -extern int __syscall_rt_sigaction (int, const struct sigaction *,
- - struct sigaction *, size_t) attribute_hidden;
- -
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/kernel_types.h uClibc/libc/sysdeps/linux/alpha/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -33,6 +33,8 @@
- typedef __kernel_uid_t __kernel_uid32_t;
- typedef __kernel_gid_t __kernel_gid32_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- int val[2];
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/local_lim.h uClibc/libc/sysdeps/linux/alpha/bits/local_lim.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/local_lim.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/alpha/bits/local_lim.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,91 @@
- +/* Minimum guaranteed maximum values for system limits. Linux/Alpha version.
- + Copyright (C) 1993-1998,2000,2002,2003,2004 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Library General Public License as
- + published by the Free Software Foundation; either version 2 of the
- + License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Library General Public License for more details.
- +
- + You should have received a copy of the GNU Library General Public
- + License along with the GNU C Library; see the file COPYING.LIB. If not,
- + see <http://www.gnu.org/licenses/>. */
- +
- +/* The kernel header pollutes the namespace with the NR_OPEN symbol
- + and defines LINK_MAX although filesystems have different maxima. A
- + similar thing is true for OPEN_MAX: the limit can be changed at
- + runtime and therefore the macro must not be defined. Remove this
- + after including the header if necessary. */
- +#ifndef NR_OPEN
- +# define __undef_NR_OPEN
- +#endif
- +#ifndef LINK_MAX
- +# define __undef_LINK_MAX
- +#endif
- +#ifndef OPEN_MAX
- +# define __undef_OPEN_MAX
- +#endif
- +
- +/* The kernel sources contain a file with all the needed information. */
- +#include <linux/limits.h>
- +
- +/* Have to remove NR_OPEN? */
- +#ifdef __undef_NR_OPEN
- +# undef NR_OPEN
- +# undef __undef_NR_OPEN
- +#endif
- +/* Have to remove LINK_MAX? */
- +#ifdef __undef_LINK_MAX
- +# undef LINK_MAX
- +# undef __undef_LINK_MAX
- +#endif
- +/* Have to remove OPEN_MAX? */
- +#ifdef __undef_OPEN_MAX
- +# undef OPEN_MAX
- +# undef __undef_OPEN_MAX
- +#endif
- +
- +/* The number of data keys per process. */
- +#define _POSIX_THREAD_KEYS_MAX 128
- +/* This is the value this implementation supports. */
- +#define PTHREAD_KEYS_MAX 1024
- +
- +/* Controlling the iterations of destructors for thread-specific data. */
- +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
- +/* Number of iterations this implementation does. */
- +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
- +
- +/* The number of threads per process. */
- +#define _POSIX_THREAD_THREADS_MAX 64
- +/* We have no predefined limit on the number of threads. */
- +#undef PTHREAD_THREADS_MAX
- +
- +/* Maximum amount by which a process can descrease its asynchronous I/O
- + priority level. */
- +#define AIO_PRIO_DELTA_MAX 20
- +
- +/* Minimum size for a thread. We are free to choose a reasonable value. */
- +#define PTHREAD_STACK_MIN 24576
- +
- +/* Maximum number of timer expiration overruns. */
- +#define DELAYTIMER_MAX 2147483647
- +
- +/* Maximum tty name length. */
- +#define TTY_NAME_MAX 32
- +
- +/* Maximum login name length. This is arbitrary. */
- +#define LOGIN_NAME_MAX 256
- +
- +/* Maximum host name length. */
- +#define HOST_NAME_MAX 64
- +
- +/* Maximum message queue priority level. */
- +#define MQ_PRIO_MAX 32768
- +
- +/* Maximum value the semaphore can have. */
- +#define SEM_VALUE_MAX (2147483647)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mathdef.h uClibc/libc/sysdeps/linux/alpha/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mathinline.h uClibc/libc/sysdeps/linux/alpha/bits/mathinline.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/mathinline.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mman.h uClibc/libc/sysdeps/linux/alpha/bits/mman.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/mman.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MMAN_H
- # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
- @@ -71,7 +70,7 @@
- # define MAP_NORESERVE 0x10000 /* Don't check for reservations. */
- # define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */
- # define MAP_NONBLOCK 0x40000 /* Do not block on IO. */
- -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
- +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
- be uninitialized. */
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/msq.h uClibc/libc/sysdeps/linux/alpha/bits/msq.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/msq.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MSG_H
- # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/netdb.h uClibc/libc/sysdeps/linux/alpha/bits/netdb.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/netdb.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/netdb.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETDB_H
- # error "Never include <bits/netdb.h> directly; use <netdb.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/resource.h uClibc/libc/sysdeps/linux/alpha/bits/resource.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/resource.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/resource.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_RESOURCE_H
- # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sem.h uClibc/libc/sysdeps/linux/alpha/bits/sem.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/sem.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SEM_H
- # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/setjmp.h uClibc/libc/sysdeps/linux/alpha/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SETJMP_H
- #define _BITS_SETJMP_H 1
- @@ -55,33 +54,6 @@
- * registers.
- */
-
- -#if defined __USE_MISC || defined __ASSEMBLY__
- -# define JB_S0 0
- -# define JB_S1 1
- -# define JB_S2 2
- -# define JB_S3 3
- -# define JB_S4 4
- -# define JB_S5 5
- -# define JB_PC 6
- -# define JB_FP 7
- -# define JB_SP 8
- -# define JB_F2 9
- -# define JB_F3 10
- -# define JB_F4 11
- -# define JB_F5 12
- -# define JB_F6 13
- -# define JB_F7 14
- -# define JB_F8 15
- -# define JB_F9 16
- -#endif
- -
- -#ifndef __ASSEMBLY__
- typedef long int __jmp_buf[17];
-
- -/* Test if longjmp to JMPBUF would unwind the frame containing a local
- - variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- - ((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
- -#endif
- -
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/shm.h uClibc/libc/sysdeps/linux/alpha/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigaction.h uClibc/libc/sysdeps/linux/alpha/bits/sigaction.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/sigaction.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/alpha/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT int _code, struct sigcontext *
- #define SIGCONTEXT_EXTRA_ARGS _code,
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/siginfo.h uClibc/libc/sysdeps/linux/alpha/bits/siginfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/siginfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/siginfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SIGNAL_H && !defined __need_siginfo_t \
- && !defined __need_sigevent_t
- @@ -258,7 +257,11 @@
-
- /* Structure to transport application-defined values with signals. */
- # define __SIGEV_MAX_SIZE 64
- -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
- +# if __WORDSIZE == 64
- +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
- +# else
- +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
- +# endif
-
- typedef struct sigevent
- {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/signum.h uClibc/libc/sysdeps/linux/alpha/bits/signum.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/signum.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/signum.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef _SIGNAL_H
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigstack.h uClibc/libc/sysdeps/linux/alpha/bits/sigstack.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigstack.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/sigstack.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include this file directly. Use <signal.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/socket_type.h uClibc/libc/sysdeps/linux/alpha/bits/socket_type.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/socket_type.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/alpha/bits/socket_type.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,54 @@
- +/* Define enum __socket_type for Linux/Alpha.
- + Copyright (C) 1991-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library. If not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SYS_SOCKET_H
- +# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
- +#endif
- +
- +/* Types of sockets. */
- +enum __socket_type
- +{
- + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
- + byte streams. */
- +#define SOCK_STREAM SOCK_STREAM
- + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
- + of fixed maximum length. */
- +#define SOCK_DGRAM SOCK_DGRAM
- + SOCK_RAW = 3, /* Raw protocol interface. */
- +#define SOCK_RAW SOCK_RAW
- + SOCK_RDM = 4, /* Reliably-delivered messages. */
- +#define SOCK_RDM SOCK_RDM
- + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- + datagrams of fixed maximum length. */
- +#define SOCK_SEQPACKET SOCK_SEQPACKET
- + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
- +#define SOCK_DCCP SOCK_DCCP
- + SOCK_PACKET = 10, /* Linux specific way of getting packets
- + at the dev level. For writing rarp and
- + other similar things on the user level. */
- +#define SOCK_PACKET SOCK_PACKET
- +
- + /* Flags to be ORed into the type parameter of socket and socketpair. */
- +
- + SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the
- + new descriptor(s). */
- +#define SOCK_CLOEXEC SOCK_CLOEXEC
- + SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as
- + non-blocking. */
- +#define SOCK_NONBLOCK SOCK_NONBLOCK
- +};
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/stackinfo.h uClibc/libc/sysdeps/linux/alpha/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/statfs.h uClibc/libc/sysdeps/linux/alpha/bits/statfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/statfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/statfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STATFS_H
- # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/stat.h uClibc/libc/sysdeps/linux/alpha/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/syscalls.h uClibc/libc/sysdeps/linux/alpha/bits/syscalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SYSCALLS_H
- #define _BITS_SYSCALLS_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/termios.h uClibc/libc/sysdeps/linux/alpha/bits/termios.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/termios.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TERMIOS_H
- # error "Never include <bits/termios.h> directly; use <termios.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/typesizes.h uClibc/libc/sysdeps/linux/alpha/bits/typesizes.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/typesizes.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_TYPES_H
- # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #define __UCLIBC_SLIGHTLY_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/uClibc_page.h uClibc/libc/sysdeps/linux/alpha/bits/uClibc_page.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/uClibc_page.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* Supply an architecture specific value for PAGE_SIZE and friends. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/wordsize.h uClibc/libc/sysdeps/linux/alpha/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 64
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/brk.S uClibc/libc/sysdeps/linux/alpha/brk.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/brk.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/brk.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* __brk is a special syscall under Linux since it never returns an
- error. Instead, the error condition is indicated by returning the old
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/clone.S uClibc/libc/sysdeps/linux/alpha/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/crt1.S uClibc/libc/sysdeps/linux/alpha/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -32,9 +32,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <sys/regdef.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/divrem.h uClibc/libc/sysdeps/linux/alpha/divrem.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/divrem.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/divrem.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The current Alpha chips don't provide hardware for integer
- division. The C compiler expects the functions
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/fpu_control.h uClibc/libc/sysdeps/linux/alpha/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ALPHA_FPU_CONTROL_H
- #define _ALPHA_FPU_CONTROL_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/alpha/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/alpha/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,35 @@
- +/* Private macros for accessing __jmp_buf contents. Alpha version.
- + Copyright (C) 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#define JB_S0 0
- +#define JB_S1 1
- +#define JB_S2 2
- +#define JB_S3 3
- +#define JB_S4 4
- +#define JB_S5 5
- +#define JB_PC 6
- +#define JB_FP 7
- +#define JB_SP 8
- +#define JB_F2 9
- +#define JB_F3 10
- +#define JB_F4 11
- +#define JB_F5 12
- +#define JB_F6 13
- +#define JB_F7 14
- +#define JB_F8 15
- +#define JB_F9 16
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/alpha/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/alpha/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,23 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame containing a local
- + variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- + ((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
- +
- +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +#include <stdint.h>
- +#include <unwind.h>
- +
- +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
- +
- +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/__longjmp.S uClibc/libc/sysdeps/linux/alpha/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,14 +12,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- -#define _SETJMP_H
- -#define __ASSEMBLY__
- -#include <bits/setjmp.h>
- +#include <setjmp-offsets.h>
-
- #define a0 $16
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/Makefile.arch uClibc/libc/sysdeps/linux/alpha/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,9 +5,9 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := __syscall_error.c sigprocmask.c
- +CSRC-y := __syscall_error.c sigprocmask.c
-
- -SSRC := \
- +SSRC-y := \
- __longjmp.S brk.S bsd-_setjmp.S bsd-setjmp.S clone.S \
- divl.S divq.S pipe.S reml.S remq.S __syscall_rt_sigaction.S setjmp.S \
- syscall.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/pipe.S uClibc/libc/sysdeps/linux/alpha/pipe.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/pipe.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/pipe.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <sys/syscall.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/setjmp.S uClibc/libc/sysdeps/linux/alpha/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,15 +12,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#include <features.h>
- -#define _ASM
- -#define _SETJMP_H
- -#define __ASSEMBLY__
- -#include <bits/setjmp.h>
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <jmpbuf-offsets.h>
-
- #define a0 $16
-
- @@ -30,10 +25,16 @@
- ldgp $29, 0($27)
-
- $sigsetjmp_local:
- - subq $30, 16, $30
- - .frame $26, 16, $26, 0
- - stq $26, 0($30)
- - .mask 0x04000000, -16
- +#ifndef __PIC__
- +# define FRAME 16
- + subq $30, FRAME, $30
- + .frame $30, FRAME, $26, 0
- + stq $26, 0($30)
- + .mask 0x04000000, -FRAME
- +#else
- +# define FRAME 0
- + .frame $30, FRAME, $26, 0
- +#endif
- .prologue 1
-
- stq $9, JB_S0*8(a0)
- @@ -43,9 +44,9 @@
- stq $13, JB_S4*8(a0)
- stq $14, JB_S5*8(a0)
- stq $26, JB_PC*8(a0)
- - addq $30, 16, $1
- - stq $15, JB_FP*8(a0)
- + addq $30, FRAME, $1
- stq $1, JB_SP*8(a0)
- + stq $15, JB_FP*8(a0)
- stt $f2, JB_F2*8(a0)
- stt $f3, JB_F3*8(a0)
- stt $f4, JB_F4*8(a0)
- @@ -55,12 +56,16 @@
- stt $f8, JB_F8*8(a0)
- stt $f9, JB_F9*8(a0)
-
- +#ifndef __PIC__
- /* Call to C to (potentially) save our signal mask. */
- jsr $26, __sigjmp_save
- -
- ldq $26, 0($30)
- addq $30, 16, $30
- ret
- +#else
- + /* Tailcall to save the signal mask. */
- + br $31, __sigjmp_save !samegp
- +#endif
-
- .end __sigsetjmp
-
- @@ -71,7 +76,6 @@
- .align 3;
- .ent _setjmp , 0;
- _setjmp:
- - .frame $30 , 0, $26
- ldgp $29, 0($27)
- mov 0, $17
- br $sigsetjmp_local
- @@ -81,11 +85,7 @@
- .align 3;
- .ent setjmp , 0;
- setjmp:
- - .frame $30 , 0, $26
- ldgp $29, 0($27)
- mov 1, $17
- br $sigsetjmp_local
- .end setjmp
- -
- -.weak _setjmp
- -.weak setjmp
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sigprocmask.c uClibc/libc/sysdeps/linux/alpha/sigprocmask.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sigprocmask.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/sigprocmask.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/acct.h uClibc/libc/sysdeps/linux/alpha/sys/acct.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/acct.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/sys/acct.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_ACCT_H
-
- @@ -59,7 +58,7 @@
-
-
- /* Switch process accounting on and off. */
- -extern int acct (__const char *__filename) __THROW;
- +extern int acct (const char *__filename) __THROW;
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/io.h uClibc/libc/sysdeps/linux/alpha/sys/io.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/io.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/sys/io.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IO_H
-
- @@ -23,6 +22,7 @@
-
- __BEGIN_DECLS
-
- +#if defined __UCLIBC_LINUX_SPECIFIC__
- /* If TURN_ON is TRUE, request for permission to do direct i/o on the
- port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
- permission off for that range. This call requires root privileges.
- @@ -32,12 +32,12 @@
- E.g., Linux/Alpha for Alpha PCs supports this. */
- extern int ioperm (unsigned long int __from, unsigned long int __num,
- int __turn_on) __THROW;
- -libc_hidden_proto(ioperm)
-
- /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
- access any I/O port is granted. This call requires root
- privileges. */
- extern int iopl (int __level) __THROW;
- +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
-
- /* Return the physical address of the DENSE I/O memory or NULL if none
- is available (e.g. on a jensen). */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/procfs.h uClibc/libc/sysdeps/linux/alpha/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/ucontext.h uClibc/libc/sysdeps/linux/alpha/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/user.h uClibc/libc/sysdeps/linux/alpha/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/__syscall_rt_sigaction.S uClibc/libc/sysdeps/linux/alpha/__syscall_rt_sigaction.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/__syscall_rt_sigaction.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/__syscall_rt_sigaction.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <sys/syscall.h>
- @@ -31,6 +30,9 @@
- .text
-
- .globl __syscall_rt_sigaction
- +#ifndef __UCLIBC_HAS_THREADS_NATIVE__
- +.hidden __syscall_rt_sigaction
- +#endif
- .align 4
- .ent __syscall_rt_sigaction, 0
- __syscall_rt_sigaction:
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/syscall.S uClibc/libc/sysdeps/linux/alpha/syscall.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/syscall.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/alpha/syscall.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <sys/regdef.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/byteswap.h uClibc/libc/sysdeps/linux/arc/bits/byteswap.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/byteswap.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/byteswap.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,23 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + *
- + */
- +
- +#ifndef _ASM_BITS_BYTESWAP_H
- +#define _ASM_BITS_BYTESWAP_H 1
- +
- +#ifdef __Xswape /* gcc defined if -mswape is enabled */
- +
- +#define __bswap_non_constant_32(x) \
- + __extension__ \
- + ({ unsigned int __bswap_32_v = x; \
- + __asm__ ("swape %0, %0" : "+r" (__bswap_32_v)); \
- + __bswap_32_v; })
- +
- +#endif /* __Xswape */
- +
- +#endif /* _ASM_BITS_BYTESWAP_H */
- +
- +#include <bits/byteswap-common.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/endian.h uClibc/libc/sysdeps/linux/arc/bits/endian.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/endian.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/endian.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,15 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +#ifndef _ENDIAN_H
- +# error "Never use <bits/endian.h> directly; include <endian.h> instead."
- +#endif
- +
- +/* ARC support either endianness. */
- +#ifdef __BIG_ENDIAN__
- +#define __BYTE_ORDER __BIG_ENDIAN
- +#else
- +#define __BYTE_ORDER __LITTLE_ENDIAN
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/fcntl.h uClibc/libc/sysdeps/linux/arc/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/fcntl.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,223 @@
- +/* O_*, F_*, FD_* bit values for Linux.
- + *
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +#ifndef _FCNTL_H
- +# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- +#endif
- +
- +
- +#include <sys/types.h>
- +#ifdef __USE_GNU
- +# include <bits/uio.h>
- +#endif
- +
- +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- + located on an ext2 file system */
- +#define O_ACCMODE 0003
- +#define O_RDONLY 00
- +#define O_WRONLY 01
- +#define O_RDWR 02
- +#define O_CREAT 0100 /* not fcntl */
- +#define O_EXCL 0200 /* not fcntl */
- +#define O_NOCTTY 0400 /* not fcntl */
- +#define O_TRUNC 01000 /* not fcntl */
- +#define O_APPEND 02000
- +#define O_NONBLOCK 04000
- +#define O_NDELAY O_NONBLOCK
- +#define O_SYNC 010000
- +#define O_FSYNC O_SYNC
- +#define O_ASYNC 020000
- +
- +#ifdef __USE_GNU
- +# define O_DIRECT 040000 /* Direct disk access. */
- +# define O_DIRECTORY 0200000 /* Must be a directory. */
- +# define O_NOFOLLOW 0400000 /* Do not follow links. */
- +# define O_NOATIME 01000000 /* Do not set atime. */
- +# define O_CLOEXEC 02000000 /* Set close_on_exec. */
- +#endif
- +
- +#ifdef __USE_LARGEFILE64
- +# define O_LARGEFILE 0100000
- +#endif
- +
- +/* For now Linux has synchronisity options for data and read operations.
- + We define the symbols here but let them do the same as O_SYNC since
- + this is a superset. */
- +#if defined __USE_POSIX199309 || defined __USE_UNIX98
- +# define O_DSYNC O_SYNC /* Synchronize data. */
- +# define O_RSYNC O_SYNC /* Synchronize read operations. */
- +#endif
- +
- +/* Values for the second argument to `fcntl'. */
- +#define F_DUPFD 0 /* Duplicate file descriptor. */
- +#define F_GETFD 1 /* Get file descriptor flags. */
- +#define F_SETFD 2 /* Set file descriptor flags. */
- +#define F_GETFL 3 /* Get file status flags. */
- +#define F_SETFL 4 /* Set file status flags. */
- +
- +#ifndef __USE_FILE_OFFSET64
- +# define F_GETLK 5 /* Get record locking info. */
- +# define F_SETLK 6 /* Set record locking info (non-blocking). */
- +# define F_SETLKW 7 /* Set record locking info (blocking). */
- +#else
- +# define F_GETLK F_GETLK64 /* Get record locking info. */
- +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
- +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
- +#endif
- +#define F_GETLK64 12 /* Get record locking info. */
- +#define F_SETLK64 13 /* Set record locking info (non-blocking). */
- +#define F_SETLKW64 14 /* Set record locking info (blocking). */
- +
- +#if defined __USE_BSD || defined __USE_XOPEN2K
- +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
- +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
- +#endif
- +
- +#ifdef __USE_GNU
- +# define F_SETSIG 10 /* Set number of signal to be sent. */
- +# define F_GETSIG 11 /* Get number of signal to be sent. */
- +#endif
- +
- +#ifdef __USE_GNU
- +# define F_SETLEASE 1024 /* Set a lease. */
- +# define F_GETLEASE 1025 /* Enquire what lease is active. */
- +# define F_NOTIFY 1026 /* Request notfications on a directory. */
- +# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- + close-on-exit set on new fd. */
- +#endif
- +
- +/* For F_[GET|SET]FL. */
- +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
- +
- +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
- +#define F_RDLCK 0 /* Read lock. */
- +#define F_WRLCK 1 /* Write lock. */
- +#define F_UNLCK 2 /* Remove lock. */
- +
- +/* For old implementation of bsd flock(). */
- +#define F_EXLCK 4 /* or 3 */
- +#define F_SHLCK 8 /* or 4 */
- +
- +#ifdef __USE_BSD
- +/* Operations for bsd flock(), also used by the kernel implementation. */
- +# define LOCK_SH 1 /* shared lock */
- +# define LOCK_EX 2 /* exclusive lock */
- +# define LOCK_NB 4 /* or'd with one of the above to prevent
- + blocking */
- +# define LOCK_UN 8 /* remove lock */
- +#endif
- +
- +#ifdef __USE_GNU
- +# define LOCK_MAND 32 /* This is a mandatory flock: */
- +# define LOCK_READ 64 /* ... which allows concurrent read operations. */
- +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
- +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
- +#endif
- +
- +#ifdef __USE_GNU
- +/* Types of directory notifications that may be requested with F_NOTIFY. */
- +# define DN_ACCESS 0x00000001 /* File accessed. */
- +# define DN_MODIFY 0x00000002 /* File modified. */
- +# define DN_CREATE 0x00000004 /* File created. */
- +# define DN_DELETE 0x00000008 /* File removed. */
- +# define DN_RENAME 0x00000010 /* File renamed. */
- +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
- +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
- +#endif
- +
- +struct flock
- + {
- + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- +#ifndef __USE_FILE_OFFSET64
- + __off_t l_start; /* Offset where the lock begins. */
- + __off_t l_len; /* Size of the locked area; zero means until EOF. */
- +#else
- + __off64_t l_start; /* Offset where the lock begins. */
- + __off64_t l_len; /* Size of the locked area; zero means until EOF. */
- +#endif
- + __pid_t l_pid; /* Process holding the lock. */
- + };
- +
- +#ifdef __USE_LARGEFILE64
- +struct flock64
- + {
- + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- + __off64_t l_start; /* Offset where the lock begins. */
- + __off64_t l_len; /* Size of the locked area; zero means until EOF. */
- + __pid_t l_pid; /* Process holding the lock. */
- + };
- +#endif
- +
- +/* Define some more compatibility macros to be backward compatible with
- + BSD systems which did not managed to hide these kernel macros. */
- +#ifdef __USE_BSD
- +# define FAPPEND O_APPEND
- +# define FFSYNC O_FSYNC
- +# define FASYNC O_ASYNC
- +# define FNONBLOCK O_NONBLOCK
- +# define FNDELAY O_NDELAY
- +#endif /* Use BSD. */
- +
- +/* Advise to `posix_fadvise'. */
- +#ifdef __USE_XOPEN2K
- +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
- +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
- +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
- +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
- +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
- +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
- +#endif
- +
- +#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- +/* Flags for SYNC_FILE_RANGE. */
- +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- + in the range before performing the
- + write. */
- +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- + dirty pages in the range which are
- + not presently under writeback. */
- +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- + the range after performing the
- + write. */
- +
- +/* Flags for SPLICE and VMSPLICE. */
- +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
- +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- + (but we may still block on the fd
- + we splice from/to). */
- +# define SPLICE_F_MORE 4 /* Expect more data. */
- +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
- +#endif
- +
- +__BEGIN_DECLS
- +
- +#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- +
- +/* Provide kernel hint to read ahead. */
- +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- + __THROW;
- +
- +/* Selective file content synch'ing. */
- +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
- + unsigned int __flags);
- +
- +/* Splice address range into a pipe. */
- +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- + size_t __count, unsigned int __flags);
- +
- +/* Splice two files together. */
- +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- + __off64_t *__offout, size_t __len,
- + unsigned int __flags);
- +
- +/* In-kernel implementation of tee for pipe buffers. */
- +extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- + unsigned int __flags);
- +
- +#endif
- +__END_DECLS
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/kernel_types.h uClibc/libc/sysdeps/linux/arc/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/kernel_types.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,59 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +/* Note that we use the exact same include guard #define names
- + * as asm/posix_types.h. This will avoid gratuitous conflicts
- + * with the posix_types.h kernel header, and will ensure that
- + * our private content, and not the kernel header, will win.
- + * -Erik
- + *
- + * Update: ARC Linux 3.2 ABI change - asm-generic/posix_types.h used now.
- + * for which ARCH wrapper (asm/posix_types.h) is generated, so need to use
- + * the asm-generic file's gaurd.
- + *
- + * Based on asm-generic/stat.h
- + */
- +
- +#ifndef __ASM_GENERIC_POSIX_TYPES_H
- +#define __ASM_GENERIC_POSIX_TYPES_H
- +
- +typedef unsigned long __kernel_dev_t;
- +typedef unsigned long __kernel_ino_t;
- +typedef unsigned int __kernel_mode_t;
- +typedef unsigned int __kernel_nlink_t;
- +typedef long __kernel_off_t;
- +typedef int __kernel_pid_t;
- +typedef int __kernel_ipc_pid_t;
- +typedef unsigned int __kernel_uid_t;
- +typedef unsigned int __kernel_gid_t;
- +typedef unsigned int __kernel_size_t;
- +typedef int __kernel_ssize_t;
- +typedef int __kernel_ptrdiff_t;
- +typedef long __kernel_time_t;
- +typedef long __kernel_suseconds_t;
- +typedef long __kernel_clock_t;
- +typedef int __kernel_daddr_t;
- +typedef char * __kernel_caddr_t;
- +typedef unsigned short __kernel_uid16_t;
- +typedef unsigned short __kernel_gid16_t;
- +typedef __kernel_uid_t __kernel_uid32_t;
- +typedef __kernel_gid_t __kernel_gid32_t;
- +typedef __kernel_uid_t __kernel_old_uid_t;
- +typedef __kernel_gid_t __kernel_old_gid_t;
- +typedef long long __kernel_loff_t;
- +typedef unsigned int __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- +
- +typedef struct {
- +#ifdef __USE_ALL
- + int val[2];
- +#else
- + int __val[2];
- +#endif
- +} __kernel_fsid_t;
- +
- +#endif /* _ASM_ARC_POSIX_TYPES_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/setjmp.h uClibc/libc/sysdeps/linux/arc/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/setjmp.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,16 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _BITS_SETJMP_H
- +#define _BITS_SETJMP_H 1
- +
- +#if !defined _SETJMP_H && !defined _PTHREAD_H
- +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- +#endif
- +
- +typedef int __jmp_buf[13+1+1+1]; /*r13-r25, fp, sp, blink */
- +
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/arc/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/sigcontextinfo.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,15 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <features.h>
- +#define SIGCONTEXT struct sigcontext *
- +#define SIGCONTEXT_EXTRA_ARGS
- +
- +#define GET_PC(ctx) ((void *) ctx->regs.scratch.ret)
- +#define GET_FRAME(ctx) ((void *) ctx->regs.scratch.fp)
- +#define GET_STACK(ctx) ((void *) ctx->regs.scratch.sp)
- +#define CALL_SIGHANDLER(handler, signo, ctx) \
- + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/stackinfo.h uClibc/libc/sysdeps/linux/arc/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/stackinfo.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,13 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _STACKINFO_H
- +#define _STACKINFO_H 1
- +
- +/* On ARC, the stack grows down. */
- +#define _STACK_GROWS_DOWN 1
- +
- +#endif /* stackinfo.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/syscalls.h uClibc/libc/sysdeps/linux/arc/bits/syscalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/syscalls.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,192 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + *
- + */
- +#ifndef _BITS_SYSCALLS_H
- +#define _BITS_SYSCALLS_H
- +#ifndef _SYSCALL_H
- +#error "Never use <bits/syscalls.h> directly; include <sys/syscall.h> instead."
- +#endif
- +
- +#ifndef __ASSEMBLER__
- +
- +#include <errno.h>
- +
- +/*
- + * Fine tuned code for errno handling in syscall wrappers.
- + *
- + * 1. __syscall_error(raw_syscall_ret_val) is used to set the errno (vs.
- + * the typical __set_errno). This helps elide the generated code for
- + * GOT fetch for __errno_location pointer etc, in each wrapper.
- + *
- + * 2. The call to above is also disguised in inline asm. This elides
- + * unconditional save/restore of a few callee regs which gcc almost
- + * always generates if the call is exposed
- + *
- + * 3. The function can't be hidden because wrappers from librt et all also
- + * call it. However hidden is not really needed to bypass PLT for
- + * intra-libc calls as the branch insn w/o @plt is sufficient.
- + */
- +
- +#ifdef IS_IN_rtld
- +/* ldso doesn't have real errno */
- +#define ERRNO_ERRANDS(_sys_result)
- +#else /* !IS_IN_rtld */
- +extern int __syscall_error (int);
- +#ifndef IS_IN_libc
- +/* Inter-libc callers use PLT */
- +#define CALL_ERRNO_SETTER "bl __syscall_error@plt \n\t"
- +#else
- +/* intra-libc callers, despite PIC can bypass PLT */
- +#define CALL_ERRNO_SETTER "bl __syscall_error \n\t"
- +#endif
- +
- +#define ERRNO_ERRANDS(_sys_result) \
- + __asm__ volatile ( \
- + "st.a blink, [sp, -4] \n\t" \
- + CALL_ERRNO_SETTER \
- + "ld.ab blink, [sp, 4] \n\t" \
- + :"+r" (_sys_result) \
- + : \
- + :"r1","r2","r3","r4","r5","r6", \
- + "r7","r8","r9","r10","r11","r12" \
- + );
- +
- +#endif /* IS_IN_rtld */
- +
- +/* Invoke the syscall and return unprocessed kernel status */
- +#define INTERNAL_SYSCALL(nm, err, nr, args...) \
- + INTERNAL_SYSCALL_NCS(SYS_ify (nm), err, nr, args)
- +
- +/* -1 to -1023 as valid error values will suffice for some time */
- +#define INTERNAL_SYSCALL_ERROR_P(val, err) \
- + ((unsigned int) (val) > (unsigned int) -1024)
- +
- +/*
- + * Standard sycall wrapper:
- + * -"const" syscall number @nm, sets errno, return success/error-codes
- + */
- +#define INLINE_SYSCALL(nm, nr_args, args...) \
- +({ \
- + register int __res __asm__("r0"); \
- + __res = INTERNAL_SYSCALL(nm, , nr_args, args); \
- + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P ((__res), ), 0)) \
- + { \
- + ERRNO_ERRANDS(__res); \
- + } \
- + __res; \
- +})
- +
- +/* Non const syscall number @nm
- + * Ideally this could be folded within INLINE_SYSCALL with
- + * __builtin_constant_p in INTERNAL_SYSCALL but that fails for syscall.c
- + */
- +#define INLINE_SYSCALL_NCS(nm, nr_args, args...) \
- +({ \
- + register int __res __asm__("r0"); \
- + __res = INTERNAL_SYSCALL_NCS(nm, , nr_args, args); \
- + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P ((__res), ), 0)) \
- + { \
- + ERRNO_ERRANDS(__res); \
- + } \
- + __res; \
- +})
- +
- +#define INLINE_SYSCALL_NOERR(name, nr, args...) \
- + ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args);\
- + (int) _inline_sys_result; })
- +
- +/*-------------------------------------------------------------------------
- + * Mechanics of Trap - specific to ARC700
- + *
- + * Note the memory clobber is not strictly needed for intended semantics of
- + * the inline asm. However some of the cases, such as old-style 6 arg mmap
- + * gcc was generating code for inline syscall ahead of buffer packing needed
- + * for syscall itself.
- + *-------------------------------------------------------------------------*/
- +
- +#define ARC_TRAP_INSN "trap0 \n\t"
- +
- +#define INTERNAL_SYSCALL_NCS(nm, err, nr_args, args...) \
- +({ \
- + /* Per ABI, r0 is 1st arg and return reg */ \
- + register int __ret __asm__("r0"); \
- + register int _sys_num __asm__("r8"); \
- + \
- + LOAD_ARGS_##nr_args (nm, args) \
- + \
- + __asm__ volatile ( \
- + ARC_TRAP_INSN \
- + : "+r" (__ret) \
- + : "r"(_sys_num) ASM_ARGS_##nr_args \
- + : "memory"); \
- + \
- + __ret; \
- +})
- +
- +/* Macros for setting up inline __asm__ input regs */
- +#define ASM_ARGS_0
- +#define ASM_ARGS_1 ASM_ARGS_0, "r" (__ret)
- +#define ASM_ARGS_2 ASM_ARGS_1, "r" (_arg2)
- +#define ASM_ARGS_3 ASM_ARGS_2, "r" (_arg3)
- +#define ASM_ARGS_4 ASM_ARGS_3, "r" (_arg4)
- +#define ASM_ARGS_5 ASM_ARGS_4, "r" (_arg5)
- +#define ASM_ARGS_6 ASM_ARGS_5, "r" (_arg6)
- +#define ASM_ARGS_7 ASM_ARGS_6, "r" (_arg7)
- +
- +/* Macros for converting sys-call wrapper args into sys call args */
- +#define LOAD_ARGS_0(nm, arg) \
- + _sys_num = (int) (nm); \
- +
- +#define LOAD_ARGS_1(nm, arg1) \
- + __ret = (int) (arg1); \
- + LOAD_ARGS_0 (nm, arg1)
- +
- +/*
- + * Note that the use of _tmpX might look superflous, however it is needed
- + * to ensure that register variables are not clobbered if arg happens to be
- + * a function call itself. e.g. sched_setaffinity() calling getpid() for arg2
- + *
- + * Also this specific order of recursive calling is important to segregate
- + * the tmp args evaluation (function call case described above) and assigment
- + * of register variables
- + */
- +#define LOAD_ARGS_2(nm, arg1, arg2) \
- + int _tmp2 = (int) (arg2); \
- + LOAD_ARGS_1 (nm, arg1) \
- + register int _arg2 __asm__ ("r1") = _tmp2;
- +
- +#define LOAD_ARGS_3(nm, arg1, arg2, arg3) \
- + int _tmp3 = (int) (arg3); \
- + LOAD_ARGS_2 (nm, arg1, arg2) \
- + register int _arg3 __asm__ ("r2") = _tmp3;
- +
- +#define LOAD_ARGS_4(nm, arg1, arg2, arg3, arg4) \
- + int _tmp4 = (int) (arg4); \
- + LOAD_ARGS_3 (nm, arg1, arg2, arg3) \
- + register int _arg4 __asm__ ("r3") = _tmp4;
- +
- +#define LOAD_ARGS_5(nm, arg1, arg2, arg3, arg4, arg5) \
- + int _tmp5 = (int) (arg5); \
- + LOAD_ARGS_4 (nm, arg1, arg2, arg3, arg4) \
- + register int _arg5 __asm__ ("r4") = _tmp5;
- +
- +#define LOAD_ARGS_6(nm, arg1, arg2, arg3, arg4, arg5, arg6) \
- + int _tmp6 = (int) (arg6); \
- + LOAD_ARGS_5 (nm, arg1, arg2, arg3, arg4, arg5) \
- + register int _arg6 __asm__ ("r5") = _tmp6;
- +
- +#define LOAD_ARGS_7(nm, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
- + int _tmp7 = (int) (arg7); \
- + LOAD_ARGS_6 (nm, arg1, arg2, arg3, arg4, arg5, arg6) \
- + register int _arg7 __asm__ ("r6") = _tmp7;
- +
- +#else
- +
- +#define ARC_TRAP_INSN trap0
- +
- +#endif /* __ASSEMBLER__ */
- +
- +#endif /* _BITS_SYSCALLS_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,53 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +/*
- + * Track misc arch-specific features that aren't config options
- + */
- +
- +#ifndef _BITS_UCLIBC_ARCH_FEATURES_H
- +#define _BITS_UCLIBC_ARCH_FEATURES_H
- +
- +/* instruction used when calling abort() to kill yourself */
- +#define __UCLIBC_ABORT_INSTRUCTION__ "flag 0"
- +
- +/* can your target use syscall6() for mmap ? */
- +#undef __UCLIBC_MMAP_HAS_6_ARGS__
- +
- +/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- +#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +
- +/* does your target have a broken create_module() ? */
- +#undef __UCLIBC_BROKEN_CREATE_MODULE__
- +
- +/* does your target have to worry about older [gs]etrlimit() ? */
- +#undef __UCLIBC_HANDLE_OLDER_RLIMIT__
- +
- +/* does your target have an asm .set ? */
- +#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
- +
- +/* define if target doesn't like .global */
- +#undef __UCLIBC_ASM_GLOBAL_DIRECTIVE__
- +
- +/* define if target supports .weak */
- +#define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
- +
- +/* define if target supports .weakext */
- +#undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
- +
- +/* needed probably only for ppc64 */
- +#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
- +
- +/* define if target supports CFI pseudo ops */
- +#undef __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__
- +
- +/* define if target supports IEEE signed zero floats */
- +#define __UCLIBC_HAVE_SIGNED_ZERO__
- +
- +/* The default ';' is a comment on ARC. */
- +#define __UCLIBC_ASM_LINE_SEP__ `
- +
- +#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/uClibc_page.h uClibc/libc/sysdeps/linux/arc/bits/uClibc_page.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/uClibc_page.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/uClibc_page.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,26 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _UCLIBC_PAGE_H
- +#define _UCLIBC_PAGE_H
- +
- +/*
- + * ARC700/linux supports 4k, 8k, 16k pages (build time).
- + * We rely on the kernel exported header (aka uapi headers since 3.8)
- + * for PAGE_SIZE and friends. This avoids hand-editing here when building
- + * toolchain.
- + *
- + * Although uClibc determines page size dynamically, from kernel's auxv which
- + * ARC Linux does pass, still the generic code needs a fall back
- + * _dl_pagesize = auxvt[AT_PAGESZ].a_un.a_val ? : PAGE_SIZE
- + *
- + */
- +#include <asm/page.h>
- +
- +/* TBD: fix this with runtime value for a PAGE_SIZE agnostic uClibc */
- +#define MMAP2_PAGE_SHIFT PAGE_SHIFT
- +
- +#endif /* _UCLIBC_PAGE_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/wordsize.h uClibc/libc/sysdeps/linux/arc/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/wordsize.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,7 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bsd-_setjmp.S uClibc/libc/sysdeps/linux/arc/bsd-_setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bsd-_setjmp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bsd-_setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,20 @@
- +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARC version.
- + *
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
- + We cannot do it in C because it must be a tail-call, so frame-unwinding
- + in setjmp doesn't clobber the state restored by longjmp. */
- +
- +#include <sysdep.h>
- +
- +;@ r0 = jump buffer into which regs will be saved
- +
- +ENTRY(_setjmp)
- + b.d __sigsetjmp
- + mov r1, 0 ; don't save signals
- +END(_setjmp)
- +libc_hidden_def(_setjmp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bsd-setjmp.S uClibc/libc/sysdeps/linux/arc/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bsd-setjmp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,20 @@
- +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. ARC version.
- + *
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
- + We cannot do it in C because it must be a tail-call, so frame-unwinding
- + in setjmp doesn't clobber the state restored by longjmp. */
- +
- +#include <sysdep.h>
- +
- +;@ r0 = jump buffer into which regs will be saved
- +
- +ENTRY(setjmp)
- + b.d __sigsetjmp
- + mov r1, 1 ; save signals
- +END(setjmp)
- +libc_hidden_def(setjmp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/cacheflush.c uClibc/libc/sysdeps/linux/arc/cacheflush.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/cacheflush.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/cacheflush.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +/* cacheflush syscall for ARC
- + *
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sys/syscall.h>
- +#include <sys/cachectl.h>
- +
- +_syscall3(int, cacheflush, void *, addr, int, nbytes, int, op)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/clone.S uClibc/libc/sysdeps/linux/arc/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/clone.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,71 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <asm/errno.h>
- +#include <sys/syscall.h>
- +#include <sysdep.h>
- +
- +; Per man, libc clone( ) is as follows
- +;
- +; int clone(int (*fn)(void *), void *child_stack,
- +; int flags, void *arg, ...
- +; /* pid_t *ptid, struct user_desc *tls, pid_t *ctid */);
- +;
- +; NOTE: I'm assuming that the last 3 args are NOT var-args and in case all
- +; 3 are not relevant, caller will nevertheless pass those as NULL.
- +; Current (Jul 2012) upstream powerpc/clone.S assumes similarly.
- +; Our LTP (from 2007) doesn't seem to have tests to prove otherwise
- +
- +; clone syscall in kernel
- +;
- +; int sys_clone(unsigned long clone_flags, unsigned long newsp,
- +; int __user *parent_tidptr, void *tls,
- +; int __user *child_tidptr)
- +
- +
- +ENTRY(clone)
- + cmp r0, 0 ; @fn can't be NULL
- + cmp.ne r1, 0 ; @child_stack can't be NULL
- + bz .L__sys_err
- +
- + ; @fn and @args needed after the syscall for child
- + ; However r3 containing @arg will be clobbered BEFORE syscall
- + ; r0 containg @fn will be clobbered AFTER syscall (with ret val)
- + mov r10, r0
- + mov r11, r3
- +
- + ; adjust libc args for syscall
- + mov r0, r2 ; libc @flags is 1st syscall arg
- + mov r2, r4 ; libc @ptid
- + mov r3, r5 ; libc @tls
- + mov r4, r6 ; libc @ctid
- + mov r8, __NR_clone
- + ARC_TRAP_INSN
- +
- + cmp r0, 0 ; return code : 0 new process, !0 parent
- + blt .L__sys_err2 ; < 0 (signed) error
- + jnz [blink] ; Parent returns
- +
- + ; child jumps off to @fn with @arg as argument
- + j.d [r10]
- + mov r0, r11
- +
- + ; falls thru to _exit() with result from @fn (already in r0)
- + b HIDDEN_JUMPTARGET(_exit)
- +
- +.L__sys_err:
- + mov r0, -EINVAL
- +.L__sys_err2:
- + ; (1) No need to make -ve kernel error code as positive errno
- + ; __syscall_error expects the -ve error code returned by kernel
- + ; (2) r0 still had orig -ve kernel error code
- + ; (3) Tail call to __syscall_error so we dont have to come back
- + ; here hence instead of jmp-n-link (reg push/pop) we do jmp
- + ; (4) No need to route __syscall_error via PLT, B is inherently
- + ; position independent
- + b __syscall_error
- +END(clone)
- +libc_hidden_def(clone)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/crt1.S uClibc/libc/sysdeps/linux/arc/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/crt1.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,57 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <features.h>
- +
- +.text
- +
- +#ifndef __UCLIBC_CTOR_DTOR__
- + .weak _init
- + .weak _fini
- +#endif
- +
- +/* Stick in a dummy reference to main(), so that if an application
- + * is linking when the main() function is in a static library (.a)
- + * we can be sure that main() actually gets linked in
- + */
- + .type main,@function
- + .type _main,@function
- +
- +
- +/* When we enter this piece of code, the program stack looks like this:
- + argc argument counter (integer)
- + argv[0] program name (pointer)
- + argv[1...N] program args (pointers)
- + argv[argc-1] end of args (integer)
- + NULL
- + env[0...N] environment variables (pointers)
- + NULL
- +*/
- + .text
- + .align 4
- + .global __start
- + .hidden __start
- + .type __start,@function
- +__start:
- + mov fp, 0
- + ld_s r1, [sp] ; argc
- +
- + mov_s r5, r0 ; rltd_fini
- + add_s r2, sp, 4 ; argv
- +
- + mov_s r0, main
- + mov_s r3, _init
- + mov r4, _fini
- +
- + and sp, sp, -8
- + mov r6, sp
- +
- + /* __uClibc_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
- + bl __uClibc_main
- +
- + /* Should never get here.... */
- + flag 1
- +.size __start,.-__start
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/crti.S uClibc/libc/sysdeps/linux/arc/crti.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/crti.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/crti.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,27 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +___gnu_compiled_c:
- +
- + .section .init
- + .align 4
- + .global _init
- + .type _init,@function
- +_init:
- + st.a blink,[sp,-4]
- + st.a fp,[sp,-4]
- + mov fp,sp
- +
- +
- + .section .fini
- + .align 4
- + .global _fini
- + .type _fini,@function
- +_fini:
- + st.a blink,[sp,-4]
- + st.a fp,[sp,-4]
- + mov fp,sp
- + .align 4
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/crtn.S uClibc/libc/sysdeps/linux/arc/crtn.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/crtn.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/crtn.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,29 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +___gnu_compiled_c:
- +
- + .section .init
- + .align 4
- + .global _init
- + .type _init,@function
- + ; EPILOGUE
- + ld.ab fp,[sp,4]
- + ld blink,[sp,0]
- + j.d [blink]
- + add sp,sp,4
- +; .size _init,.-_init
- +
- + .section .fini
- + .align 4
- + .global _fini
- + .type _fini,@function
- + ; EPILOGUE
- + ld.ab fp,[sp,4]
- + ld blink,[sp,0]
- + j.d [blink]
- + add sp,sp,4
- +; .size _fini,.-_fini
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/arc/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,7 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#define __JMP_BUF_SP (13+1)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/arc/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,13 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/__longjmp.S uClibc/libc/sysdeps/linux/arc/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/__longjmp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,38 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sysdep.h>
- +
- +;@ r0 = jump buffer from which regs will be restored
- +;@ r1 = value that setjmp( ) will return due to this longjmp
- +
- +ENTRY(__longjmp)
- +
- + ld_s r13, [r0]
- + ld_s r14, [r0,4]
- + ld r15, [r0,8]
- + ld r16, [r0,12]
- + ld r17, [r0,16]
- + ld r18, [r0,20]
- + ld r19, [r0,24]
- + ld r20, [r0,28]
- + ld r21, [r0,32]
- + ld r22, [r0,36]
- + ld r23, [r0,40]
- + ld r24, [r0,44]
- + ld r25, [r0,48]
- +
- + ld blink, [r0,60] ; load it early enough to not stall the pipeline
- + ld fp, [r0,52]
- + ld sp, [r0,56]
- +
- + mov.f r0, r1 ; get the setjmp return value(due to longjmp) in place
- +
- + j.d [blink] ; to caller of setjmp location, right after the call
- + mov.z r0, 1 ; can't let setjmp return 0 when it is due to longjmp
- +
- +END(__longjmp)
- +libc_hidden_def(__longjmp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/Makefile uClibc/libc/sysdeps/linux/arc/Makefile
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/Makefile 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,13 @@
- +# Makefile for uClibc
- +#
- +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
- +#
- +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +top_srcdir=../../../../
- +top_builddir=../../../../
- +all: objs
- +include $(top_builddir)Rules.mak
- +include Makefile.arch
- +include $(top_srcdir)Makerules
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/Makefile.arch uClibc/libc/sysdeps/linux/arc/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/Makefile.arch 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +# Makefile for uClibc
- +#
- +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
- +#
- +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +CSRC-y := syscall.c sigaction.c __syscall_error.c cacheflush.c
- +
- +SSRC-y := sigrestorer.S __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
- + vfork.S clone.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/setjmp.S uClibc/libc/sysdeps/linux/arc/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/setjmp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,39 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sysdep.h>
- +
- +;@ r0 = jump buffer into which regs will be saved
- +;@ r1 = do we need to save signals
- +
- +ENTRY(__sigsetjmp)
- +
- + st_s r13, [r0]
- + st_s r14, [r0,4]
- + st r15, [r0,8]
- + st r16, [r0,12]
- + st r17, [r0,16]
- + st r18, [r0,20]
- + st r19, [r0,24]
- + st r20, [r0,28]
- + st r21, [r0,32]
- + st r22, [r0,36]
- + st r23, [r0,40]
- + st r24, [r0,44]
- + st r25, [r0,48]
- + st fp, [r0,52]
- + st sp, [r0,56]
- +
- + ; make a note of where longjmp will return to.
- + ; that will be right next to this setjmp call-site which will be
- + ; contained in blink, since "C" caller of this routine will do
- + ; a branch-n-link
- +
- + st blink, [r0,60]
- + b __sigjmp_save
- +
- +END(__sigsetjmp)
- +libc_hidden_def(__sigsetjmp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sigaction.c uClibc/libc/sysdeps/linux/arc/sigaction.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sigaction.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,47 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <errno.h>
- +#include <signal.h>
- +#include <string.h>
- +#include <sys/syscall.h>
- +#include <bits/kernel_sigaction.h>
- +
- +extern void __default_rt_sa_restorer(void);
- +//libc_hidden_proto(__default_rt_sa_restorer);
- +
- +#define SA_RESTORER 0x04000000
- +
- +/* If @act is not NULL, change the action for @sig to @act.
- + If @oact is not NULL, put the old action for @sig in @oact. */
- +int
- +__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
- +{
- + struct sigaction kact;
- +
- + /* !act means caller only wants to know @oact
- + * Hence only otherwise, do SA_RESTORER stuff
- + *
- + * For the normal/default cases (user not providing SA_RESTORER) use
- + * a real sigreturn stub to avoid kernel synthesizing one on user stack
- + * at runtime, which needs PTE permissions update (hence TLB entry
- + * update) and costly cache line flushes for code modification
- + */
- + if (act && !(act->sa_flags & SA_RESTORER)) {
- + memcpy(&kact, act, sizeof(kact));
- + kact.sa_restorer = __default_rt_sa_restorer;
- + kact.sa_flags |= SA_RESTORER;
- +
- + act = &kact;
- + }
- +
- + return __syscall_rt_sigaction(sig, act, oact, sizeof(act->sa_mask));
- +}
- +
- +#ifndef LIBC_SIGACTION
- +weak_alias(__libc_sigaction,sigaction)
- +libc_hidden_weak(sigaction)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sigrestorer.S uClibc/libc/sysdeps/linux/arc/sigrestorer.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sigrestorer.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/sigrestorer.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,21 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sysdep.h>
- +#include <sys/syscall.h>
- +
- +/*
- + * Provide a real sigreturn stub to avoid kernel synthesizing one
- + * on user stack at runtime, which needs PTE permissions update
- + * (hence TLB entry update) and costly cache line flushes for
- + * code modification
- + */
- +
- +ENTRY(__default_rt_sa_restorer)
- + mov r8, __NR_rt_sigreturn
- + ARC_TRAP_INSN
- +END(__default_rt_sa_restorer)
- +libc_hidden_def(__default_rt_sa_restorer)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/cachectl.h uClibc/libc/sysdeps/linux/arc/sys/cachectl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/cachectl.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/sys/cachectl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,21 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _SYS_CACHECTL_H
- +#define _SYS_CACHECTL_H 1
- +
- +/*
- + * Get the kernel definition for the flag bits
- + */
- +#include <asm/cachectl.h>
- +
- +__BEGIN_DECLS
- +
- +extern int cacheflush(void *addr, int nbytes, int flags);
- +
- +__END_DECLS
- +
- +#endif /* sys/cachectl.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/procfs.h uClibc/libc/sysdeps/linux/arc/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/procfs.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,108 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _SYS_PROCFS_H
- +#define _SYS_PROCFS_H 1
- +
- +/* This is somewhat modelled after the file of the same name on SVR4
- + systems. It provides a definition of the core file format for ELF
- + used on Linux. It doesn't have anything to do with the /proc file
- + system, even though Linux has one.
- +
- + Anyway, the whole purpose of this file is for GDB and GDB only.
- + Don't read too much into it. Don't use it for anything other than
- + GDB unless you know what you are doing. */
- +
- +#include <features.h>
- +#include <sys/time.h>
- +#include <sys/types.h>
- +#include <sys/user.h>
- +
- +__BEGIN_DECLS
- +
- +/* Type for a general-purpose register. */
- +typedef unsigned long elf_greg_t;
- +
- +/* And the whole bunch of them. We could have used `struct
- + user_regs' directly in the typedef, but tradition says that
- + the register set is an array, which does have some peculiar
- + semantics, so leave it that way. */
- +#define ELF_NGREG 20
- +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
- +
- +/* Signal info. */
- +struct elf_siginfo
- + {
- + int si_signo; /* Signal number. */
- + int si_code; /* Extra code. */
- + int si_errno; /* Errno. */
- + };
- +
- +/* Definitions to generate Intel SVR4-like core files. These mostly
- + have the same names as the SVR4 types with "elf_" tacked on the
- + front to prevent clashes with Linux definitions, and the typedef
- + forms have been avoided. This is mostly like the SVR4 structure,
- + but more Linuxy, with things that Linux does not support and which
- + GDB doesn't really use excluded. */
- +
- +struct elf_prstatus
- + {
- + struct elf_siginfo pr_info; /* Info associated with signal. */
- + short int pr_cursig; /* Current signal. */
- + unsigned long int pr_sigpend; /* Set of pending signals. */
- + unsigned long int pr_sighold; /* Set of held signals. */
- + __pid_t pr_pid;
- + __pid_t pr_ppid;
- + __pid_t pr_pgrp;
- + __pid_t pr_sid;
- + struct timeval pr_utime; /* User time. */
- + struct timeval pr_stime; /* System time. */
- + struct timeval pr_cutime; /* Cumulative user time. */
- + struct timeval pr_cstime; /* Cumulative system time. */
- + elf_gregset_t pr_reg; /* GP registers. */
- + int pr_fpvalid; /* True if math copro being used. */
- + };
- +
- +
- +#define ELF_PRARGSZ (80) /* Number of chars for args. */
- +
- +struct elf_prpsinfo
- + {
- + char pr_state; /* Numeric process state. */
- + char pr_sname; /* Char for pr_state. */
- + char pr_zomb; /* Zombie. */
- + char pr_nice; /* Nice val. */
- + unsigned long int pr_flag; /* Flags. */
- + unsigned short int pr_uid;
- + unsigned short int pr_gid;
- + int pr_pid, pr_ppid, pr_pgrp, pr_sid;
- + /* Lots missing */
- + char pr_fname[16]; /* Filename of executable. */
- + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
- + };
- +
- +/* The rest of this file provides the types for emulation of the
- + Solaris <proc_service.h> interfaces that should be implemented by
- + users of libthread_db. */
- +
- +/* Addresses. */
- +typedef void *psaddr_t;
- +
- +/* Register sets. Linux has different names. */
- +typedef elf_gregset_t prgregset_t;
- +typedef elf_gregset_t prfpregset_t;
- +
- +/* We don't have any differences between processes and threads,
- + therefore have only one PID type. */
- +typedef __pid_t lwpid_t;
- +
- +/* Process status and info. In the end we do provide typedefs for them. */
- +typedef struct elf_prstatus prstatus_t;
- +typedef struct elf_prpsinfo prpsinfo_t;
- +
- +__END_DECLS
- +
- +#endif /* sys/procfs.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/ucontext.h uClibc/libc/sysdeps/linux/arc/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/ucontext.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,22 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _SYS_UCONTEXT_H
- +#define _SYS_UCONTEXT_H 1
- +
- +#include <features.h>
- +#include <signal.h>
- +#include <bits/sigcontext.h>
- +
- +typedef struct ucontext {
- + unsigned long uc_flags;
- + struct ucontext *uc_link;
- + stack_t uc_stack;
- + struct sigcontext uc_mcontext;
- + sigset_t uc_sigmask; /* mask last for extensibility */
- +} ucontext_t;
- +
- +#endif /* sys/ucontext.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/user.h uClibc/libc/sysdeps/linux/arc/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/user.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,23 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _SYS_USER_H
- +#define _SYS_USER_H 1
- +
- +/* The whole purpose of this file is for GDB and GDB only. Don't read
- + too much into it. Don't use it for anything other than GDB unless
- + you know what you are doing. */
- +
- +
- +/* Actually apps like strace also expect a struct user, so it's better to
- + * have a dummy implementation
- + */
- +
- +struct user {
- + int dummy;
- +};
- +
- +#endif /* sys/user.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/syscall.c uClibc/libc/sysdeps/linux/arc/syscall.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/syscall.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/syscall.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,17 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <features.h>
- +#include <errno.h>
- +#include <sys/types.h>
- +#include <sys/syscall.h>
- +
- +extern long syscall(long int sysnum, long a, long b, long c, long d, long e, long f);
- +
- +long syscall(long int sysnum, long a, long b, long c, long d, long e, long f)
- +{
- + return INLINE_SYSCALL_NCS(sysnum, 6, a, b, c, d, e, f);
- +}
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/__syscall_error.c uClibc/libc/sysdeps/linux/arc/__syscall_error.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/__syscall_error.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/__syscall_error.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,15 @@
- +/* Wrapper for setting errno.
- + *
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <errno.h>
- +#include <sys/syscall.h>
- +
- +int __syscall_error(int err_no)
- +{
- + __set_errno(-err_no);
- + return -1;
- +}
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sysdep.h uClibc/libc/sysdeps/linux/arc/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sysdep.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,22 @@
- +#ifndef _LINUX_ARC_SYSDEP_H
- +#define _LINUX_ARC_SYSDEP_H 1
- +
- +#include <features.h>
- +#include <libc-internal.h>
- +
- +#ifdef __ASSEMBLER__
- +
- +#define ENTRY(nm) \
- + .text ` \
- + .align 4 ` \
- + .globl nm ` \
- + .type nm,@function ` \
- +nm:
- +
- +#define END(name) .size name,.-name
- +
- +#endif /* __ASSEMBLER __*/
- +
- +#include <common/sysdep.h>
- +
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/vfork.S uClibc/libc/sysdeps/linux/arc/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/vfork.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,29 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sys/syscall.h>
- +#include <sysdep.h>
- +
- +/* No legacy syscall ABI means NR_vfork is not available at all, use clone */
- +#define _SIGNAL_H
- +#include <bits/signum.h> /* For SIGCHLD */
- +
- +#define CLONE_VM 0x00000100
- +#define CLONE_VFORK 0x00004000
- +#define CLONE_FLAGS_FOR_VFORK (CLONE_VM|CLONE_VFORK|SIGCHLD)
- +
- +ENTRY(vfork)
- + mov r0, CLONE_FLAGS_FOR_VFORK
- + mov_s r1, sp
- + mov r8, __NR_clone
- + ARC_TRAP_INSN
- +
- + cmp r0, 0
- + jge [blink] ; pid >=0 return, else detour via tailcall to errno
- +
- + b __syscall_error
- +END(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/xstatconv.c uClibc/libc/sysdeps/linux/arc/xstatconv.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/xstatconv.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arc/xstatconv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1 @@
- +/* We don't need any of this. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_assert.c uClibc/libc/sysdeps/linux/arm/aeabi_assert.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_assert.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_assert.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,16 +12,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #undef NDEBUG
- #include <assert.h>
- #include <stdlib.h>
-
-
- -void __aeabi_assert(const char *assertion, const char *file, unsigned int line);
- +void __aeabi_assert(const char *assertion, const char *file, unsigned int line) attribute_noreturn;
- void __aeabi_assert(const char *assertion, const char *file, unsigned int line)
- {
- __assert (assertion, file, line, NULL);
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_atexit.c uClibc/libc/sysdeps/linux/arm/aeabi_atexit.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_atexit.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_atexit.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_errno_addr.c uClibc/libc/sysdeps/linux/arm/aeabi_errno_addr.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_errno_addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_errno_addr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_lcsts.c uClibc/libc/sysdeps/linux/arm/aeabi_lcsts.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_lcsts.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_lcsts.c 2014-02-03 12:32:56.000000000 +0100
- @@ -30,9 +30,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The ARM EABI requires that we provide ISO compile-time constants as
- link-time constants. Some portable applications may reference these. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_localeconv.c uClibc/libc/sysdeps/linux/arm/aeabi_localeconv.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_localeconv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_localeconv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <locale.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_math.c uClibc/libc/sysdeps/linux/arm/aeabi_math.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_math.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_math.c 2014-02-03 12:32:56.000000000 +0100
- @@ -29,9 +29,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <math.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c uClibc/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,16 +12,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <langinfo.h>
- #include <locale.h>
- #include <stdlib.h>
-
- -int
- -__aeabi_MB_CUR_MAX (void)
- +int __aeabi_MB_CUR_MAX (void);
- +int __aeabi_MB_CUR_MAX (void)
- {
- return MB_CUR_MAX;
- }
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memclr.c uClibc/libc/sysdeps/linux/arm/aeabi_memclr.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memclr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_memclr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memcpy.c uClibc/libc/sysdeps/linux/arm/aeabi_memcpy.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memcpy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_memcpy.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memmove.c uClibc/libc/sysdeps/linux/arm/aeabi_memmove.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memmove.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_memmove.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memset.c uClibc/libc/sysdeps/linux/arm/aeabi_memset.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memset.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_memset.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_sighandlers.S uClibc/libc/sysdeps/linux/arm/aeabi_sighandlers.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_sighandlers.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_sighandlers.S 2014-02-03 12:32:56.000000000 +0100
- @@ -30,9 +30,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The ARM EABI defines these as "functions". */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c uClibc/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Because some objects in ld.so and libc.so are built with
- -fexceptions, we end up with references to this personality
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/arm_asm.h uClibc/libc/sysdeps/linux/arm/bits/arm_asm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/arm_asm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/arm_asm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -3,8 +3,10 @@
- #define _ARM_ASM_H
-
- #ifdef __thumb2__
- +# ifdef __ASSEMBLER__
- .thumb
- .syntax unified
- +# endif /* __ASSEMBLER__ */
- #define IT(t, cond) i##t cond
- #else
- /* XXX: This can be removed if/when we require an assembler that supports
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/armsigctx.h uClibc/libc/sysdeps/linux/arm/bits/armsigctx.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/armsigctx.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/armsigctx.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The format of struct sigcontext changed between 2.0 and 2.1 kernels.
- Fortunately 2.0 puts a magic number in the first word and this is not
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/atomic.h uClibc/libc/sysdeps/linux/arm/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if defined __thumb__ && !defined __thumb2__
- #include_next <common/bits/atomic.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/fcntl.h uClibc/libc/sysdeps/linux/arm/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/fenv.h uClibc/libc/sysdeps/linux/arm/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/huge_val.h uClibc/libc/sysdeps/linux/arm/bits/huge_val.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/huge_val.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/huge_val.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/huge_val.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/kernel_types.h uClibc/libc/sysdeps/linux/arm/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -32,6 +32,8 @@
- typedef unsigned short __kernel_old_gid_t;
- typedef long long __kernel_loff_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/mathdef.h uClibc/libc/sysdeps/linux/arm/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/setjmp.h uClibc/libc/sysdeps/linux/arm/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- +/* Copyright (C) 1997,1998,2005,2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,19 +12,18 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. ARM version. */
- +
- #ifndef _BITS_SETJMP_H
- -#define _BITS_SETJMP_H 1
- +#define _BITS_SETJMP_H 1
-
- #if !defined _SETJMP_H && !defined _PTHREAD_H
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#ifndef _ASM
- /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
- saved. */
- #ifdef __ARM_EABI__
- @@ -38,15 +37,10 @@
- #elif defined __MAVERICK__ || defined __IWMMXT__
- typedef int __jmp_buf[34];
- #else
- +# ifdef __UCLIBC_HAS_FPU__
- typedef int __jmp_buf[22];
- +# else
- +typedef int __jmp_buf[10];
- +# endif
- #endif
- #endif
- -
- -#define __JMP_BUF_SP 8
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
- -
- -#endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/shm.h uClibc/libc/sysdeps/linux/arm/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/arm/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <bits/armsigctx.h>
- #include <linux/version.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/stackinfo.h uClibc/libc/sysdeps/linux/arm/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,11 +11,11 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- #ifdef __ARM_EABI__
- -#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +#define __UCLIBC_SYSCALL_ALIGN_64BIT__
- #else
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
- #endif
-
- /* does your target have a broken create_module() ? */
- @@ -48,4 +48,15 @@
- /* only weird assemblers generally need this */
- #undef __UCLIBC_ASM_LINE_SEP__
-
- +#ifdef __GNUC__
- +# define __need_uClibc_config_h
- +# include <bits/uClibc_config.h>
- +# undef __need_uClibc_config_h
- +# if defined __CONFIG_ARM_EABI__ && !defined __ARM_EABI__
- +# error Your toolchain does not support EABI
- +# elif !defined __CONFIG_ARM_EABI__ && defined __ARM_EABI__
- +# error Your toolchain was built for EABI, but you have chosen OABI
- +# endif
- +#endif
- +
- #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/wordsize.h uClibc/libc/sysdeps/linux/arm/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/brk.c uClibc/libc/sysdeps/linux/arm/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bsd-_setjmp.S uClibc/libc/sysdeps/linux/arm/bsd-_setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bsd-_setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <bits/arm_asm.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bsd-setjmp.S uClibc/libc/sysdeps/linux/arm/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <bits/arm_asm.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/clone.S uClibc/libc/sysdeps/linux/arm/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- @@ -111,8 +110,8 @@
- ldr r4, [sp, #12]
- DO_CALL (clone)
- movs a1, a1
- - blt __error
- ldmnefd sp!, {r4}
- + blt __error
- IT(t, ne)
- #if defined(__USE_BX__)
- bxne lr
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/crt1.S uClibc/libc/sysdeps/linux/arm/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -31,9 +31,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This is the canonical entry point, usually the first thing in the text
- segment.
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/find_exidx.c uClibc/libc/sysdeps/linux/arm/find_exidx.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/find_exidx.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/find_exidx.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <link.h>
- #include <unwind.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/fpu_control.h uClibc/libc/sysdeps/linux/arm/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/getcontext.S uClibc/libc/sysdeps/linux/arm/getcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/getcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arm/getcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,80 @@
- +/* Copyright (C) 2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +#include "ucontext_i.h"
- +
- + .syntax unified
- + .text
- +
- +/* int getcontext (ucontext_t *ucp) */
- +
- +ENTRY(__getcontext)
- + /* No need to save r0-r3, d0-d7, or d16-d31. */
- + add r1, r0, #MCONTEXT_ARM_R4
- + stmia r1, {r4-r11}
- +
- + /* Save R13 separately as Thumb can't STM it. */
- + str r13, [r0, #MCONTEXT_ARM_SP]
- + str r14, [r0, #MCONTEXT_ARM_LR]
- + /* Return to LR */
- + str r14, [r0, #MCONTEXT_ARM_PC]
- + /* Return zero */
- + mov r2, #0
- + str r2, [r0, #MCONTEXT_ARM_R0]
- +
- + /* Save ucontext_t * across the next call. */
- + mov r4, r0
- +
- + /* __sigprocmask(SIG_BLOCK, NULL, &(ucontext->uc_sigmask)) */
- + mov r0, #SIG_BLOCK
- + mov r1, #0
- + add r2, r4, #UCONTEXT_SIGMASK
- + bl PLTJMP(sigprocmask)
- +
- +#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
- +# ifdef __VFP_FP__
- + /* Store the VFP registers. */
- + /* Following instruction is fstmiax ip!, {d8-d15}. */
- + stc p11, cr8, [r0], #64
- + /* Store the floating-point status register. */
- + /* Following instruction is fmrx r2, fpscr. */
- + mrc p10, 7, r1, cr1, cr0, 0
- + str r1, [r0], #4
- +# endif
- +#endif
- +#ifdef __IWMMXT__
- + /* Save the call-preserved iWMMXt registers. */
- + /* Following instructions are wstrd wr10, [r0], #8 (etc.) */
- + stcl p1, cr10, [r0], #8
- + stcl p1, cr11, [r0], #8
- + stcl p1, cr12, [r0], #8
- + stcl p1, cr13, [r0], #8
- + stcl p1, cr14, [r0], #8
- + stcl p1, cr15, [r0], #8
- +#endif
- +
- + /* Restore the clobbered R4 and LR. */
- + ldr r14, [r4, #MCONTEXT_ARM_LR]
- + ldr r4, [r4, #MCONTEXT_ARM_R4]
- +
- + mov r0, #0
- + DO_RET(r14)
- +
- +END(__getcontext)
- +weak_alias(__getcontext, getcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/ioperm.c uClibc/libc/sysdeps/linux/arm/ioperm.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/ioperm.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/ioperm.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* I/O port access on the ARM is something of a fiction. What we do is to
- map an appropriate area of /dev/mem into user space so that a program
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/iopl.c uClibc/libc/sysdeps/linux/arm/iopl.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/iopl.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/iopl.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/io.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/arm/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arm/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,23 @@
- +/* Private macros for accessing __jmp_buf contents. ARM version.
- + Copyright (C) 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifdef __UCLIBC_HAS_FPU__
- +#define __JMP_BUF_SP 20
- +#else
- +#define __JMP_BUF_SP 8
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/arm/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arm/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,29 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
- +
- +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +#include <stdint.h>
- +#include <unwind.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#undef _JMPBUF_UNWINDS
- +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- + ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
- +
- +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
- +
- +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj))
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/__longjmp.S uClibc/libc/sysdeps/linux/arm/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,16 +13,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <bits/arm_asm.h>
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
- -
-
- .global __longjmp
- .type __longjmp,%function
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/makecontext.c uClibc/libc/sysdeps/linux/arm/makecontext.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/makecontext.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arm/makecontext.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,73 @@
- +/* Copyright (C) 2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <stdarg.h>
- +#include <ucontext.h>
- +
- +/* Number of arguments that go in registers. */
- +#define NREG_ARGS 4
- +
- +/* Take a context previously prepared via getcontext() and set to
- + call func() with the given int only args. */
- +void
- +__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
- +{
- + extern void __startcontext (void);
- + unsigned long *funcstack;
- + va_list vl;
- + unsigned long *regptr;
- + unsigned int reg;
- + int misaligned;
- +
- + /* Start at the top of stack. */
- + funcstack = (unsigned long *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
- +
- + /* Ensure the stack stays eight byte aligned. */
- + misaligned = ((unsigned long) funcstack & 4) != 0;
- +
- + if ((argc > NREG_ARGS) && (argc & 1) != 0)
- + misaligned = !misaligned;
- +
- + if (misaligned)
- + funcstack -= 1;
- +
- + va_start (vl, argc);
- +
- + /* Reserve space for the on-stack arguments. */
- + if (argc > NREG_ARGS)
- + funcstack -= (argc - NREG_ARGS);
- +
- + ucp->uc_mcontext.arm_sp = (unsigned long) funcstack;
- + ucp->uc_mcontext.arm_pc = (unsigned long) func;
- +
- + /* Exit to startcontext() with the next context in R4 */
- + ucp->uc_mcontext.arm_r4 = (unsigned long) ucp->uc_link;
- + ucp->uc_mcontext.arm_lr = (unsigned long) __startcontext;
- +
- + /* The first four arguments go into registers. */
- + regptr = &(ucp->uc_mcontext.arm_r0);
- +
- + for (reg = 0; (reg < argc) && (reg < NREG_ARGS); reg++)
- + *regptr++ = va_arg (vl, unsigned long);
- +
- + /* And the remainder on the stack. */
- + for (; reg < argc; reg++)
- + *funcstack++ = va_arg (vl, unsigned long);
- +
- + va_end (vl);
- +}
- +weak_alias (__makecontext, makecontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/Makefile.arch uClibc/libc/sysdeps/linux/arm/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,42 +5,40 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c ioperm.c iopl.c mmap.c __syscall_error.c sigaction.c
- +CSRC-y := brk.c ioperm.c iopl.c __syscall_error.c sigaction.c
-
- -SSRC := \
- +SSRC-y := \
- __longjmp.S setjmp.S bsd-setjmp.S \
- - bsd-_setjmp.S sigrestorer.S mmap64.S \
- + bsd-_setjmp.S sigrestorer.S \
- vfork.S clone.S
-
- -ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- -SSRC += libc-aeabi_read_tp.S libc-thumb_atomics.S
- -endif
- -
- -ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
- -CSRC += posix_fadvise.c posix_fadvise64.c
- -endif
- +SSRC-$(UCLIBC_HAS_LFS) += mmap64.S
- +SSRC-$(UCLIBC_HAS_THREADS_NATIVE) += libc-aeabi_read_tp.S libc-thumb_atomics.S
- +CSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.c
- +SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += getcontext.S setcontext.S swapcontext.S
-
- # Is our compiler set up for EABI ?
- -IS_EABI:=$(shell $(CC) $(CFLAGS) -x c - -E -dM </dev/null 2>/dev/null \
- - | grep __ARM_EABI__ 2>&1 >/dev/null && echo 'y' \
- - )
- +CC_IS_EABI_CHECK = $(filter-out -include libc-symbols.h,$(CC) $(CFLAGS))
- +$(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'))
-
- -ifeq ($(IS_EABI),y)
- -CSRC += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
- +CSRC-$(IS_EABI) += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
- aeabi_localeconv.c aeabi_memclr.c aeabi_memcpy.c \
- aeabi_memmove.c aeabi_memset.c find_exidx.c
- -SSRC += syscall-eabi.S
- -ARCH_OBJ_FILTEROUT := syscall.c
- -ifeq ($(UCLIBC_HAS_WCHAR),y)
- -CSRC += aeabi_mb_cur_max.c
- -endif
- -else
- -CSRC += syscall.c
- -endif
- -
- +SSRC-$(IS_EABI) += syscall-eabi.S
- +CSRC-$(if $(IS_EABI),,y)) += syscall.c
- +ARCH_OBJ_FILTEROUT-$(IS_EABI) := syscall.c
- ifeq ($(IS_EABI),y)
- -libc-static-y += $(ARCH_OUT)/aeabi_lcsts.o $(ARCH_OUT)/aeabi_math.o \
- - $(ARCH_OUT)/aeabi_sighandlers.o
- -libc-nonshared-y += $(ARCH_OUT)/aeabi_lcsts.os $(ARCH_OUT)/aeabi_math.os \
- - $(ARCH_OUT)/aeabi_sighandlers.os $(ARCH_OUT)/aeabi_unwind_cpp_pr1.o
- +CSRC-$(UCLIBC_HAS_WCHAR) += aeabi_mb_cur_max.c
- endif
- +
- +libc-static-$(IS_EABI) += $(addprefix $(ARCH_OUT)/, \
- + aeabi_lcsts.o \
- + aeabi_math.o \
- + aeabi_sighandlers.o \
- + )
- +libc-nonshared-$(IS_EABI) += $(addprefix $(ARCH_OUT)/, \
- + aeabi_lcsts.os \
- + aeabi_math.os \
- + aeabi_sighandlers.os \
- + aeabi_unwind_cpp_pr1.o \
- + )
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/mmap64.S uClibc/libc/sysdeps/linux/arm/mmap64.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/mmap64.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/mmap64.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,17 +12,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- +#include <_lfs_64.h>
- #define _ERRNO_H
- #include <bits/errno.h>
- #include <sys/syscall.h>
- #include <bits/arm_asm.h>
-
- -#if defined __UCLIBC_HAS_LFS__ && defined __NR_mmap2
- +#ifdef __NR_mmap2
-
- /* The mmap2 system call takes six arguments, all in registers. */
- .text
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/mmap.c uClibc/libc/sysdeps/linux/arm/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/mmap.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,74 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * _mmap() for uClibc
- - *
- - * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
- - *
- - * GNU Library General Public License (LGPL) version 2 or later.
- - */
- -#include <errno.h>
- -#include <unistd.h>
- -#include <sys/mman.h>
- -#include <sys/syscall.h>
- -
- -#if defined (__NR_mmap) || defined (__NR_mmap2)
- -
- -libc_hidden_proto(mmap)
- -#if defined (__UCLIBC_MMAP_HAS_6_ARGS__) && defined (__NR_mmap)
- -#define __NR__mmap __NR_mmap
- -static __inline__ _syscall6 (__ptr_t, _mmap, __ptr_t, addr, size_t, len,
- - int, prot, int, flags, int, fd, __off_t, offset)
- -__ptr_t mmap(__ptr_t addr, size_t len, int prot,
- - int flags, int fd, __off_t offset)
- -{
- - return (__ptr_t) _mmap (addr, len, prot, flags,
- - fd, offset);
- -}
- -
- -#elif defined (__NR_mmap2)
- -#define __NR__mmap __NR_mmap2
- -
- -#ifndef MMAP2_PAGE_SHIFT
- -# define MMAP2_PAGE_SHIFT 12
- -#endif
- -
- -static __inline__ _syscall6 (__ptr_t, _mmap, __ptr_t, addr, size_t, len,
- - int, prot, int, flags, int, fd, __off_t, offset);
- -__ptr_t mmap(__ptr_t addr, size_t len, int prot,
- - int flags, int fd, __off_t offset)
- -{
- - /* check if offset is page aligned */
- - if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1))
- - {
- - __set_errno(EINVAL);
- - return MAP_FAILED;
- - }
- -#ifdef __USE_FILE_OFFSET64
- - return (__ptr_t) _mmap (addr, len, prot, flags,
- - fd, ((__u_quad_t) offset >> MMAP2_PAGE_SHIFT));
- -#else
- - return (__ptr_t) _mmap (addr, len, prot, flags,
- - fd, ((__u_long) offset >> MMAP2_PAGE_SHIFT));
- -#endif
- -}
- -#elif defined (__NR_mmap)
- -# define __NR__mmap __NR_mmap
- -static __inline__ _syscall1(__ptr_t, _mmap, unsigned long *, buffer)
- -__ptr_t mmap(__ptr_t addr, size_t len, int prot,
- - int flags, int fd, __off_t offset)
- -{
- - unsigned long buffer[6];
- -
- - buffer[0] = (unsigned long) addr;
- - buffer[1] = (unsigned long) len;
- - buffer[2] = (unsigned long) prot;
- - buffer[3] = (unsigned long) flags;
- - buffer[4] = (unsigned long) fd;
- - buffer[5] = (unsigned long) offset;
- - return (__ptr_t) _mmap(buffer);
- -}
- -#endif
- -libc_hidden_def (mmap)
- -#else
- -# error "Your architecture doesn't seem to provide mmap() !?"
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/posix_fadvise64.c uClibc/libc/sysdeps/linux/arm/posix_fadvise64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/posix_fadvise64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,59 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * posix_fadvise64() for ARM uClibc
- - * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
- - *
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <features.h>
- -#include <unistd.h>
- -#include <errno.h>
- -#include <endian.h>
- -#include <stdint.h>
- -#include <sys/types.h>
- -#include <sys/syscall.h>
- -#include <fcntl.h>
- -
- -#ifdef __UCLIBC_HAS_LFS__
- -
- -#if defined __NR_arm_fadvise64_64
- -
- -/* Was named __libc_posix_fadvise64 for some inexplicable reason.
- -** google says only uclibc has *__libc*_posix_fadviseXXX,
- -** so it cannot be compat with anything.
- -**
- -** Remove this comment and one at the end after 0.9.31
- -*/
- -
- -/* This is for the ARM version of fadvise64_64 which swaps the params
- - * about to avoid having ABI compat issues
- - */
- -#define __NR___syscall_arm_fadvise64_64 __NR_arm_fadvise64_64
- -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
- -{
- - INTERNAL_SYSCALL_DECL (err);
- - int ret = INTERNAL_SYSCALL (arm_fadvise64_64, err, 6, fd, advise,
- - __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset),
- - __LONG_LONG_PAIR ((long)(len >> 32), (long)len));
- - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
- - return 0;
- - if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
- - return INTERNAL_SYSCALL_ERRNO (ret, err);
- - return 0;
- -}
- -
- -/* weak_alias(__libc_posix_fadvise64, posix_fadvise64); */
- -
- -#elif defined __UCLIBC_HAS_STUBS__
- -
- -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
- -{
- - return ENOSYS;
- -}
- -
- -#endif
- -
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/posix_fadvise.c uClibc/libc/sysdeps/linux/arm/posix_fadvise.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/posix_fadvise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,49 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * posix_fadvise() for ARM uClibc
- - * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
- - *
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -#include <sys/syscall.h>
- -#include <fcntl.h>
- -
- -#if defined __NR_arm_fadvise64_64
- -
- -#define HIGH_BITS(x) (sizeof(x) > 4 ? (x) >> 32 : 0)
- -
- -/* Was named __libc_posix_fadvise for some inexplicable reason.
- -** google says only uclibc has *__libc*_posix_fadviseXXX,
- -** so it cannot be compat with anything.
- -**
- -** Remove this comment and one at the end after 0.9.31
- -*/
- -
- -/* This is for the ARM version of fadvise64_64 which swaps the params
- - * about to avoid having ABI compat issues
- - */
- -#define __NR___syscall_arm_fadvise64_64 __NR_arm_fadvise64_64
- -int posix_fadvise(int fd, off_t offset, off_t len, int advise)
- -{
- - INTERNAL_SYSCALL_DECL (err);
- - int ret = INTERNAL_SYSCALL (arm_fadvise64_64, err, 6, fd, advise,
- - __LONG_LONG_PAIR (HIGH_BITS(offset), (long)offset),
- - __LONG_LONG_PAIR (HIGH_BITS(len), (long)len));
- -
- - if (INTERNAL_SYSCALL_ERROR_P (ret, err))
- - return INTERNAL_SYSCALL_ERRNO (ret, err);
- - return 0;
- -}
- -
- -/* weak_alias(__libc_posix_fadvise, posix_fadvise); */
- -
- -#elif defined __UCLIBC_HAS_STUBS__
- -
- -int posix_fadvise(int fd attribute_unused, off_t offset attribute_unused, off_t len attribute_unused, int advice attribute_unused)
- -{
- - return ENOSYS;
- -}
- -
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/setcontext.S uClibc/libc/sysdeps/linux/arm/setcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/setcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arm/setcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,76 @@
- +/* Copyright (C) 2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +#include "ucontext_i.h"
- +
- + .syntax unified
- + .text
- +
- +/* int setcontext (const ucontext_t *ucp) */
- +
- +ENTRY(__setcontext)
- + mov r4, r0
- +
- +#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
- +# ifdef __VFP_FP__
- + /* Following instruction is vldmia r0!, {d8-d15}. */
- + ldc p11, cr8, [r0], #64
- + /* Restore the floating-point status register. */
- + ldr r1, [r0], #4
- + /* Following instruction is fmxr fpscr, r1. */
- + mcr p10, 7, r1, cr1, cr0, 0
- +# endif
- +#endif
- +
- +#ifdef __IWMMXT__
- + /* Restore the call-preserved iWMMXt registers. */
- + /* Following instructions are wldrd wr10, [r0], #8 (etc.) */
- + ldcl p1, cr10, [r0], #8
- + ldcl p1, cr11, [r0], #8
- + ldcl p1, cr12, [r0], #8
- + ldcl p1, cr13, [r0], #8
- + ldcl p1, cr14, [r0], #8
- + ldcl p1, cr15, [r0], #8
- +#endif
- +
- + /* Now bring back the signal status. */
- + mov r0, #SIG_SETMASK
- + add r1, r4, #UCONTEXT_SIGMASK
- + mov r2, #0
- + bl PLTJMP(sigprocmask)
- +
- + /* Loading r0-r3 makes makecontext easier. */
- + add r14, r4, #MCONTEXT_ARM_R0
- + ldmia r14, {r0-r11}
- + ldr r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)]
- + add r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0)
- + ldmia r14, {r14, pc}
- +
- +END(setcontext)
- +weak_alias(__setcontext, setcontext)
- +
- + /* Called when a makecontext() context returns. Start the
- + context in R4 or fall through to exit(). */
- +ENTRY(__startcontext)
- + movs r0, r4
- + bne PLTJMP(__setcontext)
- +
- + @ New context was 0 - exit
- + b PLTJMP(_exit)
- +END(__startcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/setjmp.S uClibc/libc/sysdeps/linux/arm/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <bits/arm_asm.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sigaction.c uClibc/libc/sysdeps/linux/arm/sigaction.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>.
-
- Totally hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
- */
- @@ -29,8 +28,6 @@
- extern void __default_sa_restorer(void);
- extern void __default_rt_sa_restorer(void);
-
- -extern __typeof(sigaction) __libc_sigaction;
- -
- /* When RT signals are in use we need to use a different return stub. */
- #ifdef __NR_rt_sigreturn
- #define choose_restorer(flags) \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sigrestorer.S uClibc/libc/sysdeps/linux/arm/sigrestorer.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sigrestorer.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/sigrestorer.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <bits/arm_asm.h>
- #include <sys/syscall.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/swapcontext.S uClibc/libc/sysdeps/linux/arm/swapcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/swapcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arm/swapcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,63 @@
- +/* Copyright (C) 2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +#include "ucontext_i.h"
- +
- + .syntax unified
- + .text
- +
- +/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
- +
- +ENTRY(swapcontext)
- +
- + /* Have getcontext() do most of the work then fix up
- + LR afterwards. Save R3 to keep the stack aligned. */
- + push {r0,r1,r3,r14}
- + cfi_adjust_cfa_offset (16)
- + cfi_rel_offset (r0,0)
- + cfi_rel_offset (r1,4)
- + cfi_rel_offset (r3,8)
- + cfi_rel_offset (r14,12)
- +
- + bl __getcontext
- + mov r4, r0
- +
- + pop {r0,r1,r3,r14}
- + cfi_adjust_cfa_offset (-16)
- + cfi_restore (r0)
- + cfi_restore (r1)
- + cfi_restore (r3)
- + cfi_restore (r14)
- +
- + /* Exit if getcontext() failed. */
- + cmp r4, #0
- + itt ne
- + movne r0, r4
- + RETINSTR(ne, r14)
- +
- + /* Fix up LR and the PC. */
- + str r13,[r0, #MCONTEXT_ARM_SP]
- + str r14,[r0, #MCONTEXT_ARM_LR]
- + str r14,[r0, #MCONTEXT_ARM_PC]
- +
- + /* And swap using swapcontext(). */
- + mov r0, r1
- + b __setcontext
- +
- +END(swapcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/elf.h uClibc/libc/sysdeps/linux/arm/sys/elf.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/elf.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/sys/elf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_ELF_H
- #define _SYS_ELF_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/io.h uClibc/libc/sysdeps/linux/arm/sys/io.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/io.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/sys/io.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IO_H
-
- @@ -23,6 +22,7 @@
-
- __BEGIN_DECLS
-
- +#if defined __UCLIBC_LINUX_SPECIFIC__
- /* If TURN_ON is TRUE, request for permission to do direct i/o on the
- port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
- permission off for that range. This call requires root privileges. */
- @@ -34,6 +34,7 @@
- permission to access any I/O port is granted. This call requires
- root privileges. */
- extern int iopl (int __level) __THROW;
- +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
-
- /* The functions that actually perform reads and writes. */
- extern unsigned char inb (unsigned long int port) __THROW;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/procfs.h uClibc/libc/sysdeps/linux/arm/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/ucontext.h uClibc/libc/sysdeps/linux/arm/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* System V/ARM ABI compliant context switching support. */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/user.h uClibc/libc/sysdeps/linux/arm/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/syscall-eabi.S uClibc/libc/sysdeps/linux/arm/syscall-eabi.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/syscall-eabi.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/syscall-eabi.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/syscall.h>
- #include <bits/arm_asm.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sysdep.h uClibc/libc/sysdeps/linux/arm/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LINUX_ARM_SYSDEP_H
- #define _LINUX_ARM_SYSDEP_H 1
- @@ -157,6 +156,7 @@
- #define PSEUDO_END_ERRVAL(name) \
- END (name)
-
- +#undef ret_ERRVAL
- #define ret_ERRVAL PSEUDO_RET_NOERRNO
-
- #if defined NOT_IN_libc
- @@ -254,7 +254,7 @@
- #undef INLINE_SYSCALL
- #define INLINE_SYSCALL(name, nr, args...) \
- ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args); \
- - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ), 0)) \
- + if (unlikely (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ))) \
- { \
- __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, )); \
- _inline_sys_result = (unsigned int) -1; \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/ucontext_i.sym uClibc/libc/sysdeps/linux/arm/ucontext_i.sym
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/ucontext_i.sym 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/arm/ucontext_i.sym 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,30 @@
- +#include <inttypes.h>
- +#include <signal.h>
- +#include <stddef.h>
- +#include <sys/ucontext.h>
- +
- +SIG_BLOCK
- +SIG_SETMASK
- +
- +-- Offsets of the fields in the ucontext_t structure.
- +#define ucontext(member) offsetof (ucontext_t, member)
- +#define mcontext(member) ucontext (uc_mcontext.member)
- +
- +UCONTEXT_FLAGS ucontext (uc_flags)
- +UCONTEXT_LINK ucontext (uc_link)
- +UCONTEXT_STACK ucontext (uc_stack)
- +UCONTEXT_MCONTEXT ucontext (uc_mcontext)
- +UCONTEXT_SIGMASK ucontext (uc_sigmask)
- +
- +UCONTEXT_REGSPACE ucontext (uc_regspace)
- +
- +MCONTEXT_TRAP_NO mcontext (trap_no)
- +MCONTEXT_ERROR_CODE mcontext (error_code)
- +MCONTEXT_OLDMASK mcontext (oldmask)
- +MCONTEXT_ARM_R0 mcontext (arm_r0)
- +MCONTEXT_ARM_R4 mcontext (arm_r4)
- +MCONTEXT_ARM_SP mcontext (arm_sp)
- +MCONTEXT_ARM_LR mcontext (arm_lr)
- +MCONTEXT_ARM_PC mcontext (arm_pc)
- +MCONTEXT_ARM_CPSR mcontext (arm_cpsr)
- +MCONTEXT_FAULT_ADDRESS mcontext (fault_address)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/unwind.h uClibc/libc/sysdeps/linux/arm/unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -22,9 +22,8 @@
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- - along with this program; see the file COPYING. If not, write to
- - the Free Software Foundation, 51 Franklin Street, Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + along with this program; see the file COPYING. If not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Language-independent unwinder header public defines. This contains both
- ABI defined objects, and GNU support routines. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/vfork.S uClibc/libc/sysdeps/linux/arm/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/arm/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -104,5 +104,5 @@
- .size __vfork,.-__vfork
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/atomic.h uClibc/libc/sysdeps/linux/avr32/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -28,6 +28,7 @@
-
- #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- ({ \
- + __uint32_t __result; \
- __typeof__(*(mem)) __prev; \
- __asm__ __volatile__( \
- "/* __arch_compare_and_exchange_val_32_acq */\n" \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/kernel_types.h uClibc/libc/sysdeps/linux/avr32/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -39,6 +39,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef unsigned short __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- #ifdef __GNUC__
- typedef long long __kernel_loff_t;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/setjmp.h uClibc/libc/sysdeps/linux/avr32/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,19 +12,10 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#ifndef _ASM
- /*
- * The jump buffer contains r0-r7, sr, sp and lr. Other registers are
- * not saved.
- */
- typedef int __jmp_buf[11];
- -#endif
- -
- -#define __JMP_BUF_SP 4
- -
- -/* Test if longjmp to JMPBUF would unwind the frame containing a local
- - variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *)(address) < (void *)(jmpbuf[__JMP_BUF_SP]))
-
- #endif /* _BITS_SETJMP_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/stackinfo.h uClibc/libc/sysdeps/linux/avr32/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/avr32/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/avr32/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,9 @@
- +/* Private macros for accessing __jmp_buf contents. avr32 version.
- + * Copyright (C) 2004-2005 Atmel Corporation
- + *
- + * This file is subject to the terms and conditions of the GNU Lesser General
- + * Public License. See the file "COPYING.LIB" in the main directory of this
- + * archive for more details.
- + */
- +
- +#define __JMP_BUF_SP 4
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/avr32/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/avr32/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,14 @@
- +/*
- + * Copyright (C) 2004-2005 Atmel Corporation
- + *
- + * This file is subject to the terms and conditions of the GNU Lesser General
- + * Public License. See the file "COPYING.LIB" in the main directory of this
- + * archive for more details.
- + */
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame containing a local
- + variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *)(address) < (void *)(jmpbuf[__JMP_BUF_SP]))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/Makefile uClibc/libc/sysdeps/linux/avr32/Makefile
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
- # details.
- #
- # You should have received a copy of the GNU Library General Public License
- -# along with this program; if not, write to the Free Software Foundation, Inc.,
- -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- +# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
- top_srcdir=../../../../
- top_builddir=../../../../
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/Makefile.arch uClibc/libc/sysdeps/linux/avr32/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c clone.c mmap.c prctl.c sigaction.c
- +CSRC-y := brk.c clone.c mmap.c prctl.c sigaction.c
-
- -SSRC := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
- +SSRC-y := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
- sigrestorer.S syscall.S vfork.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/mmap.c uClibc/libc/sysdeps/linux/avr32/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/mmap.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,10 +12,10 @@
- #include <sys/syscall.h>
-
-
- -static _syscall6(__ptr_t, mmap2, __ptr_t, addr, size_t, len, int, prot,
- - int, flags, int, fd, __off_t, pgoff)
- +static __inline__ _syscall6(void *, mmap2, void *, addr, size_t, len, int, prot,
- + int, flags, int, fd, __off_t, pgoff)
-
- -__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
- +void *mmap(void *addr, size_t len, int prot, int flags, int fd, __off_t offset)
- {
- unsigned long page_size = sysconf(_SC_PAGESIZE);
- unsigned long pgoff;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/setjmp.S uClibc/libc/sysdeps/linux/avr32/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -5,9 +5,6 @@
- * Public License. See the file "COPYING.LIB" in the main directory of this
- * archive for more details.
- */
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
-
- .text
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sigaction.c uClibc/libc/sysdeps/linux/avr32/sigaction.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,6 @@
- #define SA_RESTORER 0x04000000
- extern void __default_rt_sa_restorer(void);
-
- -extern __typeof(sigaction) __libc_sigaction;
- -
- /*
- * If act is not NULL, change the action for sig to *act.
- * If oact is not NULL, put the old action for sig in *oact.
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/elf.h uClibc/libc/sysdeps/linux/avr32/sys/elf.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/elf.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/sys/elf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_ELF_H
- #define _SYS_ELF_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/procfs.h uClibc/libc/sysdeps/linux/avr32/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/ucontext.h uClibc/libc/sysdeps/linux/avr32/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Linux/AVR32 ABI compliant context switching support. */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/vfork.S uClibc/libc/sysdeps/linux/avr32/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/avr32/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -17,10 +17,10 @@
- * Fortunately, the Linux kernel preserves LR across system calls.
- */
-
- -#include <features.h>
- #include <sys/syscall.h>
-
- .global __vfork
- + .hidden __vfork
- .type __vfork,@function
- .align 1
- __vfork:
- @@ -55,4 +55,4 @@
- .size __vfork, . - __vfork
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/elf-fdpic.h uClibc/libc/sysdeps/linux/bfin/bits/elf-fdpic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/elf-fdpic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/bits/elf-fdpic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -22,8 +22,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_ELF_FDPIC_H
- #define _BITS_ELF_FDPIC_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/fcntl.h uClibc/libc/sysdeps/linux/bfin/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/huge_val.h uClibc/libc/sysdeps/linux/bfin/bits/huge_val.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/huge_val.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/bits/huge_val.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/huge_val.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/kernel_types.h uClibc/libc/sysdeps/linux/bfin/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -32,6 +32,8 @@
- typedef unsigned short __kernel_old_gid_t;
- typedef long long __kernel_loff_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/setjmp.h uClibc/libc/sysdeps/linux/bfin/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. bfin version. Lineo, Inc. 2001*/
- #ifndef _BITS_SETJMP_H
- @@ -24,7 +23,6 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#ifndef _ASM
- /* Jump buffer contains r7-r4, p5-p3, fp, sp and pc. Other registers are not saved. */
- typedef struct
- {
- @@ -45,13 +43,4 @@
- unsigned long pc;
- }__jmp_buf[1];
-
- -#endif
- -
- -#define __JMP_BUF_SP 8
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)->fp)
- -
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/bfin/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT int _code, struct sigcontext *
- #define SIGCONTEXT_EXTRA_ARGS _code,
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/stackinfo.h uClibc/libc/sysdeps/linux/bfin/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/typesizes.h uClibc/libc/sysdeps/linux/bfin/bits/typesizes.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/bits/typesizes.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_TYPES_H
- # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/wordsize.h uClibc/libc/sysdeps/linux/bfin/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/cacheflush.c uClibc/libc/sysdeps/linux/bfin/cacheflush.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/cacheflush.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/cacheflush.c 2014-02-03 12:32:56.000000000 +0100
- @@ -6,9 +6,10 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <unistd.h>
- -#include <errno.h>
- #include <sys/syscall.h>
- -#include <sys/cachectl.h>
-
- -_syscall3 (int, cacheflush, void *, start, const int, nbytes, const int, flags)
- +#ifdef __NR_cacheflush
- +# include <sys/cachectl.h>
- +
- +_syscall3 (int, cacheflush, void *, addr, const int, nbytes, const int, flags)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crt1.S uClibc/libc/sysdeps/linux/bfin/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
-
- /* When we enter this piece of code, the user stack looks like this:
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crti.S uClibc/libc/sysdeps/linux/bfin/crti.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crti.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/crti.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- -along with GCC; see the file COPYING. If not, write to
- -the Free Software Foundation, 59 Temple Place - Suite 330,
- -Boston, MA 02111-1307, USA. */
- +along with GCC; see the file COPYING. If not, see
- +<http://www.gnu.org/licenses/>. */
-
- /* As a special exception, if you link this library with files
- compiled with GCC to produce an executable, this does not cause
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crtn.S uClibc/libc/sysdeps/linux/bfin/crtn.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crtn.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/crtn.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- -along with GCC; see the file COPYING. If not, write to
- -the Free Software Foundation, 59 Temple Place - Suite 330,
- -Boston, MA 02111-1307, USA. */
- +along with GCC; see the file COPYING. If not, see
- +<http://www.gnu.org/licenses/>. */
-
- /* As a special exception, if you link this library with files
- compiled with GCC to produce an executable, this does not cause
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crtreloc.c uClibc/libc/sysdeps/linux/bfin/crtreloc.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crtreloc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/crtreloc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -23,8 +23,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- #ifdef __BFIN_FDPIC__
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/bfin/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/bfin/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,8 @@
- +/* Private macros for accessing __jmp_buf contents. BFIN version. */
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#define __JMP_BUF_SP 8
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/bfin/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/bfin/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)->fp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/Makefile.arch uClibc/libc/sysdeps/linux/bfin/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,9 +5,11 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := bsdsetjmp.c clone.c \
- - sram-alloc.c sram-free.c dma-memcpy.c cacheflush.c
- +CSRC-y := bsdsetjmp.c clone.c \
- + sram-alloc.c sram-free.c dma-memcpy.c
-
- -SSRC := __longjmp.S setjmp.S bsd-_setjmp.S
- +SSRC-y := __longjmp.S setjmp.S bsd-_setjmp.S
- +
- +CSRC-$(UCLIBC_LINUX_SPECIFIC) += cacheflush.c
-
- ARCH_HEADERS := bfin_fixed_code.h bfin_l1layout.h bfin_sram.h
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/cachectl.h uClibc/libc/sysdeps/linux/bfin/sys/cachectl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/cachectl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/sys/cachectl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -18,7 +18,7 @@
-
- __BEGIN_DECLS
-
- -extern int cacheflush (void *addr, __const int nbytes, __const int flags);
- +extern int cacheflush (void *addr, const int nbytes, const int flags);
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/elf.h uClibc/libc/sysdeps/linux/bfin/sys/elf.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/elf.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/sys/elf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_ELF_H
- #define _SYS_ELF_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/io.h uClibc/libc/sysdeps/linux/bfin/sys/io.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/io.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/sys/io.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IO_H
-
- @@ -23,17 +22,18 @@
-
- __BEGIN_DECLS
-
- +#if defined __UCLIBC_LINUX_SPECIFIC__
- /* If TURN_ON is TRUE, request for permission to do direct i/o on the
- port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
- permission off for that range. This call requires root privileges. */
- extern int ioperm (unsigned long int __from, unsigned long int __num,
- int __turn_on) __THROW;
- -libc_hidden_proto(ioperm)
-
- /* Set the I/O privilege level to LEVEL. If LEVEL is nonzero,
- permission to access any I/O port is granted. This call requires
- root privileges. */
- extern int iopl (int __level) __THROW;
- +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
-
- /* The functions that actually perform reads and writes. */
- extern unsigned char inb (unsigned long int port) __THROW;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/procfs.h uClibc/libc/sysdeps/linux/bfin/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/ucontext.h uClibc/libc/sysdeps/linux/bfin/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/bfin/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* System V/blackfin ABI compliant context switching support. */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/byteswap.h uClibc/libc/sysdeps/linux/c6x/bits/byteswap.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/byteswap.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- - *
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- #ifndef _ASM_BITS_BYTESWAP_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/elf-dsbt.h uClibc/libc/sysdeps/linux/c6x/bits/elf-dsbt.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/elf-dsbt.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/elf-dsbt.h 2014-02-03 12:32:56.000000000 +0100
- @@ -25,8 +25,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_ELF_DSBT_H
- #define _BITS_ELF_DSBT_H
- @@ -59,15 +58,10 @@
-
- struct elf32_dsbt_loadmap {
- /* Protocol version number, must be zero. */
- - Elf32_Word version;
- -
- - /* Pointer to DSBT */
- - unsigned *dsbt_table;
- - unsigned dsbt_size;
- - unsigned dsbt_index;
- + Elf32_Half version;
-
- /* number of segments */
- - Elf32_Word nsegs;
- + Elf32_Half nsegs;
-
- /* The actual memory map. */
- struct elf32_dsbt_loadseg segs[0];
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/fcntl.h uClibc/libc/sysdeps/linux/c6x/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/ipc.h uClibc/libc/sysdeps/linux/c6x/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/kernel_types.h uClibc/libc/sysdeps/linux/c6x/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -22,6 +22,8 @@
- typedef unsigned int __kernel_old_uid_t;
- typedef unsigned int __kernel_old_gid_t;
- typedef unsigned int __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef unsigned int __kernel_size_t;
- typedef int __kernel_ssize_t;
- typedef int __kernel_ptrdiff_t;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/mathdef.h uClibc/libc/sysdeps/linux/c6x/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/nan.h uClibc/libc/sysdeps/linux/c6x/bits/nan.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/nan.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/nan.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/nan.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/poll.h uClibc/libc/sysdeps/linux/c6x/bits/poll.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/poll.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_POLL_H
- # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/resource.h uClibc/libc/sysdeps/linux/c6x/bits/resource.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/resource.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/resource.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_RESOURCE_H
- # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/setjmp.h uClibc/libc/sysdeps/linux/c6x/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,12 +14,14 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- - *
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- -#ifndef _SETJMP_H
- +#ifndef _BITS_SETJMP_H
- +#define _BITS_SETJMP_H 1
- +
- +#if !defined _SETJMP_H && !defined _PTHREAD_H
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- @@ -28,12 +30,4 @@
- unsigned long __pc; /* the return address */
- } __jmp_buf[1];
-
- -/* the stack pointer (B15) */
- -#define JP_SP 11
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)->__regs[JP_SP])
- -
- -
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/c6x/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT int _code, struct sigcontext *
- #define SIGCONTEXT_EXTRA_ARGS _code,
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/stackinfo.h uClibc/libc/sysdeps/linux/c6x/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/syscalls.h uClibc/libc/sysdeps/linux/c6x/bits/syscalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -37,7 +37,7 @@
- #undef INLINE_SYSCALL
- #define INLINE_SYSCALL(name, nr, args...) \
- ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args); \
- - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ), 0)) \
- + if (unlikely (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ))) \
- { \
- __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, )); \
- _inline_sys_result = (unsigned int) -1; \
- @@ -103,7 +103,7 @@
- register long __B6 __asm__ ("B6") = (long)(arg4); \
- register long __A8 __asm__ ("A8") = (long)(arg5); \
- register long __g1 __asm__ ("g1") = __NR_clone; \
- - __asm __volatile (__CLONE_SYSCALL_STRING : \
- + __asm__ __volatile__ (__CLONE_SYSCALL_STRING : \
- "=r" (__g1), "=r" (__A4), "=r" (__B4) : \
- "0" (__g1), "1" (__A4), "2" (__B4), \
- "r" (__A6), "r" (__B6), "r" (__A8) : \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/c6x/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/wordsize.h uClibc/libc/sysdeps/linux/c6x/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/brk.c uClibc/libc/sysdeps/linux/c6x/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- - *
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bsd-_setjmp.s uClibc/libc/sysdeps/linux/c6x/bsd-_setjmp.s
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bsd-_setjmp.s 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bsd-_setjmp.s 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
- ; for more details.
- ;
- ; You should have received a copy of the GNU Library General Public License
- - ; along with this program; if not, write to the Free Software Foundation,
- - ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + ; along with this program; if not, see <http://www.gnu.org/licenses/>.
- ;
-
- .global _setjmp
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bsd-setjmp.S uClibc/libc/sysdeps/linux/c6x/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
- ; for more details.
- ;
- ; You should have received a copy of the GNU Library General Public License
- - ; along with this program; if not, write to the Free Software Foundation,
- - ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + ; along with this program; if not, see <http://www.gnu.org/licenses/>.
- ;
-
- .global setjmp
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/clone.S uClibc/libc/sysdeps/linux/c6x/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
- ; for more details.
- ;
- ; You should have received a copy of the GNU Library General Public License
- - ; along with this program; if not, write to the Free Software Foundation,
- - ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + ; along with this program; if not, see <http://www.gnu.org/licenses/>.
- ;
- #define __ASSEMBLY__
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/crt1.S uClibc/libc/sysdeps/linux/c6x/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,7 @@
- ; for more details.
- ;
- ; You should have received a copy of the GNU Library General Public License
- -; along with this program; if not, write to the Free Software Foundation,
- -; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- +; along with this program; if not, see <http://www.gnu.org/licenses/>.
- ;
-
- .text
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/c6x/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/c6x/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,22 @@
- +/* Private macros for accessing __jmp_buf contents. c6x version.
- + * Port of uClibc for TMS320C6000 DSP architecture
- + * Copyright (C) 2004 Texas Instruments Incorporated
- + * Author of TMS320C6000 port: Aurelien Jacquiot
- + *
- + * This program is free software; you can redistribute it and/or modify it
- + * under the terms of the GNU Library General Public License as published by
- + * the Free Software Foundation; either version 2 of the License, or (at your
- + * option) any later version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
- + * for more details.
- + *
- + * You should have received a copy of the GNU Library General Public License
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- + */
- +
- +/* the stack pointer (B15) */
- +#define JP_SP 11
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/c6x/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/c6x/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,28 @@
- +/*
- + * Port of uClibc for TMS320C6000 DSP architecture
- + * Copyright (C) 2004 Texas Instruments Incorporated
- + * Author of TMS320C6000 port: Aurelien Jacquiot
- + *
- + * This program is free software; you can redistribute it and/or modify it
- + * under the terms of the GNU Library General Public License as published by
- + * the Free Software Foundation; either version 2 of the License, or (at your
- + * option) any later version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
- + * for more details.
- + *
- + * You should have received a copy of the GNU Library General Public License
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- + */
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)->__regs[JP_SP])
- +
- +
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/__longjmp.S uClibc/libc/sysdeps/linux/c6x/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
- ; for more details.
- ;
- ; You should have received a copy of the GNU Library General Public License
- - ; along with this program; if not, write to the Free Software Foundation,
- - ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + ; along with this program; if not, see <http://www.gnu.org/licenses/>.
- ;
-
- .global __longjmp
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/Makefile.arch uClibc/libc/sysdeps/linux/c6x/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,6 +5,6 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c pread_write.c syscall.c prctl.c
- +CSRC-y := brk.c syscall.c prctl.c
-
- -SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S _vfork.S
- +SSRC-y := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S _vfork.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/pread_write.c uClibc/libc/sysdeps/linux/c6x/pread_write.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/pread_write.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/pread_write.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,103 +0,0 @@
- -/* vi: set sw=4 ts=4:
- - *
- - * Copyright (C) 2002 by Erik Andersen <andersen@uclibc.org>
- - * Based in part on the files
- - * ./sysdeps/unix/sysv/linux/pwrite.c,
- - * ./sysdeps/unix/sysv/linux/pread.c,
- - * sysdeps/posix/pread.c
- - * sysdeps/posix/pwrite.c
- - * from GNU libc 2.2.5, but reworked considerably...
- - *
- - * This program is free software; you can redistribute it and/or modify it
- - * under the terms of the GNU Library General Public License as published by
- - * the Free Software Foundation; either version 2 of the License, or (at your
- - * option) any later version.
- - *
- - * This program is distributed in the hope that it will be useful, but WITHOUT
- - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
- - * for more details.
- - *
- - * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- - */
- -
- -#define _LARGEFILE64_SOURCE
- -#include <features.h>
- -#undef __OPTIMIZE__
- -/* We absolutely do _NOT_ want interfaces silently
- - * * * renamed under us or very bad things will happen... */
- -#ifdef __USE_FILE_OFFSET64
- -# undef __USE_FILE_OFFSET64
- -#endif
- -
- -
- -#include <errno.h>
- -#include <sys/types.h>
- -#include <sys/syscall.h>
- -#include <unistd.h>
- -#include <stdint.h>
- -
- -extern __typeof(pread) __libc_pread;
- -extern __typeof(pwrite) __libc_pwrite;
- -#ifdef __UCLIBC_HAS_LFS__
- -extern __typeof(pread64) __libc_pread64;
- -extern __typeof(pwrite64) __libc_pwrite64;
- -#endif
- -
- -#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
- -# ifdef __NR_pread
- -# error "__NR_pread and __NR_pread64 both defined???"
- -# endif
- -# define __NR_pread __NR_pread64
- -#endif
- -
- -#define __NR___syscall_pread __NR_pread
- -static inline _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
- - size_t, count, off_t, offset_hi, off_t, offset_lo);
- -
- -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
- -{
- - return(__syscall_pread(fd,buf,count,offset,offset >> 31));
- -}
- -weak_alias (__libc_pread, pread)
- -
- -#if defined __UCLIBC_HAS_LFS__
- -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
- -{
- - uint32_t low = offset & 0xffffffff;
- - uint32_t high = offset >> 32;
- - return(__syscall_pread(fd, buf, count, low, high));
- -}
- -weak_alias (__libc_pread64, pread64)
- -#endif /* __UCLIBC_HAS_LFS__ */
- -
- -
- -#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
- -# ifdef __NR_pwrite
- -# error "__NR_pwrite and __NR_pwrite64 both defined???"
- -# endif
- -# define __NR_pwrite __NR_pwrite64
- -#endif
- -
- -#define __NR___syscall_pwrite __NR_pwrite
- -static inline _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- - size_t, count, off_t, offset_hi, off_t, offset_lo);
- -
- -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
- -{
- - return(__syscall_pwrite(fd,buf,count,offset,offset >> 31));
- -}
- -weak_alias (__libc_pwrite, pwrite)
- -
- -#if defined __UCLIBC_HAS_LFS__
- -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
- -{
- - uint32_t low = offset & 0xffffffff;
- - uint32_t high = offset >> 32;
- - return(__syscall_pwrite(fd, buf, count, low, high));
- -}
- -weak_alias (__libc_pwrite64, pwrite64)
- -#endif /* __UCLIBC_HAS_LFS__ */
- -
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/setjmp.s uClibc/libc/sysdeps/linux/c6x/setjmp.s
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/setjmp.s 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/setjmp.s 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
- ; for more details.
- ;
- ; You should have received a copy of the GNU Library General Public License
- - ; along with this program; if not, write to the Free Software Foundation,
- - ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + ; along with this program; if not, see <http://www.gnu.org/licenses/>.
- ;
-
- .global __sigsetjmp
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sigaction.c uClibc/libc/sysdeps/linux/c6x/sigaction.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,8 +17,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA.
- + see <http://www.gnu.org/licenses/>.
-
- Totally hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
- */
- @@ -34,8 +33,6 @@
-
- #define SA_RESTORER 0x04000000
-
- -extern __typeof(sigaction) __libc_sigaction;
- -
- extern void restore_rt(void) __asm__ ("__restore_rt") attribute_hidden;
- extern void restore(void) __asm__ ("__restore") attribute_hidden;
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/procfs.h uClibc/libc/sysdeps/linux/c6x/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/ptrace.h uClibc/libc/sysdeps/linux/c6x/sys/ptrace.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/sys/ptrace.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PTRACE_H
- #define _SYS_PTRACE_H 1
- @@ -112,12 +111,6 @@
- PTRACE_SYSCALL = 24,
- #define PT_SYSCALL PTRACE_SYSCALL
-
- - /* Obtain the load map of the main program or the interpreter of the
- - ptraced process, depending on whether the addr argument is
- - (void*)0 or (void*)1, respectively. */
- - PTRACE_GETDSBT = 31,
- -#define PT_GETDSBT PTRACE_GETDSBT
- -
- /* Set ptrace filter options. */
- PTRACE_SETOPTIONS = 0x4200,
- #define PT_SETOPTIONS PTRACE_SETOPTIONS
- @@ -135,9 +128,6 @@
- #define PT_SETSIGINFO PTRACE_SETSIGINFO
- };
-
- -#define PTRACE_GETDSBT_EXEC ((void*)0) /* [addr] request the executable loadmap */
- -#define PTRACE_GETDSBT_INTERP ((void*)1) /* [addr] request the interpreter loadmap */
- -
- /* Options set using PTRACE_SETOPTIONS. */
- enum __ptrace_setoptions {
- PTRACE_O_TRACESYSGOOD = 0x00000001,
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/reg.h uClibc/libc/sysdeps/linux/c6x/sys/reg.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/reg.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/sys/reg.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- - *
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
- #ifndef _SYS_REG_H
- #define _SYS_REG_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/ucontext.h uClibc/libc/sysdeps/linux/c6x/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/user.h uClibc/libc/sysdeps/linux/c6x/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/_vfork.S uClibc/libc/sysdeps/linux/c6x/_vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/_vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/c6x/_vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,8 +16,8 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
- #define __ASSEMBLY__
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/access.c uClibc/libc/sysdeps/linux/common/access.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/access.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/access.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,4 +9,14 @@
-
- #include <sys/syscall.h>
- #include <unistd.h>
- +
- +#if defined __NR_faccessat && !defined __NR_access
- +# include <fcntl.h>
- +int access(const char *pathname, int mode)
- +{
- + return faccessat(AT_FDCWD, pathname, mode, 0);
- +}
- +
- +#else
- _syscall2(int, access, const char *, pathname, int, mode)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/alarm.c uClibc/libc/sysdeps/linux/common/alarm.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/alarm.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/alarm.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,12 +10,10 @@
- #include <sys/syscall.h>
- #include <unistd.h>
-
- -
- #ifdef __NR_alarm
- _syscall1(unsigned int, alarm, unsigned int, seconds)
- #else
- -#include <sys/time.h>
- -
- +# include <sys/time.h>
-
- unsigned int alarm(unsigned int seconds)
- {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/arch_prctl.c uClibc/libc/sysdeps/linux/common/arch_prctl.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/arch_prctl.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/arch_prctl.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,6 @@
- #include <sys/syscall.h>
-
- #ifdef __NR_arch_prctl
- -extern int arch_prctl(int code, unsigned long addr);
- +int arch_prctl(int code, unsigned long addr);
- _syscall2(int, arch_prctl, int, code, unsigned long, addr)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/atomic.h uClibc/libc/sysdeps/linux/common/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_ATOMIC_H
- #define _BITS_ATOMIC_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/byteswap-common.h uClibc/libc/sysdeps/linux/common/bits/byteswap-common.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/byteswap-common.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/byteswap-common.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _BYTESWAP_H && !defined _NETINET_IN_H
- # error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/cmathcalls.h uClibc/libc/sysdeps/linux/common/bits/cmathcalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/cmathcalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/cmathcalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* NOTE: Because of the special way this file is used by <complex.h>, this
- file must NOT be protected from multiple inclusion as header files
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/confname.h uClibc/libc/sysdeps/linux/common/bits/confname.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/confname.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/confname.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _UNISTD_H
- # error "Never use <bits/confname.h> directly; include <unistd.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/dirent.h uClibc/libc/sysdeps/linux/common/bits/dirent.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/dirent.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/dirent.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _DIRENT_H
- # error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/dlfcn.h uClibc/libc/sysdeps/linux/common/bits/dlfcn.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/dlfcn.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/dlfcn.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _DLFCN_H
- # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/environments.h uClibc/libc/sysdeps/linux/common/bits/environments.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/environments.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/environments.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _UNISTD_H
- # error "Never include this file directly. Use <unistd.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/errno.h uClibc/libc/sysdeps/linux/common/bits/errno.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/errno.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/errno.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef _ERRNO_H
-
- @@ -43,6 +42,11 @@
- # ifndef __ASSEMBLER__
- /* Function to get address of global `errno' variable. */
- extern int *__errno_location (void) __THROW __attribute__ ((__const__));
- +# ifdef _LIBC
- +# if !defined(__UCLIBC_HAS_TLS__) && !defined(__UCLIBC_HAS_THREADS__)
- +extern int weak_const_function *__errno_location(void);
- +# endif
- +# endif
- libc_hidden_proto(__errno_location)
-
- # ifdef __UCLIBC_HAS_THREADS__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/eventfd.h uClibc/libc/sysdeps/linux/common/bits/eventfd.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/eventfd.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common/bits/eventfd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,31 @@
- +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SYS_EVENTFD_H
- +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
- +#endif
- +
- +/* Flags for eventfd. */
- +enum
- + {
- + EFD_SEMAPHORE = 00000001,
- +#define EFD_SEMAPHORE EFD_SEMAPHORE
- + EFD_CLOEXEC = 02000000,
- +#define EFD_CLOEXEC EFD_CLOEXEC
- + EFD_NONBLOCK = 00004000
- +#define EFD_NONBLOCK EFD_NONBLOCK
- + };
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/fenv.h uClibc/libc/sysdeps/linux/common/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- @@ -53,4 +52,4 @@
- fenv_t;
-
- /* If the default argument is used we use this value. */
- -#define FE_DFL_ENV ((__const fenv_t *) -1l)
- +#define FE_DFL_ENV ((const fenv_t *) -1l)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/getopt.h uClibc/libc/sysdeps/linux/common/bits/getopt.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/getopt.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/getopt.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _GETOPT_H
-
- @@ -26,31 +25,7 @@
- # define _GETOPT_H 1
- #endif
-
- -/* If __GNU_LIBRARY__ is not already defined, either we are being used
- - standalone, or this is the first header included in the source file.
- - If we are being used with glibc, we need to include <features.h>, but
- - that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
- - not defined, include <ctype.h>, which will pull in <features.h> for us
- - if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
- - doesn't flood the namespace with stuff the way some other headers do.) */
- -#if !defined __GNU_LIBRARY__
- -# include <ctype.h>
- -#endif
- -
- -#ifndef __THROW
- -# ifndef __GNUC_PREREQ
- -# define __GNUC_PREREQ(maj, min) (0)
- -# endif
- -# if defined __cplusplus && __GNUC_PREREQ (2,8)
- -# define __THROW throw ()
- -# else
- -# define __THROW
- -# endif
- -#endif
- -
- -#ifdef __cplusplus
- -extern "C" {
- -#endif
- +__BEGIN_DECLS
-
- /* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- @@ -147,17 +122,9 @@
- arguments to the option '\0'. This behavior is specific to the GNU
- `getopt'. */
-
- -#if defined __GNU_LIBRARY__ || defined __UCLIBC__
- -/* Many other libraries have conflicting prototypes for getopt, with
- - differences in the consts, in stdlib.h. To avoid compilation
- - errors, only prototype getopt for the GNU C library. */
- extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
- __THROW;
- libc_hidden_proto(getopt)
- -#else /* not __GNU_LIBRARY__ */
- -extern int getopt ();
- -libc_hidden_proto(getopt)
- -#endif /* __GNU_LIBRARY__ */
-
- #if defined __UCLIBC_HAS_GNU_GETOPT__ || defined __UCLIBC_HAS_GETOPT_LONG__
- #ifndef __need_getopt
- @@ -173,9 +140,7 @@
- #endif
- #endif
-
- -#ifdef __cplusplus
- -}
- -#endif
- +__END_DECLS
-
- /* Make sure we later can get all the definitions and declarations. */
- #undef __need_getopt
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_valf.h uClibc/libc/sysdeps/linux/common/bits/huge_valf.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_valf.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/huge_valf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/huge_valf.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_val.h uClibc/libc/sysdeps/linux/common/bits/huge_val.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_val.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/huge_val.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/huge_val.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_vall.h uClibc/libc/sysdeps/linux/common/bits/huge_vall.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_vall.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/huge_vall.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/inf.h uClibc/libc/sysdeps/linux/common/bits/inf.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/inf.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/inf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/inf.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/in.h uClibc/libc/sysdeps/linux/common/bits/in.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/in.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/in.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1991-1999, 2000, 2004 Free Software Foundation, Inc.
- +/* Copyright (C) 1991-2013 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Linux version. */
-
- @@ -43,31 +42,49 @@
- #define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */
- #define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */
- #define IP_MSFILTER 41
- -#define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */
- -#define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */
- -#define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/
- -#define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */
- -#define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */
- -#define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/
- -#define MCAST_MSFILTER 48
- -
- -#define MCAST_EXCLUDE 0
- -#define MCAST_INCLUDE 1
- -
- -#define IP_ROUTER_ALERT 5 /* bool */
- -#define IP_PKTINFO 8 /* bool */
- -#define IP_PKTOPTIONS 9
- -#define IP_PMTUDISC 10 /* obsolete name? */
- -#define IP_MTU_DISCOVER 10 /* int; see below */
- -#define IP_RECVERR 11 /* bool */
- -#define IP_RECVTTL 12 /* bool */
- -#define IP_RECVTOS 13 /* bool */
- +#if defined __USE_MISC || defined __USE_GNU
- +# define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */
- +# define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */
- +# define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/
- +# define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */
- +# define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */
- +# define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/
- +# define MCAST_MSFILTER 48
- +# define IP_MULTICAST_ALL 49
- +# define IP_UNICAST_IF 50
- +
- +# define MCAST_EXCLUDE 0
- +# define MCAST_INCLUDE 1
- +#endif
- +
- +#define IP_ROUTER_ALERT 5 /* bool */
- +#define IP_PKTINFO 8 /* bool */
- +#define IP_PKTOPTIONS 9
- +#define IP_PMTUDISC 10 /* obsolete name? */
- +#define IP_MTU_DISCOVER 10 /* int; see below */
- +#define IP_RECVERR 11 /* bool */
- +#define IP_RECVTTL 12 /* bool */
- +#define IP_RECVTOS 13 /* bool */
- +#define IP_MTU 14 /* int */
- +#define IP_FREEBIND 15
- +#define IP_IPSEC_POLICY 16
- +#define IP_XFRM_POLICY 17
- +#define IP_PASSSEC 18
- +#define IP_TRANSPARENT 19
- +#define IP_MULTICAST_ALL 49 /* bool */
- +
- +/* TProxy original addresses */
- +#define IP_ORIGDSTADDR 20
- +#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
- +
- +#define IP_MINTTL 21
-
-
- /* IP_MTU_DISCOVER arguments. */
- #define IP_PMTUDISC_DONT 0 /* Never send DF frames. */
- #define IP_PMTUDISC_WANT 1 /* Use per route hints. */
- #define IP_PMTUDISC_DO 2 /* Always DF. */
- +#define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */
-
- /* To select the IP level. */
- #define SOL_IP 0
- @@ -76,6 +93,7 @@
- #define IP_DEFAULT_MULTICAST_LOOP 1
- #define IP_MAX_MEMBERSHIPS 20
-
- +#if defined __USE_MISC || defined __USE_GNU
- /* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS.
- The `ip_dst' field is used for the first-hop gateway when using a
- source route (this gets put into the header proper). */
- @@ -100,6 +118,7 @@
- struct in_addr ipi_spec_dst; /* Routing destination address */
- struct in_addr ipi_addr; /* Header destination address */
- };
- +#endif
-
- #ifdef __UCLIBC_HAS_IPV6__
- /* Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
- @@ -159,6 +178,7 @@
- #define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */
- #define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */
- #define IPV6_PMTUDISC_DO 2 /* Always DF. */
- +#define IPV6_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */
-
- /* Socket level values for IPv6. */
- #define SOL_IPV6 41
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/initspin.h uClibc/libc/sysdeps/linux/common/bits/initspin.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/initspin.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/initspin.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* Initial value of a spinlock. Most platforms should use zero,
- unless they only implement a "test and clear" operation instead of
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ioctls.h uClibc/libc/sysdeps/linux/common/bits/ioctls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ioctls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/ioctls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IOCTL_H
- # error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ioctl-types.h uClibc/libc/sysdeps/linux/common/bits/ioctl-types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ioctl-types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/ioctl-types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IOCTL_H
- # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ipc.h uClibc/libc/sysdeps/linux/common/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/kernel-features.h uClibc/libc/sysdeps/linux/common/bits/kernel-features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/kernel-features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/kernel-features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file must not contain any C code. At least it must be protected
- to allow using the file also in assembler files. */
- @@ -311,17 +310,19 @@
-
- /* Support for various CLOEXEC and NONBLOCK flags was added for x86,
- * x86-64, PPC, IA-64, and SPARC in 2.6.27. */
- -#if __LINUX_KERNEL_VERSION >= 0x02061b \
- - && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
- - || defined __ia64__ || defined __sparc__ || defined __s390__)
- +#if (__LINUX_KERNEL_VERSION >= 0x02061b \
- + && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
- + || defined __ia64__ || defined __sparc__ || defined __s390__) \
- + ) || (__LINUX_KERNEL_VERSION >= 0x020621 && defined __alpha__) \
- + || defined __aarch64__ || defined __tile__
- /* # define __ASSUME_SOCK_CLOEXEC 1 */
- /* # define __ASSUME_IN_NONBLOCK 1 */
- # define __ASSUME_PIPE2 1
- /* # define __ASSUME_EVENTFD2 1 */
- /* # define __ASSUME_SIGNALFD4 1 */
- +/* # define __ASSUME_DUP3 1 */
- #endif
-
- -
- /* These features were surely available with 2.4.12. */
- #if __LINUX_KERNEL_VERSION >= 132108 && defined __mc68000__
- # define __ASSUME_MMAP2_SYSCALL 1
- @@ -494,6 +495,14 @@
- # define __ASSUME_PRIVATE_FUTEX 1
- #endif
-
- +/* Support for fallocate was added in 2.6.23,
- + on s390 only after 2.6.23-rc1, on alpha only after 2.6.33-rc1. */
- +#if __LINUX_KERNEL_VERSION >= 0x020617 \
- + && (!defined __s390__ || __LINUX_KERNEL_VERSION >= 0x020618) \
- + && (!defined __alpha__ || __LINUX_KERNEL_VERSION >= 0x020621)
- +# define __ASSUME_FALLOCATE 1
- +#endif
- +
- /* getcpu is a syscall for x86-64 since 3.1. */
- #if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100
- # define __ASSUME_GETCPU_SYSCALL 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/kernel_sigaction.h uClibc/libc/sysdeps/linux/common/bits/kernel_sigaction.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/kernel_sigaction.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/kernel_sigaction.h 2014-02-03 12:32:56.000000000 +0100
- @@ -19,18 +19,6 @@
- unsigned long sa_flags;
- void (*sa_restorer)(void);
- };
- -/* In uclibc, userspace struct sigaction is identical to
- - * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
- - * See sigaction.h
- - */
- -
- -extern int __syscall_sigaction(int, const struct old_kernel_sigaction *,
- - struct old_kernel_sigaction *);
- -
- #endif
-
- -
- -extern int __syscall_rt_sigaction(int, const struct sigaction *,
- - struct sigaction *, size_t);
- -
- #endif /* _BITS_SIGACTION_STRUCT_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/locale.h uClibc/libc/sysdeps/linux/common/bits/locale.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/locale.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/locale.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _LOCALE_H && !defined _LANGINFO_H
- # error "Never use <bits/locale.h> directly; include <locale.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/local_lim.h uClibc/libc/sysdeps/linux/common/bits/local_lim.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/local_lim.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- @@ -71,6 +70,8 @@
-
- /* The number of threads per process. */
- #define _POSIX_THREAD_THREADS_MAX 64
- +/* We have no predefined limit on the number of threads. */
- +#undef PTHREAD_THREADS_MAX
-
- /* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
- @@ -93,3 +94,6 @@
-
- /* Maximum message queue priority level. */
- #define MQ_PRIO_MAX 32768
- +
- +/* Maximum value the semaphore can have. */
- +#define SEM_VALUE_MAX (2147483647)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mathcalls.h uClibc/libc/sysdeps/linux/common/bits/mathcalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mathcalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/mathcalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* NOTE: Because of the special way this file is used by <math.h>, this
- file must NOT be protected from multiple inclusion as header files
- @@ -49,7 +48,7 @@
-
-
- /* __MATHCALLX(type,function,[suffix],args,attrib) and
- - * __MATHCALLI(type,function,[suffix],args) include libm_hidden_def
- + * __MATHCALLI(type,function,[suffix],args) include libm_hidden_proto
- * (for "double" versions only, xxxf and xxxl do not get this treatment).
- *
- * __MATHDECL(type,function,[suffix],args) does not.
- @@ -57,7 +56,7 @@
- * (it is just a shortcut to __MATHDECL(_Mdouble_,function,[suffix],args)).
- *
- * __MATHDECL_PRIV(type,function,[suffix],args,attrib)
- - * includes libm_hidden_def (always) and declares __foo, not foo.
- + * includes libm_hidden_proto (always) and declares __foo, not foo.
- */
-
-
- @@ -155,7 +154,7 @@
- __MATHCALLI (exp2,, (_Mdouble_ __x))
-
- /* Compute base-2 logarithm of X. */
- -__MATHCALL (log2,, (_Mdouble_ __x))
- +__MATHCALLI (log2,, (_Mdouble_ __x))
- __END_NAMESPACE_C99
- #endif
-
- @@ -223,7 +222,7 @@
-
-
- /* Return the fractional part of X after dividing out `ilogb (X)'. */
- -__MATHCALL (significand,, (_Mdouble_ __x))
- +__MATHCALLI (significand,, (_Mdouble_ __x))
- #endif /* Use misc. */
-
- #if defined __USE_MISC || defined __USE_ISOC99
- @@ -236,7 +235,7 @@
- #ifdef __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* Return representation of NaN for double type. */
- -__MATHCALLX (nan,, (__const char *__tagb), (__const__))
- +__MATHCALLX (nan,, (const char *__tagb), (__const__))
- __END_NAMESPACE_C99
- #endif
-
- @@ -278,7 +277,7 @@
-
- #if defined __USE_MISC || defined __USE_XOPEN
- /* Obsolete alias for `lgamma'. */
- -__MATHCALL (gamma,, (_Mdouble_))
- +__MATHCALLI (gamma,, (_Mdouble_))
- #endif
-
- #ifdef __USE_MISC
- @@ -286,6 +285,8 @@
- `signgam'. The reentrant version instead takes a pointer and stores
- the value through it. */
- __MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp))
- +/* __MATHCALLI does not work here, probably due to ,_r, */
- +libm_hidden_proto(lgamma_r)
- #endif
-
-
- @@ -376,5 +377,5 @@
- #if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \
- && defined __UCLIBC_SUSV3_LEGACY__
- /* Return X times (2 to the Nth power). */
- -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n))
- +__MATHCALLI (scalb,, (_Mdouble_ __x, _Mdouble_ __n))
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mathdef.h uClibc/libc/sysdeps/linux/common/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mman-common.h uClibc/libc/sysdeps/linux/common/bits/mman-common.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mman-common.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/mman-common.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MMAN_H
- # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
- @@ -64,7 +63,7 @@
- # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
- # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
- # define MAP_STACK 0x20000 /* Allocation is for a stack. */
- -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
- +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
- be uninitialized. */
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mqueue.h uClibc/libc/sysdeps/linux/common/bits/mqueue.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mqueue.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/mqueue.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MQUEUE_H
- # error "Never use <bits/mqueue.h> directly; include <mqueue.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/msq.h uClibc/libc/sysdeps/linux/common/bits/msq.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/msq.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MSG_H
- # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/nan.h uClibc/libc/sysdeps/linux/common/bits/nan.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/nan.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/nan.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/nan.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/netdb.h uClibc/libc/sysdeps/linux/common/bits/netdb.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/netdb.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/netdb.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _NETDB_H
- # error "Never include <bits/netdb.h> directly; use <netdb.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/poll.h uClibc/libc/sysdeps/linux/common/bits/poll.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/poll.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_POLL_H
- # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix1_lim.h uClibc/libc/sysdeps/linux/common/bits/posix1_lim.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix1_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/posix1_lim.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix2_lim.h uClibc/libc/sysdeps/linux/common/bits/posix2_lim.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix2_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/posix2_lim.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * Never include this file directly; include <limits.h> instead.
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix_opt.h uClibc/libc/sysdeps/linux/common/bits/posix_opt.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix_opt.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/posix_opt.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,5 @@
- /* Define POSIX options for Linux.
- - Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
- + Copyright (C) 1996-2004, 2006, 2008, 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -13,12 +13,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- -#ifndef _POSIX_OPT_H
- -#define _POSIX_OPT_H 1
- +#ifndef _BITS_POSIX_OPT_H
- +#define _BITS_POSIX_OPT_H 1
-
- /* Job control is supported. */
- #define _POSIX_JOB_CONTROL 1
- @@ -27,28 +26,28 @@
- #define _POSIX_SAVED_IDS 1
-
- /* Priority scheduling is supported. */
- -#define _POSIX_PRIORITY_SCHEDULING 200112L
- +#define _POSIX_PRIORITY_SCHEDULING 200809L
-
- /* Synchronizing file data is supported. */
- -#define _POSIX_SYNCHRONIZED_IO 200112L
- +#define _POSIX_SYNCHRONIZED_IO 200809L
-
- /* The fsync function is present. */
- -#define _POSIX_FSYNC 200112L
- +#define _POSIX_FSYNC 200809L
-
- /* Mapping of files to memory is supported. */
- -#define _POSIX_MAPPED_FILES 200112L
- +#define _POSIX_MAPPED_FILES 200809L
-
- /* Locking of all memory is supported. */
- -#define _POSIX_MEMLOCK 200112L
- +#define _POSIX_MEMLOCK 200809L
-
- /* Locking of ranges of memory is supported. */
- -#define _POSIX_MEMLOCK_RANGE 200112L
- +#define _POSIX_MEMLOCK_RANGE 200809L
-
- /* Setting of memory protections is supported. */
- -#define _POSIX_MEMORY_PROTECTION 200112L
- +#define _POSIX_MEMORY_PROTECTION 200809L
-
- -/* Only root can change owner of file. */
- -#define _POSIX_CHOWN_RESTRICTED 1
- +/* Some filesystems allow all users to change file ownership. */
- +#define _POSIX_CHOWN_RESTRICTED 0
-
- /* `c_cc' member of 'struct termios' structure can be disabled by
- using the value _POSIX_VDISABLE. */
- @@ -60,53 +59,67 @@
- /* X/Open realtime support is available. */
- #define _XOPEN_REALTIME 1
-
- +/* X/Open thread realtime support is available. */
- +#define _XOPEN_REALTIME_THREADS 1
- +
- /* XPG4.2 shared memory is supported. */
- #define _XOPEN_SHM 1
-
- /* Tell we have POSIX threads. */
- -#define _POSIX_THREADS 200112L
- +#define _POSIX_THREADS 200809L
-
- /* We have the reentrant functions described in POSIX. */
- #define _POSIX_REENTRANT_FUNCTIONS 1
- -#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
- +#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
-
- /* We provide priority scheduling for threads. */
- -#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L
- +#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
-
- /* We support user-defined stack sizes. */
- -#define _POSIX_THREAD_ATTR_STACKSIZE 200112L
- +#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
-
- /* We support user-defined stacks. */
- -#define _POSIX_THREAD_ATTR_STACKADDR 200112L
- +#define _POSIX_THREAD_ATTR_STACKADDR 200809L
-
- -#ifdef __UCLIBC_HAS_REALTIME__
- -/* We support POSIX.1b semaphores. */
- -#define _POSIX_SEMAPHORES 200112L
- +/* We support priority inheritence. */
- +#define _POSIX_THREAD_PRIO_INHERIT 200809L
- +
- +/* We support priority protection, though only for non-robust
- + mutexes. */
- +#define _POSIX_THREAD_PRIO_PROTECT 200809L
- +
- +#ifdef __USE_XOPEN2K8
- +/* We support priority inheritence for robust mutexes. */
- +# define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L
- +
- +/* We do not support priority protection for robust mutexes. */
- +# define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
- #endif
-
- +/* We support POSIX.1b semaphores. */
- +#define _POSIX_SEMAPHORES 200809L
- +
- /* Real-time signals are supported. */
- -#define _POSIX_REALTIME_SIGNALS 200112L
- +#define _POSIX_REALTIME_SIGNALS 200809L
-
- /* We support asynchronous I/O. */
- -#define _POSIX_ASYNCHRONOUS_IO 200112L
- +#define _POSIX_ASYNCHRONOUS_IO 200809L
- #define _POSIX_ASYNC_IO 1
- /* Alternative name for Unix98. */
- #define _LFS_ASYNCHRONOUS_IO 1
- /* Support for prioritization is also available. */
- -#define _POSIX_PRIORITIZED_IO 200112L
- +#define _POSIX_PRIORITIZED_IO 200809L
-
- /* The LFS support in asynchronous I/O is also available. */
- #define _LFS64_ASYNCHRONOUS_IO 1
-
- -#ifdef __UCLIBC_HAS_LFS__
- /* The rest of the LFS is also available. */
- #define _LFS_LARGEFILE 1
- #define _LFS64_LARGEFILE 1
- #define _LFS64_STDIO 1
- -#endif
-
- /* POSIX shared memory objects are implemented. */
- -#define _POSIX_SHARED_MEMORY_OBJECTS 200112L
- +#define _POSIX_SHARED_MEMORY_OBJECTS 200809L
-
- /* CPU-time clocks support needs to be checked at runtime. */
- #define _POSIX_CPUTIME 0
- @@ -114,61 +127,53 @@
- /* Clock support in threads must be also checked at runtime. */
- #define _POSIX_THREAD_CPUTIME 0
-
- -#ifdef __UCLIBC_HAS_REGEX__
- /* GNU libc provides regular expression handling. */
- #define _POSIX_REGEXP 1
- -#endif
-
- /* Reader/Writer locks are available. */
- -#define _POSIX_READER_WRITER_LOCKS 200112L
- +#define _POSIX_READER_WRITER_LOCKS 200809L
-
- /* We have a POSIX shell. */
- #define _POSIX_SHELL 1
-
- /* We support the Timeouts option. */
- -#define _POSIX_TIMEOUTS 200112L
- +#define _POSIX_TIMEOUTS 200809L
-
- /* We support spinlocks. */
- -#define _POSIX_SPIN_LOCKS 200112L
- +#define _POSIX_SPIN_LOCKS 200809L
-
- /* The `spawn' function family is supported. */
- -#if 0 /* no support in uClibc (yet) */
- -#define _POSIX_SPAWN 200112L
- -#endif
- +#define _POSIX_SPAWN 200809L
-
- /* We have POSIX timers. */
- -#define _POSIX_TIMERS 200112L
- +#define _POSIX_TIMERS 200809L
-
- /* The barrier functions are available. */
- -#define _POSIX_BARRIERS 200112L
- +#define _POSIX_BARRIERS 200809L
-
- /* POSIX message queues are available. */
- -#define _POSIX_MESSAGE_PASSING 200112L
- +#define _POSIX_MESSAGE_PASSING 200809L
-
- /* Thread process-shared synchronization is supported. */
- -#define _POSIX_THREAD_PROCESS_SHARED 200112L
- +#define _POSIX_THREAD_PROCESS_SHARED 200809L
-
- /* The monotonic clock might be available. */
- #define _POSIX_MONOTONIC_CLOCK 0
-
- /* The clock selection interfaces are available. */
- -#define _POSIX_CLOCK_SELECTION 200112L
- +#define _POSIX_CLOCK_SELECTION 200809L
-
- /* Advisory information interfaces are available. */
- -#define _POSIX_ADVISORY_INFO 200112L
- +#define _POSIX_ADVISORY_INFO 200809L
-
- -#ifdef __UCLIBC_HAS_IPV6__
- /* IPv6 support is available. */
- -#define _POSIX_IPV6 200112L
- -#endif
- +#define _POSIX_IPV6 200809L
-
- -#ifdef __UCLIBC_HAS_SOCKET__
- /* Raw socket support is available. */
- -#define _POSIX_RAW_SOCKETS 200112L
- -#endif
- +#define _POSIX_RAW_SOCKETS 200809L
-
- /* We have at least one terminal. */
- -#define _POSIX2_CHAR_TERM 200112L
- +#define _POSIX2_CHAR_TERM 200809L
-
- /* Neither process nor thread sporadic server interfaces is available. */
- #define _POSIX_SPORADIC_SERVER -1
- @@ -183,8 +188,4 @@
- /* Typed memory objects are not available. */
- #define _POSIX_TYPED_MEMORY_OBJECTS -1
-
- -/* No support for priority inheritance or protection so far. */
- -#define _POSIX_THREAD_PRIO_INHERIT -1
- -#define _POSIX_THREAD_PRIO_PROTECT -1
- -
- -#endif /* posix_opt.h */
- +#endif /* bits/posix_opt.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/resource.h uClibc/libc/sysdeps/linux/common/bits/resource.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/resource.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/resource.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_RESOURCE_H
- # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sched.h uClibc/libc/sysdeps/linux/common/bits/sched.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sched.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/sched.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef __need_schedparam
-
- @@ -109,6 +108,7 @@
- /* Size definition for CPU sets. */
- # define __CPU_SETSIZE 1024
- # define __NCPUBITS (8 * sizeof (__cpu_mask))
- +# include <stdlib.h>
-
- /* Type for array elements in 'cpu_set_t'. */
- typedef unsigned long int __cpu_mask;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/select.h uClibc/libc/sysdeps/linux/common/bits/select.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/select.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/select.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SELECT_H
- # error "Never use <bits/select.h> directly; include <sys/select.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sem.h uClibc/libc/sysdeps/linux/common/bits/sem.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/sem.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SEM_H
- # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/shm.h uClibc/libc/sysdeps/linux/common/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigaction.h uClibc/libc/sysdeps/linux/common/bits/sigaction.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/sigaction.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigcontext.h uClibc/libc/sysdeps/linux/common/bits/sigcontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/sigcontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
- # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/common/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* In general we cannot provide any information. */
- #define SIGCONTEXT struct sigcontext *
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/siginfo.h uClibc/libc/sysdeps/linux/common/bits/siginfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/siginfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/siginfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SIGNAL_H && !defined __need_siginfo_t \
- && !defined __need_sigevent_t
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/signum.h uClibc/libc/sysdeps/linux/common/bits/signum.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/signum.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/signum.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef _SIGNAL_H
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigset.h uClibc/libc/sysdeps/linux/common/bits/sigset.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigset.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/sigset.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGSET_H_types
- # define _SIGSET_H_types 1
- @@ -153,7 +152,7 @@
- checking is done in the non __ versions. */
-
- # if !defined __USE_EXTERN_INLINES || defined __PROVIDE_OUT_OF_LINE_SIGSETFN
- -extern int __sigismember (__const __sigset_t *, int);
- +extern int __sigismember (const __sigset_t *, int);
- libc_hidden_proto(__sigismember)
- extern int __sigaddset (__sigset_t *, int);
- libc_hidden_proto(__sigaddset)
- @@ -179,7 +178,7 @@
- return BODY; \
- }
-
- -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const)
- +__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, const)
- __SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), )
- __SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), )
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigstack.h uClibc/libc/sysdeps/linux/common/bits/sigstack.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigstack.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/sigstack.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include this file directly. Use <signal.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigthread.h uClibc/libc/sysdeps/linux/common/bits/sigthread.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigthread.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/sigthread.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SIGTHREAD_H
- #define _BITS_SIGTHREAD_H 1
- @@ -29,7 +28,7 @@
- /* Modify the signal mask for the calling thread. The arguments have
- the same meaning as for sigprocmask(2). */
- extern int pthread_sigmask (int __how,
- - __const __sigset_t *__restrict __newmask,
- + const __sigset_t *__restrict __newmask,
- __sigset_t *__restrict __oldmask)__THROW;
-
- /* Send signal SIGNO to the given thread. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sockaddr.h uClibc/libc/sysdeps/linux/common/bits/sockaddr.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sockaddr.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/sockaddr.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * Never include this file directly; use <sys/socket.h> instead.
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/socket.h uClibc/libc/sysdeps/linux/common/bits/socket.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/socket.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/socket.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,6 @@
- /* System-specific socket constants and types. Linux version.
- - Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc.
- + Copyright (C) 1991,1992,1994-2001,2004,2006-2012
- + Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -13,19 +14,17 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef __BITS_SOCKET_H
- #define __BITS_SOCKET_H
-
- -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
- +#ifndef _SYS_SOCKET_H
- # error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
- #endif
-
- #define __need_size_t
- -#define __need_NULL
- #include <stddef.h>
-
- #include <limits.h>
- @@ -37,37 +36,8 @@
- # define __socklen_t_defined
- #endif
-
- -/* Types of sockets. */
- -enum __socket_type
- -{
- - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
- - byte streams. */
- -#define SOCK_STREAM SOCK_STREAM
- - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
- - of fixed maximum length. */
- -#define SOCK_DGRAM SOCK_DGRAM
- - SOCK_RAW = 3, /* Raw protocol interface. */
- -#define SOCK_RAW SOCK_RAW
- - SOCK_RDM = 4, /* Reliably-delivered messages. */
- -#define SOCK_RDM SOCK_RDM
- - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- - datagrams of fixed maximum length. */
- -#define SOCK_SEQPACKET SOCK_SEQPACKET
- - SOCK_PACKET = 10, /* Linux specific way of getting packets
- - at the dev level. For writing rarp and
- - other similar things on the user level. */
- -#define SOCK_PACKET SOCK_PACKET
- -
- - /* Flags to be ORed into the type parameter of socket and socketpair and
- - used for the flags parameter of paccept. */
- -
- - SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
- - new descriptor(s). */
- -#define SOCK_CLOEXEC SOCK_CLOEXEC
- - SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as
- - non-blocking. */
- -#define SOCK_NONBLOCK SOCK_NONBLOCK
- -};
- +/* Get the architecture-dependent definition of enum __socket_type. */
- +#include <bits/socket_type.h>
-
- /* Protocol families. */
- #define PF_UNSPEC 0 /* Unspecified. */
- @@ -94,22 +64,24 @@
- #define PF_ASH 18 /* Ash. */
- #define PF_ECONET 19 /* Acorn Econet. */
- #define PF_ATMSVC 20 /* ATM SVCs. */
- +#define PF_RDS 21 /* RDS sockets. */
- #define PF_SNA 22 /* Linux SNA Project */
- #define PF_IRDA 23 /* IRDA sockets. */
- #define PF_PPPOX 24 /* PPPoX sockets. */
- #define PF_WANPIPE 25 /* Wanpipe API sockets. */
- -#define PF_LLC 26 /* Linux LLC. */
- -#define PF_CAN 29 /* Controller Area Network. */
- -#define PF_TIPC 30 /* TIPC sockets. */
- +#define PF_LLC 26 /* Linux LLC. */
- +#define PF_CAN 29 /* Controller Area Network. */
- +#define PF_TIPC 30 /* TIPC sockets. */
- #define PF_BLUETOOTH 31 /* Bluetooth sockets. */
- #define PF_IUCV 32 /* IUCV sockets. */
- -#define PF_RXRPC 33 /* RxRPC sockets. */
- -#define PF_ISDN 34 /* mISDN sockets. */
- -#define PF_PHONET 35 /* Phonet sockets. */
- -#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
- -#define PF_CAIF 37 /* CAIF sockets. */
- -#define PF_ALG 38 /* Algorithm sockets. */
- -#define PF_MAX 39 /* For now.. */
- +#define PF_RXRPC 33 /* RxRPC sockets. */
- +#define PF_ISDN 34 /* mISDN sockets. */
- +#define PF_PHONET 35 /* Phonet sockets. */
- +#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
- +#define PF_CAIF 37 /* CAIF sockets. */
- +#define PF_ALG 38 /* Algorithm sockets. */
- +#define PF_NFC 39 /* NFC sockets. */
- +#define PF_MAX 40 /* For now.. */
-
- /* Address families. */
- #define AF_UNSPEC PF_UNSPEC
- @@ -136,21 +108,23 @@
- #define AF_ASH PF_ASH
- #define AF_ECONET PF_ECONET
- #define AF_ATMSVC PF_ATMSVC
- +#define AF_RDS PF_RDS
- #define AF_SNA PF_SNA
- #define AF_IRDA PF_IRDA
- #define AF_PPPOX PF_PPPOX
- #define AF_WANPIPE PF_WANPIPE
- -#define AF_LLC PF_LLC
- -#define AF_CAN PF_CAN
- -#define AF_TIPC PF_TIPC
- +#define AF_LLC PF_LLC
- +#define AF_CAN PF_CAN
- +#define AF_TIPC PF_TIPC
- #define AF_BLUETOOTH PF_BLUETOOTH
- -#define AF_IUCV PF_IUCV
- -#define AF_RXRPC PF_RXRPC
- -#define AF_ISDN PF_ISDN
- -#define AF_PHONET PF_PHONET
- -#define AF_IEEE802154 PF_IEEE802154
- -#define AF_CAIF PF_CAIF
- -#define AF_ALG PF_ALG
- +#define AF_IUCV PF_IUCV
- +#define AF_RXRPC PF_RXRPC
- +#define AF_ISDN PF_ISDN
- +#define AF_PHONET PF_PHONET
- +#define AF_IEEE802154 PF_IEEE802154
- +#define AF_CAIF PF_CAIF
- +#define AF_ALG PF_ALG
- +#define AF_NFC PF_NFC
- #define AF_MAX PF_MAX
-
- /* Socket level values. Others are defined in the appropriate headers.
- @@ -235,8 +209,14 @@
- #define MSG_ERRQUEUE MSG_ERRQUEUE
- MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
- #define MSG_NOSIGNAL MSG_NOSIGNAL
- - MSG_MORE = 0x8000 /* Sender will send more. */
- + MSG_MORE = 0x8000, /* Sender will send more. */
- #define MSG_MORE MSG_MORE
- + MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
- +#define MSG_WAITFORONE MSG_WAITFORONE
- + MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
- + descriptor received through
- + SCM_RIGHTS. */
- +#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
- };
-
-
- @@ -290,7 +270,7 @@
- #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
- #define CMSG_FIRSTHDR(mhdr) \
- ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
- - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
- + ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
- #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
- & (size_t) ~(sizeof (size_t) - 1))
- #define CMSG_SPACE(len) (CMSG_ALIGN (len) \
- @@ -302,14 +282,14 @@
- libc_hidden_proto(__cmsg_nxthdr)
- #ifdef __USE_EXTERN_INLINES
- # ifndef _EXTERN_INLINE
- -# define _EXTERN_INLINE extern __inline
- +# define _EXTERN_INLINE __extern_inline
- # endif
- _EXTERN_INLINE struct cmsghdr *
- __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
- {
- if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
- /* The kernel header does this so there may be a reason. */
- - return 0;
- + return (struct cmsghdr *) 0;
-
- __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
- + CMSG_ALIGN (__cmsg->cmsg_len));
- @@ -318,7 +298,7 @@
- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
- /* No more entries. */
- - return 0;
- + return (struct cmsghdr *) 0;
- return __cmsg;
- }
- #endif /* Use `extern inline'. */
- @@ -329,20 +309,21 @@
- {
- SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
- #define SCM_RIGHTS SCM_RIGHTS
- -#ifdef __USE_BSD
- +#ifdef __USE_GNU
- , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
- # define SCM_CREDENTIALS SCM_CREDENTIALS
- #endif
- };
-
- +#ifdef __USE_GNU
- /* User visible structure for SCM_CREDENTIALS message */
- -
- struct ucred
- {
- pid_t pid; /* PID of sending process. */
- uid_t uid; /* UID of sending process. */
- gid_t gid; /* GID of sending process. */
- };
- +#endif
-
- /* Get socket manipulation related informations from kernel headers. */
- #ifndef __GLIBC__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/socket_type.h uClibc/libc/sysdeps/linux/common/bits/socket_type.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/socket_type.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common/bits/socket_type.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,54 @@
- +/* Define enum __socket_type for generic Linux.
- + Copyright (C) 1991-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SYS_SOCKET_H
- +# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
- +#endif
- +
- +/* Types of sockets. */
- +enum __socket_type
- +{
- + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
- + byte streams. */
- +#define SOCK_STREAM SOCK_STREAM
- + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
- + of fixed maximum length. */
- +#define SOCK_DGRAM SOCK_DGRAM
- + SOCK_RAW = 3, /* Raw protocol interface. */
- +#define SOCK_RAW SOCK_RAW
- + SOCK_RDM = 4, /* Reliably-delivered messages. */
- +#define SOCK_RDM SOCK_RDM
- + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- + datagrams of fixed maximum length. */
- +#define SOCK_SEQPACKET SOCK_SEQPACKET
- + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
- +#define SOCK_DCCP SOCK_DCCP
- + SOCK_PACKET = 10, /* Linux specific way of getting packets
- + at the dev level. For writing rarp and
- + other similar things on the user level. */
- +#define SOCK_PACKET SOCK_PACKET
- +
- + /* Flags to be ORed into the type parameter of socket and socketpair. */
- +
- + SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
- + new descriptor(s). */
- +#define SOCK_CLOEXEC SOCK_CLOEXEC
- + SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as
- + non-blocking. */
- +#define SOCK_NONBLOCK SOCK_NONBLOCK
- +};
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stab.def uClibc/libc/sysdeps/linux/common/bits/stab.def
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stab.def 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/stab.def 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This contains contribution from Cygnus Support. */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stackinfo.h uClibc/libc/sysdeps/linux/common/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. Since there is no general truth we can't say
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/statfs.h uClibc/libc/sysdeps/linux/common/bits/statfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/statfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/statfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STATFS_H
- # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stat.h uClibc/libc/sysdeps/linux/common/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/statvfs.h uClibc/libc/sysdeps/linux/common/bits/statvfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/statvfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/statvfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STATVFS_H
- # error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stdio.h uClibc/libc/sysdeps/linux/common/bits/stdio.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stdio.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/stdio.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _STDIO_H
- # error "Never include <bits/stdio.h> directly; use <stdio.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stdio_lim.h uClibc/libc/sysdeps/linux/common/bits/stdio_lim.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stdio_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/stdio_lim.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX
- # error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/termios.h uClibc/libc/sysdeps/linux/common/bits/termios.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/termios.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TERMIOS_H
- # error "Never include <bits/termios.h> directly; use <termios.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/time.h uClibc/libc/sysdeps/linux/common/bits/time.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/time.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/time.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * Never include this file directly; use <time.h> instead.
- @@ -54,6 +53,12 @@
- # define CLOCK_PROCESS_CPUTIME_ID 2
- /* Thread-specific CPU-time clock. */
- # define CLOCK_THREAD_CPUTIME_ID 3
- +/* Monotonic system-wide clock, not adjusted for frequency scaling. */
- +# define CLOCK_MONOTONIC_RAW 4
- +/* Identifier for system-wide realtime clock, updated only on ticks. */
- +# define CLOCK_REALTIME_COARSE 5
- +/* Monotonic system-wide clock, updated only on ticks. */
- +# define CLOCK_MONOTONIC_COARSE 6
-
- /* Flag to indicate time is absolute. */
- # define TIMER_ABSTIME 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/types.h uClibc/libc/sysdeps/linux/common/bits/types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,5 @@
- /* bits/types.h -- definitions of __*_t types underlying *_t types.
- - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
- + Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * Never include this file directly; use <sys/types.h> instead.
- @@ -27,8 +26,6 @@
- #include <features.h>
- #include <bits/wordsize.h>
-
- -#define __need_size_t
- -#include <stddef.h>
- #ifdef _LIBC
- #include <bits/kernel_types.h>
- #endif
- @@ -49,7 +46,7 @@
- #if __WORDSIZE == 64
- typedef signed long int __int64_t;
- typedef unsigned long int __uint64_t;
- -#elif defined(__GNUC__)
- +#elif defined(__GNUC__) || defined __ICC || defined __TenDRA__
- __extension__ typedef signed long long int __int64_t;
- __extension__ typedef unsigned long long int __uint64_t;
- #endif
- @@ -58,7 +55,7 @@
- #if __WORDSIZE == 64
- typedef long int __quad_t;
- typedef unsigned long int __u_quad_t;
- -#elif defined(__GNUC__)
- +#elif defined(__GNUC__) || defined __ICC || defined __TenDRA__
- __extension__ typedef long long int __quad_t;
- __extension__ typedef unsigned long long int __u_quad_t;
- #else
- @@ -200,9 +197,4 @@
-
- #undef __STD_TYPE
-
- -/* Now add the thread types. */
- -#if defined __UCLIBC_HAS_THREADS__ && (defined __USE_POSIX199506 || defined __USE_UNIX98)
- -# include <bits/pthreadtypes.h>
- -#endif
- -
- #endif /* bits/types.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/typesizes.h uClibc/libc/sysdeps/linux/common/bits/typesizes.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/typesizes.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_TYPES_H
- # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/common/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,8 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_ctype.h uClibc/libc/sysdeps/linux/common/bits/uClibc_ctype.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_ctype.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_ctype.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,9 +11,8 @@
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- + * License along with the GNU C Library; see the file COPYING.LIB. If
- + * not, see <http://www.gnu.org/licenses/>.
- */
-
- /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_fpmax.h uClibc/libc/sysdeps/linux/common/bits/uClibc_fpmax.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_fpmax.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_fpmax.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,10 +12,6 @@
- #ifndef _UCLIBC_FPMAX_H
- #define _UCLIBC_FPMAX_H
-
- -#ifndef _ISOC99_SOURCE
- -#define _ISOC99_SOURCE 1
- -#endif
- -
- #include <features.h>
- #include <float.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_locale.h uClibc/libc/sysdeps/linux/common/bits/uClibc_locale.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_locale.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_locale.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,9 +11,8 @@
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- + * License along with the GNU C Library; see the file COPYING.LIB. If
- + * not, see <http://www.gnu.org/licenses/>.
- */
-
- /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
- @@ -93,7 +92,7 @@
- #ifdef _LIBC
-
- /* extern void _locale_set(const unsigned char *p); */
- -/* extern void _locale_init(void); */
- +extern void weak_function _locale_init(void) attribute_hidden;
-
- #include <stddef.h>
- #include <stdint.h>
- @@ -338,7 +337,9 @@
- extern __locale_t __curlocale_var;
- # ifdef __UCLIBC_HAS_THREADS__
- extern __locale_t __curlocale(void) __THROW __attribute__ ((__const__));
- +libc_hidden_proto(__curlocale)
- extern __locale_t __curlocale_set(__locale_t newloc);
- +libc_hidden_proto(__curlocale_set)
- # define __UCLIBC_CURLOCALE (__curlocale())
- # else
- # define __UCLIBC_CURLOCALE (__curlocale_var)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_local_lim.h uClibc/libc/sysdeps/linux/common/bits/uClibc_local_lim.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_local_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_local_lim.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,14 +11,22 @@
- #define _BITS_UCLIBC_LOCAL_LIM_H 1
-
- /* This file works correctly only if local_lim.h is the NPTL version */
- -#if !defined PTHREAD_KEYS_MAX || defined TIMER_MAX
- +#if !defined PTHREAD_KEYS_MAX || defined TIMER_MAX || !defined SEM_VALUE_MAX
- # error local_lim.h was incorrectly updated, use the NPTL version from glibc
- #endif
-
- /* This should really be moved to thread specific directories */
- #if defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_HAS_THREADS_NATIVE__
- +/* glibc uses 16384 */
- # define PTHREAD_THREADS_MAX 1024
- # define TIMER_MAX 256
- +# ifdef __LINUXTHREADS_OLD__
- +# undef SEM_VALUE_MAX
- +# define SEM_VALUE_MAX ((int) ((~0u) >> 1))
- +# endif
- +# undef PTHREAD_STACK_MIN
- +/* glibc uses at least 16364 */
- +# define PTHREAD_STACK_MIN 1024
- #endif
-
- #ifndef __UCLIBC_HAS_THREADS__
- @@ -28,6 +36,7 @@
- # undef PTHREAD_DESTRUCTOR_ITERATIONS
- # undef PTHREAD_STACK_MIN
- # undef DELAYTIMER_MAX
- +# undef SEM_VALUE_MAX
- #endif
-
- #endif /* bits/uClibc_local_lim.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_mutex.h uClibc/libc/sysdeps/linux/common/bits/uClibc_mutex.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_mutex.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_mutex.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,7 +13,9 @@
- #ifdef __UCLIBC_HAS_THREADS__
-
- #include <pthread.h>
- +#ifdef _LIBC
- #include <bits/uClibc_pthread.h>
- +#endif
-
- #define __UCLIBC_MUTEX_TYPE pthread_mutex_t
-
- @@ -108,8 +110,8 @@
- #define __UCLIBC_IO_MUTEX_AUTO_UNLOCK(M,A) __UCLIBC_MUTEX_AUTO_UNLOCK(M,A)
- #define __UCLIBC_IO_MUTEX_LOCK_CANCEL_UNSAFE(M) __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE(M)
- #define __UCLIBC_IO_MUTEX_UNLOCK_CANCEL_UNSAFE(M) __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE(M)
- -#define __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_LOCK(M, 1)
- -#define __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M, 1)
- +#define __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_LOCK(M,C)
- +#define __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M,C)
-
- #endif /* of __USE_STDIO_FUTEXES__ */
-
- @@ -146,8 +148,8 @@
- #define __UCLIBC_IO_MUTEX_AUTO_UNLOCK(M,A) __UCLIBC_MUTEX_AUTO_UNLOCK(M,A)
- #define __UCLIBC_IO_MUTEX_LOCK_CANCEL_UNSAFE(M) __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE(M)
- #define __UCLIBC_IO_MUTEX_UNLOCK_CANCEL_UNSAFE(M) __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE(M)
- -#define __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_LOCK(M, 1)
- -#define __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M, 1)
- +#define __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_LOCK(M,C)
- +#define __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M,C)
-
- #endif /* of __UCLIBC_HAS_THREADS__ */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_page.h uClibc/libc/sysdeps/linux/common/bits/uClibc_page.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_page.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,9 +11,8 @@
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- + * License along with the GNU C Library; see the file COPYING.LIB. If
- + * not, see <http://www.gnu.org/licenses/>.
- */
-
- /* Supply an architecture specific value for PAGE_SIZE and friends. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_posix_opt.h uClibc/libc/sysdeps/linux/common/bits/uClibc_posix_opt.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_posix_opt.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_posix_opt.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,136 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +/*
- + * Never include this file directly; use <unistd.h> instead.
- + */
- +
- +#ifndef _BITS_UCLIBC_POSIX_OPT_H
- +#define _BITS_UCLIBC_POSIX_OPT_H 1
- +
- +/* This file works correctly only if posix_opt.h is the NPTL version */
- +#ifndef _POSIX_THREADS
- +# error posix_opt.h was incorrectly updated, use the NPTL version from glibc
- +#endif
- +
- +/* change first options based on what glibc does */
- +
- +#ifndef __UCLIBC_HAS_THREADS_NATIVE__
- +# undef _POSIX_THREAD_PROCESS_SHARED
- +# define _POSIX_THREAD_PROCESS_SHARED -1
- +# undef _POSIX_CLOCK_SELECTION
- +# define _POSIX_CLOCK_SELECTION -1
- +# undef _POSIX_THREAD_PRIO_INHERIT
- +# define _POSIX_THREAD_PRIO_INHERIT -1
- +# undef _POSIX_THREAD_PRIO_PROTECT
- +# define _POSIX_THREAD_PRIO_PROTECT -1
- +# undef _POSIX_THREAD_ROBUST_PRIO_INHERIT
- +# undef _POSIX_THREAD_ROBUST_PRIO_PROTECT
- +#endif
- +
- +/* this has to be adapted to uClibc, not all are thread related */
- +#ifndef __UCLIBC_HAS_THREADS__
- +# undef _XOPEN_REALTIME_THREADS
- +# undef _POSIX_THREADS
- +# undef _POSIX_REENTRANT_FUNCTIONS
- +# undef _POSIX_THREAD_SAFE_FUNCTIONS
- +# undef _POSIX_THREAD_PRIORITY_SCHEDULING
- +# undef _POSIX_THREAD_ATTR_STACKSIZE
- +# undef _POSIX_THREAD_ATTR_STACKADDR
- +# undef _POSIX_THREAD_PRIO_INHERIT
- +# undef _POSIX_THREAD_PRIO_PROTECT
- +# undef _POSIX_SEMAPHORES
- +# undef _POSIX_ASYNCHRONOUS_IO
- +# undef _POSIX_ASYNC_IO
- +# undef _LFS_ASYNCHRONOUS_IO
- +# undef _POSIX_PRIORITIZED_IO
- +# undef _LFS64_ASYNCHRONOUS_IO
- +# undef _POSIX_CPUTIME
- +# undef _POSIX_THREAD_CPUTIME
- +# undef _POSIX_READER_WRITER_LOCKS
- +# undef _POSIX_TIMEOUTS
- +# undef _POSIX_SPIN_LOCKS
- +# undef _POSIX_BARRIERS
- +# undef _POSIX_MESSAGE_PASSING
- +# undef _POSIX_THREAD_PROCESS_SHARED
- +# undef _POSIX_CLOCK_SELECTION
- +# undef _POSIX_ADVISORY_INFO
- +/*# undef _POSIX_RAW_SOCKETS*/
- +/*# undef _POSIX2_CHAR_TERM*/
- +# undef _POSIX_SPORADIC_SERVER
- +# undef _POSIX_THREAD_SPORADIC_SERVER
- +/*# undef _POSIX_TRACE
- +# undef _POSIX_TRACE_EVENT_FILTER
- +# undef _POSIX_TRACE_INHERIT
- +# undef _POSIX_TRACE_LOG
- +# undef _POSIX_TYPED_MEMORY_OBJECTS*/
- +#endif
- +
- +/* were in earlier version, used by sysconf */
- +#define _POSIX_POLL 1
- +#define _POSIX_SELECT 1
- +
- +/* disable independently unsupported features */
- +#undef _POSIX_TRACE
- +#undef _POSIX_TRACE_EVENT_FILTER
- +#undef _POSIX_TRACE_INHERIT
- +#undef _POSIX_TRACE_LOG
- +#undef _POSIX_TYPED_MEMORY_OBJECTS
- +#undef _POSIX_SPAWN
- +
- +#if 0 /* does uClibc support these? */
- +# undef _POSIX_ASYNCHRONOUS_IO
- +# undef _POSIX_ASYNC_IO
- +# undef _LFS_ASYNCHRONOUS_IO
- +# undef _POSIX_PRIORITIZED_IO
- +# undef _LFS64_ASYNCHRONOUS_IO
- +# undef _POSIX_MESSAGE_PASSING
- +#endif
- +
- +/* change options based on uClibc config options */
- +
- +#if 0 /*ndef __UCLIBC_HAS_POSIX_TIMERS__*/
- +# undef _POSIX_TIMERS
- +# undef _POSIX_THREAD_CPUTIME
- +#endif
- +
- +#if 0 /*ndef __UCLIBC_HAS_POSIX_BARRIERS__*/
- +# undef _POSIX_BARRIERS
- +#endif
- +
- +#if 0 /*ndef __UCLIBC_HAS_POSIX_SPINLOCKS__*/
- +# undef _POSIX_SPIN_LOCKS
- +#endif
- +
- +#ifndef __ARCH_USE_MMU__
- +# undef _POSIX_MEMLOCK
- +# undef _POSIX_MEMLOCK_RANGE
- +# undef _POSIX_MEMORY_PROTECTION
- +#endif
- +
- +#ifndef __UCLIBC_HAS_LFS__
- +# undef _LFS64_ASYNCHRONOUS_IO
- +# undef _LFS_LARGEFILE
- +# undef _LFS64_LARGEFILE
- +# undef _LFS64_STDIO
- +#endif
- +
- +#ifndef __UCLIBC_HAS_REALTIME__
- +# undef _POSIX_SEMAPHORES
- +#endif
- +
- +#ifndef __UCLIBC_HAS_REGEX__
- +# undef _POSIX_REGEXP
- +#endif
- +
- +#ifndef __UCLIBC_HAS_IPV6__
- +# undef _POSIX_IPV6
- +#endif
- +
- +#ifndef __UCLIBC_HAS_SOCKET__
- +# undef _POSIX_RAW_SOCKETS
- +#endif
- +
- +#endif /* bits/uClibc_posix_opt.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_pthread.h uClibc/libc/sysdeps/linux/common/bits/uClibc_pthread.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_pthread.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_pthread.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,9 +11,8 @@
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- + * License along with the GNU C Library; see the file COPYING.LIB. If
- + * not, see <http://www.gnu.org/licenses/>.
- */
-
- /* Supply prototypes for the internal thread functions used by the
- @@ -27,15 +26,12 @@
- # error "Always include <pthread.h> rather than <bits/uClibc_pthread.h>"
- #endif
-
- -#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)
- -
- struct _pthread_cleanup_buffer;
-
- /* Threading functions internal to uClibc. Make these thread functions
- * weak so that we can elide them from single-threaded processes. */
- extern int weak_function __pthread_mutex_init (pthread_mutex_t *__mutex,
- - __const pthread_mutexattr_t *__mutex_attr);
- -extern int weak_function __pthread_mutex_destroy (pthread_mutex_t *__mutex);
- + const pthread_mutexattr_t *__mutex_attr);
- extern int weak_function __pthread_mutex_lock (pthread_mutex_t *__mutex);
- extern int weak_function __pthread_mutex_unlock (pthread_mutex_t *__mutex);
- extern int weak_function __pthread_mutex_trylock (pthread_mutex_t *__mutex);
- @@ -47,5 +43,3 @@
- int __execute);
-
- #endif
- -
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_stdio.h uClibc/libc/sysdeps/linux/common/bits/uClibc_stdio.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2014-02-03 12:32:56.000000000 +0100
- @@ -54,27 +54,6 @@
- #endif
-
- /**********************************************************************/
- -/* Make sure defines related to large files are consistent. */
- -#ifdef _LIBC
- -
- -#ifdef __UCLIBC_HAS_LFS__
- -#undef __USE_LARGEFILE
- -#undef __USE_LARGEFILE64
- -#undef __USE_FILE_OFFSET64
- -/* If we're actually building uClibc with large file support, only define... */
- -#define __USE_LARGEFILE64 1
- -#endif /* __UCLIBC_HAS_LFS__ */
- -
- -#else /* not _LIBC */
- -
- -#ifndef __UCLIBC_HAS_LFS__
- -#if defined(__LARGEFILE64_SOURCE) || defined(__USE_LARGEFILE64) || defined(__USE_FILE_OFFSET64)
- -#error Sorry... uClibc was built without large file support!
- -#endif
- -#endif /* __UCLIBC_HAS_LFS__ */
- -
- -#endif /* _LIBC */
- -/**********************************************************************/
- #ifdef __UCLIBC_HAS_WCHAR__
-
- #define __need_wchar_t
- @@ -99,22 +78,7 @@
- #define __STDIO_PUTC_MACRO
- #endif
-
- -
- -/* These are consistency checks on the different options */
- -
- -#ifndef __STDIO_BUFFERS
- -#undef __STDIO_GETC_MACRO
- -#undef __STDIO_PUTC_MACRO
- -#endif
- -
- -#ifdef __BCC__
- -#undef __UCLIBC_HAS_LFS__
- -#endif
- -
- -#ifndef __UCLIBC_HAS_LFS__
- -#undef __UCLIBC_HAS_FOPEN_LARGEFILE_MODE__
- -#endif
- -
- +#ifdef _LIBC
- /**********************************************************************/
- #include <bits/uClibc_mutex.h>
-
- @@ -169,6 +133,8 @@
- #endif
- #endif
-
- +#endif /* _LIBC */
- +
- /**********************************************************************/
-
- #define __STDIO_IOFBF 0 /* Fully buffered. */
- @@ -209,7 +175,7 @@
-
- typedef __ssize_t __io_read_fn(void *__cookie, char *__buf, size_t __bufsize);
- typedef __ssize_t __io_write_fn(void *__cookie,
- - __const char *__buf, size_t __bufsize);
- + const char *__buf, size_t __bufsize);
- /* NOTE: GLIBC difference!!! -- fopencookie seek function
- * For glibc, the type of pos is always (__off64_t *) but in our case
- * it is type (__off_t *) when the lib is built without large file support.
- @@ -224,7 +190,7 @@
- __io_close_fn *close;
- } _IO_cookie_io_functions_t;
-
- -#if defined(_LIBC) || defined(_GNU_SOURCE)
- +#ifdef __USE_GNU
-
- typedef __io_read_fn cookie_read_function_t;
- typedef __io_write_fn cookie_write_function_t;
- @@ -238,6 +204,17 @@
- #endif
- /**********************************************************************/
-
- +#if defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_IO_MUTEX
- +/* keep this in sync with uClibc_mutex.h */
- +# ifdef __USE_STDIO_FUTEXES__
- +# include <bits/stdio-lock.h>
- +# define __UCLIBC_IO_MUTEX(M) _IO_lock_t M
- +# else
- +# include <bits/pthreadtypes.h>
- +# define __UCLIBC_IO_MUTEX(M) pthread_mutex_t M
- +# endif /* __UCLIBC_HAS_THREADS_NATIVE__ */
- +#endif
- +
- struct __STDIO_FILE_STRUCT {
- unsigned short __modeflags;
- /* There could be a hole here, but modeflags is used most.*/
- @@ -351,22 +328,27 @@
- **********************************************************************/
- #if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)
-
- -extern void _stdio_init(void) attribute_hidden;
- -extern void _stdio_term(void) attribute_hidden;
- +extern void weak_function _stdio_init(void) attribute_hidden;
- +extern void weak_function _stdio_term(void) attribute_hidden;
-
- #ifdef __STDIO_HAS_OPENLIST
-
- extern struct __STDIO_FILE_STRUCT *_stdio_openlist;
-
- #ifdef __UCLIBC_HAS_THREADS__
- -__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_add_lock);
- +__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_add_lock)
- +# ifndef __UCLIBC_HAS_THREADS_NATIVE__
- + attribute_hidden
- +# endif
- + ;
- #ifdef __STDIO_BUFFERS
- -__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_del_lock);
- -extern volatile int _stdio_openlist_use_count; /* _stdio_openlist_del_lock */
- -extern int _stdio_openlist_del_count; /* _stdio_openlist_del_lock */
- +__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_del_lock)
- +# ifndef __UCLIBC_HAS_THREADS_NATIVE__
- + attribute_hidden
- +# endif
- + ;
- #endif
- extern int _stdio_user_locking;
- -extern void __stdio_init_mutex(__UCLIBC_MUTEX_TYPE *m) attribute_hidden;
- #endif
-
- #endif
- @@ -465,6 +447,8 @@
-
- #else
-
- +# define __stdin stdin
- +
- #endif /* __STDIO_GETC_MACRO */
-
-
- @@ -524,4 +508,8 @@
- # endif
- # endif
-
- +#else
- +
- +# define __stdout stdout
- +
- #endif /* __STDIO_PUTC_MACRO */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_touplow.h uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_touplow.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,9 +11,8 @@
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- + * License along with the GNU C Library; see the file COPYING.LIB. If
- + * not, see <http://www.gnu.org/licenses/>.
- */
-
- /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_uintmaxtostr.h uClibc/libc/sysdeps/linux/common/bits/uClibc_uintmaxtostr.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_uintmaxtostr.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_uintmaxtostr.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,9 +11,8 @@
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- + * License along with the GNU C Library; see the file COPYING.LIB. If
- + * not, see <http://www.gnu.org/licenses/>.
- */
-
- /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
- @@ -28,16 +27,6 @@
- #ifndef _UINTMAXTOSTR_H
- #define _UINTMAXTOSTR_H 1
-
- -#ifdef _FEATURES_H
- -# ifndef __USE_ISOC99
- -# error features was included without defining _ISOC99_SOURCE!
- -# endif
- -#else
- -# ifndef _ISOC99_SOURCE
- -# define _ISOC99_SOURCE
- -# endif
- -#endif
- -
- #include <features.h>
- #include <limits.h>
- #include <stdint.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_uwchar.h uClibc/libc/sysdeps/linux/common/bits/uClibc_uwchar.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_uwchar.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_uwchar.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,9 +11,8 @@
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- + * License along with the GNU C Library; see the file COPYING.LIB. If
- + * not, see <http://www.gnu.org/licenses/>.
- */
-
- /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_va_copy.h uClibc/libc/sysdeps/linux/common/bits/uClibc_va_copy.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_va_copy.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uClibc_va_copy.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- + * License along with the GNU C Library; see the file COPYING.LIB. If
- + * not, see <http://www.gnu.org/licenses/>.
- */
-
- #ifndef _UCLIBC_VA_COPY_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uio.h uClibc/libc/sysdeps/linux/common/bits/uio.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uio.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/uio.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SYS_UIO_H && !defined _FCNTL_H
- # error "Never include <bits/uio.h> directly; use <sys/uio.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ustat.h uClibc/libc/sysdeps/linux/common/bits/ustat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ustat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/ustat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USTAT_H
- # error "Never include <bits/ustat.h> directly; use <sys/ustat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utmp.h uClibc/libc/sysdeps/linux/common/bits/utmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/utmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _UTMP_H
- # error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utmpx.h uClibc/libc/sysdeps/linux/common/bits/utmpx.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utmpx.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/utmpx.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _UTMPX_H
- # error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utsname.h uClibc/libc/sysdeps/linux/common/bits/utsname.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utsname.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/utsname.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UTSNAME_H
- # error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/waitflags.h uClibc/libc/sysdeps/linux/common/bits/waitflags.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/waitflags.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/waitflags.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SYS_WAIT_H && !defined _STDLIB_H
- # error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/waitstatus.h uClibc/libc/sysdeps/linux/common/bits/waitstatus.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/waitstatus.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/waitstatus.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SYS_WAIT_H && !defined _STDLIB_H
- # error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead."
- @@ -25,7 +24,7 @@
- /* Everything extant so far uses these same bits. */
-
-
- -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */
- +/* If WIFEXITED(STATUS), the low-order 8 bits of exit(N). */
- #define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
-
- /* If WIFSIGNALED(STATUS), the terminating signal. */
- @@ -37,12 +36,20 @@
- /* Nonzero if STATUS indicates normal termination. */
- #define __WIFEXITED(status) (__WTERMSIG(status) == 0)
-
- -/* Nonzero if STATUS indicates termination by a signal. */
- -#define __WIFSIGNALED(status) \
- - (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
- +/* Nonzero if STATUS indicates termination by a signal.
- + * Note that status 0x007f is "died from signal 127", not "stopped by signal 0".
- + * This does happen on MIPS.
- + * The comparison is "< 0xff", not "< 0x7f", because WCOREDUMP bit (0x80)
- + * can be set too.
- + */
- +#define __WIFSIGNALED(status) (((unsigned)((status) & 0xffff) - 1U) < 0xffU)
-
- /* Nonzero if STATUS indicates the child is stopped. */
- +#if !defined(__mips__)
- #define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
- +#else
- +#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f && ((status) & 0xff00))
- +#endif
-
- /* Nonzero if STATUS indicates the child continued after a stop. We only
- define this if <bits/waitflags.h> provides the WCONTINUED flag bit. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/wchar.h uClibc/libc/sysdeps/linux/common/bits/wchar.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/wchar.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/wchar.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_WCHAR_H
- #define _BITS_WCHAR_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/xopen_lim.h uClibc/libc/sysdeps/linux/common/bits/xopen_lim.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/xopen_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/bits/xopen_lim.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * Never include this file directly; use <limits.h> instead.
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/brk.c uClibc/libc/sysdeps/linux/common/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,10 +8,8 @@
- #include <unistd.h>
- #include <sys/syscall.h>
-
- -libc_hidden_proto(brk)
- -
- #define __NR___syscall_brk __NR_brk
- -static inline _syscall1(void *, __syscall_brk, void *, end)
- +static __always_inline _syscall1(void *, __syscall_brk, void *, end)
-
- /* This must be initialized data because commons can't have aliases. */
- void * __curbrk attribute_hidden = 0;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/capget.c uClibc/libc/sysdeps/linux/common/capget.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/capget.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/capget.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,7 +8,8 @@
- */
-
- #include <sys/syscall.h>
- -int capget(void *header, void *data);
- +
- #ifdef __NR_capget
- +int capget(void *header, void *data);
- _syscall2(int, capget, void *, header, void *, data)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/capset.c uClibc/libc/sysdeps/linux/common/capset.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/capset.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/capset.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,7 +9,7 @@
-
- #include <sys/syscall.h>
-
- -int capset(void *header, const void *data);
- #ifdef __NR_capset
- +int capset(void *header, const void *data);
- _syscall2(int, capset, void *, header, const void *, data)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/chdir.c uClibc/libc/sysdeps/linux/common/chdir.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/chdir.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/chdir.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,15 +8,7 @@
- */
-
- #include <sys/syscall.h>
- -#include <string.h>
- #include <unistd.h>
- -#include <sys/param.h>
-
- -
- -#define __NR___syscall_chdir __NR_chdir
- -static __inline__ _syscall1(int, __syscall_chdir, const char *, path)
- -int chdir(const char *path)
- -{
- - return __syscall_chdir(path);
- -}
- +_syscall1(int, chdir, const char *, path)
- libc_hidden_def(chdir)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/chmod.c uClibc/libc/sysdeps/linux/common/chmod.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/chmod.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/chmod.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,13 +9,22 @@
-
- #include <sys/syscall.h>
- #include <sys/stat.h>
- +#include <unistd.h>
-
- +#if defined __NR_fchmodat && !defined __NR_chmod
- +# include <fcntl.h>
- +int chmod(const char *path, mode_t mode)
- +{
- + return fchmodat(AT_FDCWD, path, mode, 0);
- +}
-
- -#define __NR___syscall_chmod __NR_chmod
- +#else
- +# define __NR___syscall_chmod __NR_chmod
- static __inline__ _syscall2(int, __syscall_chmod, const char *, path, __kernel_mode_t, mode)
-
- int chmod(const char *path, mode_t mode)
- {
- return __syscall_chmod(path, mode);
- }
- +#endif
- libc_hidden_def(chmod)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/chown.c uClibc/libc/sysdeps/linux/common/chown.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/chown.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/chown.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,18 +11,26 @@
- #include <unistd.h>
- #include <bits/wordsize.h>
-
- +#if defined __NR_fchownat && !defined __NR_chown
- +# include <fcntl.h>
- +int chown(const char *path, uid_t owner, gid_t group)
- +{
- + return fchownat(AT_FDCWD, path, owner, group, 0);
- +}
-
- -#if (__WORDSIZE == 32 && defined(__NR_chown32)) || __WORDSIZE == 64
- -# ifdef __NR_chown32
- -# undef __NR_chown
- -# define __NR_chown __NR_chown32
- -# endif
- +#else
- +
- +# if (__WORDSIZE == 32 && defined(__NR_chown32)) || __WORDSIZE == 64
- +# ifdef __NR_chown32
- +# undef __NR_chown
- +# define __NR_chown __NR_chown32
- +# endif
-
- _syscall3(int, chown, const char *, path, uid_t, owner, gid_t, group)
-
- -#else
- +# else
-
- -# define __NR___syscall_chown __NR_chown
- +# define __NR___syscall_chown __NR_chown
- static __inline__ _syscall3(int, __syscall_chown, const char *, path,
- __kernel_uid_t, owner, __kernel_gid_t, group)
-
- @@ -35,6 +43,7 @@
- }
- return (__syscall_chown(path, owner, group));
- }
- -#endif
- +# endif
-
- +#endif
- libc_hidden_def(chown)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_getres.c uClibc/libc/sysdeps/linux/common/clock_getres.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_getres.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/clock_getres.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,11 +9,11 @@
-
- #include <sys/syscall.h>
- #include <time.h>
- -#include <unistd.h>
-
- #ifdef __NR_clock_getres
- _syscall2(int, clock_getres, clockid_t, clock_id, struct timespec*, res)
- #else
- +# include <unistd.h>
-
- int clock_getres(clockid_t clock_id, struct timespec* res)
- {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_gettime.c uClibc/libc/sysdeps/linux/common/clock_gettime.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_gettime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/clock_gettime.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,11 +10,11 @@
-
- #include <sys/syscall.h>
- #include <time.h>
- -#include <sys/time.h>
-
- #ifdef __NR_clock_gettime
- _syscall2(int, clock_gettime, clockid_t, clock_id, struct timespec*, tp)
- #else
- +# include <sys/time.h>
-
- int clock_gettime(clockid_t clock_id, struct timespec* tp)
- {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_settime.c uClibc/libc/sysdeps/linux/common/clock_settime.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_settime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/clock_settime.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,11 +9,11 @@
-
- #include <sys/syscall.h>
- #include <time.h>
- -#include <sys/time.h>
-
- #ifdef __NR_clock_settime
- _syscall2(int, clock_settime, clockid_t, clock_id, const struct timespec*, tp)
- #else
- +# include <sys/time.h>
-
- int clock_settime(clockid_t clock_id, const struct timespec* tp)
- {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/close.c uClibc/libc/sysdeps/linux/common/close.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/close.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/close.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,12 +9,13 @@
-
- #include <sys/syscall.h>
- #include <unistd.h>
- +#include <cancel.h>
-
- -_syscall1(int, close, int, fd)
- +#define __NR___close_nocancel __NR_close
- +_syscall1(int, __NC(close), int, fd)
-
- -#ifndef __LINUXTHREADS_OLD__
- -libc_hidden_def(close)
- -#else
- -libc_hidden_weak(close)
- -strong_alias(close,__libc_close)
- -#endif
- +#define __NR___close_nocancel_no_status __NR_close
- +_syscall_noerr1(void, __close_nocancel_no_status, int, fd)
- +
- +CANCELLABLE_SYSCALL(int, close, (int fd), (fd))
- +lt_libc_hidden(close)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/cmsg_nxthdr.c uClibc/libc/sysdeps/linux/common/cmsg_nxthdr.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/cmsg_nxthdr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/cmsg_nxthdr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,12 +13,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#define __FORCE_GLIBC
- #include <features.h>
- +#include <stddef.h>
- /* Prevent math.h from defining a colliding inline */
- #undef __USE_EXTERN_INLINES
- #include <sys/socket.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/creat64.c uClibc/libc/sysdeps/linux/common/creat64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/creat64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/creat64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,19 +12,17 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <_lfs_64.h>
- -
- -#ifdef __UCLIBC_HAS_LFS__
- #include <fcntl.h>
- -#include <sys/types.h>
- +#include <cancel.h>
-
- /* Create FILE with protections MODE. */
- int creat64(const char *file, mode_t mode)
- {
- - return open64(file, O_WRONLY|O_CREAT|O_TRUNC, mode);
- + return open64(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
- }
- -#endif /* __UCLIBC_HAS_LFS__ */
- +/* open handled cancellation, noop on uClibc */
- +LIBC_CANCEL_HANDLED();
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/creat.c uClibc/libc/sysdeps/linux/common/creat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/creat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/creat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,8 +8,11 @@
- */
-
- #include <fcntl.h>
- +#include <cancel.h>
-
- int creat(const char *file, mode_t mode)
- {
- return open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
- }
- +/* open handled cancellation, noop on uClibc */
- +LIBC_CANCEL_HANDLED();
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/create_module.c uClibc/libc/sysdeps/linux/common/create_module.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/create_module.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/create_module.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,10 +7,10 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <errno.h>
- -#include <unistd.h>
- #include <features.h>
- -#include <sys/types.h>
- +#define __need_size_t
- +#include <stddef.h>
- +#include <errno.h>
- #include <sys/syscall.h>
-
- #ifdef __NR_create_module
- @@ -22,7 +22,7 @@
- static __inline__ _syscall2(long, __create_module, const char *, name, size_t, size)
- /* By checking the value of errno, we know if we have been fooled
- * by the syscall2 macro making a very high address look like a
- - * negative, so we we fix it up here. */
- + * negative, so we fix it up here. */
- unsigned long create_module(const char *name, size_t size)
- {
- long ret = __create_module(name, size);
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/delete_module.c uClibc/libc/sysdeps/linux/common/delete_module.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/delete_module.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/delete_module.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,7 +7,7 @@
- */
-
- #include <sys/syscall.h>
- -int delete_module(const char *name, unsigned int flags);
- #ifdef __NR_delete_module
- +int delete_module(const char *name, unsigned int flags);
- _syscall2(int, delete_module, const char *, name, unsigned int, flags)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/dl-osinfo.h uClibc/libc/sysdeps/linux/common/dl-osinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/dl-osinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/dl-osinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -17,10 +17,11 @@
- # endif
-
- # include <stdint.h>
- -# include <sys/time.h>
-
- # ifdef IS_IN_libc
- -#include <fcntl.h>
- +# include <fcntl.h>
- +# include <unistd.h>
- +# include <sys/time.h>
- # define OPEN open
- # define READ read
- # define CLOSE close
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/dup2.c uClibc/libc/sysdeps/linux/common/dup2.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/dup2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/dup2.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,7 +9,24 @@
-
- #include <sys/syscall.h>
- #include <unistd.h>
- +#if defined __NR_dup3 && !defined __NR_dup2
- +# include <fcntl.h>
- +extern int __libc_fcntl (int fd, int cmd, ...);
- +libc_hidden_proto(__libc_fcntl);
-
- +int dup2(int old, int newfd)
- +{
- + /*
- + * Check if old fd is valid before we try
- + * to ducplicate it. Return it if valid
- + * or EBADF otherwise
- + */
- + if (old == newfd)
- + return fcntl(old, F_GETFL, 0) < 0 ? -1 : newfd;
-
- + return dup3(old, newfd, 0);
- +}
- +#else
- _syscall2(int, dup2, int, oldfd, int, newfd)
- +#endif
- libc_hidden_def(dup2)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/dup3.c uClibc/libc/sysdeps/linux/common/dup3.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/dup3.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common/dup3.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,16 @@
- +/* vi: set sw=4 ts=4: */
- +/*
- + * dup3() for uClibc
- + *
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sys/syscall.h>
- +#include <unistd.h>
- +
- +#if defined(__NR_dup3)
- +_syscall3(int, dup3, int, oldfd, int, newfd, int, flags)
- +libc_hidden_def(dup3)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/epoll.c uClibc/libc/sysdeps/linux/common/epoll.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/epoll.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/epoll.c 2014-02-03 12:32:56.000000000 +0100
- @@ -1,6 +1,6 @@
- /* vi: set sw=4 ts=4: */
- /*
- - * epoll_create() / epoll_ctl() / epoll_wait() for uClibc
- + * epoll_create() / epoll_ctl() / epoll_wait() / epoll_pwait() for uClibc
- *
- * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- *
- @@ -9,75 +9,61 @@
-
- #include <sys/syscall.h>
- #include <sys/epoll.h>
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -# include <sysdep-cancel.h>
- -#else
- -# define SINGLE_THREAD_P 1
- -#endif
- +#include <cancel.h>
-
- -/*
- - * epoll_create()
- - */
- #ifdef __NR_epoll_create
- _syscall1(int, epoll_create, int, size)
- #endif
-
- -/*
- - * epoll_create1()
- - */
- #ifdef __NR_epoll_create1
- _syscall1(int, epoll_create1, int, flags)
- #endif
-
- -/*
- - * epoll_ctl()
- - */
- +#if defined __NR_epoll_create1 && !defined __NR_epoll_create
- +int epoll_create(int size)
- +{
- + return INLINE_SYSCALL(epoll_create1, 1, 0);
- +}
- +
- +#endif
- +
- #ifdef __NR_epoll_ctl
- -_syscall4(int,epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event)
- +_syscall4(int, epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event)
- #endif
-
- -/*
- - * epoll_wait()
- - */
- #ifdef __NR_epoll_wait
- -extern __typeof(epoll_wait) __libc_epoll_wait;
- -int __libc_epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
- +static int __NC(epoll_wait)(int epfd, struct epoll_event *events, int maxevents, int timeout)
- {
- - if (SINGLE_THREAD_P)
- - return INLINE_SYSCALL(epoll_wait, 4, epfd, events, maxevents, timeout);
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - else {
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = INLINE_SYSCALL(epoll_wait, 4, epfd, events, maxevents, timeout);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- - }
- -# endif
- + return INLINE_SYSCALL(epoll_wait, 4, epfd, events, maxevents, timeout);
- }
- -weak_alias(__libc_epoll_wait, epoll_wait)
- +CANCELLABLE_SYSCALL(int, epoll_wait, (int epfd, struct epoll_event *events, int maxevents, int timeout),
- + (epfd, events, maxevents, timeout))
- #endif
-
- -/*
- - * epoll_pwait()
- - */
- #ifdef __NR_epoll_pwait
- # include <signal.h>
-
- -extern __typeof(epoll_pwait) __libc_epoll_pwait;
- -int __libc_epoll_pwait(int epfd, struct epoll_event *events, int maxevents,
- - int timeout, const sigset_t *set)
- +# define __NR___syscall_epoll_pwait __NR_epoll_pwait
- +static __always_inline _syscall6(int, __syscall_epoll_pwait, int, epfd, struct epoll_event *, events,
- + int, maxevents, int, timeout, const sigset_t *, sigmask, size_t, sigsetsize)
- +
- +static int __NC(epoll_pwait)(int epfd, struct epoll_event *events, int maxevents, int timeout,
- + const sigset_t *set)
- {
- - int nsig = _NSIG / 8;
- - if (SINGLE_THREAD_P)
- - return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig);
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - else {
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- - }
- -# endif
- + return __syscall_epoll_pwait(epfd, events, maxevents, timeout, set, __SYSCALL_SIGSET_T_SIZE);
- }
- -weak_alias(__libc_epoll_pwait, epoll_pwait)
- +CANCELLABLE_SYSCALL(int, epoll_pwait, (int epfd, struct epoll_event *events, int maxevents, int timeout,
- + const sigset_t *set),
- + (epfd, events, maxevents, timeout, set))
- +/*
- + * If epoll_wait is not defined, then call epoll_pwait instead using NULL
- + * for sigmask argument
- + */
- +# ifndef __NR_epoll_wait
- +# include <stddef.h>
- +int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
- +{
- + return INLINE_SYSCALL(epoll_pwait, 5, epfd, events, maxevents, timeout, NULL);
- +}
- +# endif
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/eventfd.c uClibc/libc/sysdeps/linux/common/eventfd.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/eventfd.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/eventfd.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,12 +7,24 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- +#include <errno.h>
- #include <sys/syscall.h>
- #include <sys/eventfd.h>
-
- /*
- * eventfd()
- */
- -#ifdef __NR_eventfd
- -_syscall2(int, eventfd, int, count, int, flags)
- +#if defined __NR_eventfd || defined __NR_eventfd2
- +int eventfd (int count, int flags)
- +{
- +#if defined __NR_eventfd2
- + return INLINE_SYSCALL (eventfd2, 2, count, flags);
- +#elif defined __NR_eventfd
- + if (flags != 0) {
- + __set_errno (EINVAL);
- + return -1;
- + }
- + return INLINE_SYSCALL (eventfd, 1, count);
- +#endif
- +}
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/_exit.c uClibc/libc/sysdeps/linux/common/_exit.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/_exit.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/_exit.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,28 +7,36 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <features.h>
- -#include <errno.h>
- #include <unistd.h>
- -#include <sys/types.h>
- +#include <stdlib.h>
- #include <sys/syscall.h>
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep.h>
- +#include <bits/kernel-features.h>
- +
- +#ifdef __UCLIBC_ABORT_INSTRUCTION__
- +# define ABORT_INSTRUCTION __asm__(__UCLIBC_ABORT_INSTRUCTION__)
- +#else
- +# warning "no abort instruction defined for this arch"
- #endif
-
- +/* have to check for kernel 2.5.35 too, since NR was earlier present */
- +#if defined __NR_exit_group && __LINUX_KERNEL_VERSION >= 0x020600 \
- + && defined __UCLIBC_HAS_THREADS__
- +# undef __NR_exit
- +# define __NR_exit __NR_exit_group
- +#endif
-
- -void attribute_noreturn _exit(int status)
- +void _exit(int status)
- {
- /* The loop is added only to keep gcc happy. */
- while(1)
- {
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -# ifdef __NR_exit_group
- - INLINE_SYSCALL(exit_group, 1, status);
- -# endif
- -#endif
- INLINE_SYSCALL(exit, 1, status);
- +#ifdef ABORT_INSTRUCTION
- + ABORT_INSTRUCTION;
- +#endif
- }
- }
- libc_hidden_def(_exit)
- +#ifdef __USE_ISOC99
- weak_alias(_exit,_Exit)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/faccessat.c uClibc/libc/sysdeps/linux/common/faccessat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/faccessat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/faccessat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
-
- #ifdef __NR_faccessat
- _syscall4(int, faccessat, int, fd, const char *, file, int, type, int, flag)
- +libc_hidden_def(faccessat)
- #else
- /* should add emulation with faccess() and /proc/self/fd/ ... */
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fchdir.c uClibc/libc/sysdeps/linux/common/fchdir.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fchdir.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fchdir.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,7 @@
- #include <sys/syscall.h>
- #include <unistd.h>
-
- -
- +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- _syscall1(int, fchdir, int, fd)
- libc_hidden_def(fchdir)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fchmodat.c uClibc/libc/sysdeps/linux/common/fchmodat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fchmodat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fchmodat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -32,6 +32,7 @@
-
- return INLINE_SYSCALL(fchmodat, 3, fd, file, mode);
- }
- +libc_hidden_def(fchmodat)
- #else
- /* should add emulation with fchmod() and /proc/self/fd/ ... */
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fchownat.c uClibc/libc/sysdeps/linux/common/fchownat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fchownat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fchownat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
-
- #ifdef __NR_fchownat
- _syscall5(int, fchownat, int, fd, const char *, file, uid_t, owner, gid_t, group, int, flag)
- +libc_hidden_def(fchownat)
- #else
- /* should add emulation with fchown() and /proc/self/fd/ ... */
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fdatasync.c uClibc/libc/sysdeps/linux/common/fdatasync.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fdatasync.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fdatasync.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,36 +8,17 @@
- */
-
- #include <sys/syscall.h>
- -#include <unistd.h>
-
- #if !defined __NR_fdatasync && defined __NR_osf_fdatasync
- # define __NR_fdatasync __NR_osf_fdatasync
- #endif
-
- #ifdef __NR_fdatasync
- +# include <unistd.h>
- +# include <cancel.h>
-
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -# include <sysdep-cancel.h>
- -# else
- -# define SINGLE_THREAD_P 1
- -# endif
- -
- -#define __NR___syscall_fdatasync __NR_fdatasync
- -
- -static __always_inline
- -_syscall1(int, __syscall_fdatasync, int, fd)
- -
- -int fdatasync(int fd)
- -{
- - if (SINGLE_THREAD_P)
- - return __syscall_fdatasync(fd);
- -
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __syscall_fdatasync(fd);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -# endif
- -}
- +# define __NR___fdatasync_nocancel __NR_fdatasync
- +static _syscall1(int, __NC(fdatasync), int, fd)
-
- +CANCELLABLE_SYSCALL(int, fdatasync, (int fd), (fd))
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fork.c uClibc/libc/sysdeps/linux/common/fork.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fork.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,16 +8,35 @@
- */
-
- #include <sys/syscall.h>
- -#include <unistd.h>
-
- -#ifdef __ARCH_USE_MMU__
- -
- -#ifdef __NR_fork
- -#define __NR___libc_fork __NR_fork
- +#if defined __ARCH_USE_MMU__
- +# include <unistd.h>
- extern __typeof(fork) __libc_fork;
- -_syscall0(pid_t, __libc_fork)
- -weak_alias(__libc_fork,fork)
- +# if defined __NR_fork
- +# include <cancel.h>
- +# define __NR___libc_fork __NR_fork
- +_syscall0(pid_t, fork)
- +
- +# elif defined __NR_clone && !defined __NR_fork
- +# include <sys/types.h>
- +# include <signal.h>
- +# include <stddef.h>
- +pid_t fork(void)
- +{
- + pid_t pid = INLINE_SYSCALL(clone, 4, SIGCHLD, NULL, NULL, NULL);
- +
- + if (pid < 0)
- + return -1;
- +
- + return pid;
- +}
- +
- +# endif
- +# ifdef __UCLIBC_HAS_THREADS__
- +strong_alias(fork,__libc_fork)
- libc_hidden_weak(fork)
- -#endif
- +# else
- +libc_hidden_def(fork)
- +# endif
-
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fpu_control.h uClibc/libc/sysdeps/linux/common/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fstat64.c uClibc/libc/sysdeps/linux/common/fstat64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fstat64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fstat64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,20 +7,20 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
-
- -#if defined __UCLIBC_HAS_LFS__ && defined __NR_fstat64
- -#include <unistd.h>
- -#include <sys/stat.h>
- -#include "xstatconv.h"
- -
- -
- -#define __NR___syscall_fstat64 __NR_fstat64
- -static __inline__ _syscall2(int, __syscall_fstat64,
- - int, filedes, struct kernel_stat64 *, buf)
- +#ifdef __NR_fstat64
- +# include <unistd.h>
- +# include <sys/stat.h>
- +# include "xstatconv.h"
- +# define __NR___syscall_fstat64 __NR_fstat64
- +static __always_inline _syscall2(int, __syscall_fstat64,
- + int, filedes, struct kernel_stat64 *, buf)
-
- int fstat64(int fd, struct stat64 *buf)
- {
- +#ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
- int result;
- struct kernel_stat64 kbuf;
-
- @@ -29,6 +29,9 @@
- __xstat64_conv(&kbuf, buf);
- }
- return result;
- +#else
- + return __syscall_fstat64(fd, buf);
- +#endif
- }
- libc_hidden_def(fstat64)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatat64.c uClibc/libc/sysdeps/linux/common/fstatat64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatat64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fstatat64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -6,20 +6,21 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- +#include <_lfs_64.h>
- +#include <bits/wordsize.h>
- #include <sys/syscall.h>
- -#include <sys/stat.h>
- -#include "xstatconv.h"
- -
- -#ifdef __UCLIBC_HAS_LFS__
-
- /* 64bit ports tend to favor newfstatat() */
- -#ifdef __NR_newfstatat
- +#if __WORDSIZE == 64 && defined __NR_newfstatat
- # define __NR_fstatat64 __NR_newfstatat
- #endif
-
- #ifdef __NR_fstatat64
- +# include <sys/stat.h>
- +# include "xstatconv.h"
- int fstatat64(int fd, const char *file, struct stat64 *buf, int flag)
- {
- +# ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
- int ret;
- struct kernel_stat64 kbuf;
-
- @@ -28,9 +29,11 @@
- __xstat64_conv(&kbuf, buf);
-
- return ret;
- +# else
- + return INLINE_SYSCALL(fstatat64, 4, fd, file, buf, flag);
- +# endif
- }
- +libc_hidden_def(fstatat64)
- #else
- /* should add emulation with fstat64() and /proc/self/fd/ ... */
- #endif
- -
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatat.c uClibc/libc/sysdeps/linux/common/fstatat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fstatat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,7 +11,7 @@
- #include "xstatconv.h"
-
- /* 64bit ports tend to favor newfstatat() */
- -#ifdef __NR_newfstatat
- +#if __WORDSIZE == 64 && defined __NR_newfstatat
- # define __NR_fstatat64 __NR_newfstatat
- #endif
-
- @@ -19,14 +19,26 @@
- int fstatat(int fd, const char *file, struct stat *buf, int flag)
- {
- int ret;
- +# ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
- struct kernel_stat64 kbuf;
- -
- ret = INLINE_SYSCALL(fstatat64, 4, fd, file, &kbuf, flag);
- if (ret == 0)
- __xstat32_conv(&kbuf, buf);
- -
- +# else
- + ret = INLINE_SYSCALL(fstatat64, 4, fd, file, buf, flag);
- + if (ret == 0) {
- + /* Did we overflow */
- + if (buf->__pad1 || buf->__pad2 || buf->__pad3
- + || buf->__pad4 || buf->__pad5 || buf->__pad6
- + || buf->__pad7) {
- + __set_errno(EOVERFLOW);
- + return -1;
- + }
- + }
- +# endif /* __ARCH_HAS_DEPRECATED_SYSCALLS__ */
- return ret;
- }
- +libc_hidden_def(fstatat)
- #else
- /* should add emulation with fstat() and /proc/self/fd/ ... */
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fstat.c uClibc/libc/sysdeps/linux/common/fstat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fstat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fstat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,10 +12,28 @@
- #include <sys/stat.h>
- #include "xstatconv.h"
-
- +#if defined __NR_fstat64 && !defined __NR_fstat
- +int fstat(int fd, struct stat *buf)
- +{
- + int result = INLINE_SYSCALL(fstat64, 2, fd, buf);
- + if (result == 0) {
- + /* Did we overflow? */
- + if (buf->__pad1 || buf->__pad2 || buf->__pad3
- + || buf->__pad4 || buf->__pad5
- + || buf->__pad6 || buf->__pad7) {
- + __set_errno(EOVERFLOW);
- + return -1;
- + }
- + }
- + return result;
- +}
- +libc_hidden_def(fstat)
- +
- +#elif defined __NR_fstat
- int fstat(int fd, struct stat *buf)
- {
- int result;
- -#ifdef __NR_fstat64
- +# ifdef __NR_fstat64
- /* normal stat call has limited values for various stat elements
- * e.g. uid device major/minor etc.
- * so we use 64 variant if available
- @@ -26,19 +44,21 @@
- if (result == 0) {
- __xstat32_conv(&kbuf, buf);
- }
- -#else
- +# else
- struct kernel_stat kbuf;
-
- result = INLINE_SYSCALL(fstat, 2, fd, &kbuf);
- if (result == 0) {
- __xstat_conv(&kbuf, buf);
- }
- -#endif
- +# endif
- return result;
- }
- libc_hidden_def(fstat)
-
- -#if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
- +# if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
- strong_alias_untyped(fstat,fstat64)
- libc_hidden_def(fstat64)
- +# endif
- +
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatfs.c uClibc/libc/sysdeps/linux/common/fstatfs.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatfs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fstatfs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,8 +9,9 @@
-
- #include <sys/syscall.h>
- #include <sys/vfs.h>
- +#include <string.h>
-
- -#ifndef __USE_FILE_OFFSET64
- +#ifndef __USE_FILE_OFFSET64__
- extern int fstatfs (int __fildes, struct statfs *__buf)
- __THROW __nonnull ((2));
- #else
- @@ -23,8 +24,26 @@
- #endif
-
- extern __typeof(fstatfs) __libc_fstatfs attribute_hidden;
- -#define __NR___libc_fstatfs __NR_fstatfs
- +#ifdef __NR_fstatfs
- +# define __NR___libc_fstatfs __NR_fstatfs
- _syscall2(int, __libc_fstatfs, int, fd, struct statfs *, buf)
- +#else
- +int __libc_fstatfs (int __fildes, struct statfs *__buf)
- +{
- + int err = INLINE_SYSCALL(fstatfs64, 3, __fildes, sizeof(*__buf), __buf);
- +
- + if (err == 0) {
- + /* Did we overflow? */
- + if (__buf->__pad1 || __buf->__pad2 || __buf->__pad3 ||
- + __buf->__pad4 || __buf->__pad5) {
- + __set_errno(EOVERFLOW);
- + return -1;
- + }
- + }
- + return err;
- +};
- +/* Redefined fstatfs because we need it for backwards compatibility */
- +#endif /* __NR_fstatfs */
-
- #if defined __UCLIBC_LINUX_SPECIFIC__
- weak_alias(__libc_fstatfs,fstatfs)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fsync.c uClibc/libc/sysdeps/linux/common/fsync.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fsync.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/fsync.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,29 +9,9 @@
-
- #include <sys/syscall.h>
- #include <unistd.h>
- +#include <cancel.h>
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include "sysdep-cancel.h"
- -#else
- -#define SINGLE_THREAD_P 1
- -#endif
- +#define __NR___fsync_nocancel __NR_fsync
- +static _syscall1(int, __NC(fsync), int, fd)
-
- -#define __NR___syscall_fsync __NR_fsync
- -static inline _syscall1(int, __syscall_fsync, int, fd)
- -
- -extern __typeof(fsync) __libc_fsync;
- -
- -int __libc_fsync(int fd)
- -{
- - if (SINGLE_THREAD_P)
- - return __syscall_fsync(fd);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __syscall_fsync(fd);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -
- -weak_alias(__libc_fsync, fsync)
- +CANCELLABLE_SYSCALL(int, fsync, (int fd), (fd))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ftruncate64.c uClibc/libc/sysdeps/linux/common/ftruncate64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ftruncate64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/ftruncate64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,50 +7,41 @@
- * and on 32 bit machines this sends things into the kernel as
- * two 32-bit arguments (high and low 32 bits of length) that
- * are ordered based on endianess. It turns out endian.h has
- - * just the macro we need to order things, __LONG_LONG_PAIR.
- + * just the macro we need to order things, OFF64_HI_LO.
- */
-
- -#include <features.h>
- +#include <_lfs_64.h>
- +#include <sys/syscall.h>
- +#include <unistd.h>
-
- -#ifdef __UCLIBC_HAS_LFS__
- +#ifdef __NR_ftruncate64
- +# include <bits/wordsize.h>
-
- -# include <unistd.h>
- -# include <errno.h>
- -# include <endian.h>
- -# include <stdint.h>
- -# include <sys/types.h>
- -# include <sys/syscall.h>
- -
- -
- -# ifdef __NR_ftruncate64
- -
- -# if __WORDSIZE == 64
- +# if __WORDSIZE == 64
-
- /* For a 64 bit machine, life is simple... */
- _syscall2(int, ftruncate64, int, fd, __off64_t, length)
-
- -# elif __WORDSIZE == 32
- +# elif __WORDSIZE == 32
- +# include <endian.h>
- +# include <stdint.h>
-
- /* The exported ftruncate64 function. */
- int ftruncate64 (int fd, __off64_t length)
- {
- - uint32_t low = length & 0xffffffff;
- - uint32_t high = length >> 32;
- -# if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
- - return INLINE_SYSCALL(ftruncate64,
- - 4, fd, 0, __LONG_LONG_PAIR (high, low));
- -# else
- - return INLINE_SYSCALL(ftruncate64, 3, fd,
- - __LONG_LONG_PAIR (high, low));
- -# endif
- +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
- + return INLINE_SYSCALL(ftruncate64, 4, fd, 0, OFF64_HI_LO(length));
- +# else
- + return INLINE_SYSCALL(ftruncate64, 3, fd, OFF64_HI_LO(length));
- +# endif
- }
-
- -# else /* __WORDSIZE */
- -# error Your machine is not 64 bit or 32 bit, I am dazed and confused.
- -# endif /* __WORDSIZE */
- -
- -# else /* __NR_ftruncate64 */
- +# else /* __WORDSIZE */
- +# error Your machine is not 64 bit or 32 bit, I am dazed and confused.
- +# endif /* __WORDSIZE */
-
- +#else /* __NR_ftruncate64 */
- +# include <errno.h>
-
- int ftruncate64 (int fd, __off64_t length)
- {
- @@ -65,7 +56,5 @@
- return -1;
- }
-
- -# endif /* __NR_ftruncate64 */
- +#endif /* __NR_ftruncate64 */
- libc_hidden_def(ftruncate64)
- -
- -#endif /* __UCLIBC_HAS_LFS__ */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ftruncate.c uClibc/libc/sysdeps/linux/common/ftruncate.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ftruncate.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/ftruncate.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,20 @@
- #include <sys/syscall.h>
- #include <unistd.h>
-
- +#if defined __NR_ftruncate64 && !defined __NR_ftruncate
- +# include <endian.h>
- +# include <stdint.h>
- +int ftruncate(int fd, __off_t length)
- +{
- +# if defined __UCLIBC_HAS_LFS__
- + return ftruncate64(fd, length);
- +# elif __WORDSIZE == 32
- + return INLINE_SYSCALL(ftruncate64, 3, fd, OFF_HI_LO(length));
- +# endif
- +}
- +libc_hidden_def(ftruncate);
-
- +#else
- _syscall2(int, ftruncate, int, fd, __off_t, length)
- libc_hidden_def(ftruncate)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/futimens.c uClibc/libc/sysdeps/linux/common/futimens.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/futimens.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/futimens.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,13 +16,13 @@
- * Note that due to not including the header, we have to alias the call
- * manually.
- */
- -extern int utimensat (int __fd, __const char *__path,
- - __const struct timespec __times[2],
- +extern int utimensat (int __fd, const char *__path,
- + const struct timespec __times[2],
- int __flags) __THROW;
- libc_hidden_proto(utimensat)
-
- -int futimens (int __fd, __const struct timespec __times[2]) __THROW;
- -int futimens (int fd, __const struct timespec ts[2])
- +int futimens (int __fd, const struct timespec __times[2]) __THROW;
- +int futimens (int fd, const struct timespec ts[2])
- {
- return utimensat(fd, 0, ts, 0);
- }
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getdents64.c uClibc/libc/sysdeps/linux/common/getdents64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getdents64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/getdents64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,7 +4,11 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <features.h>
- +#include <_lfs_64.h>
- +#include <sys/syscall.h>
- +
- +#ifdef __NR_getdents64
- +
- #include <assert.h>
- #include <errno.h>
- #include <dirent.h>
- @@ -13,17 +17,9 @@
- #include <string.h>
- #include <unistd.h>
- #include <sys/param.h>
- -#include <sys/types.h>
- -#include <sys/syscall.h>
- -#include <bits/kernel_types.h>
- +#include <bits/wordsize.h>
- #include <bits/uClibc_alloc.h>
-
- -#if defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64
- -
- -# ifndef offsetof
- -# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
- -# endif
- -
- struct kernel_dirent64
- {
- uint64_t d_ino;
- @@ -36,7 +32,6 @@
- # define __NR___syscall_getdents64 __NR_getdents64
- static __inline__ _syscall3(int, __syscall_getdents64, int, fd, unsigned char *, dirp, size_t, count)
-
- -ssize_t __getdents64 (int fd, char *buf, size_t nbytes) attribute_hidden;
- ssize_t __getdents64 (int fd, char *buf, size_t nbytes)
- {
- struct dirent64 *dp;
- @@ -96,10 +91,10 @@
- return (char *) dp - buf;
- }
-
- -#if __WORDSIZE == 64
- +#if __WORDSIZE == 64 || (defined __UCLIBC_HAS_LFS__ && !defined __NR_getdents)
- /* since getdents doesnt give us d_type but getdents64 does, try and
- * use getdents64 as much as possible */
- -attribute_hidden strong_alias(__getdents64,__getdents)
- +strong_alias(__getdents64,__getdents)
- #endif
-
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getdents.c uClibc/libc/sysdeps/linux/common/getdents.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getdents.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/getdents.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,21 +4,17 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <assert.h>
- -#include <errno.h>
- +#include <sys/syscall.h>
- +#include <bits/wordsize.h>
- +
- +#if !(defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64 && __WORDSIZE == 64)
- +
- #include <dirent.h>
- -#include <stddef.h>
- -#include <stdint.h>
- #include <string.h>
- -#include <unistd.h>
- -#include <sys/param.h>
- #include <sys/types.h>
- -#include <sys/syscall.h>
- #include <bits/kernel_types.h>
- #include <bits/kernel-features.h>
- -#include <bits/uClibc_alloc.h>
-
- -#if !(defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64 && __WORDSIZE == 64)
- /* If the condition above is met, __getdents is defined as an alias
- * for __getdents64 (see getdents64.c). Otherwise...
- */
- @@ -30,10 +26,7 @@
- * version / arch details.
- */
-
- -#ifndef offsetof
- -# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
- -#endif
- -
- +# ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
- struct kernel_dirent
- {
- long int d_ino;
- @@ -41,13 +34,16 @@
- unsigned short int d_reclen;
- char d_name[256];
- };
- +# else
- +# define kernel_dirent dirent
- +# endif
-
- -ssize_t __getdents (int fd, char *buf, size_t nbytes) attribute_hidden;
- -
- -#define __NR___syscall_getdents __NR_getdents
- +# if defined __NR_getdents
- +# define __NR___syscall_getdents __NR_getdents
- static __always_inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count)
- +# endif
-
- -#if defined __ASSUME_GETDENTS32_D_TYPE
- +# if defined __ASSUME_GETDENTS32_D_TYPE && defined __NR_getdents
-
- ssize_t __getdents (int fd, char *buf, size_t nbytes)
- {
- @@ -76,7 +72,14 @@
- return retval;
- }
-
- -#elif ! defined __UCLIBC_HAS_LFS__ || ! defined __NR_getdents64
- +# elif ! defined __UCLIBC_HAS_LFS__ || !defined __NR_getdents64
- +
- +# include <assert.h>
- +# include <stddef.h>
- +# include <errno.h>
- +# include <unistd.h>
- +# include <sys/param.h>
- +# include <bits/uClibc_alloc.h>
-
- ssize_t __getdents (int fd, char *buf, size_t nbytes)
- {
- @@ -88,6 +91,7 @@
- const size_t size_diff = (offsetof (struct dirent, d_name)
- - offsetof (struct kernel_dirent, d_name));
-
- +# ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
- red_nbytes = MIN (nbytes - ((nbytes /
- (offsetof (struct dirent, d_name) + 14)) * size_diff),
- nbytes - size_diff);
- @@ -96,6 +100,21 @@
- skdp = kdp = stack_heap_alloc(red_nbytes);
-
- retval = __syscall_getdents(fd, (unsigned char *)kdp, red_nbytes);
- +# else
- +
- + dp = (struct dirent *) buf;
- + skdp = kdp = stack_heap_alloc(nbytes);
- +
- + retval = INLINE_SYSCALL(getdents64, 3, fd, (unsigned char *)kdp, nbytes);
- + if (retval > 0) {
- + /* Did we overflow? */
- + if (kdp->__pad1 || kdp->__pad2) {
- + __set_errno(EINVAL);
- + return -1;
- + }
- + }
- +# endif
- +
- if (retval == -1) {
- stack_heap_free(skdp);
- return -1;
- @@ -137,9 +156,10 @@
- return (char *) dp - buf;
- }
-
- -#elif __WORDSIZE == 32
- +# elif __WORDSIZE == 32 && !defined __NR_getdents64
- +
- +# include <stddef.h>
-
- -extern __typeof(__getdents) __getdents64 attribute_hidden;
- ssize_t __getdents (int fd, char *buf, size_t nbytes)
- {
- struct dirent *dp;
- @@ -165,10 +185,10 @@
- return ret;
- }
-
- -#endif
- +# endif
-
- -#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
- -attribute_hidden strong_alias(__getdents,__getdents64)
- -#endif
- +# if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
- +strong_alias(__getdents,__getdents64)
- +# endif
-
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getdirname.c uClibc/libc/sysdeps/linux/common/getdirname.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getdirname.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/getdirname.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getgroups.c uClibc/libc/sysdeps/linux/common/getgroups.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getgroups.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/getgroups.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,10 +8,7 @@
- */
-
- #include <sys/syscall.h>
- -#include <stdlib.h>
- #include <unistd.h>
- -#include <grp.h>
- -
-
- #if defined(__NR_getgroups32)
- # undef __NR_getgroups
- @@ -22,12 +19,14 @@
- _syscall2(int, getgroups, int, size, gid_t *, list)
-
- #else
- -
- -#define MIN(a,b) (((a)<(b))?(a):(b))
- -
- -#define __NR___syscall_getgroups __NR_getgroups
- -static __inline__ _syscall2(int, __syscall_getgroups,
- - int, size, __kernel_gid_t *, list)
- +# include <errno.h>
- +# include <stdlib.h>
- +# include <sys/types.h>
- +# include <sys/param.h>
- +
- +# define __NR___syscall_getgroups __NR_getgroups
- +static __always_inline
- +_syscall2(int, __syscall_getgroups, int, size, __kernel_gid_t *, list)
-
- int getgroups(int size, gid_t groups[])
- {
- @@ -56,5 +55,4 @@
- }
- }
- #endif
- -
- libc_hidden_def(getgroups)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/get_kernel_syms.c uClibc/libc/sysdeps/linux/common/get_kernel_syms.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/get_kernel_syms.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/get_kernel_syms.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,8 +9,8 @@
-
- #include <sys/syscall.h>
-
- -struct kernel_sym;
- -int get_kernel_syms(struct kernel_sym *table attribute_unused);
- #ifdef __NR_get_kernel_syms
- +struct kernel_sym;
- +int get_kernel_syms(struct kernel_sym *table);
- _syscall1(int, get_kernel_syms, struct kernel_sym *, table)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getpagesize.c uClibc/libc/sysdeps/linux/common/getpagesize.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getpagesize.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/getpagesize.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,16 +12,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
- #include <features.h>
- #include <sys/param.h>
-
- -extern size_t __pagesize;
- -
- /* Return the system page size. */
- /* couldn't make __getpagesize hidden, because shm.h uses it in a macro */
- extern __typeof(getpagesize) __getpagesize;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getrlimit64.c uClibc/libc/sysdeps/linux/common/getrlimit64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getrlimit64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/getrlimit64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,20 +12,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <_lfs_64.h>
- -
- -#include <sys/types.h>
- -#include <sys/resource.h>
- #include <bits/wordsize.h>
-
- /* the regular getrlimit will work just fine for 64bit users */
- +#if __WORDSIZE == 32
-
- -#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 32
- -
- +# include <sys/resource.h>
-
- /* Put the soft and hard limits for RESOURCE in *RLIMITS.
- Returns 0 if successful, -1 if not (and sets errno). */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getrlimit.c uClibc/libc/sysdeps/linux/common/getrlimit.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getrlimit.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/getrlimit.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,12 +7,9 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define getrlimit64 __hide_getrlimit64
- #include <sys/syscall.h>
- -#include <unistd.h>
- #include <sys/resource.h>
- -#undef getrlimit64
- -
- +#include <bits/wordsize.h>
-
- /* Only wrap getrlimit if the new ugetrlimit is not present and getrlimit sucks */
-
- @@ -25,14 +22,14 @@
- struct rlimit *, rlim)
- int getrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
- {
- - return (__syscall_ugetrlimit(resource, rlimits));
- + return __syscall_ugetrlimit(resource, rlimits);
- }
-
- #elif !defined(__UCLIBC_HANDLE_OLDER_RLIMIT__)
-
- /* We don't need to wrap getrlimit() */
- _syscall2(int, getrlimit, __rlimit_resource_t, resource,
- - struct rlimit *, rlim)
- + struct rlimit *, rlim)
-
- #else
-
- @@ -59,9 +56,8 @@
- return result;
- }
- #endif
- -
- libc_hidden_def(getrlimit)
-
- #if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
- -strong_alias(getrlimit, getrlimit64)
- +strong_alias_untyped(getrlimit, getrlimit64)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/gettimeofday.c uClibc/libc/sysdeps/linux/common/gettimeofday.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/gettimeofday.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/gettimeofday.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,9 +10,5 @@
- #include <sys/syscall.h>
- #include <sys/time.h>
-
- -#ifdef __USE_BSD
- -_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz)
- -#else
- -_syscall2(int, gettimeofday, struct timeval *, tv, void *, tz)
- -#endif
- +_syscall2(int, gettimeofday, struct timeval *, tv, __timezone_ptr_t, tz)
- libc_hidden_def(gettimeofday)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/hp-timing.h uClibc/libc/sysdeps/linux/common/hp-timing.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/hp-timing.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/hp-timing.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _HP_TIMING_H
- #define _HP_TIMING_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/init_module.c uClibc/libc/sysdeps/linux/common/init_module.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/init_module.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/init_module.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,12 +8,13 @@
- */
-
- #include <sys/syscall.h>
- -int init_module(void *first, void *second, void *third, void *fourth, void *fifth);
- +
- #ifdef __NR_init_module
- +int init_module(void *first, void *second, void *third, void *fourth, void *fifth);
- /* This may have 5 arguments (for old 2.0 kernels) or 2 arguments
- * (for 2.2 and 2.4 kernels). Use the greatest common denominator,
- * and let the kernel cope with whatever it gets. It's good at that. */
- _syscall5(int, init_module, void *, first, void *, second, void *, third,
- - void *, fourth, void *, fifth)
- + void *, fourth, void *, fifth)
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/inotify.c uClibc/libc/sysdeps/linux/common/inotify.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/inotify.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/inotify.c 2014-02-03 12:32:56.000000000 +0100
- @@ -19,6 +19,13 @@
- _syscall1(int, inotify_init1, int, flags)
- #endif
-
- +#if defined __NR_inotify_init1 && !defined __NR_inotify_init
- +int inotify_init(void)
- +{
- + return INLINE_SYSCALL(inotify_init1, 1, 0);
- +}
- +#endif
- +
- #ifdef __NR_inotify_add_watch
- _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ioctl.c uClibc/libc/sysdeps/linux/common/ioctl.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ioctl.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/ioctl.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,14 +10,7 @@
- #include <sys/syscall.h>
- #include <stdarg.h>
- #include <sys/ioctl.h>
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- -#else
- -#define SINGLE_THREAD_P 1
- -#endif
- -
- -libc_hidden_proto(ioctl)
- +#include <cancel.h>
-
- #define __NR___syscall_ioctl __NR_ioctl
- static __always_inline
- @@ -30,17 +23,16 @@
-
- va_start(list, request);
- arg = va_arg(list, void *);
- -
- va_end(list);
-
- if (SINGLE_THREAD_P)
- return __syscall_ioctl(fd, request, arg);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +#ifdef __NEW_THREADS
- int oldtype = LIBC_CANCEL_ASYNC ();
- int result = __syscall_ioctl(fd, request, arg);
- LIBC_CANCEL_RESET (oldtype);
- return result;
- #endif
- }
- -libc_hidden_def(ioctl)
- +lt_strong_alias(ioctl)
- +lt_libc_hidden(ioctl)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ioperm.c uClibc/libc/sysdeps/linux/common/ioperm.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ioperm.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/ioperm.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,10 +13,6 @@
-
- /* psm: can't #include <sys/io.h>, some archs miss it */
- extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on) __THROW;
- -/* Not needed internally;
- -libc_hidden_proto(ioperm)
- -*/
- _syscall3(int, ioperm, unsigned long, from, unsigned long, num, int, turn_on)
- -/*libc_hidden_def(ioperm)*/
-
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/common/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,6 @@
- +/* Private macros for accessing __jmp_buf contents. dummy version. */
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/lchown.c uClibc/libc/sysdeps/linux/common/lchown.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/lchown.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/lchown.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,17 +11,26 @@
- #include <unistd.h>
- #include <bits/wordsize.h>
-
- -#if (__WORDSIZE == 32 && defined(__NR_lchown32)) || __WORDSIZE == 64
- -# ifdef __NR_lchown32
- -# undef __NR_lchown
- -# define __NR_lchown __NR_lchown32
- -# endif
- +#if defined __NR_fchownat && !defined __NR_lchown
- +# include <fcntl.h>
- +int lchown(const char *path, uid_t owner, gid_t group)
- +{
- + return fchownat(AT_FDCWD, path, owner, group, AT_SYMLINK_NOFOLLOW);
- +}
- +
- +#else
- +
- +# if (__WORDSIZE == 32 && defined(__NR_lchown32)) || __WORDSIZE == 64
- +# ifdef __NR_lchown32
- +# undef __NR_lchown
- +# define __NR_lchown __NR_lchown32
- +# endif
-
- _syscall3(int, lchown, const char *, path, uid_t, owner, gid_t, group)
-
- -#else
- +# else
-
- -# define __NR___syscall_lchown __NR_lchown
- +# define __NR___syscall_lchown __NR_lchown
- static __inline__ _syscall3(int, __syscall_lchown, const char *, path,
- __kernel_uid_t, owner, __kernel_gid_t, group)
-
- @@ -35,4 +44,6 @@
- return __syscall_lchown(path, owner, group);
- }
-
- +# endif
- +
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/linkat.c uClibc/libc/sysdeps/linux/common/linkat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/linkat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/linkat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
-
- #ifdef __NR_linkat
- _syscall5(int, linkat, int, fromfd, const char *, from, int, tofd, const char *, to, int, flags)
- +libc_hidden_def(linkat)
- #else
- /* should add emulation with link() and /proc/self/fd/ ... */
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/link.c uClibc/libc/sysdeps/linux/common/link.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/link.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/link.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,4 +9,13 @@
-
- #include <sys/syscall.h>
- #include <unistd.h>
- +
- +#if defined __NR_linkat && !defined __NR_link
- +# include <fcntl.h>
- +int link(const char *oldpath, const char *newpath)
- +{
- + return linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0);
- +}
- +#else
- _syscall2(int, link, const char *, oldpath, const char *, newpath)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/llseek.c uClibc/libc/sysdeps/linux/common/llseek.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/llseek.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/llseek.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,36 +7,26 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <unistd.h>
- -#include <sys/types.h>
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- +#include <bits/wordsize.h>
-
- /* Newer kernel ports have llseek() instead of _llseek() */
- #if !defined __NR__llseek && defined __NR_llseek
- # define __NR__llseek __NR_llseek
- #endif
-
- -#if defined __NR__llseek && defined __UCLIBC_HAS_LFS__
- -
- -loff_t lseek64(int fd, loff_t offset, int whence)
- -{
- - loff_t result;
- - return (loff_t)(INLINE_SYSCALL(_llseek, 5, fd, (off_t) (offset >> 32),
- - (off_t) (offset & 0xffffffff), &result, whence) ?: result);
- -}
- -
- -#else
- -
- -loff_t lseek64(int fd, loff_t offset, int whence)
- +#if defined __NR__llseek && __WORDSIZE == 32
- +# include <unistd.h>
- +# include <endian.h>
- +# include <cancel.h>
- +off64_t __NC(lseek64)(int fd, off64_t offset, int whence)
- {
- - return (loff_t)(lseek(fd, (off_t) (offset), whence));
- + off64_t result;
- + /* do we not need to handle the offset with __LONG_LONG_PAIR depending on endianness? */
- + return (off64_t)INLINE_SYSCALL(_llseek, 5, fd, (off_t) OFF64_HI(offset),
- + (off_t) OFF64_LO(offset), &result, whence) ?: result;
- }
- -
- -#endif
- -
- -#ifndef __LINUXTHREADS_OLD__
- -libc_hidden_def(lseek64)
- -#else
- -libc_hidden_weak(lseek64)
- -strong_alias(lseek64,__libc_lseek64)
- +CANCELLABLE_SYSCALL(off64_t, lseek64, (int fd, off64_t offset, int whence), (fd, offset, whence))
- +lt_libc_hidden(lseek64)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/longjmp.c uClibc/libc/sysdeps/linux/common/longjmp.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/longjmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/longjmp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,23 +12,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <setjmp.h>
- #include <signal.h>
-
- -
- -extern void __longjmp (__jmp_buf __env, int __val) attribute_noreturn;
- -libc_hidden_proto(__longjmp)
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -extern void _longjmp_unwind (jmp_buf env, int val);
- -#endif
- -
- -extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
- /* Set the signal mask to the one specified in ENV, and jump
- to the position specified in ENV, causing the setjmp
- call there to return VAL, or 1 if VAL is 0. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/lseek.c uClibc/libc/sysdeps/linux/common/lseek.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/lseek.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/lseek.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,19 +9,55 @@
-
- #include <sys/syscall.h>
- #include <unistd.h>
- +#include <cancel.h>
-
- #ifdef __NR_lseek
- -_syscall3(__off_t, lseek, int, fildes, __off_t, offset, int, whence)
- +# define __NR___lseek_nocancel __NR_lseek
- +_syscall3(off_t, __NC(lseek), int, fd, off_t, offset, int, whence)
- +/* Use lseek64 if __NR_lseek is not defined but UCLIBC_HAS_LFS is enabled */
- +#elif !defined __NR_lseek && defined __NR_llseek
- +#include <endian.h>
- +off_t __NC(lseek)(int fd, off_t offset, int whence)
- +{
- +#if defined __UCLIBC_HAS_LFS__
- + return lseek64(fd, offset, whence);
- +#elif __WORDSIZE == 32
- + __off64_t result;
- + __off_t high = 0;
- + return INLINE_SYSCALL(llseek, 5, fd,
- + __LONG_LONG_PAIR(high, offset),
- + &result, whence) ?: result;
- +#endif
- +/* No need to handle __WORDSIZE == 64 as such a kernel won't define __NR_llseek */
- +}
- #else
- -
- -__off_t lseek(int fildes, __off_t offset, int whence)
- +# include <errno.h>
- +off_t __NC(lseek)(int fd, off_t offset attribute_unused, int whence)
- {
- - return lseek64(fildes, offset, whence);
- + if (fd < 0) {
- + __set_errno(EBADF);
- + return -1;
- + }
- +
- + switch(whence) {
- + case SEEK_SET:
- + case SEEK_CUR:
- + case SEEK_END:
- + break;
- + default:
- + __set_errno(EINVAL);
- + return -1;
- + }
- +
- + __set_errno(ENOSYS);
- + return -1;
- }
- #endif
- -#ifndef __LINUXTHREADS_OLD__
- -libc_hidden_def(lseek)
- -#else
- -libc_hidden_weak(lseek)
- -strong_alias(lseek,__libc_lseek)
- +CANCELLABLE_SYSCALL(off_t, lseek, (int fd, off_t offset, int whence), (fd, offset, whence))
- +lt_libc_hidden(lseek)
- +#if defined __UCLIBC_HAS_LFS__ && (__WORDSIZE == 64 || (!defined __NR__llseek && !defined __NR_llseek))
- +strong_alias_untyped(__NC(lseek),__NC(lseek64))
- +strong_alias_untyped(lseek,lseek64)
- +lt_strong_alias(lseek64)
- +lt_libc_hidden(lseek64)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/lstat64.c uClibc/libc/sysdeps/linux/common/lstat64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/lstat64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/lstat64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,17 +7,27 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
-
- -#if defined __UCLIBC_HAS_LFS__ && defined __NR_lstat64
- # include <unistd.h>
- # include <sys/stat.h>
- -# include "xstatconv.h"
-
- +#if defined __NR_fstatat64 && !defined __NR_lstat64
- +# include <fcntl.h>
- +
- +int lstat64(const char *file_name, struct stat64 *buf)
- +{
- + return fstatat64(AT_FDCWD, file_name, buf, AT_SYMLINK_NOFOLLOW);
- +}
- +libc_hidden_def(lstat64)
-
- +/* For systems which have both, prefer the old one */
- +#elif defined __NR_lstat64
- +# include "xstatconv.h"
- # define __NR___syscall_lstat64 __NR_lstat64
- -static __inline__ _syscall2(int, __syscall_lstat64, const char *, file_name,
- - struct kernel_stat64 *, buf)
- +static __always_inline _syscall2(int, __syscall_lstat64, const char *, file_name,
- + struct kernel_stat64 *, buf)
-
- int lstat64(const char *file_name, struct stat64 *buf)
- {
- @@ -31,5 +41,4 @@
- return result;
- }
- libc_hidden_def(lstat64)
- -
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/lstat.c uClibc/libc/sysdeps/linux/common/lstat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/lstat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/lstat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,12 +10,23 @@
- #include <sys/syscall.h>
- #include <unistd.h>
- #include <sys/stat.h>
- -#include "xstatconv.h"
- +
- +#if defined __NR_fstatat64 && !defined __NR_lstat
- +# include <fcntl.h>
-
- int lstat(const char *file_name, struct stat *buf)
- {
- + return fstatat(AT_FDCWD, file_name, buf, AT_SYMLINK_NOFOLLOW);
- +}
- +libc_hidden_def(lstat)
- +
- +/* For systems which have both, prefer the old one */
- +#else
- +# include "xstatconv.h"
- +int lstat(const char *file_name, struct stat *buf)
- +{
- int result;
- -#ifdef __NR_lstat64
- +# ifdef __NR_lstat64
- /* normal stat call has limited values for various stat elements
- * e.g. uid device major/minor etc.
- * so we use 64 variant if available
- @@ -26,19 +37,22 @@
- if (result == 0) {
- __xstat32_conv(&kbuf, buf);
- }
- -#else
- +# else
- struct kernel_stat kbuf;
-
- result = INLINE_SYSCALL(lstat, 2, file_name, &kbuf);
- if (result == 0) {
- __xstat_conv(&kbuf, buf);
- }
- -#endif
- +# endif /* __NR_lstat64 */
- return result;
- }
- libc_hidden_def(lstat)
-
- -#if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
- +# if ! defined __NR_fstatat64 && ! defined __NR_lstat64 \
- + && defined __UCLIBC_HAS_LFS__
- strong_alias_untyped(lstat,lstat64)
- libc_hidden_def(lstat64)
- -#endif
- +# endif
- +
- +#endif /* __NR_fstatat64 */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/Makefile.in uClibc/libc/sysdeps/linux/common/Makefile.in
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -23,6 +23,7 @@
- bdflush.c \
- capget.c \
- capset.c \
- + dup3.c \
- eventfd.c \
- inotify.c \
- ioperm.c \
- @@ -64,24 +65,30 @@
- # NPTL needs these internally: madvise.c
- CSRC-$(findstring y,$(UCLIBC_LINUX_SPECIFIC)$(UCLIBC_HAS_THREADS_NATIVE)) += madvise.c
- ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- -CSRC- += fork.c getpid.c raise.c open.c close.c read.c write.c
- +CSRC- += fork.c getpid.c raise.c #open.c close.c read.c write.c
- CSRC- += $(if $(findstring =arm=,=$(TARGET_ARCH)=),vfork.c)
- CSRC- += $(if $(findstring =x86_64=,=$(TARGET_ARCH)=),vfork.c)
- -CSRC- += $(if $(findstring =mips=y=,=$(TARGET_ARCH)=$(CONFIG_MIPS_O32_ABI)=),waitpid.c)
- +#CSRC- += $(if $(findstring =mips=y=,=$(TARGET_ARCH)=$(CONFIG_MIPS_O32_ABI)=),waitpid.c)
- +CSRC- += $(if $(findstring =metag=,=$(TARGET_ARCH)=),vfork.c)
- +endif
- +ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
- +# No conversion is needed for new architectures
- +CSRC- += xstatconv.c
- endif
- # stubbed out in mman.h
- CSRC-$(ARCH_USE_MMU) += msync.c
- # we need these internally: getdomainname.c
- CSRC-$(UCLIBC_BSD_SPECIFIC) += mincore.c setdomainname.c
- CSRC-$(UCLIBC_NTP_LEGACY) += ntp_gettime.c
- -# 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
- +# 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
- CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \
- fdatasync.c mlockall.c mlock.c munlockall.c munlock.c \
- nanosleep.c __rt_sigtimedwait.c __rt_sigwaitinfo.c sched_getparam.c \
- sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
- sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c
- # 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
- -CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c
- +CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c \
- + posix_fallocate.c posix_fallocate64.c
- CSRC-$(UCLIBC_SUSV4_LEGACY) += utime.c
- CSRC-$(UCLIBC_HAS_EPOLL) += epoll.c
- CSRC-$(UCLIBC_HAS_XATTR) += xattr.c
- @@ -96,11 +103,11 @@
-
- # provided via pthreads builddir
- CSRC-y := $(filter-out $(libc_a_CSRC) $(notdir $(libpthread_libc_OBJS:.o=.c)),$(CSRC-y))
- -SSRC := $(filter-out $(libc_a_SSRC) $(notdir $(libpthread_libc_OBJS:.o=.S)),$(SSRC))
- +SSRC-y := $(filter-out $(libc_a_SSRC) $(notdir $(libpthread_libc_OBJS:.o=.S)),$(SSRC-y))
-
- # fails for some reason
- -ifneq ($(strip $(ARCH_OBJS)),)
- -CSRC-y := $(filter-out $(notdir $(ARCH_OBJS:.o=.c)) $(ARCH_OBJ_FILTEROUT),$(CSRC-y))
- +ifneq ($(strip $(ARCH_OBJS-y)),)
- +CSRC-y := $(filter-out $(notdir $(ARCH_OBJS-y:.o=.c)) $(ARCH_OBJ_FILTEROUT-y),$(CSRC-y))
- endif
-
- CFLAGS-ssp.c := $(SSP_DISABLE_FLAGS)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mkdirat.c uClibc/libc/sysdeps/linux/common/mkdirat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mkdirat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/mkdirat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
-
- #ifdef __NR_mkdirat
- _syscall3(int, mkdirat, int, fd, const char *, path, mode_t, mode)
- +libc_hidden_def(mkdirat)
- #else
- /* should add emulation with mkdir() and /proc/self/fd/ ... */
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mkdir.c uClibc/libc/sysdeps/linux/common/mkdir.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mkdir.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/mkdir.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,8 +10,15 @@
- #include <sys/syscall.h>
- #include <sys/stat.h>
-
- +#if defined __NR_mkdirat && !defined __NR_mkdir
- +# include <fcntl.h>
- +int mkdir(const char *pathname, mode_t mode)
- +{
- + return mkdirat(AT_FDCWD, pathname, mode);
- +}
-
- -#define __NR___syscall_mkdir __NR_mkdir
- +#else
- +# define __NR___syscall_mkdir __NR_mkdir
- static __inline__ _syscall2(int, __syscall_mkdir, const char *, pathname,
- __kernel_mode_t, mode)
-
- @@ -19,4 +26,5 @@
- {
- return (__syscall_mkdir(pathname, mode));
- }
- +#endif
- libc_hidden_def(mkdir)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mkfifo.c uClibc/libc/sysdeps/linux/common/mkfifo.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mkfifo.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/mkfifo.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stddef.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mknod.c uClibc/libc/sysdeps/linux/common/mknod.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mknod.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/mknod.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,13 @@
- #include <sys/syscall.h>
- #include <sys/stat.h>
-
- +#if defined __NR_mknodat && !defined __NR_mknod
- +# include <fcntl.h>
- +int mknod(const char *path, mode_t mode, dev_t dev)
- +{
- + return mknodat(AT_FDCWD, path, mode, dev);
- +}
- +#else
- int mknod(const char *path, mode_t mode, dev_t dev)
- {
- unsigned long long int k_dev;
- @@ -19,4 +26,5 @@
-
- return INLINE_SYSCALL(mknod, 3, path, mode, (unsigned int)k_dev);
- }
- +#endif
- libc_hidden_def(mknod)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mmap64.c uClibc/libc/sysdeps/linux/common/mmap64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mmap64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/mmap64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -6,18 +6,12 @@
- /* Massivly hacked up for uClibc by Erik Andersen */
-
- #include <_lfs_64.h>
- -
- -#ifdef __UCLIBC_HAS_LFS__
- -
- -#include <errno.h>
- #include <stdint.h>
- -#include <unistd.h>
- -#include <sys/mman.h>
- #include <sys/syscall.h>
- -#include <bits/uClibc_page.h>
- -
- +#include <errno.h>
- +#include <sys/mman.h>
-
- -# if !defined __NR_mmap2
- +#ifndef __NR_mmap2
-
- /*
- * This version is a stub that just chops off everything at the mmap 32 bit
- @@ -27,7 +21,7 @@
- *
- */
-
- -__ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t offset)
- +void *mmap64(void *addr, size_t len, int prot, int flags, int fd, __off64_t offset)
- {
- if (offset != (off_t) offset ||
- (offset + len) != (off_t) (offset + len)) {
- @@ -38,17 +32,18 @@
- return mmap(addr, len, prot, flags, fd, (off_t) offset);
- }
-
- -# else
- +#else
- +# include <bits/uClibc_page.h>
-
- -/* Some architectures always use 12 as page shift for mmap2() eventhough the
- +/* Some architectures always use 12 as page shift for mmap2() even though the
- * real PAGE_SHIFT != 12. Other architectures use the same value as
- * PAGE_SHIFT...
- */
- -# ifndef MMAP2_PAGE_SHIFT
- -# define MMAP2_PAGE_SHIFT 12
- -# endif
- +# ifndef MMAP2_PAGE_SHIFT
- +# define MMAP2_PAGE_SHIFT 12
- +# endif
-
- -__ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t offset)
- +void *mmap64(void *addr, size_t len, int prot, int flags, int fd, __off64_t offset)
- {
- /*
- * Some arches check the size in INLINE_SYSCALL() and barf if it's
- @@ -73,8 +68,7 @@
- */
- sysoff = (uint64_t)offset >> MMAP2_PAGE_SHIFT;
-
- - return (__ptr_t) INLINE_SYSCALL(mmap2, 6, addr, len, prot, flags, fd, sysoff);
- + return (void*) INLINE_SYSCALL(mmap2, 6, addr, len, prot, flags, fd, sysoff);
- }
-
- -# endif
- -#endif /* __UCLIBC_HAS_LFS__ */
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mmap.c uClibc/libc/sysdeps/linux/common/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/mmap.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,25 +7,57 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <sys/syscall.h>
- -#include <unistd.h>
- #include <sys/mman.h>
- -#include <bits/uClibc_page.h>
- +#include <sys/syscall.h>
-
- -#ifdef __NR_mmap
- +#if defined __UCLIBC_MMAP_HAS_6_ARGS__ && defined __NR_mmap
-
- +# ifndef _syscall6
- +# error disable __UCLIBC_MMAP_HAS_6_ARGS__ for this arch
- +# endif
-
- -#ifdef __UCLIBC_MMAP_HAS_6_ARGS__
- +# define __NR__mmap __NR_mmap
- +static _syscall6(void *, _mmap, void *, addr, size_t, len,
- + int, prot, int, flags, int, fd, __off_t, offset)
-
- -_syscall6(void *, mmap, void *, start, size_t, length,
- - int, prot, int, flags, int, fd, off_t, offset)
- +#elif defined __NR_mmap2 && defined _syscall6
-
- -#else
- +# include <errno.h>
- +# include <bits/uClibc_page.h>
- +# ifndef MMAP2_PAGE_SHIFT
- +# define MMAP2_PAGE_SHIFT 12
- +# endif
-
- -# define __NR__mmap __NR_mmap
- -static __inline__ _syscall1(__ptr_t, _mmap, unsigned long *, buffer)
- -__ptr_t mmap(__ptr_t addr, size_t len, int prot,
- - int flags, int fd, __off_t offset)
- +# define __NR___syscall_mmap2 __NR_mmap2
- +static __inline__ _syscall6(void *, __syscall_mmap2, void *, addr, size_t, len,
- + int, prot, int, flags, int, fd, __off_t, offset)
- +
- +static void *_mmap(void *addr, size_t len, int prot, int flags,
- + int fd, __off_t offset)
- +{
- + const int mmap2_shift = MMAP2_PAGE_SHIFT;
- + const __off_t mmap2_mask = ((__off_t) 1 << MMAP2_PAGE_SHIFT) - 1;
- + /* check if offset is page aligned */
- + if (offset & mmap2_mask) {
- + __set_errno(EINVAL);
- + return MAP_FAILED;
- + }
- +# ifdef __USE_FILE_OFFSET64
- + return __syscall_mmap2(addr, len, prot, flags, fd,
- + ((__u_quad_t) offset >> mmap2_shift));
- +# else
- + return __syscall_mmap2(addr, len, prot, flags, fd,
- + ((__u_long) offset >> mmap2_shift));
- +# endif
- +}
- +
- +#elif defined __NR_mmap
- +
- +# define __NR___syscall_mmap __NR_mmap
- +static __inline__ _syscall1(void *, __syscall_mmap, unsigned long *, buffer)
- +
- +static void *_mmap(void *addr, size_t len, int prot, int flags,
- + int fd, __off_t offset)
- {
- unsigned long buffer[6];
-
- @@ -35,37 +67,14 @@
- buffer[3] = (unsigned long) flags;
- buffer[4] = (unsigned long) fd;
- buffer[5] = (unsigned long) offset;
- - return (__ptr_t) _mmap(buffer);
- + return __syscall_mmap(buffer);
- }
-
- -#endif
- -
- -libc_hidden_def(mmap)
- -
- -#elif defined(__NR_mmap2)
- -
- +#else
-
- -#define __NR___syscall_mmap2 __NR_mmap2
- -static __inline__ _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
- - size_t, len, int, prot, int, flags, int, fd, off_t, offset)
- +# error "Your architecture doesn't seem to provide mmap() !?"
-
- -/* Some architectures always use 12 as page shift for mmap2() eventhough the
- - * real PAGE_SHIFT != 12. Other architectures use the same value as
- - * PAGE_SHIFT...
- - */
- -# ifndef MMAP2_PAGE_SHIFT
- -# define MMAP2_PAGE_SHIFT 12
- -# endif
- -
- -__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
- -{
- - if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) {
- - __set_errno(EINVAL);
- - return MAP_FAILED;
- - }
- - return __syscall_mmap2(addr, len, prot, flags, fd, offset >> MMAP2_PAGE_SHIFT);
- -}
- +#endif
-
- +strong_alias(_mmap,mmap)
- libc_hidden_def(mmap)
- -
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mount.c uClibc/libc/sysdeps/linux/common/mount.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mount.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/mount.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,5 +10,5 @@
- #include <sys/syscall.h>
- #include <sys/mount.h>
- _syscall5(int, mount, const char *, specialfile, const char *, dir,
- - const char *, filesystemtype, unsigned long, rwflag,
- - const void *, data)
- + const char *, filesystemtype, unsigned long, rwflag,
- + const void *, data)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/msync.c uClibc/libc/sysdeps/linux/common/msync.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/msync.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/msync.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,38 +8,14 @@
- */
-
- #include <sys/syscall.h>
- -#include <unistd.h>
- -#include <sys/mman.h>
-
- -#ifdef __NR_msync
- +#if defined __NR_msync && defined __ARCH_USE_MMU__
- +# include <sys/mman.h>
- +# include <cancel.h>
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- -#else
- -#define SINGLE_THREAD_P 1
- -#endif
- -
- -#define __NR___syscall_msync __NR_msync
- -static __always_inline _syscall3(int, __syscall_msync, void *, addr, size_t, length,
- - int, flags)
- -
- -extern __typeof(msync) __libc_msync;
- -int __libc_msync(void * addr, size_t length, int flags)
- -{
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype, result;
- -#endif
- -
- - if (SINGLE_THREAD_P)
- - return __syscall_msync(addr, length, flags);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - oldtype = LIBC_CANCEL_ASYNC ();
- - result = __syscall_msync(addr, length, flags);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -weak_alias(__libc_msync,msync)
- +# define __NR___msync_nocancel __NR_msync
- +static _syscall3(int, __NC(msync), void *, addr, size_t, length, int, flags)
-
- +CANCELLABLE_SYSCALL(int, msync, (void *addr, size_t length, int flags),
- + (addr, length, flags))
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/munmap.c uClibc/libc/sysdeps/linux/common/munmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/munmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/munmap.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,9 +8,7 @@
- */
-
- #include <sys/syscall.h>
- -#include <unistd.h>
- #include <sys/mman.h>
-
- -
- _syscall2(int, munmap, void *, start, size_t, length)
- libc_hidden_def(munmap)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/nanosleep.c uClibc/libc/sysdeps/linux/common/nanosleep.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/nanosleep.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/nanosleep.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,32 +9,13 @@
-
- #include <sys/syscall.h>
- #include <time.h>
- +#include <cancel.h>
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- -#include <pthreadP.h>
- -#else
- -#define SINGLE_THREAD_P 1
- -#endif
- -
- -#define __NR___syscall_nanosleep __NR_nanosleep
- -static inline _syscall2(int, __syscall_nanosleep, const struct timespec *, req,
- - struct timespec *, rem);
- -
- -extern __typeof(nanosleep) __libc_nanosleep;
- -
- -int __libc_nanosleep(const struct timespec *req, struct timespec *rem)
- -{
- - if (SINGLE_THREAD_P)
- - return __syscall_nanosleep(req, rem);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __syscall_nanosleep(req, rem);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -
- -weak_alias(__libc_nanosleep,nanosleep)
- -libc_hidden_weak(nanosleep)
- +#define __NR___nanosleep_nocancel __NR_nanosleep
- +static _syscall2(int, __NC(nanosleep), const struct timespec *, req,
- + struct timespec *, rem);
- +
- +CANCELLABLE_SYSCALL(int, nanosleep,
- + (const struct timespec *req, struct timespec *rem),
- + (req, rem))
- +lt_libc_hidden(nanosleep)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/nice.c uClibc/libc/sysdeps/linux/common/nice.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/nice.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/nice.c 2014-02-03 12:32:56.000000000 +0100
- @@ -25,15 +25,15 @@
-
- static __inline__ int int_add_no_wrap(int a, int b)
- {
- - int s = a + b;
- -
- if (b < 0) {
- - if (s > a) s = INT_MIN;
- + if (a < INT_MIN - b)
- + return INT_MIN;
- } else {
- - if (s < a) s = INT_MAX;
- + if (a > INT_MAX - b)
- + return INT_MAX;
- }
-
- - return s;
- + return a + b;
- }
-
- static __inline__ int __syscall_nice(int incr)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/noophooks.c uClibc/libc/sysdeps/linux/common/noophooks.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/noophooks.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/noophooks.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,11 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#include <libc-internal.h>
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- void
- __cyg_profile_func_enter (attribute_unused void *this_fn, attribute_unused void *call_site);
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/not-cancel.h uClibc/libc/sysdeps/linux/common/not-cancel.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/not-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/not-cancel.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,5 @@
- /* Uncancelable versions of cancelable interfaces. Linux version.
- - Copyright (C) 2003 Free Software Foundation, Inc.
- + Copyright (C) 2003, 2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
- @@ -14,17 +14,50 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- +#include <sys/types.h>
- #include <sysdep.h>
-
- +#ifdef NOT_IN_libc
- +
- /* Uncancelable open. */
- +#if defined __NR_openat && !defined __NR_open
- +#define open_not_cancel(name, flags, mode) \
- + INLINE_SYSCALL (openat, 4, AT_FDCWD, (const char *) (name), (flags), (mode))
- +#define open_not_cancel_2(name, flags) \
- + INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), (flags))
- +#else
- #define open_not_cancel(name, flags, mode) \
- INLINE_SYSCALL (open, 3, (const char *) (name), (flags), (mode))
- #define open_not_cancel_2(name, flags) \
- INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
- +#endif
- +
- +#if 0
- +/* Uncancelable openat. */
- +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
- +extern int __openat_nocancel (int fd, const char *fname, int oflag,
- + mode_t mode) attribute_hidden;
- +extern int __openat64_nocancel (int fd, const char *fname, int oflag,
- + mode_t mode) attribute_hidden;
- +#else
- +# define __openat_nocancel(fd, fname, oflag, mode) \
- + openat (fd, fname, oflag, mode)
- +# define __openat64_nocancel(fd, fname, oflag, mode) \
- + openat64 (fd, fname, oflag, mode)
- +#endif
- +
- +#define openat_not_cancel(fd, fname, oflag, mode) \
- + __openat_nocancel (fd, fname, oflag, mode)
- +#define openat_not_cancel_3(fd, fname, oflag) \
- + __openat_nocancel (fd, fname, oflag, 0)
- +#define openat64_not_cancel(fd, fname, oflag, mode) \
- + __openat64_nocancel (fd, fname, oflag, mode)
- +#define openat64_not_cancel_3(fd, fname, oflag) \
- + __openat64_nocancel (fd, fname, oflag, 0)
- +#endif
-
- /* Uncancelable close. */
- #define close_not_cancel(fd) \
- @@ -37,10 +70,13 @@
- #define read_not_cancel(fd, buf, n) \
- INLINE_SYSCALL (read, 3, (fd), (buf), (n))
-
- +#ifdef __LINUXTHREADS_NEW__
- /* Uncancelable write. */
- #define write_not_cancel(fd, buf, n) \
- INLINE_SYSCALL (write, 3, (fd), (buf), (n))
- +#endif
-
- +#if 0
- /* Uncancelable writev. */
- #define writev_not_cancel_no_status(fd, iov, n) \
- (void) ({ INTERNAL_SYSCALL_DECL (err); \
- @@ -49,12 +85,68 @@
- /* Uncancelable fcntl. */
- #define fcntl_not_cancel(fd, cmd, val) \
- __fcntl_nocancel (fd, cmd, val)
- +#endif
-
- +#ifdef __LINUXTHREADS_NEW__
- /* Uncancelable waitpid. */
- -#ifdef __NR_waitpid
- +#if 0 /*def __NR_waitpid*/
- # define waitpid_not_cancel(pid, stat_loc, options) \
- INLINE_SYSCALL (waitpid, 3, pid, stat_loc, options)
- #else
- # define waitpid_not_cancel(pid, stat_loc, options) \
- INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL)
- #endif
- +#endif
- +
- +/* Uncancelable pause. */
- +#ifdef __NR_pause
- +# define pause_not_cancel() \
- + INLINE_SYSCALL (pause, 0)
- +#else
- +# include <unistd.h>
- +extern __typeof(pause) __pause_nocancel;
- +# define pause_not_cancel() \
- + __pause_nocancel ()
- +#endif
- +
- +/* Uncancelable nanosleep. */
- +#ifdef __NR_nanosleep
- +# define nanosleep_not_cancel(requested_time, remaining) \
- + INLINE_SYSCALL (nanosleep, 2, requested_time, remaining)
- +/*#else
- +# define nanosleep_not_cancel(requested_time, remaining) \
- + __nanosleep_nocancel (requested_time, remaining)*/
- +#endif
- +
- +#if 0
- +/* Uncancelable sigsuspend. */
- +#define sigsuspend_not_cancel(set) \
- + __sigsuspend_nocancel (set)
- +#endif
- +
- +#elif !defined NOT_IN_libc
- +
- +#include <cancel.h>
- +#include <fcntl.h>
- +#include <unistd.h>
- +
- +#define open_not_cancel(name, flags, mode) \
- + __NC(open)(name, flags, mode)
- +#define open_not_cancel_2(name, flags) \
- + __NC(open2)(name, flags)
- +
- +#define close_not_cancel(fd) \
- + __NC(close)(fd)
- +#define close_not_cancel_no_status(fd) \
- + __close_nocancel_no_status(fd)
- +
- +#define read_not_cancel(fd, buf, n) \
- + __NC(read)(fd, buf, n)
- +
- +#define write_not_cancel(fd, buf, n) \
- + __NC(write)(fd, buf, n)
- +
- +#define fcntl_not_cancel(fd, cmd, val) \
- + __NC(fcntl)(fd, cmd, val)
- +
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ntp_gettime.c uClibc/libc/sysdeps/linux/common/ntp_gettime.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ntp_gettime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/ntp_gettime.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/timex.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/open64.c uClibc/libc/sysdeps/linux/common/open64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/open64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/open64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,54 +4,30 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <features.h>
- +#include <_lfs_64.h>
- #include <fcntl.h>
- #include <stdarg.h>
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <errno.h>
- -#include <sysdep-cancel.h>
- -#endif
- -
- -#ifdef __UCLIBC_HAS_LFS__
- -
- -#ifndef O_LARGEFILE
- -# define O_LARGEFILE 0100000
- -#endif
- +#include <cancel.h>
-
- /* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
- a third argument is the file protection. */
- -int open64 (const char *file, int oflag, ...)
- +int open64(const char *file, int oflag, ...)
- {
- - mode_t mode = 0;
- -
- - if (oflag & O_CREAT)
- - {
- - va_list arg;
- - va_start (arg, oflag);
- - mode = va_arg (arg, mode_t);
- - va_end (arg);
- - }
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - if (SINGLE_THREAD_P)
- - return INLINE_SYSCALL (open, 3, file, oflag | O_LARGEFILE, mode);
- + mode_t mode = 0;
-
- - int oldtype = LIBC_CANCEL_ASYNC ();
- -
- - int result = INLINE_SYSCALL (open, 3, file, oflag | O_LARGEFILE, mode);
- -
- - LIBC_CANCEL_RESET (oldtype);
- -
- - return result;
- + if (oflag & O_CREAT) {
- + va_list arg;
- + va_start (arg, oflag);
- + mode = va_arg (arg, mode_t);
- + va_end (arg);
- + }
- +#if defined __NR_openat && !defined __NR_open
- + return openat(AT_FDCWD, file, oflag | O_LARGEFILE, mode);
- #else
- - return open(file, oflag | O_LARGEFILE, mode);
- + return open(file, oflag | O_LARGEFILE, mode);
- #endif
- }
- -#ifndef __LINUXTHREADS_OLD__
- -libc_hidden_def(open64)
- -#else
- -libc_hidden_weak(open64)
- -strong_alias(open64,__libc_open64)
- -#endif
- -
- -#endif /* __UCLIBC_HAS_LFS__ */
- +lt_strong_alias(open64)
- +lt_libc_hidden(open64)
- +/* open handled cancellation, noop on uClibc */
- +LIBC_CANCEL_HANDLED();
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/openat64.c uClibc/libc/sysdeps/linux/common/openat64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/openat64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/openat64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -6,27 +6,16 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define openat64 __xx_openat
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- #include <fcntl.h>
- -#undef openat64
- -
- -#ifdef __UCLIBC_HAS_LFS__
-
- #ifdef __NR_openat
- -/* The openat() prototype is varargs based, but we don't care about that
- - * here, so need to provide our own dedicated signature.
- - */
- -extern int openat64(int fd, const char *file, int oflag, mode_t mode);
- -libc_hidden_proto(openat64)
- -
- -int openat64(int fd, const char *file, int oflag, mode_t mode)
- +static int __openat64(int fd, const char *file, int oflag, mode_t mode)
- {
- return openat(fd, file, oflag | O_LARGEFILE, mode);
- }
- -libc_hidden_def(openat64)
- +strong_alias_untyped(__openat64,openat64)
- #else
- /* should add emulation with open() and /proc/self/fd/ ... */
- #endif
- -
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/openat.c uClibc/libc/sysdeps/linux/common/openat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/openat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/openat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -6,19 +6,13 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define openat __xx_openat
- #include <sys/syscall.h>
- #include <fcntl.h>
- -#undef openat
-
- #ifdef __NR_openat
- -/* The openat() prototype is varargs based, but we don't care about that
- - * here, so need to provide our own dedicated signature.
- - */
- -extern int openat(int fd, const char *file, int oflag, mode_t mode);
- -libc_hidden_proto(openat)
- -
- -_syscall4(int, openat, int, fd, const char *, file, int, oflag, mode_t, mode)
- +# define __NR___syscall_openat __NR_openat
- +static __inline__ _syscall4(int, __syscall_openat, int, fd, const char *, file, int, oflag, mode_t, mode)
- +strong_alias_untyped(__syscall_openat,openat)
- libc_hidden_def(openat)
- #else
- /* should add emulation with open() and /proc/self/fd/ ... */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/open.c uClibc/libc/sysdeps/linux/common/open.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/open.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/open.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,15 +8,22 @@
- */
-
- #include <sys/syscall.h>
- -#include <stdlib.h>
- -#include <stdarg.h>
- #include <fcntl.h>
- -#include <string.h>
- -#include <sys/param.h>
- +#include <stdarg.h>
- +#include <cancel.h>
- +
- +#if defined __NR_open
- +# define __NR___syscall_open __NR_open
- +static __always_inline _syscall3(int, __syscall_open, const char *, file,
- + int, flags, __kernel_mode_t, mode)
- +strong_alias_untyped(__syscall_open,__NC(open))
-
- -#define __NR___syscall_open __NR_open
- -static __inline__ _syscall3(int, __syscall_open, const char *, file,
- - int, flags, __kernel_mode_t, mode)
- +# define __NR___open2_nocancel __NR_open
- +_syscall2(int, __NC(open2), const char *, file, int, flags)
- +#else
- +int __open2_nocancel(const char *, int) __nonnull ((1)) attribute_hidden;
- +int __open_nocancel(const char *, int, mode_t) __nonnull ((1)) attribute_hidden;
- +#endif
-
- int open(const char *file, int oflag, ...)
- {
- @@ -29,11 +36,27 @@
- va_end(arg);
- }
-
- - return __syscall_open(file, oflag, mode);
- + if (SINGLE_THREAD_P)
- +#if defined(__NR_open)
- + return __NC(open)(file, oflag, mode);
- +#elif defined(__NR_openat)
- + return openat(AT_FDCWD, file, oflag, mode);
- +#endif
- +
- +#ifdef __NEW_THREADS
- + int oldtype = LIBC_CANCEL_ASYNC ();
- +# if defined(__NR_open)
- + int result = __NC(open)(file, oflag, mode);
- +# else
- + int result = openat(AT_FDCWD, file, oflag, mode);
- +# endif
- + LIBC_CANCEL_RESET (oldtype);
- + return result;
- +#endif
- }
- -#ifndef __LINUXTHREADS_OLD__
- -libc_hidden_def(open)
- -#else
- -libc_hidden_weak(open)
- -strong_alias(open,__libc_open)
- +lt_strong_alias(open)
- +lt_libc_hidden(open)
- +#if !defined(__NR_open)
- +strong_alias_untyped(open,__open2_nocancel)
- +strong_alias_untyped(open,__open_nocancel)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/pause.c uClibc/libc/sysdeps/linux/common/pause.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/pause.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/pause.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,35 +7,35 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define __UCLIBC_HIDE_DEPRECATED__
- #include <sys/syscall.h>
- #include <unistd.h>
- +#include <cancel.h>
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- -#endif
- -
- -#include <signal.h>
- +#ifdef __NR_pause
- +/* even if it is not obvious, glibc uses the pause syscall, see syscalls.list */
- +# define __NR___pause_nocancel __NR_pause
- +static _syscall0(int, __NC(pause))
- +CANCELLABLE_SYSCALL(int, pause, (void), ())
- +#else
- +# define __need_NULL
- +# include <stddef.h>
- +# include <signal.h>
-
- -/* Suspend the process until a signal arrives.
- - This always returns -1 and sets errno to EINTR. */
- -extern __typeof(pause) __libc_pause;
- int
- -__libc_pause (void)
- +# ifdef __LINUXTHREADS_OLD__
- +weak_function
- +# endif
- +__NC(pause)(void)
- {
- - sigset_t set;
- -
- - /*__sigemptyset (&set); - why? */
- - sigprocmask (SIG_BLOCK, NULL, &set);
- + sigset_t set;
-
- - /* pause is a cancellation point, but so is sigsuspend.
- - So no need for anything special here. */
- + /*__sigemptyset (&set); - why? */
- + sigprocmask (SIG_BLOCK, NULL, &set);
-
- - return sigsuspend (&set);
- + /* pause is a cancellation point, but so is sigsuspend.
- + So no need for anything special here. */
- + return sigsuspend(&set);
- }
- -weak_alias (__libc_pause, pause)
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +CANCELLABLE_SYSCALL(int, pause, (void), ())
- LIBC_CANCEL_HANDLED (); /* sigsuspend handles our cancellation. */
- #endif
- -
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/pipe.c uClibc/libc/sysdeps/linux/common/pipe.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/pipe.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/pipe.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,5 +11,13 @@
- #include <unistd.h>
-
-
- +#if defined __NR_pipe2 && !defined __NR_pipe
- +int pipe(int filedes[2])
- +{
- + return pipe2(filedes, 0);
- +}
- +/* If both are defined then use the pipe syscall */
- +#else
- _syscall1(int, pipe, int *, filedes)
- +#endif
- libc_hidden_def(pipe)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/pivot_root.c uClibc/libc/sysdeps/linux/common/pivot_root.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/pivot_root.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/pivot_root.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,7 +9,7 @@
-
- #include <sys/syscall.h>
-
- -int pivot_root(const char *new_root, const char *put_old);
- #ifdef __NR_pivot_root
- +int pivot_root(const char *new_root, const char *put_old);
- _syscall2(int, pivot_root, const char *, new_root, const char *, put_old)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/poll.c uClibc/libc/sysdeps/linux/common/poll.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/poll.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/poll.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,40 +13,20 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/syscall.h>
- #include <sys/poll.h>
- #include <bits/kernel-features.h>
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- -#else
- -#define SINGLE_THREAD_P 1
- -#endif
- -
- -libc_hidden_proto(poll)
- +#include <cancel.h>
-
- #if defined __ASSUME_POLL_SYSCALL && defined __NR_poll
-
- -#define __NR___syscall_poll __NR_poll
- -static inline _syscall3(int, __syscall_poll, struct pollfd *, fds,
- - unsigned long int, nfds, int, timeout);
- -
- -int poll(struct pollfd *fds, nfds_t nfds, int timeout)
- -{
- - if (SINGLE_THREAD_P)
- - return __syscall_poll(fds, nfds, timeout);
- +#define __NR___poll_nocancel __NR_poll
- +static _syscall3(int, __NC(poll), struct pollfd *, fds,
- + unsigned long int, nfds, int, timeout)
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __syscall_poll(fds, nfds, timeout);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- #else /* !__NR_poll */
-
- #include <alloca.h>
- @@ -56,9 +36,7 @@
- #include <sys/time.h>
- #include <sys/param.h>
- #include <unistd.h>
- -
- -libc_hidden_proto(getdtablesize)
- -libc_hidden_proto(select)
- +#include <sys/select.h>
-
- /* uClinux 2.0 doesn't have poll, emulate it using select */
-
- @@ -68,7 +46,7 @@
- Returns the number of file descriptors with events, zero if timed out,
- or -1 for errors. */
-
- -int poll(struct pollfd *fds, nfds_t nfds, int timeout)
- +int __NC(poll)(struct pollfd *fds, nfds_t nfds, int timeout)
- {
- static int max_fd_size;
- struct timeval tv;
- @@ -139,7 +117,7 @@
-
- while (1)
- {
- - ready = select (maxfd + 1, rset, wset, xset,
- + ready = __NC(select) (maxfd + 1, rset, wset, xset,
- timeout == -1 ? NULL : &tv);
-
- /* It might be that one or more of the file descriptors is invalid.
- @@ -182,7 +160,7 @@
- if (f->events & POLLPRI)
- FD_SET (f->fd, sngl_xset);
-
- - n = select (f->fd + 1, sngl_rset, sngl_wset, sngl_xset,
- + n = __NC(select) (f->fd + 1, sngl_rset, sngl_wset, sngl_xset,
- &sngl_tv);
- if (n != -1)
- {
- @@ -227,4 +205,6 @@
- }
-
- #endif
- -libc_hidden_def(poll)
- +CANCELLABLE_SYSCALL(int, poll, (struct pollfd *fds, nfds_t nfds, int timeout),
- + (fds, nfds, timeout))
- +lt_libc_hidden(poll)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fadvise64.c uClibc/libc/sysdeps/linux/common/posix_fadvise64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fadvise64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/posix_fadvise64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,63 +8,32 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <features.h>
- -#include <unistd.h>
- -#include <errno.h>
- -#include <endian.h>
- -#include <stdint.h>
- -#include <sys/types.h>
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- -#include <fcntl.h>
- +#include <bits/wordsize.h>
-
- -#ifdef __UCLIBC_HAS_LFS__
- -#ifdef __NR_fadvise64_64
- -
- -/* 64 bit implementation is cake ... or more like pie ... */
- -#if __WORDSIZE == 64
- -
- -#define __NR_posix_fadvise64 __NR_fadvise64_64
- -
- -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
- -{
- - if (len != (off_t) len)
- - return EOVERFLOW;
- - INTERNAL_SYSCALL_DECL (err);
- - int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 5, fd,
- - __LONG_LONG_PAIR ((long) (offset >> 32),
- - (long) offset),
- - (off_t) len, advice);
- - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
- - return 0;
- - return INTERNAL_SYSCALL_ERRNO (ret, err);
- -}
- +#ifdef __NR_arm_fadvise64_64
- +# define __NR_fadvise64_64 __NR_arm_fadvise64_64
- +#endif
-
- -/* 32 bit implementation is kind of a pita */
- -#elif __WORDSIZE == 32
- +#if defined __NR_fadvise64_64 && __WORDSIZE == 32
- +# include <fcntl.h>
- +# include <endian.h>
-
- -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
- +int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice)
- {
- INTERNAL_SYSCALL_DECL (err);
- + /* ARM has always been funky. */
- +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__) || defined(__arm__)
- + int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advice,
- + OFF64_HI_LO (offset), OFF64_HI_LO (len));
- +# else
- int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
- - __LONG_LONG_PAIR(offset >> 32, offset & 0xffffffff),
- - __LONG_LONG_PAIR(len >> 32, len & 0xffffffff),
- - advice);
- - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
- - return 0;
- - return INTERNAL_SYSCALL_ERRNO (ret, err);
- + OFF64_HI_LO (offset), OFF64_HI_LO (len),
- + advice);
- +# endif
- + if (INTERNAL_SYSCALL_ERROR_P (ret, err))
- + return INTERNAL_SYSCALL_ERRNO (ret, err);
- + return 0;
- }
- -
- -#else
- -#error your machine is neither 32 bit or 64 bit ... it must be magical
- #endif
- -
- -#elif !defined __NR_fadvise64 && defined __UCLIBC_HAS_STUBS__
- -/* This is declared as a strong alias in posix_fadvise.c if __NR_fadvise64
- - * is defined.
- - */
- -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
- -{
- - return ENOSYS;
- -}
- -#endif /* __NR_fadvise64_64 */
- -#endif /* __UCLIBC_HAS_LFS__ */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fadvise.c uClibc/libc/sysdeps/linux/common/posix_fadvise.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fadvise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/posix_fadvise.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,27 +9,46 @@
- */
-
- #include <sys/syscall.h>
- -#include <fcntl.h>
-
- -#ifdef __NR_fadvise64
- -#define __NR_posix_fadvise __NR_fadvise64
- +#ifdef __NR_arm_fadvise64_64
- +/* We handle the 64bit alignment issue which is why the arm guys renamed their
- + * syscall in the first place. So rename it back.
- + */
- +# define __NR_fadvise64_64 __NR_arm_fadvise64_64
- +#endif
- +
- +#if defined(__NR_fadvise64) || defined(__NR_fadvise64_64)
- +# include <fcntl.h>
- +# include <endian.h>
- +# include <bits/wordsize.h>
- +
- +# ifdef __NR_fadvise64_64
- +int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice);
- +# endif
- +
- int posix_fadvise(int fd, off_t offset, off_t len, int advice)
- {
- +# ifdef __NR_fadvise64_64
- + return posix_fadvise64(fd, offset, len, advice);
- +# else
- + int ret;
- INTERNAL_SYSCALL_DECL(err);
- - int ret = (int) (INTERNAL_SYSCALL(posix_fadvise, err, 5, fd,
- - __LONG_LONG_PAIR (offset >> 31, offset), len, advice));
- - if (INTERNAL_SYSCALL_ERROR_P (ret, err))
- - return INTERNAL_SYSCALL_ERRNO (ret, err);
- - return 0;
- +# if __WORDSIZE == 64
- + ret = INTERNAL_SYSCALL(fadvise64, err, 4, fd, offset, len, advice);
- +# else
- +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
- + ret = INTERNAL_SYSCALL(fadvise64, err, 6, fd, /*unused*/0,
- +# else
- + ret = INTERNAL_SYSCALL(fadvise64, err, 5, fd,
- +# endif
- + OFF_HI_LO (offset), len, advice);
- +# endif
- + if (INTERNAL_SYSCALL_ERROR_P (ret, err))
- + return INTERNAL_SYSCALL_ERRNO (ret, err);
- + return 0;
- +# endif
- }
- -
- -#if defined __UCLIBC_HAS_LFS__ && !defined __NR_fadvise64_64
- +# if defined __UCLIBC_HAS_LFS__ && (!defined __NR_fadvise64_64 || __WORDSIZE == 64)
- strong_alias(posix_fadvise,posix_fadvise64)
- -#endif
- -
- -#elif defined __UCLIBC_HAS_STUBS__
- -int posix_fadvise(int fd attribute_unused, off_t offset attribute_unused, off_t len attribute_unused, int advice attribute_unused)
- -{
- - return ENOSYS;
- -}
- +# endif
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fallocate64.c uClibc/libc/sysdeps/linux/common/posix_fallocate64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fallocate64.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common/posix_fallocate64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,34 @@
- +/* vi: set sw=4 ts=4: */
- +/*
- + * posix_fallocate() for uClibc
- + * http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html
- + *
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sys/syscall.h>
- +#include <fcntl.h>
- +#include <bits/kernel-features.h>
- +#include <stdint.h>
- +
- +#if defined __NR_fallocate
- +
- +# if __WORDSIZE == 64
- +/* Can use normal posix_fallocate() */
- +# elif __WORDSIZE == 32
- +int posix_fallocate64(int fd, __off64_t offset, __off64_t len)
- +{
- + int ret;
- + INTERNAL_SYSCALL_DECL(err);
- + ret = (int) (INTERNAL_SYSCALL(fallocate, err, 6, fd, 0,
- + OFF64_HI_LO (offset), OFF64_HI_LO (len)));
- + if (unlikely(INTERNAL_SYSCALL_ERROR_P (ret, err)))
- + return INTERNAL_SYSCALL_ERRNO (ret, err);
- + return 0;
- +}
- +# else
- +# error your machine is neither 32 bit or 64 bit ... it must be magical
- +# endif
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fallocate.c uClibc/libc/sysdeps/linux/common/posix_fallocate.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fallocate.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common/posix_fallocate.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,43 @@
- +/* vi: set sw=4 ts=4: */
- +/*
- + * posix_fallocate() for uClibc
- + * http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html
- + *
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sys/syscall.h>
- +#include <fcntl.h>
- +#include <bits/kernel-features.h>
- +#include <stdint.h>
- +
- +#if defined __NR_fallocate
- +int posix_fallocate(int fd, __off_t offset, __off_t len)
- +{
- + int ret;
- +
- +# if __WORDSIZE == 32
- + uint32_t off_low = offset;
- + uint32_t len_low = len;
- + /* may assert that these >>31 are 0 */
- + uint32_t zero = 0;
- + INTERNAL_SYSCALL_DECL(err);
- + ret = (int) (INTERNAL_SYSCALL(fallocate, err, 6, fd, 0,
- + __LONG_LONG_PAIR (zero, off_low),
- + __LONG_LONG_PAIR (zero, len_low)));
- +# elif __WORDSIZE == 64
- + INTERNAL_SYSCALL_DECL(err);
- + ret = (int) (INTERNAL_SYSCALL(fallocate, err, 4, fd, 0, offset, len));
- +# else
- +# error your machine is neither 32 bit or 64 bit ... it must be magical
- +#endif
- + if (unlikely(INTERNAL_SYSCALL_ERROR_P (ret, err)))
- + return INTERNAL_SYSCALL_ERRNO (ret, err);
- + return 0;
- +}
- +# if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
- +strong_alias(posix_fallocate,posix_fallocate64)
- +# endif
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_madvise.c uClibc/libc/sysdeps/linux/common/posix_madvise.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_madvise.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common/posix_madvise.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,25 @@
- +/* vi: set sw=4 ts=4: */
- +/* Licensed under the LGPL v2.1, see the file LICENSE in this tarball. */
- +
- +#include <sys/mman.h>
- +#include <sys/syscall.h>
- +
- +#if defined __NR_madvise && defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__
- +int posix_madvise(void *addr, size_t len, int advice)
- +{
- + int result;
- + /* We have one problem: the kernel's MADV_DONTNEED does not
- + * correspond to POSIX's POSIX_MADV_DONTNEED. The former simply
- + * discards changes made to the memory without writing it back to
- + * disk, if this would be necessary. The POSIX behaviour does not
- + * allow this. There is no functionality mapping for the POSIX
- + * behaviour so far so we ignore that advice for now. */
- + if (advice == POSIX_MADV_DONTNEED)
- + return 0;
- +
- + /* this part might use madvise function */
- + INTERNAL_SYSCALL_DECL (err);
- + result = INTERNAL_SYSCALL (madvise, err, 3, addr, len, advice);
- + return INTERNAL_SYSCALL_ERRNO (result, err);
- +}
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ppoll.c uClibc/libc/sysdeps/linux/common/ppoll.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ppoll.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/ppoll.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,26 +13,22 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <signal.h>
- #include <sys/syscall.h>
- -#include <sys/poll.h>
- +
- +#if defined __NR_ppoll && defined __UCLIBC_LINUX_SPECIFIC__ && defined __USE_GNU
- +
- #define __need_NULL
- #include <stddef.h>
- +#include <signal.h>
- +#include <sys/poll.h>
- +#include <cancel.h>
-
- -#if defined __NR_ppoll && defined __UCLIBC_LINUX_SPECIFIC__
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -# include <sysdep-cancel.h>
- -# else
- -# define SINGLE_THREAD_P 1
- -# endif
- -
- -int
- -ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
- - const sigset_t *sigmask)
- +static int
- +__NC(ppoll)(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
- + const sigset_t *sigmask)
- {
- /* The Linux kernel can in some situations update the timeout value.
- We do not want that so use a local variable. */
- @@ -41,15 +37,11 @@
- tval = *timeout;
- timeout = &tval;
- }
- - if (SINGLE_THREAD_P)
- - return INLINE_SYSCALL(ppoll, 5, fds, nfds, timeout, sigmask, _NSIG / 8);
- -
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = INLINE_SYSCALL(ppoll, 5, fds, nfds, timeout, sigmask, _NSIG / 8);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -# endif
- + return INLINE_SYSCALL(ppoll, 5, fds, nfds, timeout, sigmask, __SYSCALL_SIGSET_T_SIZE);
- }
- -libc_hidden_def(ppoll)
- +
- +CANCELLABLE_SYSCALL(int, ppoll, (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
- + const sigset_t *sigmask),
- + (fds, nfds, timeout, sigmask))
- +
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/prctl.c uClibc/libc/sysdeps/linux/common/prctl.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/prctl.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/prctl.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,10 +8,10 @@
- */
-
- #include <sys/syscall.h>
- -#include <stdarg.h>
- /* psm: including sys/prctl.h would depend on kernel headers */
-
- #ifdef __NR_prctl
- -extern int prctl (int, long, long, long, long);
- -_syscall5(int, prctl, int, option, long, _a2, long, _a3, long, _a4, long, _a5)
- +int prctl (int, long, long, long, long);
- +_syscall5(int, prctl, int, option, long, _prctl_a2, long, _prctl_a3,
- + long, _prctl_a4, long, _prctl_a5)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/pread_write.c uClibc/libc/sysdeps/linux/common/pread_write.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/pread_write.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/pread_write.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,173 +15,101 @@
-
- #include <sys/syscall.h>
- #include <unistd.h>
- -#include <stdint.h>
- #include <endian.h>
- +#include <bits/wordsize.h>
- +#include <cancel.h>
-
- -extern __typeof(pread) __libc_pread;
- -extern __typeof(pwrite) __libc_pwrite;
- -#ifdef __UCLIBC_HAS_LFS__
- -extern __typeof(pread64) __libc_pread64;
- -extern __typeof(pwrite64) __libc_pwrite64;
- +#ifdef __NR_pread64
- +# undef __NR_pread
- +# define __NR_pread __NR_pread64
- +#endif
- +#ifdef __NR_pwrite64
- +# undef __NR_pwrite
- +# define __NR_pwrite __NR_pwrite64
- #endif
-
- -#include <bits/kernel_types.h>
- -
- -#ifdef __NR_pread
- -
- -# define __NR___syscall_pread __NR_pread
- -static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
- - size_t, count, off_t, offset_hi, off_t, offset_lo)
- -
- -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
- -{
- - return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
- -}
- -weak_alias(__libc_pread,pread)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
- -{
- - uint32_t low = offset & 0xffffffff;
- - uint32_t high = offset >> 32;
- - return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
- -}
- -weak_alias(__libc_pread64,pread64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -
- -#endif /* __NR_pread */
- -
- -#ifdef __NR_pwrite
- -
- -# define __NR___syscall_pwrite __NR_pwrite
- -static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- - size_t, count, off_t, offset_hi, off_t, offset_lo)
- -
- -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
- -{
- - return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
- -}
- -weak_alias(__libc_pwrite,pwrite)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
- -{
- - uint32_t low = offset & 0xffffffff;
- - uint32_t high = offset >> 32;
- - return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
- -}
- -weak_alias(__libc_pwrite64,pwrite64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* __NR_pwrite */
- -
- -#if ! defined __NR_pread || ! defined __NR_pwrite
- -
- -static ssize_t __fake_pread_write(int fd, void *buf,
- - size_t count, off_t offset, int do_pwrite)
- -{
- - int save_errno;
- - ssize_t result;
- - off_t old_offset;
- -
- - /* Since we must not change the file pointer preserve the
- - * value so that we can restore it later. */
- - if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
- - return -1;
- -
- - /* Set to wanted position. */
- - if (lseek(fd, offset, SEEK_SET) == (off_t) -1)
- - return -1;
- -
- - if (do_pwrite == 1) {
- - /* Write the data. */
- - result = write(fd, buf, count);
- - } else {
- - /* Read the data. */
- - result = read(fd, buf, count);
- - }
- -
- - /* Now we have to restore the position. If this fails we
- - * have to return this as an error. */
- - save_errno = errno;
- - if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
- - {
- - if (result == -1)
- - __set_errno(save_errno);
- - return -1;
- - }
- - __set_errno(save_errno);
- - return(result);
- -}
- -
- -# ifdef __UCLIBC_HAS_LFS__
- +#ifndef MY_PREAD
- +# ifdef __NR_pread
- +# define __NR___syscall_pread __NR_pread
- +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
- +static _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
- + size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
- +# define MY_PREAD(fd, buf, count, offset) __syscall_pread(fd, buf, count, 0, OFF_HI_LO(offset))
- +# define MY_PREAD64(fd, buf, count, offset) __syscall_pread(fd, buf, count, 0, OFF64_HI_LO(offset))
- +# elif __WORDSIZE == 32
- +static _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
- + size_t, count, off_t, offset_hi, off_t, offset_lo)
- +# define MY_PREAD(fd, buf, count, offset) __syscall_pread(fd, buf, count, OFF_HI_LO(offset))
- +# define MY_PREAD64(fd, buf, count, offset) __syscall_pread(fd, buf, count, OFF64_HI_LO(offset))
- +# else
- +static _syscall4(ssize_t, __syscall_pread, int, fd, void *, buf,
- + size_t, count, off_t, offset)
- +# define MY_PREAD(fd, buf, count, offset) __syscall_pread(fd, buf, count, offset)
- +# define MY_PREAD64(fd, buf, count, offset) __syscall_pread(fd, buf, count, offset)
- +# endif
- +# endif
- +#endif
-
- -static ssize_t __fake_pread_write64(int fd, void *buf,
- - size_t count, off64_t offset, int do_pwrite)
- -{
- - int save_errno;
- - ssize_t result;
- - off64_t old_offset;
- -
- - /* Since we must not change the file pointer preserve the
- - * value so that we can restore it later. */
- - if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
- - return -1;
- -
- - /* Set to wanted position. */
- - if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
- - return -1;
- -
- - if (do_pwrite == 1) {
- - /* Write the data. */
- - result = write(fd, buf, count);
- - } else {
- - /* Read the data. */
- - result = read(fd, buf, count);
- - }
- -
- - /* Now we have to restore the position. */
- - save_errno = errno;
- - if (lseek64(fd, old_offset, SEEK_SET) == (off64_t) -1) {
- - if (result == -1)
- - __set_errno (save_errno);
- - return -1;
- - }
- - __set_errno (save_errno);
- - return result;
- -}
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
- +#ifndef MY_PWRITE
- +# ifdef __NR_pwrite
- +# define __NR___syscall_pwrite __NR_pwrite
- +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
- +static _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- + size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
- +# define MY_PWRITE(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, 0, OFF_HI_LO(offset))
- +# define MY_PWRITE64(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, 0, OFF64_HI_LO(offset))
- +# elif __WORDSIZE == 32
- +static _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- + size_t, count, off_t, offset_hi, off_t, offset_lo)
- +# define MY_PWRITE(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, OFF_HI_LO(offset))
- +# define MY_PWRITE64(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, OFF64_HI_LO(offset))
- +# else
- +static _syscall4(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- + size_t, count, off_t, offset)
- +# define MY_PWRITE(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, offset)
- +# define MY_PWRITE64(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, offset)
- +# endif
- +# endif
- +#endif
-
- -#ifndef __NR_pread
- -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
- +static ssize_t __NC(pread)(int fd, void *buf, size_t count, off_t offset)
- {
- - return __fake_pread_write(fd, buf, count, offset, 0);
- + return MY_PREAD(fd, buf, count, offset);
- }
- -weak_alias(__libc_pread,pread)
- +CANCELLABLE_SYSCALL(ssize_t, pread, (int fd, void *buf, size_t count, off_t offset),
- + (fd, buf, count, offset))
-
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
- +static ssize_t __NC(pwrite)(int fd, const void *buf, size_t count, off_t offset)
- {
- - return __fake_pread_write64(fd, buf, count, offset, 0);
- + return MY_PWRITE(fd, buf, count, offset);
- }
- -weak_alias(__libc_pread64,pread64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* ! __NR_pread */
- +CANCELLABLE_SYSCALL(ssize_t, pwrite, (int fd, const void *buf, size_t count, off_t offset),
- + (fd, buf, count, offset))
-
- -#ifndef __NR_pwrite
- -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
- +#ifdef __UCLIBC_HAS_LFS__
- +# if __WORDSIZE == 32
- +static ssize_t __NC(pread64)(int fd, void *buf, size_t count, off64_t offset)
- {
- - /* we won't actually be modifying the buffer,
- - *just cast it to get rid of warnings */
- - return __fake_pread_write(fd, (void*)buf, count, offset, 1);
- + return MY_PREAD64(fd, buf, count, offset);
- }
- -weak_alias(__libc_pwrite,pwrite)
- +CANCELLABLE_SYSCALL(ssize_t, pread64, (int fd, void *buf, size_t count, off64_t offset),
- + (fd, buf, count, offset))
-
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
- -{
- - return __fake_pread_write64(fd, (void*)buf, count, offset, 1);
- -}
- -weak_alias(__libc_pwrite64,pwrite64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* ! __NR_pwrite */
- +static ssize_t __NC(pwrite64)(int fd, const void *buf, size_t count, off64_t offset)
- +{
- + return MY_PWRITE64(fd, buf, count, offset);
- +}
- +CANCELLABLE_SYSCALL(ssize_t, pwrite64, (int fd, const void *buf, size_t count, off64_t offset),
- + (fd, buf, count, offset))
- +# else
- +# ifdef __LINUXTHREADS_OLD__
- +weak_alias(pread,pread64)
- +weak_alias(pwrite,pwrite64)
- +lt_strong_alias(pread64)
- +lt_strong_alias(pwrite64)
- +# else
- +strong_alias_untyped(pread,pread64)
- +strong_alias_untyped(pwrite,pwrite64)
- +# endif
- +# endif
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/pselect.c uClibc/libc/sysdeps/linux/common/pselect.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/pselect.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/pselect.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,82 +13,53 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <errno.h>
- -#include <signal.h>
- -#include <stddef.h> /* For NULL. */
- -#include <sys/time.h>
- -#include <sys/select.h>
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- -#endif
- +#include <features.h>
-
- -libc_hidden_proto(sigprocmask)
- -libc_hidden_proto(select)
- +#ifdef __USE_XOPEN2K
-
- +#include <sys/syscall.h>
- +#include <sys/select.h>
- +#include <sys/time.h>
- +#include <signal.h>
- +#include <cancel.h>
-
- -/* Check the first NFDS descriptors each in READFDS (if not NULL) for read
- - readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
- - (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out
- - after waiting the interval specified therein. Additionally set the sigmask
- - SIGMASK for this call. Returns the number of ready descriptors, or -1 for
- - errors. */
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -static int
- -__pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- -#else
- -int
- -pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- -#endif
- - const struct timespec *timeout, const sigset_t *sigmask)
- +static int __NC(pselect)(int nfds, fd_set *readfds, fd_set *writefds,
- + fd_set *exceptfds, const struct timespec *timeout,
- + const sigset_t *sigmask)
- {
- - struct timeval tval;
- - int retval;
- - sigset_t savemask;
- -
- - /* Change nanosecond number to microseconds. This might mean losing
- - precision and therefore the `pselect` should be available. But
- - for now it is hardly found. */
- - if (timeout != NULL)
- - TIMESPEC_TO_TIMEVAL (&tval, timeout);
- -
- - /* The setting and restoring of the signal mask and the select call
- - should be an atomic operation. This can't be done without kernel
- - help. */
- - if (sigmask != NULL)
- - sigprocmask (SIG_SETMASK, sigmask, &savemask);
- -
- - /* Note the pselect() is a cancellation point. But since we call
- - select() which itself is a cancellation point we do not have
- - to do anything here. */
- - retval = select (nfds, readfds, writefds, exceptfds,
- - timeout != NULL ? &tval : NULL);
- + struct timeval tval;
- + int retval;
- + sigset_t savemask;
- +
- + /* Change nanosecond number to microseconds. This might mean losing
- + precision and therefore the `pselect` should be available. But
- + for now it is hardly found. */
- + if (timeout != NULL)
- + TIMESPEC_TO_TIMEVAL (&tval, timeout);
- +
- + /* The setting and restoring of the signal mask and the select call
- + should be an atomic operation. This can't be done without kernel
- + help. */
- + if (sigmask != NULL)
- + sigprocmask (SIG_SETMASK, sigmask, &savemask);
- +
- + /* The comment below does not apply on uClibc, since we use __select_nocancel */
- + /* Note the pselect() is a cancellation point. But since we call
- + select() which itself is a cancellation point we do not have
- + to do anything here. */
- + retval = __NC(select)(nfds, readfds, writefds, exceptfds,
- + timeout != NULL ? &tval : NULL);
-
- - if (sigmask != NULL)
- - sigprocmask (SIG_SETMASK, &savemask, NULL);
- + if (sigmask != NULL)
- + sigprocmask (SIG_SETMASK, &savemask, NULL);
-
- - return retval;
- + return retval;
- }
- +CANCELLABLE_SYSCALL(int, pselect, (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- + const struct timespec *timeout, const sigset_t *sigmask),
- + (nfds, readfds, writefds, exceptfds, timeout, sigmask))
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -int
- -pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- - const struct timespec *timeout, const sigset_t *sigmask)
- -{
- - if (SINGLE_THREAD_P)
- - return __pselect (nfds, readfds, writefds, exceptfds,
- - timeout, sigmask);
- -
- - int oldtype = LIBC_CANCEL_ASYNC ();
- -
- - int result = __pselect (nfds, readfds, writefds, exceptfds,
- - timeout, sigmask);
- -
- - LIBC_CANCEL_RESET (oldtype);
- -
- - return result;
- -}
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/readahead.c uClibc/libc/sysdeps/linux/common/readahead.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/readahead.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/readahead.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,46 +13,33 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#include <errno.h>
- -#include <fcntl.h>
- -#include <sys/types.h>
- -#include <sys/syscall.h>
- -#include <bits/wordsize.h>
- -
- -#ifdef __UCLIBC_HAS_LFS__
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <_lfs_64.h>
- +#include <sys/syscall.h>
-
- -#ifdef __NR_readahead
- +#if defined __NR_readahead && defined __UCLIBC_HAS_LFS__ && defined __USE_GNU
-
- -# define __NR___readahead __NR_readahead
- +# include <fcntl.h>
- +# include <bits/wordsize.h>
-
- # if __WORDSIZE == 64
-
- -static __inline__ _syscall3(ssize_t, __readahead, int, fd,
- - off_t, offset, size_t, count)
- -
- -ssize_t readahead(int fd, off_t offset, size_t count)
- -{
- - return __readahead(fd, offset, count);
- -}
- +_syscall3(ssize_t, readahead, int, fd, off_t, offset, size_t, count)
-
- # else
-
- -static __inline__ _syscall4(ssize_t, __readahead, int, fd,
- - off_t, high_offset, off_t, low_offset, size_t, count)
- -
- ssize_t readahead(int fd, off64_t offset, size_t count)
- {
- - return __readahead(fd, (off_t) (offset >> 32), (off_t) (offset & 0xffffffff), count);
- + return INLINE_SYSCALL(readahead,
- +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
- + 5, fd, 0,
- +# else
- + 4, fd,
- +# endif
- + OFF64_HI_LO(offset), count);
- }
-
- # endif
-
- #endif
- -
- -#endif /* __UCLIBC_HAS_LFS__ */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/read.c uClibc/libc/sysdeps/linux/common/read.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/read.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/read.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,11 +9,11 @@
-
- #include <sys/syscall.h>
- #include <unistd.h>
- +#include <cancel.h>
-
- -_syscall3(ssize_t, read, int, fd, __ptr_t, buf, size_t, count)
- -#ifndef __LINUXTHREADS_OLD__
- -libc_hidden_def(read)
- -#else
- -libc_hidden_weak(read)
- -strong_alias(read,__libc_read)
- -#endif
- +#define __NR___read_nocancel __NR_read
- +_syscall3(ssize_t, __NC(read), int, fd, void *, buf, size_t, count)
- +
- +CANCELLABLE_SYSCALL(ssize_t, read, (int fd, void *buf, size_t count),
- + (fd, buf, count))
- +lt_libc_hidden(read)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/readlinkat.c uClibc/libc/sysdeps/linux/common/readlinkat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/readlinkat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/readlinkat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
-
- #ifdef __NR_readlinkat
- _syscall4(ssize_t, readlinkat, int, fd, const char *, path, char *, buf, size_t, len)
- +libc_hidden_def(readlinkat)
- #else
- /* should add emulation with readlink() and /proc/self/fd/ ... */
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/readlink.c uClibc/libc/sysdeps/linux/common/readlink.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/readlink.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/readlink.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,5 +10,13 @@
- #include <sys/syscall.h>
- #include <unistd.h>
-
- +#if defined(__NR_readlinkat) && !defined(__NR_readlink)
- +# include <fcntl.h>
- +ssize_t readlink (const char *path, char *buf, size_t len)
- +{
- + return readlinkat(AT_FDCWD, path, buf, len);
- +}
- +#else
- _syscall3(ssize_t, readlink, const char *, path, char *, buf, size_t, bufsiz)
- +#endif
- libc_hidden_def(readlink)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/readv.c uClibc/libc/sysdeps/linux/common/readv.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/readv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/readv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,41 +10,21 @@
-
- #include <sys/syscall.h>
- #include <sys/uio.h>
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- +#include <cancel.h>
-
- /* We should deal with kernel which have a smaller UIO_FASTIOV as well
- as a very big count. */
- -static ssize_t __readv (int fd, const struct iovec *vector, int count)
- +static ssize_t __NC(readv)(int fd, const struct iovec *vector, int count)
- {
- - ssize_t bytes_read;
- -
- - bytes_read = INLINE_SYSCALL (readv, 3, fd, vector, count);
- -
- - if (bytes_read >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
- - return bytes_read;
- -
- - /* glibc tries again, but we do not. */
- - //return __atomic_readv_replacement (fd, vector, count);
- -
- - return -1;
- -}
- -
- -ssize_t readv (int fd, const struct iovec *vector, int count)
- -{
- - if (SINGLE_THREAD_P)
- - return __readv (fd, vector, count);
- -
- - int oldtype = LIBC_CANCEL_ASYNC ();
- + ssize_t bytes_read = INLINE_SYSCALL(readv, 3, fd, vector, count);
-
- - int result = __readv (fd, vector, count);
- + if (bytes_read >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
- + return bytes_read;
-
- - LIBC_CANCEL_RESET (oldtype);
- + /* glibc tries again, but we do not. */
- + /* return __atomic_readv_replacement (fd, vector, count); */
-
- - return result;
- + return -1;
- }
- -#else
- -_syscall3(ssize_t, readv, int, filedes, const struct iovec *, vector,
- - int, count)
- -#endif
- +CANCELLABLE_SYSCALL(ssize_t, readv, (int fd, const struct iovec *vector, int count),
- + (fd, vector, count))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/renameat.c uClibc/libc/sysdeps/linux/common/renameat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/renameat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/renameat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
-
- #ifdef __NR_renameat
- _syscall4(int, renameat, int, oldfd, const char *, old, int, newfd, const char *, new)
- +libc_hidden_def(renameat)
- #else
- /* should add emulation with rename() and /proc/self/fd/ ... */
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/rename.c uClibc/libc/sysdeps/linux/common/rename.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/rename.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/rename.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,17 +8,15 @@
- */
-
- #include <sys/syscall.h>
- -#include <unistd.h>
- -#include <string.h>
- -#include <sys/param.h>
- #include <stdio.h>
- +#include <unistd.h>
-
- -#define __NR___syscall_rename __NR_rename
- -static __inline__ _syscall2(int, __syscall_rename, const char *, oldpath,
- - const char *, newpath)
- -
- -int rename(const char * oldpath, const char * newpath)
- +#if defined __NR_renameat && !defined __NR_rename
- +# include <fcntl.h>
- +int rename(const char *oldpath, const char *newpath)
- {
- - return __syscall_rename(oldpath, newpath);
- + return renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath);
- }
- -
- +#else
- +_syscall2(int, rename, const char *, oldpath, const char *, newpath)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/rmdir.c uClibc/libc/sysdeps/linux/common/rmdir.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/rmdir.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/rmdir.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,5 +11,13 @@
- #include <unistd.h>
-
-
- +#if defined __NR_unlinkat && !defined __NR_rmdir
- +# include <fcntl.h>
- +int rmdir(const char *pathname)
- +{
- + return unlinkat(AT_FDCWD, pathname, AT_REMOVEDIR);
- +}
- +#else
- _syscall1(int, rmdir, const char *, pathname)
- +#endif
- libc_hidden_def(rmdir)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__rt_sigtimedwait.c uClibc/libc/sysdeps/linux/common/__rt_sigtimedwait.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__rt_sigtimedwait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/__rt_sigtimedwait.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,42 +9,49 @@
- */
-
- #include <sys/syscall.h>
- -#include <signal.h>
- -#include <string.h>
-
- #ifdef __NR_rt_sigtimedwait
- -
- +# include <signal.h>
- +# include <cancel.h>
- # ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -# include <sysdep-cancel.h>
- # include <pthreadP.h> /* SIGCANCEL */
- +# endif
- +# ifdef SIGCANCEL
- +# define __need_NULL
- +# include <stddef.h>
- +# include <string.h>
- +# endif
-
- -static int do_sigtimedwait(const sigset_t *set, siginfo_t *info,
- - const struct timespec *timeout)
- +int __NC(sigtimedwait)(const sigset_t *set, siginfo_t *info,
- + const struct timespec *timeout)
- {
- -# ifdef SIGCANCEL
- +# ifdef SIGCANCEL
- sigset_t tmpset;
-
- - if (set != NULL && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
- -# ifdef SIGSETXID
- - || __builtin_expect (__sigismember (set, SIGSETXID), 0)
- -# endif
- + if (set != NULL && (unlikely (__sigismember (set, SIGCANCEL))
- +# ifdef SIGSETXID
- + || unlikely (__sigismember (set, SIGSETXID))
- +# endif
- ))
- {
- /* Create a temporary mask without the bit for SIGCANCEL set. */
- // We are not copying more than we have to.
- memcpy (&tmpset, set, _NSIG / 8);
- __sigdelset (&tmpset, SIGCANCEL);
- -# ifdef SIGSETXID
- +# ifdef SIGSETXID
- __sigdelset (&tmpset, SIGSETXID);
- -# endif
- +# endif
- set = &tmpset;
- }
- -# endif
- +# endif
-
- +/* if this is enabled, enable the disabled section in sigwait.c */
- +# if defined SI_TKILL && defined SI_USER
- /* XXX The size argument hopefully will have to be changed to the
- real size of the user-level sigset_t. */
- - int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set, info,
- - timeout, _NSIG / 8);
- + /* on uClibc we use the kernel sigset_t size */
- + int result = INLINE_SYSCALL(rt_sigtimedwait, 4, set, info,
- + timeout, __SYSCALL_SIGSET_T_SIZE);
-
- /* The kernel generates a SI_TKILL code in si_code in case tkill is
- used. tkill is transparently used in raise(). Since having
- @@ -54,39 +61,14 @@
- info->si_code = SI_USER;
-
- return result;
- -}
- -
- -/* Return any pending signal or wait for one for the given time. */
- -int attribute_hidden __sigtimedwait(const sigset_t *set, siginfo_t *info,
- - const struct timespec *timeout)
- -{
- - if(SINGLE_THREAD_P)
- - return do_sigtimedwait(set, info, timeout);
- -
- - int oldtype = LIBC_CANCEL_ASYNC();
- -
- - /* XXX The size argument hopefully will have to be changed to the
- - real size of the user-level sigset_t. */
- - int result = do_sigtimedwait(set, info, timeout);
- -
- - LIBC_CANCEL_RESET(oldtype);
- -
- - return result;
- -}
- # else
- -# define __need_NULL
- -# include <stddef.h>
- -# define __NR___rt_sigtimedwait __NR_rt_sigtimedwait
- -static _syscall4(int, __rt_sigtimedwait, const sigset_t *, set,
- - siginfo_t *, info, const struct timespec *, timeout,
- - size_t, setsize);
- -
- -int attribute_hidden __sigtimedwait(const sigset_t * set, siginfo_t * info,
- - const struct timespec *timeout)
- -{
- - return __rt_sigtimedwait(set, info, timeout, _NSIG / 8);
- + /* on uClibc we use the kernel sigset_t size */
- + return INLINE_SYSCALL(rt_sigtimedwait, 4, set, info,
- + timeout, __SYSCALL_SIGSET_T_SIZE);
- +# endif
- }
- -# endif /* !__UCLIBC_HAS_THREADS_NATIVE__ */
- -weak_alias(__sigtimedwait,sigtimedwait)
- -libc_hidden_weak(sigtimedwait)
- +CANCELLABLE_SYSCALL(int, sigtimedwait,
- + (const sigset_t *set, siginfo_t *info, const struct timespec *timeout),
- + (set, info, timeout))
- +lt_libc_hidden(sigtimedwait)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__rt_sigwaitinfo.c uClibc/libc/sysdeps/linux/common/__rt_sigwaitinfo.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__rt_sigwaitinfo.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/__rt_sigwaitinfo.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,81 +9,17 @@
- */
-
- #include <sys/syscall.h>
- -#include <signal.h>
- -#include <string.h>
-
- #ifdef __NR_rt_sigtimedwait
- +# define __need_NULL
- +# include <stddef.h>
- +# include <signal.h>
- +# include <cancel.h>
-
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -# include <sysdep-cancel.h>
- -
- -static int do_sigwaitinfo(const sigset_t *set, siginfo_t *info)
- -{
- -# ifdef SIGCANCEL
- - sigset_t tmpset;
- -
- - if (set != NULL && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
- -# ifdef SIGSETXID
- - || __builtin_expect (__sigismember (set, SIGSETXID), 0)
- -# endif
- - ))
- - {
- - /* Create a temporary mask without the bit for SIGCANCEL set. */
- - // We are not copying more than we have to.
- - memcpy (&tmpset, set, _NSIG / 8);
- - __sigdelset (&tmpset, SIGCANCEL);
- -# ifdef SIGSETXID
- - __sigdelset (&tmpset, SIGSETXID);
- -# endif
- - set = &tmpset;
- - }
- -# endif
- -
- - /* XXX The size argument hopefully will have to be changed to the
- - real size of the user-level sigset_t. */
- - int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set, info,
- - NULL, _NSIG / 8);
- -
- - /* The kernel generates a SI_TKILL code in si_code in case tkill is
- - used. tkill is transparently used in raise(). Since having
- - SI_TKILL as a code is useful in general we fold the results
- - here. */
- - if (result != -1 && info != NULL && info->si_code == SI_TKILL)
- - info->si_code = SI_USER;
- -
- - return result;
- -}
- -
- -/* Return any pending signal or wait for one for the given time. */
- -int __sigwaitinfo(const sigset_t *set, siginfo_t *info)
- -{
- - if(SINGLE_THREAD_P)
- - return do_sigwaitinfo(set, info);
- -
- - int oldtype = LIBC_CANCEL_ASYNC();
- -
- - /* XXX The size argument hopefully will have to be changed to the
- - real size of the user-level sigset_t. */
- - int result = do_sigwaitinfo(set, info);
- -
- - LIBC_CANCEL_RESET(oldtype);
- -
- - return result;
- -}
- -# else
- -# define __need_NULL
- -# include <stddef.h>
- -# define __NR___rt_sigwaitinfo __NR_rt_sigtimedwait
- -static _syscall4(int, __rt_sigwaitinfo, const sigset_t *, set,
- - siginfo_t *, info, const struct timespec *, timeout,
- - size_t, setsize);
- -
- -int attribute_hidden __sigwaitinfo(const sigset_t * set, siginfo_t * info)
- +int sigwaitinfo(const sigset_t *set, siginfo_t *info)
- {
- - return __rt_sigwaitinfo(set, info, NULL, _NSIG / 8);
- + return sigtimedwait(set, info, NULL);
- }
- -# endif
- -libc_hidden_proto(sigwaitinfo)
- -weak_alias (__sigwaitinfo, sigwaitinfo)
- -libc_hidden_weak(sigwaitinfo)
- +/* cancellation handled by sigtimedwait, noop on uClibc */
- +LIBC_CANCEL_HANDLED();
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_cpucount.c uClibc/libc/sysdeps/linux/common/sched_cpucount.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_cpucount.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sched_cpucount.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <sched.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_getaffinity.c uClibc/libc/sysdeps/linux/common/sched_getaffinity.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_getaffinity.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sched_getaffinity.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,24 +12,19 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- -#ifdef __USE_GNU
- -
- -#include <sched.h>
- -#include <sys/types.h>
- #include <sys/syscall.h>
-
- -#include <string.h>
- -#include <sys/param.h>
- -
- -#if defined __NR_sched_getaffinity
- -#define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
- -static __inline__ _syscall3(int, __syscall_sched_getaffinity, __kernel_pid_t, pid,
- - size_t, cpusetsize, cpu_set_t *, cpuset)
- +#if defined __NR_sched_getaffinity && defined __USE_GNU
- +# include <sched.h>
- +# include <string.h>
- +# include <sys/types.h>
- +# include <sys/param.h>
- +# define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
- +static __always_inline _syscall3(int, __syscall_sched_getaffinity, __kernel_pid_t, pid,
- + size_t, cpusetsize, cpu_set_t *, cpuset)
-
- int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
- {
- @@ -45,4 +40,3 @@
- return res;
- }
- #endif
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_setaffinity.c uClibc/libc/sysdeps/linux/common/sched_setaffinity.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_setaffinity.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sched_setaffinity.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,26 +12,20 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- -#ifdef __USE_GNU
- -
- -#include <sched.h>
- -#include <sys/types.h>
- #include <sys/syscall.h>
- -#include <string.h>
- -#include <unistd.h>
- -#include <sys/param.h>
- -#include <alloca.h>
- -
- -#if defined __NR_sched_setaffinity
- -
- -#define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
- -static __inline__ _syscall3(int, __syscall_sched_setaffinity, __kernel_pid_t, pid,
- - size_t, cpusetsize, cpu_set_t *, cpuset)
- +
- +#if defined __NR_sched_setaffinity && defined __USE_GNU
- +# include <sched.h>
- +# include <sys/types.h>
- +# include <string.h>
- +# include <unistd.h>
- +# include <alloca.h>
- +# define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
- +static __always_inline _syscall3(int, __syscall_sched_setaffinity, __kernel_pid_t, pid,
- + size_t, cpusetsize, const cpu_set_t *, cpuset)
-
- static size_t __kernel_cpumask_size;
-
- @@ -68,7 +62,6 @@
- return -1;
- }
-
- - return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
- + return __syscall_sched_setaffinity(pid, cpusetsize, cpuset);
- }
- #endif
- -#endif /* __USE_GNU */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/select.c uClibc/libc/sysdeps/linux/common/select.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/select.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/select.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,27 +9,24 @@
-
- #include <sys/syscall.h>
- #include <sys/select.h>
- -#include <stdint.h>
- +#include <cancel.h>
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- -#else
- -#define SINGLE_THREAD_P 1
- +#ifdef __NR__newselect
- +# undef __NR_select
- +# define __NR_select __NR__newselect
- #endif
-
- -#define USEC_PER_SEC 1000000L
- -
- -extern __typeof(select) __libc_select;
- -
- -#if !defined(__NR__newselect) && !defined(__NR_select) && defined __USE_XOPEN2K
- -# define __NR___libc_pselect6 __NR_pselect6
- -static _syscall6(int, __libc_pselect6, int, n, fd_set *, readfds, fd_set *, writefds,
- - fd_set *, exceptfds, const struct timespec *, timeout,
- - const sigset_t *, sigmask)
- +#if !defined __NR_select && defined __NR_pselect6
- +# include <stdint.h>
- +# define USEC_PER_SEC 1000000L
- +#endif
-
- -int __libc_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- - struct timeval *timeout)
- +int __NC(select)(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- + struct timeval *timeout)
- {
- +#ifdef __NR_select
- + return INLINE_SYSCALL(select, 5, n, readfds, writefds, exceptfds, timeout);
- +#elif defined __NR_pselect6
- struct timespec _ts, *ts = 0;
- if (timeout) {
- uint32_t usec;
- @@ -51,44 +48,14 @@
-
- ts = &_ts;
- }
- -
- - if (SINGLE_THREAD_P)
- - return __libc_pselect6(n, readfds, writefds, exceptfds, ts, 0);
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __libc_pselect6(n, readfds, writefds, exceptfds, ts, 0);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -
- -}
- -
- -#else
- -
- -#ifdef __NR__newselect
- -# define __NR___syscall_select __NR__newselect
- -#else
- -# define __NR___syscall_select __NR_select
- -#endif
- -
- -static _syscall5(int, __syscall_select, int, n, fd_set *, readfds,
- - fd_set *, writefds, fd_set *, exceptfds, struct timeval *, timeout);
- -
- -int __libc_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- - struct timeval *timeout)
- -{
- - if (SINGLE_THREAD_P)
- - return __syscall_select(n, readfds, writefds, exceptfds, timeout);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = __syscall_select(n, readfds, writefds, exceptfds, timeout);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- + return INLINE_SYSCALL(pselect6, 6, n, readfds, writefds, exceptfds, ts, 0);
- #endif
- }
- -
- +/* we should guard it, but we need it in other files, so let it fail
- + * if we miss any of the syscalls */
- +#if 1 /*defined __NR_select || defined __NR_pselect6*/
- +CANCELLABLE_SYSCALL(int, select, (int n, fd_set *readfds, fd_set *writefds,
- + fd_set *exceptfds, struct timeval *timeout),
- + (n, readfds, writefds, exceptfds, timeout))
- +lt_libc_hidden(select)
- #endif
- -
- -weak_alias(__libc_select,select)
- -libc_hidden_weak(select)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sendfile64.c uClibc/libc/sysdeps/linux/common/sendfile64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sendfile64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sendfile64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,15 +10,12 @@
- * just the macro we need to order things, __LONG_LONG_PAIR.
- */
-
- -#include <features.h>
- -#include <unistd.h>
- -#include <errno.h>
- -#include <endian.h>
- -#include <stdint.h>
- -#include <sys/sendfile.h>
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- #include <bits/wordsize.h>
-
- -#if defined __UCLIBC_HAS_LFS__ && defined __NR_sendfile64
- +#if defined __NR_sendfile64 && __WORDSIZE != 64
- +# include <sys/sendfile.h>
- _syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count)
- +libc_hidden_def(sendfile64)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sendfile.c uClibc/libc/sysdeps/linux/common/sendfile.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sendfile.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sendfile.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,16 +8,57 @@
- */
-
- #include <sys/syscall.h>
- -#include <unistd.h>
- -#include <sys/sendfile.h>
-
- -#ifdef __NR_sendfile
- +# include <sys/sendfile.h>
- +# include <bits/wordsize.h>
-
- +#if defined __NR_sendfile
- _syscall4(ssize_t, sendfile, int, out_fd, int, in_fd, __off_t *, offset,
- - size_t, count)
- + size_t, count)
- +# if defined __UCLIBC_HAS_LFS__ && (!defined __NR_sendfile64 || __WORDSIZE == 64)
- +libc_hidden_def(sendfile64)
- +strong_alias_untyped(sendfile,sendfile64)
- +# endif
-
- -#if ! defined __NR_sendfile64 && defined __UCLIBC_HAS_LFS__
- -strong_alias(sendfile,sendfile64)
- -#endif
- +#elif defined __NR_sendfile64 && !defined __NR_sendfile
- +# include <unistd.h>
- +# include <stddef.h>
- +
- +ssize_t sendfile(int out_fd, int in_fd, __off_t *offset, size_t count)
- +{
- + __off64_t off64, *off;
- + ssize_t res;
- +
- + /*
- + * Check if valid fds and valid pointers were passed
- + * This does not prevent the user from passing
- + * an arbitrary pointer causing a segfault or
- + * other security issues
- + */
- +
- + if (in_fd < 0 || out_fd < 0) {
- + __set_errno(EBADF);
- + return -1;
- + }
- +
- + if (offset == NULL || (int)offset < 0) {
- + __set_errno(EFAULT);
- + return -1;
- + }
-
- -#endif /* __NR_sendfile */
- + if (offset) {
- + off = &off64;
- + off64 = *offset;
- + } else {
- + off = NULL;
- + }
- +
- + res = INLINE_SYSCALL(sendfile64, 4, out_fd, in_fd, off, count);
- +
- + if (res >= 0)
- + *offset = off64;
- +
- + return res;
- +}
- +
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setgroups.c uClibc/libc/sysdeps/linux/common/setgroups.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setgroups.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/setgroups.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,12 +8,9 @@
- */
-
- #include <sys/syscall.h>
- -#include <stdlib.h>
- -#include <unistd.h>
- -#include <grp.h>
-
- #ifdef __USE_BSD
- -
- +#include <grp.h>
-
- #if defined(__NR_setgroups32)
- # undef __NR_setgroups
- @@ -24,11 +21,14 @@
- _syscall2(int, setgroups, size_t, size, const gid_t *, list)
-
- #else
- -
- -
- -#define __NR___syscall_setgroups __NR_setgroups
- -static __inline__ _syscall2(int, __syscall_setgroups,
- - size_t, size, const __kernel_gid_t *, list)
- +# include <errno.h>
- +# include <stdlib.h>
- +# include <unistd.h>
- +# include <sys/types.h>
- +
- +# define __NR___syscall_setgroups __NR_setgroups
- +static __always_inline _syscall2(int, __syscall_setgroups,
- + size_t, size, const __kernel_gid_t *, list)
-
- int setgroups(size_t size, const gid_t *groups)
- {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setpgrp.c uClibc/libc/sysdeps/linux/common/setpgrp.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setpgrp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/setpgrp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,10 +4,8 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <syscall.h>
- #include <unistd.h>
-
- -
- int setpgrp(void)
- {
- return setpgid(0,0);
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setrlimit64.c uClibc/libc/sysdeps/linux/common/setrlimit64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setrlimit64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/setrlimit64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,20 +12,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <_lfs_64.h>
- -
- -#include <sys/types.h>
- -#include <sys/resource.h>
- #include <bits/wordsize.h>
-
- /* the regular setrlimit will work just fine for 64bit users */
- +#if __WORDSIZE == 32
-
- -#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 32
- -
- +# include <sys/resource.h>
-
- /* Set the soft and hard limits for RESOURCE to *RLIMITS.
- Only the super-user can increase hard limits.
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setrlimit.c uClibc/libc/sysdeps/linux/common/setrlimit.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setrlimit.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/setrlimit.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,12 +7,9 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define setrlimit64 __hide_setrlimit64
- #include <sys/syscall.h>
- -#include <unistd.h>
- #include <sys/resource.h>
- -#undef setrlimit64
- -
- +#include <bits/wordsize.h>
-
- /* Only wrap setrlimit if the new usetrlimit is not present and setrlimit sucks */
-
- @@ -25,7 +22,7 @@
- const struct rlimit *, rlim)
- int setrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
- {
- - return (__syscall_usetrlimit(resource, rlimits));
- + return __syscall_usetrlimit(resource, rlimits);
- }
-
- #elif !defined(__UCLIBC_HANDLE_OLDER_RLIMIT__)
- @@ -36,6 +33,11 @@
-
- #else
-
- +# define __need_NULL
- +# include <stddef.h>
- +# include <errno.h>
- +# include <sys/param.h>
- +
- /* we have to handle old style setrlimit() */
- # define __NR___syscall_setrlimit __NR_setrlimit
- static __always_inline
- @@ -52,18 +54,15 @@
-
- /* We might have to correct the limits values. Since the old values
- * were signed the new values might be too large. */
- -# define RMIN(x, y) ((x) < (y) ? (x) : (y))
- - rlimits_small.rlim_cur = RMIN((unsigned long int) rlimits->rlim_cur,
- + rlimits_small.rlim_cur = MIN((unsigned long int) rlimits->rlim_cur,
- RLIM_INFINITY >> 1);
- - rlimits_small.rlim_max = RMIN((unsigned long int) rlimits->rlim_max,
- + rlimits_small.rlim_max = MIN((unsigned long int) rlimits->rlim_max,
- RLIM_INFINITY >> 1);
- -#undef RMIN
- - return (__syscall_setrlimit(resource, &rlimits_small));
- + return __syscall_setrlimit(resource, &rlimits_small);
- }
- #endif
- -
- libc_hidden_def(setrlimit)
-
- #if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
- -strong_alias(setrlimit, setrlimit64)
- +strong_alias_untyped(setrlimit, setrlimit64)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setsid.c uClibc/libc/sysdeps/linux/common/setsid.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setsid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/setsid.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,5 @@
- #include <sys/syscall.h>
- #include <unistd.h>
-
- -
- _syscall0(pid_t, setsid)
- libc_hidden_def(setsid)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/settimeofday.c uClibc/libc/sysdeps/linux/common/settimeofday.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/settimeofday.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/settimeofday.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,12 +8,36 @@
- */
-
- #include <sys/syscall.h>
- -#include <sys/time.h>
-
- #ifdef __USE_BSD
- +# include <sys/time.h>
- +# ifdef __NR_settimeofday
- +_syscall2(int, settimeofday, const struct timeval *, tv,
- + const struct timezone *, tz)
- +# elif defined __USE_SVID && defined __NR_stime
- +# define __need_NULL
- +# include <stddef.h>
- +# include <errno.h>
- +# include <time.h>
- +int settimeofday(const struct timeval *tv, const struct timezone *tz)
- +{
- + time_t when;
-
- + if (tv == NULL) {
- + __set_errno(EINVAL);
- + return -1;
- + }
-
- -_syscall2(int, settimeofday, const struct timeval *, tv,
- - const struct timezone *, tz)
- + if (tz != NULL || tv->tv_usec % 1000000 != 0) {
- + __set_errno(ENOSYS);
- + return -1;
- + }
- +
- + when = tv->tv_sec + (tv->tv_usec / 1000000);
- + return stime(&when);
- +}
- +# endif
- +# if defined __NR_settimeofday || (defined __USE_SVID && defined __NR_stime)
- libc_hidden_def(settimeofday)
- +# endif
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setuid.c uClibc/libc/sysdeps/linux/common/setuid.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setuid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/setuid.c 2014-02-03 12:32:56.000000000 +0100
- @@ -22,7 +22,7 @@
- #else
-
- # define __NR___syscall_setuid __NR_setuid
- -static __inline__ _syscall1(int, __syscall_setuid, __kernel_uid_t, uid)
- +static __always_inline _syscall1(int, __syscall_setuid, __kernel_uid_t, uid)
-
- int setuid(uid_t uid)
- {
- @@ -30,6 +30,6 @@
- __set_errno(EINVAL);
- return -1;
- }
- - return (__syscall_setuid(uid));
- + return __syscall_setuid(uid);
- }
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/signalfd.c uClibc/libc/sysdeps/linux/common/signalfd.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/signalfd.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/signalfd.c 2014-02-03 12:32:56.000000000 +0100
- @@ -25,13 +25,13 @@
- int signalfd (int fd, const sigset_t *mask, int flags)
- {
- #if defined __NR___syscall_signalfd4
- - return __syscall_signalfd4(fd, mask, _NSIG / 8, flags);
- + return __syscall_signalfd4(fd, mask, __SYSCALL_SIGSET_T_SIZE, flags);
- #elif defined __NR___syscall_signalfd
- if (flags != 0) {
- __set_errno(EINVAL);
- return -1;
- }
- - return __syscall_signalfd(fd, mask, _NSIG / 8);
- + return __syscall_signalfd(fd, mask, __SYSCALL_SIGSET_T_SIZE);
- #endif
- }
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sigpending.c uClibc/libc/sysdeps/linux/common/sigpending.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sigpending.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sigpending.c 2014-02-03 12:32:56.000000000 +0100
- @@ -19,7 +19,7 @@
-
- int sigpending(sigset_t * set)
- {
- - return __rt_sigpending(set, _NSIG / 8);
- + return __rt_sigpending(set, __SYSCALL_SIGSET_T_SIZE);
- }
- #else
- _syscall1(int, sigpending, sigset_t *, set)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sigprocmask.c uClibc/libc/sysdeps/linux/common/sigprocmask.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sigprocmask.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sigprocmask.c 2014-02-03 12:32:56.000000000 +0100
- @@ -35,9 +35,9 @@
- * The only thing we have to make sure here is that SIGCANCEL and
- * SIGSETXID are not blocked.
- */
- - if (set != NULL && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
- + if (set != NULL && (unlikely (__sigismember (set, SIGCANCEL))
- # ifdef SIGSETXID
- - || __builtin_expect (__sigismember (set, SIGSETXID), 0)
- + || unlikely (__sigismember (set, SIGSETXID))
- # endif
- ))
- {
- @@ -50,7 +50,7 @@
- }
- #endif
-
- - return __rt_sigprocmask(how, set, oldset, _NSIG / 8);
- + return __rt_sigprocmask(how, set, oldset, __SYSCALL_SIGSET_T_SIZE);
- }
-
-
- @@ -70,9 +70,9 @@
- * The only thing we have to make sure here is that SIGCANCEL and
- * SIGSETXID are not blocked.
- */
- - if (set != NULL && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
- + if (set != NULL && (unlikely (__sigismember (set, SIGCANCEL))
- # ifdef SIGSETXID
- - || __builtin_expect (__sigismember (set, SIGSETXID), 0)
- + || unlikely (__sigismember (set, SIGSETXID))
- # endif
- ))
- {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sigqueue.c uClibc/libc/sysdeps/linux/common/sigqueue.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sigqueue.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sigqueue.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,41 +12,35 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#include <errno.h>
- -#include <signal.h>
- -#include <unistd.h>
- -#include <string.h>
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/syscall.h>
- -#if defined __USE_POSIX199309
-
- +#if defined __NR_rt_sigqueueinfo && defined __USE_POSIX199309
- +# include <signal.h>
- +# include <unistd.h>
- +# include <string.h>
-
- -#ifdef __NR_rt_sigqueueinfo
- -
- -# define __NR___libc_rt_sigqueueinfo __NR_rt_sigqueueinfo
- -static __inline__ _syscall3(int, __libc_rt_sigqueueinfo, pid_t, pid, int, sig, void*, value)
- +# define __NR___syscall_rt_sigqueueinfo __NR_rt_sigqueueinfo
- +static __always_inline _syscall3(int, __syscall_rt_sigqueueinfo, pid_t, pid, int, sig, void*, value)
-
- /* Return any pending signal or wait for one for the given time. */
- int sigqueue (pid_t pid, int sig, const union sigval val)
- {
- - siginfo_t info;
- + siginfo_t info;
-
- - /* First, clear the siginfo_t structure, so that we don't pass our
- - stack content to other tasks. */
- - memset (&info, 0, sizeof (siginfo_t));
- - /* We must pass the information about the data in a siginfo_t value. */
- - info.si_signo = sig;
- - info.si_code = SI_QUEUE;
- - info.si_pid = getpid ();
- - info.si_uid = getuid ();
- - info.si_value = val;
- + /* First, clear the siginfo_t structure, so that we don't pass our
- + stack content to other tasks. */
- + memset(&info, 0, sizeof(info));
- + /* We must pass the information about the data in a siginfo_t value. */
- + info.si_signo = sig;
- + info.si_code = SI_QUEUE;
- + info.si_pid = getpid ();
- + info.si_uid = getuid ();
- + info.si_value = val;
-
- - return __libc_rt_sigqueueinfo(pid, sig, &info);
- + return __syscall_rt_sigqueueinfo(pid, sig, &info);
- }
-
- #endif
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sigsuspend.c uClibc/libc/sysdeps/linux/common/sigsuspend.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sigsuspend.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sigsuspend.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,51 +9,18 @@
-
- #include <sys/syscall.h>
-
- -#if defined __USE_POSIX
- +#ifdef __USE_POSIX
- #include <signal.h>
- -#undef sigsuspend
- +#include <cancel.h>
-
- -libc_hidden_proto(sigsuspend)
- -
- -#ifdef __NR_rt_sigsuspend
- -# define __NR___rt_sigsuspend __NR_rt_sigsuspend
- -
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -# include <errno.h>
- -# include <sysdep-cancel.h>
- -
- -/* Change the set of blocked signals to SET,
- - wait until a signal arrives, and restore the set of blocked signals. */
- -int sigsuspend (const sigset_t *set)
- +int __NC(sigsuspend)(const sigset_t *set)
- {
- - if (SINGLE_THREAD_P)
- - return INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8);
- -
- - int oldtype = LIBC_CANCEL_ASYNC ();
- -
- - int result = INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8);
- -
- - LIBC_CANCEL_RESET (oldtype);
- -
- - return result;
- -}
- -# else
- -static inline _syscall2(int, __rt_sigsuspend, const sigset_t *, mask, size_t, size)
- -
- -int sigsuspend(const sigset_t * mask)
- -{
- - return __rt_sigsuspend(mask, _NSIG / 8);
- -}
- -# endif
- +#ifdef __NR_rt_sigsuspend
- + return INLINE_SYSCALL(rt_sigsuspend, 2, set, __SYSCALL_SIGSET_T_SIZE);
- #else
- -# define __NR___syscall_sigsuspend __NR_sigsuspend
- -static __inline__ _syscall3(int, __syscall_sigsuspend, int, a, unsigned long int, b,
- - unsigned long int, c)
- -
- -int sigsuspend(const sigset_t * set)
- -{
- - return __syscall_sigsuspend(0, 0, set->__val[0]);
- -}
- + return INLINE_SYSCALL(sigsuspend, 3, 0, 0, set->__val[0]);
- #endif
- -libc_hidden_def(sigsuspend)
- +}
- +CANCELLABLE_SYSCALL(int, sigsuspend, (const sigset_t *set), (set))
- +lt_libc_hidden(sigsuspend)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__socketcall.c uClibc/libc/sysdeps/linux/common/__socketcall.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__socketcall.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/__socketcall.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,8 +8,18 @@
- */
-
- #include <sys/syscall.h>
- +
- +/* At the time of this writing,
- + * several arches provide the individual calls and do _not_ go through
- + * this demuxer.
- + *
- + * Verify all arches supported by your kernel before you remove the
- + * guard below!
- + */
- #ifdef __NR_socketcall
- +#include <sys/socket.h>
- +
- #define __NR___socketcall __NR_socketcall
- -int __socketcall(int __call, unsigned long *__args) attribute_hidden;
- _syscall2(int, __socketcall, int, call, unsigned long *, args)
- +
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/splice.c uClibc/libc/sysdeps/linux/common/splice.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/splice.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/splice.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,9 +8,10 @@
- */
-
- #include <sys/syscall.h>
- -#include <fcntl.h>
-
- -#ifdef __NR_splice
- -_syscall6(ssize_t, splice, int, __fdin, __off64_t *, __offin, int, __fdout,
- - __off64_t *, __offout, size_t, __len, unsigned int, __flags)
- +#if defined __NR_splice && defined __UCLIBC_HAS_LFS__ && defined __USE_GNU
- +# include <fcntl.h>
- +
- +_syscall6(ssize_t, splice, int, __fdin, off64_t *, __offin, int, __fdout,
- + off64_t *, __offout, size_t, __len, unsigned int, __flags)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ssp.c uClibc/libc/sysdeps/linux/common/ssp.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ssp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/ssp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -20,103 +20,113 @@
- #error "file must not be compiled with stack protection enabled on it. Use -fno-stack-protector"
- #endif
-
- +#include <string.h>
- +#include <unistd.h>
- +#include <signal.h>
- +#ifdef __UCLIBC_HAS_SYSLOG__
- +#include <sys/syslog.h>
- +#endif
- +
- #ifdef __PROPOLICE_BLOCK_SEGV__
- # define SSP_SIGTYPE SIGSEGV
- #else
- # define SSP_SIGTYPE SIGABRT
- #endif
-
- -#include <string.h>
- -#include <unistd.h>
- -#include <signal.h>
- -#if defined __UCLIBC_HAS_SYSLOG__
- -#include <sys/syslog.h>
- +static void do_write(const char *msg)
- +{
- + /* could use inlined syscall here to be sure ... */
- + return (void) write(STDERR_FILENO, msg, strlen(msg));
- +}
-
- +static void __cold do_msg(const char *msg1, const char *msg2, const char *msg3)
- +{
- + do_write(msg1);
- + do_write(msg2);
- + do_write(msg3);
- + do_write("\n");
- +#ifdef __UCLIBC_HAS_SYSLOG__
- + syslog(LOG_INFO, "%s%s%s()", msg1, msg2, msg3);
- #endif
- +}
-
- -
- -static void block_signals(void)
- +static void __cold attribute_noreturn
- +#ifdef __UCLIBC_HAS_SSP_COMPAT__
- +ssp_handler(char func[])
- +#else
- +ssp_handler(void)
- +#endif
- {
- + pid_t pid;
- + static const char msg_ssd[] = "*** stack smashing detected ***: ";
- + static const char msg_terminated[] = " terminated";
- +#ifdef __UCLIBC_HAS_SSP_COMPAT__
- + static const char msg_ssa[] = ": stack smashing attack in function ";
- +#endif
- +
- +#ifdef __DODEBUG__
- struct sigaction sa;
- sigset_t mask;
-
- __sigfillset(&mask);
- __sigdelset(&mask, SSP_SIGTYPE); /* Block all signal handlers */
- sigprocmask(SIG_BLOCK, &mask, NULL); /* except SSP_SIGTYPE */
- +#endif
- +
- +#ifdef __UCLIBC_HAS_SSP_COMPAT__
- + if (func != NULL)
- + do_msg(__uclibc_progname, msg_ssa, func);
- + else
- +#endif
- + do_msg(msg_ssd, __uclibc_progname, msg_terminated);
-
- + pid = getpid();
- +#ifdef __DODEBUG__
- /* Make the default handler associated with the signal handler */
- memset(&sa, 0, sizeof(sa));
- __sigfillset(&sa.sa_mask); /* Block all signals */
- if (SIG_DFL) /* if it's constant zero, it's already done */
- sa.sa_handler = SIG_DFL;
- - sigaction(SSP_SIGTYPE, &sa, NULL);
- -}
- -
- -static void __cold ssp_write(int fd, const char *msg1, const char *msg2, const char *msg3)
- -{
- - write(fd, msg1, strlen(msg1));
- - write(fd, msg2, strlen(msg2));
- - write(fd, msg3, strlen(msg3));
- - write(fd, "()\n", 3);
- -#if defined __UCLIBC_HAS_SYSLOG__
- - openlog("ssp", LOG_CONS | LOG_PID, LOG_USER);
- - syslog(LOG_INFO, "%s%s%s()", msg1, msg2, msg3);
- - closelog();
- + if (sigaction(SSP_SIGTYPE, &sa, NULL) == 0)
- + (void)kill(pid, SSP_SIGTYPE);
- #endif
- -}
- -
- -static attribute_noreturn void terminate(void)
- -{
- - (void) kill(getpid(), SSP_SIGTYPE);
- - _exit(127);
- + (void)kill(pid, SIGKILL);
- + /* The loop is added only to keep gcc happy. */
- + while(1)
- + _exit(127);
- }
-
- #ifdef __UCLIBC_HAS_SSP_COMPAT__
- -void __stack_smash_handler(char func[], int damaged __attribute__ ((unused))) attribute_noreturn __cold;
- -void __stack_smash_handler(char func[], int damaged)
- +void __stack_smash_handler(char func[], int damaged) attribute_noreturn __cold;
- +void __stack_smash_handler(char func[], int damaged attribute_unused)
- {
- - static const char message[] = ": stack smashing attack in function ";
- -
- - block_signals();
- -
- - ssp_write(STDERR_FILENO, __uclibc_progname, message, func);
- -
- - /* The loop is added only to keep gcc happy. */
- - while(1)
- - terminate();
- + ssp_handler(func);
- }
- -#endif
-
- -#ifdef __UCLIBC_HAS_SSP__
- -void __stack_chk_fail(void) attribute_noreturn __cold;
- void __stack_chk_fail(void)
- {
- - static const char msg1[] = "stack smashing detected: ";
- - static const char msg3[] = " terminated";
- -
- - block_signals();
- -
- - ssp_write(STDERR_FILENO, msg1, __uclibc_progname, msg3);
- -
- - /* The loop is added only to keep gcc happy. */
- - while(1)
- - terminate();
- + ssp_handler(NULL);
- }
- +#else
- +strong_alias(ssp_handler,__stack_chk_fail)
- #endif
-
- #ifdef __UCLIBC_HAS_FORTIFY__
- +/* should be redone when activated to use common code above.
- + * for now, it works without debugging support */
- void __chk_fail(void)
- {
- - static const char msg1[] = "buffer overflow detected: ";
- - static const char msg3[] = " terminated";
- -
- - block_signals();
- + static const char msg_fail[] = "*** buffer overflow detected ***: ";
- + static const char msg_terminated[] = " terminated";
- + pid_t pid;
-
- - ssp_write(STDERR_FILENO, msg1, __uclibc_progname, msg3);
- + do_msg(msg_fail, __uclibc_progname, msg_terminated);
-
- + pid = getpid();
- + (void)kill(pid, SIGKILL);
- /* The loop is added only to keep gcc happy. */
- while(1)
- - terminate();
- + _exit(127);
- }
- libc_hidden_def(__chk_fail)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ssp-local.c uClibc/libc/sysdeps/linux/common/ssp-local.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ssp-local.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/ssp-local.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,18 +12,19 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * Peter S. Mazinger ps.m[@]gmx.net
- * copied stack_chk_fail_local.c from glibc and adapted for uClibc
- */
-
- -#include <features.h>
- +#if defined __SSP__ || defined __SSP_ALL__
- +# error "file must not be compiled with stack protection enabled on it. Use -fno-stack-protector"
- +#endif
-
- -extern void __stack_chk_fail (void) attribute_noreturn;
- +#include <features.h>
-
- /* On some architectures, this helps needless PIC pointer setup
- that would be needed just for the __stack_chk_fail call. */
- @@ -31,5 +32,5 @@
- void __stack_chk_fail_local (void) attribute_noreturn attribute_hidden;
- void __stack_chk_fail_local (void)
- {
- - __stack_chk_fail ();
- + __stack_chk_fail ();
- }
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/stat64.c uClibc/libc/sysdeps/linux/common/stat64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/stat64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/stat64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,17 +7,28 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- #include <sys/stat.h>
-
- -#if defined __UCLIBC_HAS_LFS__ && defined __NR_stat64
- +#if defined __UCLIBC_HAS_LFS__
-
- -# define __NR___syscall_stat64 __NR_stat64
- +# if defined __NR_fstatat64 && !defined __NR_stat64
- +# include <fcntl.h>
- # include <unistd.h>
- -# include "xstatconv.h"
-
- -static __inline__ _syscall2(int, __syscall_stat64,
- - const char *, file_name, struct kernel_stat64 *, buf)
- +int stat64(const char *file_name, struct stat64 *buf)
- +{
- + return fstatat64(AT_FDCWD, file_name, buf, 0);
- +}
- +libc_hidden_def(stat64)
- +
- +/* For systems which have both, prefer the old one */
- +# elif defined __NR_stat64
- +# define __NR___syscall_stat64 __NR_stat64
- +# include "xstatconv.h"
- +static __always_inline _syscall2(int, __syscall_stat64,
- + const char *, file_name, struct kernel_stat64 *, buf)
-
- int stat64(const char *file_name, struct stat64 *buf)
- {
- @@ -31,4 +42,6 @@
- return result;
- }
- libc_hidden_def(stat64)
- -#endif
- +# endif
- +
- +#endif /* __UCLIBC_HAS_LFS__ */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/stat.c uClibc/libc/sysdeps/linux/common/stat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/stat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/stat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,14 +10,24 @@
- #include <sys/syscall.h>
- #include <unistd.h>
- #include <sys/stat.h>
- -#include "xstatconv.h"
-
- #undef stat
-
- +#if defined __NR_fstatat64 && !defined __NR_stat
- +# include <fcntl.h>
- +
- +int stat(const char *file_name, struct stat *buf)
- +{
- + return fstatat(AT_FDCWD, file_name, buf, 0);
- +}
- +
- +#else
- +# include "xstatconv.h"
- +
- int stat(const char *file_name, struct stat *buf)
- {
- int result;
- -#ifdef __NR_stat64
- +# ifdef __NR_stat64
- /* normal stat call has limited values for various stat elements
- * e.g. uid device major/minor etc.
- * so we use 64 variant if available
- @@ -28,19 +38,21 @@
- if (result == 0) {
- __xstat32_conv(&kbuf, buf);
- }
- -#else
- +# else
- struct kernel_stat kbuf;
-
- result = INLINE_SYSCALL(stat, 2, file_name, &kbuf);
- if (result == 0) {
- __xstat_conv(&kbuf, buf);
- }
- -#endif
- +# endif /* __NR_stat64 */
- return result;
- }
- +#endif /* __NR_fstat64 */
- libc_hidden_def(stat)
-
- -#if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
- +#if ! defined __NR_stat64 && ! defined __NR_fstatat64 && \
- + defined __UCLIBC_HAS_LFS__
- strong_alias_untyped(stat,stat64)
- libc_hidden_def(stat64)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/statfs.c uClibc/libc/sysdeps/linux/common/statfs.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/statfs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/statfs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,10 +13,39 @@
- #include <sys/vfs.h>
-
- extern __typeof(statfs) __libc_statfs attribute_hidden;
- -#define __NR___libc_statfs __NR_statfs
- +
- +#if defined __NR_statfs64 && !defined __NR_statfs
- +
- +int __libc_statfs(const char *path, struct statfs *buf)
- +{
- + int err = INLINE_SYSCALL(statfs64, 3, path, sizeof(*buf), buf);
- +
- + if (err == 0) {
- + /* Did we overflow? */
- + if (buf->__pad1 || buf->__pad2 || buf->__pad3 ||
- + buf->__pad4 || buf->__pad5) {
- + __set_errno(EOVERFLOW);
- + return -1;
- + }
- + }
- +
- + return err;
- +}
- +# if defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__
- +/* statfs is used by NPTL, so it must exported in case */
- +weak_alias(__libc_statfs, statfs)
- +# endif
- +
- +/* For systems which have both, prefer the old one */
- +#else
- +
- +# define __NR___libc_statfs __NR_statfs
- _syscall2(int, __libc_statfs, const char *, path, struct statfs *, buf)
-
- -#if defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__
- +# if defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__
- /* statfs is used by NPTL, so it must exported in case */
- -weak_alias(__libc_statfs,statfs)
- +weak_alias(__libc_statfs, statfs)
- +# endif
- +
- #endif
- +libc_hidden_def(statfs)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/stime.c uClibc/libc/sysdeps/linux/common/stime.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/stime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/stime.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,15 +8,17 @@
- */
-
- #include <sys/syscall.h>
- -#include <time.h>
- -#include <sys/time.h>
-
- #ifdef __USE_SVID
- -#ifdef __NR_stime
- +# include <time.h>
- +# ifdef __NR_stime
- _syscall1(int, stime, const time_t *, t)
- -#else
- -
- -int stime(const time_t * when)
- +# elif defined __USE_BSD && defined __NR_settimeofday
- +# define __need_NULL
- +# include <stddef.h>
- +# include <errno.h>
- +# include <sys/time.h>
- +int stime(const time_t *when)
- {
- struct timeval tv;
-
- @@ -28,5 +30,8 @@
- tv.tv_usec = 0;
- return settimeofday(&tv, (struct timezone *) 0);
- }
- -#endif
- +# endif
- +# if defined __NR_stime || (defined __USE_BSD && defined __NR_settimeofday)
- +libc_hidden_def(stime)
- +# endif
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/stubs.c uClibc/libc/sysdeps/linux/common/stubs.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/stubs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/stubs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -6,31 +6,52 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- +/* Please keep the list sorted alphabetically, in ascending order
- + * of the stub name! */
- +
- #include <errno.h>
- #include <bits/wordsize.h>
- #include <sys/syscall.h>
-
- #ifdef __UCLIBC_HAS_STUBS__
-
- -static int enosys_stub(void) __attribute_used__;
- -static int enosys_stub(void)
- +__attribute_used__ static int enosys_stub(void)
- {
- __set_errno(ENOSYS);
- return -1;
- }
-
- +__attribute_used__ static int ret_enosys_stub(void)
- +{
- + return ENOSYS;
- +}
- +
- #define make_stub(stub) \
- link_warning(stub, #stub ": this function is not implemented") \
- strong_alias(enosys_stub, stub)
-
- +#define make_ret_stub(stub) \
- + link_warning(stub, #stub ": this function is not implemented") \
- + strong_alias(ret_enosys_stub, stub)
- +
- #ifndef __ARCH_USE_MMU__
- # undef __NR_fork
- #endif
-
- -#ifndef __UCLIBC_HAS_LFS__
- -# undef __NR_fadvise64
- -# undef __NR_fadvise64_64
- -# undef __NR_sync_file_range
- +#ifdef __arm__
- +# define __NR_fadvise64_64 __NR_arm_fadvise64_64
- +# define __NR_fadvise64 __NR_arm_fadvise64_64
- +/* ARM always provides funcs w/out syscalls; disable the stubs */
- +# define __NR_ioperm 0
- +# define __NR_iopl 0
- +#endif
- +
- +#ifdef __mips__
- +# define __NR_fadvise64_64 __NR_fadvise64
- +#endif
- +
- +#ifdef __xtensa__
- +# define __NR_fadvise64 __NR_fadvise64_64
- #endif
-
- #if !defined __NR_accept && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
- @@ -45,14 +66,6 @@
- make_stub(arch_prctl)
- #endif
-
- -#if !defined __NR_capget && defined __UCLIBC_LINUX_SPECIFIC__
- -make_stub(capget)
- -#endif
- -
- -#if !defined __NR_capset && defined __UCLIBC_LINUX_SPECIFIC__
- -make_stub(capset)
- -#endif
- -
- #if !defined __NR_bdflush && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(bdflush)
- #endif
- @@ -61,11 +74,11 @@
- make_stub(bind)
- #endif
-
- -#ifndef __NR_capget
- +#if !defined __NR_capget && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(capget)
- #endif
-
- -#ifndef __NR_capset
- +#if !defined __NR_capset && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(capset)
- #endif
-
- @@ -81,38 +94,44 @@
- make_stub(delete_module)
- #endif
-
- -#ifndef __NR_epoll_create
- +#if !defined __NR_epoll_create && defined __UCLIBC_HAS_EPOLL__ \
- + && !defined __NR_epoll_create1
- make_stub(epoll_create)
- #endif
-
- -#ifndef __NR_epoll_ctl
- +#if !defined __NR_epoll_ctl && defined __UCLIBC_HAS_EPOLL__
- make_stub(epoll_ctl)
- #endif
-
- -#ifndef __NR_epoll_wait
- +#if !defined __NR_epoll_pwait && defined __UCLIBC_HAS_EPOLL__
- +make_stub(epoll_pwait)
- +#endif
- +
- +#if !defined __NR_epoll_wait && defined __UCLIBC_HAS_EPOLL__ \
- + && !defined __NR_epoll_pwait
- make_stub(epoll_wait)
- #endif
-
- -#if !defined __NR_eventfd && defined __UCLIBC_LINUX_SPECIFIC__
- +#if !defined __NR_eventfd && !defined __NR_eventfd2 && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(eventfd)
- #endif
-
- -#ifndef __NR_fdatasync
- +#if !defined __NR_fdatasync && !defined __NR_osf_fdatasync
- make_stub(fdatasync)
- #endif
-
- +#ifndef __NR_fgetxattr
- +make_stub(fgetxattr)
- +#endif
- +
- #ifndef __NR_flistxattr
- make_stub(flistxattr)
- #endif
-
- -#ifndef __NR_fork
- +#if !defined __NR_fork && !defined __NR_clone
- make_stub(fork)
- #endif
-
- -#ifndef __NR_fgetxattr
- -make_stub(fgetxattr)
- -#endif
- -
- #ifndef __NR_fremovexattr
- make_stub(fremovexattr)
- #endif
- @@ -121,7 +140,8 @@
- make_stub(fsetxattr)
- #endif
-
- -#if !defined __NR_fstatfs && defined __UCLIBC_LINUX_SPECIFIC__
- +#if !defined __NR_fstatfs && !defined __NR_fstatfs64 \
- + && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(fstatfs)
- #endif
-
- @@ -129,10 +149,6 @@
- make_stub(get_kernel_syms)
- #endif
-
- -#if !defined __NR_getcpu && defined __UCLIBC_LINUX_SPECIFIC__ && ((defined __x86_64__ && !defined __UCLIBC_HAS_TLS__) || !defined __x86_64__)
- -make_stub(sched_getcpu)
- -#endif
- -
- #if !defined __NR_getpeername && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
- make_stub(getpeername)
- #endif
- @@ -157,7 +173,12 @@
- make_stub(init_module)
- #endif
-
- -#if !defined __NR_inotify_init && defined __UCLIBC_LINUX_SPECIFIC__
- +#if !defined __NR_inotify_add_watch && defined __UCLIBC_LINUX_SPECIFIC__
- +make_stub(inotify_add_watch)
- +#endif
- +
- +#if !defined __NR_inotify_init && defined __UCLIBC_LINUX_SPECIFIC__ \
- + && !defined __NR_inotify_init1
- make_stub(inotify_init)
- #endif
-
- @@ -165,19 +186,15 @@
- make_stub(inotify_init1)
- #endif
-
- -#if !defined __NR_inotify_add_watch && defined __UCLIBC_LINUX_SPECIFIC__
- -make_stub(inotify_add_watch)
- -#endif
- -
- #if !defined __NR_inotify_rm_watch && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(inotify_rm_watch)
- #endif
-
- -#if !defined __NR_ioperm && defined __UCLIBC_LINUX_SPECIFIC__ && !defined __arm__
- +#if !defined __NR_ioperm && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(ioperm)
- #endif
-
- -#if !defined __NR_iopl && defined __UCLIBC_LINUX_SPECIFIC__ && !defined __arm__
- +#if !defined __NR_iopl && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(iopl)
- #endif
-
- @@ -213,6 +230,13 @@
- make_stub(modify_ldt)
- #endif
-
- +#ifndef __NR_openat
- +make_stub(openat)
- +# ifdef __UCLIBC_HAS_LFS__
- +make_stub(openat64)
- +# endif
- +#endif
- +
- #if !defined __NR_personality && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(personality)
- #endif
- @@ -225,6 +249,18 @@
- make_stub(pivot_root)
- #endif
-
- +#if !defined __NR_fadvise64 && defined __UCLIBC_HAS_LFS__
- +make_ret_stub(posix_fadvise)
- +#endif
- +
- +#if !defined __NR_fadvise64_64 && defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 32
- +make_ret_stub(posix_fadvise64)
- +#endif
- +
- +#ifndef __NR_madvise
- +make_ret_stub(posix_madvise)
- +#endif
- +
- #if !defined __NR_ppoll && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(ppoll)
- #endif
- @@ -233,6 +269,10 @@
- make_stub(prctl)
- #endif
-
- +#if !defined __NR_query_module && defined __UCLIBC_LINUX_MODULE_24__
- +make_stub(query_module)
- +#endif
- +
- #if !defined __NR_readahead && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(readahead)
- #endif
- @@ -241,10 +281,6 @@
- make_stub(reboot)
- #endif
-
- -#if !defined __NR_query_module && defined __UCLIBC_LINUX_MODULE_24__
- -make_stub(query_module)
- -#endif
- -
- #if !defined __NR_recv && !defined __NR_socketcall && !defined __NR_recvfrom && defined __UCLIBC_HAS_SOCKET__
- make_stub(recv)
- #endif
- @@ -265,10 +301,18 @@
- make_stub(removexattr)
- #endif
-
- +#ifndef __NR_renameat
- +make_stub(renameat)
- +#endif
- +
- #if !defined __NR_sched_getaffinity && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(sched_getaffinity)
- #endif
-
- +#if !defined __NR_getcpu && defined __UCLIBC_LINUX_SPECIFIC__ && ((defined __x86_64__ && !defined __UCLIBC_HAS_TLS__) || !defined __x86_64__)
- +make_stub(sched_getcpu)
- +#endif
- +
- #if !defined __NR_sched_setaffinity && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(sched_setaffinity)
- #endif
- @@ -277,7 +321,8 @@
- make_stub(send)
- #endif
-
- -#if !defined __NR_sendfile && defined __UCLIBC_LINUX_SPECIFIC__
- +#if !defined __NR_sendfile && !defined __NR_sendfile64 \
- + && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(sendfile)
- #endif
-
- @@ -325,6 +370,15 @@
- make_stub(signalfd)
- #endif
-
- +#ifndef __NR_rt_sigtimedwait
- +make_stub(sigtimedwait)
- +make_stub(sigwaitinfo)
- +#endif
- +
- +#ifndef __NR_rt_sigqueueinfo
- +make_stub(sigqueue)
- +#endif
- +
- #if !defined __NR_socket && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
- make_stub(socket)
- #endif
- @@ -337,9 +391,9 @@
- make_stub(socketpair)
- #endif
-
- -#ifndef __NR_rt_sigtimedwait
- -make_stub(sigtimedwait)
- -make_stub(sigwaitinfo)
- +#if !defined __NR_stime && !defined __NR_settimeofday
- +make_stub(stime)
- +make_stub(settimeofday)
- #endif
-
- #if !defined __NR_splice && defined __UCLIBC_LINUX_SPECIFIC__
- @@ -354,6 +408,10 @@
- make_stub(swapon)
- #endif
-
- +#if !defined __NR_symlink && !defined __NR_symlinkat
- +make_stub(symlink)
- +#endif
- +
- #if !defined __NR_sync_file_range && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(sync_file_range)
- #endif
- @@ -382,6 +440,21 @@
- make_stub(timerfd_gettime)
- #endif
-
- +#ifndef __NR_utimensat
- +make_stub(futimens)
- +make_stub(utimensat)
- +# ifndef __NR_lutimes
- +make_stub(lutimes)
- +# endif
- +#endif
- +
- +#ifndef __NR_utimensat
- +#if !defined __NR_utime && !defined __NR_utimes
- +/*make_stub(utime) obsoleted */
- +make_stub(utimes)
- +#endif
- +#endif
- +
- #if !defined __NR_umount && !defined __NR_umount2 && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(umount)
- #endif
- @@ -394,19 +467,15 @@
- make_stub(unshare)
- #endif
-
- -#ifndef __NR_utimensat
- -make_stub(futimens)
- -make_stub(utimensat)
- -# ifndef __NR_lutimes
- -make_stub(lutimes)
- -# endif
- +#if defined __UCLIBC_SV4_DEPRECATED__ && !defined __NR_ustat
- +make_stub(ustat)
- #endif
-
- #if !defined __NR_vhangup && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(vhangup)
- #endif
-
- -#ifndef __NR_vmsplice
- +#if !defined __NR_vmsplice && defined __UCLIBC_LINUX_SPECIFIC__
- make_stub(vmsplice)
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/symlinkat.c uClibc/libc/sysdeps/linux/common/symlinkat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/symlinkat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/symlinkat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
-
- #ifdef __NR_symlinkat
- _syscall3(int, symlinkat, const char *, from, int, tofd, const char *, to)
- +libc_hidden_def(symlinkat)
- #else
- /* should add emulation with symlink() and /proc/self/fd/ ... */
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/symlink.c uClibc/libc/sysdeps/linux/common/symlink.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/symlink.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/symlink.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,6 +9,19 @@
-
- #include <sys/syscall.h>
- #if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K
- -#include <unistd.h>
- +# include <unistd.h>
- +
- +# if defined __NR_symlinkat && !defined __NR_symlink
- +# include <fcntl.h>
- +int symlink(const char *oldpath, const char *newpath)
- +{
- + return symlinkat(oldpath, AT_FDCWD, newpath);
- +}
- +
- +# elif defined(__NR_symlink)
- +
- _syscall2(int, symlink, const char *, oldpath, const char *, newpath)
- +
- +# endif
- +
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sync.c uClibc/libc/sysdeps/linux/common/sync.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sync.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sync.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,12 +8,8 @@
- */
-
- #include <sys/syscall.h>
- -# if defined __USE_BSD || defined __USE_UNIX98
- -#include <sys/types.h>
- -#include <unistd.h>
-
- -void sync(void)
- -{
- - INLINE_SYSCALL(sync, 0);
- -}
- +#if defined __USE_BSD || defined __USE_UNIX98
- +# include <unistd.h>
- +_syscall0(void, sync)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sync_file_range.c uClibc/libc/sysdeps/linux/common/sync_file_range.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sync_file_range.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sync_file_range.c 2014-02-15 14:18:15.000000000 +0100
- @@ -4,24 +4,34 @@
- *
- * Copyright (C) 2008 Bernhard Reutner-Fischer <uclibc@uclibc.org>
- *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- */
-
- #include <sys/syscall.h>
- -#if defined __USE_GNU
- -#include <fcntl.h>
- +#if defined __UCLIBC_HAS_LFS__ && defined __USE_GNU
- +# include <bits/wordsize.h>
- +# include <endian.h>
- +# include <fcntl.h>
- +# include <cancel.h>
-
- -#if defined __NR_sync_file_range && defined __UCLIBC_HAS_LFS__
- -#define __NR___syscall_sync_file_range __NR_sync_file_range
- -static __inline__ _syscall6(int, __syscall_sync_file_range, int, fd,
- - off_t, offset_hi, off_t, offset_lo,
- - off_t, nbytes_hi, off_t, nbytes_lo, unsigned int, flags)
- -int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags)
- +# ifdef __NR_sync_file_range2
- +# undef __NR_sync_file_range
- +# define __NR_sync_file_range __NR_sync_file_range2
- +# endif
- +
- +# ifdef __NR_sync_file_range
- +static int __NC(sync_file_range)(int fd, off64_t offset, off64_t nbytes, unsigned int flags)
- {
- - return __syscall_sync_file_range(fd,
- - __LONG_LONG_PAIR((long)(offset >> 32), (long)(offset & 0xffffffff)),
- - __LONG_LONG_PAIR((long)(nbytes >> 32), (long)(nbytes & 0xffffffff)),
- - flags);
- +# if defined __powerpc__ && __WORDSIZE == 64
- + return INLINE_SYSCALL(sync_file_range, 4, fd, offset, nbytes, flags);
- +# elif defined __mips__ && _MIPS_SIM == _ABIO32
- + return INLINE_SYSCALL(sync_file_range, 7, fd, 0,
- + OFF64_HI_LO(offset), OFF64_HI_LO(nbytes), flags);
- +# else
- + return INLINE_SYSCALL(sync_file_range, 6, fd,
- + OFF64_HI_LO(offset), OFF64_HI_LO(nbytes), flags);
- +# endif
- }
- -#endif
- +CANCELLABLE_SYSCALL(int, sync_file_range, (int fd, off64_t offset, off64_t nbytes, unsigned int flags), (fd, offset, nbytes, flags))
- +# endif
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/acct.h uClibc/libc/sysdeps/linux/common/sys/acct.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/acct.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sys/acct.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
- +/* Copyright (C) 1996, 1997, 1998, 1999, 2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,15 +12,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_ACCT_H
- #define _SYS_ACCT_H 1
-
- #include <features.h>
-
- +#include <endian.h>
- #define __need_time_t
- #include <time.h>
- #include <sys/types.h>
- @@ -38,25 +38,51 @@
- typedef u_int16_t comp_t;
-
- struct acct
- - {
- - char ac_flag; /* Accounting flags. */
- - u_int16_t ac_uid; /* Accounting user ID. */
- - u_int16_t ac_gid; /* Accounting group ID. */
- - u_int16_t ac_tty; /* Controlling tty. */
- - u_int32_t ac_btime; /* Beginning time. */
- - comp_t ac_utime; /* Accounting user time. */
- - comp_t ac_stime; /* Accounting system time. */
- - comp_t ac_etime; /* Accounting elapsed time. */
- - comp_t ac_mem; /* Accounting average memory usage. */
- - comp_t ac_io; /* Accounting chars transferred. */
- - comp_t ac_rw; /* Accounting blocks read or written. */
- - comp_t ac_minflt; /* Accounting minor pagefaults. */
- - comp_t ac_majflt; /* Accounting major pagefaults. */
- - comp_t ac_swaps; /* Accounting number of swaps. */
- - u_int32_t ac_exitcode; /* Accounting process exitcode. */
- - char ac_comm[ACCT_COMM+1]; /* Accounting command name. */
- - char ac_pad[10]; /* Accounting padding bytes. */
- - };
- +{
- + char ac_flag; /* Flags. */
- + u_int16_t ac_uid; /* Real user ID. */
- + u_int16_t ac_gid; /* Real group ID. */
- + u_int16_t ac_tty; /* Controlling terminal. */
- + u_int32_t ac_btime; /* Beginning time. */
- + comp_t ac_utime; /* User time. */
- + comp_t ac_stime; /* System time. */
- + comp_t ac_etime; /* Elapsed time. */
- + comp_t ac_mem; /* Average memory usage. */
- + comp_t ac_io; /* Chars transferred. */
- + comp_t ac_rw; /* Blocks read or written. */
- + comp_t ac_minflt; /* Minor pagefaults. */
- + comp_t ac_majflt; /* Major pagefaults. */
- + comp_t ac_swaps; /* Number of swaps. */
- + u_int32_t ac_exitcode; /* Process exitcode. */
- + char ac_comm[ACCT_COMM+1]; /* Command name. */
- + char ac_pad[10]; /* Padding bytes. */
- +};
- +
- +#if 0
- +struct acct_v3
- +{
- + char ac_flag; /* Flags */
- + char ac_version; /* Always set to ACCT_VERSION */
- + u_int16_t ac_tty; /* Control Terminal */
- + u_int32_t ac_exitcode; /* Exitcode */
- + u_int32_t ac_uid; /* Real User ID */
- + u_int32_t ac_gid; /* Real Group ID */
- + u_int32_t ac_pid; /* Process ID */
- + u_int32_t ac_ppid; /* Parent Process ID */
- + u_int32_t ac_btime; /* Process Creation Time */
- + float ac_etime; /* Elapsed Time */
- + comp_t ac_utime; /* User Time */
- + comp_t ac_stime; /* System Time */
- + comp_t ac_mem; /* Average Memory Usage */
- + comp_t ac_io; /* Chars Transferred */
- + comp_t ac_rw; /* Blocks Read or Written */
- + comp_t ac_minflt; /* Minor Pagefaults */
- + comp_t ac_majflt; /* Major Pagefaults */
- + comp_t ac_swaps; /* Number of Swaps */
- + char ac_comm[ACCT_COMM]; /* Command Name */
- +};
- +#endif
- +
-
- enum
- {
- @@ -66,11 +92,17 @@
- AXSIG = 0x10 /* Killed by a signal. */
- };
-
- +#if __BYTE_ORDER == __BIG_ENDIAN
- +# define ACCT_BYTEORDER 0x80 /* Accounting file is big endian. */
- +#else
- +# define ACCT_BYTEORDER 0x00 /* Accounting file is little endian. */
- +#endif
- +
- #define AHZ 100
-
-
- /* Switch process accounting on and off. */
- -extern int acct (__const char *__filename) __THROW;
- +extern int acct (const char *__filename) __THROW;
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/epoll.h uClibc/libc/sysdeps/linux/common/sys/epoll.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/epoll.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sys/epoll.h 2014-02-03 12:32:56.000000000 +0100
- @@ -36,7 +36,6 @@
- # define __EPOLL_PACKED
- #endif
-
- -
- enum EPOLL_EVENTS
- {
- EPOLLIN = 0x001,
- @@ -97,7 +96,7 @@
- returned by epoll_create() should be closed with close(). */
- extern int epoll_create (int __size) __THROW;
-
- -/* Same as epoll_create but with an FLAGS parameter. The unused SIZE
- +/* Same as epoll_create but with a FLAGS parameter. The unused SIZE
- parameter has been dropped. */
- extern int epoll_create1 (int __flags) __THROW;
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/eventfd.h uClibc/libc/sysdeps/linux/common/sys/eventfd.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/eventfd.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sys/eventfd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
- +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,30 +12,20 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_EVENTFD_H
- #define _SYS_EVENTFD_H 1
-
- #include <stdint.h>
-
- +/* Get the platform-dependent flags. */
- +#include <bits/eventfd.h>
-
- /* Type for event counter. */
- typedef uint64_t eventfd_t;
-
- -/* Flags for signalfd. */
- -enum
- - {
- - EFD_SEMAPHORE = 1,
- -#define EFD_SEMAPHORE EFD_SEMAPHORE
- - EFD_CLOEXEC = 02000000,
- -#define EFD_CLOEXEC EFD_CLOEXEC
- - EFD_NONBLOCK = 04000
- -#define EFD_NONBLOCK EFD_NONBLOCK
- - };
- -
-
- __BEGIN_DECLS
-
- @@ -43,6 +33,16 @@
- value to COUNT. */
- extern int eventfd (int __count, int __flags) __THROW;
-
- +#if 0 /* not (yet) implemented in uClibc */
- +
- +/* Read event counter and possibly wait for events. */
- +extern int eventfd_read (int __fd, eventfd_t *__value);
- +
- +/* Increment event counter. */
- +extern int eventfd_write (int __fd, eventfd_t __value);
- +
- +#endif
- +
- __END_DECLS
-
- #endif /* sys/eventfd.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/prctl.h uClibc/libc/sysdeps/linux/common/sys/prctl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/prctl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sys/prctl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PRCTL_H
- #define _SYS_PRCTL_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/ptrace.h uClibc/libc/sysdeps/linux/common/sys/ptrace.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sys/ptrace.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,5 @@
- /* `ptrace' debugger support interface. Linux version.
- - Copyright (C) 1996-1999,2000,2006,2007 Free Software Foundation, Inc.
- + Copyright (C) 1996-2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PTRACE_H
- #define _SYS_PTRACE_H 1
- @@ -125,13 +124,40 @@
- #define PT_GETSIGINFO PTRACE_GETSIGINFO
-
- /* Set new siginfo for process. */
- - PTRACE_SETSIGINFO = 0x4203
- + PTRACE_SETSIGINFO = 0x4203,
- #define PT_SETSIGINFO PTRACE_SETSIGINFO
- +
- + /* Get register content. */
- + PTRACE_GETREGSET = 0x4204,
- +#define PTRACE_GETREGSET PTRACE_GETREGSET
- +
- + /* Set register content. */
- + PTRACE_SETREGSET = 0x4205,
- +#define PTRACE_SETREGSET PTRACE_SETREGSET
- +
- + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
- + signal or group stop state. */
- + PTRACE_SEIZE = 0x4206,
- +#define PTRACE_SEIZE PTRACE_SEIZE
- +
- + /* Trap seized tracee. */
- + PTRACE_INTERRUPT = 0x4207,
- +#define PTRACE_INTERRUPT PTRACE_INTERRUPT
- +
- + /* Wait for next group event. */
- + PTRACE_LISTEN = 0x4208
- };
-
-
- +/* Flag for PTRACE_LISTEN. */
- +enum __ptrace_flags
- +{
- + PTRACE_SEIZE_DEVEL = 0x80000000
- +};
- +
- /* Options set using PTRACE_SETOPTIONS. */
- -enum __ptrace_setoptions {
- +enum __ptrace_setoptions
- +{
- PTRACE_O_TRACESYSGOOD = 0x00000001,
- PTRACE_O_TRACEFORK = 0x00000002,
- PTRACE_O_TRACEVFORK = 0x00000004,
- @@ -139,17 +165,20 @@
- PTRACE_O_TRACEEXEC = 0x00000010,
- PTRACE_O_TRACEVFORKDONE = 0x00000020,
- PTRACE_O_TRACEEXIT = 0x00000040,
- - PTRACE_O_MASK = 0x0000007f
- + PTRACE_O_TRACESECCOMP = 0x00000080,
- + PTRACE_O_MASK = 0x000000ff
- };
-
- /* Wait extended result codes for the above trace options. */
- -enum __ptrace_eventcodes {
- +enum __ptrace_eventcodes
- +{
- PTRACE_EVENT_FORK = 1,
- PTRACE_EVENT_VFORK = 2,
- PTRACE_EVENT_CLONE = 3,
- PTRACE_EVENT_EXEC = 4,
- PTRACE_EVENT_VFORK_DONE = 5,
- - PTRACE_EVENT_EXIT = 6
- + PTRACE_EVENT_EXIT = 6,
- + PTRAVE_EVENT_SECCOMP = 7
- };
-
- /* Perform process tracing functions. REQUEST is one of the values
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_fcntl64.c uClibc/libc/sysdeps/linux/common/__syscall_fcntl64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_fcntl64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/__syscall_fcntl64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,14 +7,18 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- -#include <stdarg.h>
- -#include <fcntl.h>
- +#include <bits/wordsize.h>
-
- -#if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
- +#if defined __NR_fcntl64 && __WORDSIZE == 32
- +# include <stdarg.h>
- +# include <cancel.h>
- +# include <fcntl.h>
- +
- +# define __NR___fcntl64_nocancel __NR_fcntl64
- +_syscall3(int, __NC(fcntl64), int, fd, int, cmd, long, arg)
-
- -#define __NR___syscall_fcntl64 __NR_fcntl64
- -static __inline__ _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg)
- int fcntl64(int fd, int cmd, ...)
- {
- long arg;
- @@ -24,7 +28,15 @@
- arg = va_arg(list, long);
- va_end(list);
-
- - return (__syscall_fcntl64(fd, cmd, arg));
- + if (SINGLE_THREAD_P || (cmd != F_SETLKW64))
- + return __NC(fcntl64)(fd, cmd, arg);
- +# ifdef __NEW_THREADS
- + int oldtype = LIBC_CANCEL_ASYNC();
- + int result = __NC(fcntl64)(fd, cmd, arg);
- + LIBC_CANCEL_RESET(oldtype);
- + return result;
- +# endif
- }
- -libc_hidden_def(fcntl64)
- +lt_strong_alias(fcntl64)
- +lt_libc_hidden(fcntl64)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_fcntl.c uClibc/libc/sysdeps/linux/common/__syscall_fcntl.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_fcntl.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/__syscall_fcntl.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,82 +10,61 @@
-
- #include <sys/syscall.h>
- #include <stdarg.h>
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h> /* Must come before <fcntl.h>. */
- -#endif
- +#include <cancel.h> /* Must come before <fcntl.h>. */
- #include <fcntl.h>
- #include <bits/wordsize.h>
-
- -extern __typeof(fcntl) __libc_fcntl;
- -libc_hidden_proto(__libc_fcntl)
- -
- -int __fcntl_nocancel (int fd, int cmd, ...)
- +int __NC(fcntl)(int fd, int cmd, long arg)
- {
- - va_list ap;
- - void *arg;
- -
- - va_start (ap, cmd);
- - arg = va_arg (ap, void *);
- - va_end (ap);
- -
- -# if __WORDSIZE == 32
- +#if __WORDSIZE == 32
- if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) {
- -# if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
- - return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
- -# else
- +# if (defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64) || !defined __NR_fcntl
- + return INLINE_SYSCALL(fcntl64, 3, fd, cmd, arg);
- +# else
- __set_errno(ENOSYS);
- return -1;
- -# endif
- - }
- # endif
- - return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
- + }
- +#endif
- +
- +#if defined __NR_fcntl
- + return INLINE_SYSCALL(fcntl, 3, fd, cmd, arg);
- +#else
- + __set_errno(ENOSYS);
- + return -1;
- +#endif
- }
- -libc_hidden_def(__fcntl_nocancel)
-
- -int __libc_fcntl (int fd, int cmd, ...)
- +int fcntl(int fd, int cmd, ...)
- {
- va_list ap;
- - void *arg;
- + long arg;
-
- va_start (ap, cmd);
- - arg = va_arg (ap, void *);
- + arg = va_arg (ap, long);
- va_end (ap);
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64))
- -# if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
- - return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
- -# else
- - return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
- -# endif
- -
- +#if defined __NR_fcntl
- + return __NC(fcntl)(fd, cmd, arg);
- +#else
- + return INLINE_SYSCALL(fcntl64, 3, fd, cmd, arg);
- +#endif
- +#ifdef __NEW_THREADS
- int oldtype = LIBC_CANCEL_ASYNC ();
- -
- -# if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
- - int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
- -# else
- - int result = INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
- -# endif
- -
- +#if defined __NR_fcntl
- + int result = __NC(fcntl)(fd, cmd, arg);
- +#else
- + int result = INLINE_SYSCALL(fcntl64, 3, fd, cmd, arg);
- +#endif
- LIBC_CANCEL_RESET (oldtype);
- -
- return result;
- -#else
- -# if __WORDSIZE == 32
- - if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) {
- -# if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
- - return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
- -# else
- - __set_errno(ENOSYS);
- - return -1;
- -# endif
- - }
- -# endif
- - return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
- #endif
- }
- -libc_hidden_def(__libc_fcntl)
- -
- -libc_hidden_proto(fcntl)
- -weak_alias(__libc_fcntl,fcntl)
- -libc_hidden_weak(fcntl)
- +lt_strong_alias(fcntl)
- +lt_libc_hidden(fcntl)
- +#if defined __UCLIBC_HAS_LFS__ && !defined __NR_fcntl64 && __WORDSIZE == 32
- +strong_alias_untyped(fcntl,fcntl64)
- +lt_strong_alias(fcntl64)
- +lt_libc_hidden(fcntl64)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_rt_sigaction.c uClibc/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_rt_sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/__syscall_rt_sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,11 +12,8 @@
- #ifdef __NR_rt_sigaction
- #include <signal.h>
-
- -int __syscall_rt_sigaction (int __signum, const struct sigaction *__act,
- - struct sigaction *__oldact, size_t __size);
- -
- #define __NR___syscall_rt_sigaction __NR_rt_sigaction
- _syscall4(int, __syscall_rt_sigaction, int, signum,
- - const struct sigaction *, act, struct sigaction *, oldact,
- - size_t, size)
- + const struct sigaction *, act, struct sigaction *, oldact,
- + size_t, size)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/syscalls.h uClibc/libc/sysdeps/linux/common/syscalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/syscalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/syscalls.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,24 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * Common header file for uClibc syscalls
- - *
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#define _LARGEFILE64_SOURCE
- -#include <features.h>
- -#include <errno.h>
- -#include <sys/types.h>
- -#include <sys/syscall.h>
- -#include <endian.h>
- -
- -#undef __OPTIMIZE__
- -/* We absolutely do _NOT_ want interfaces silently
- - * being renamed under us or very bad things will happen... */
- -#ifdef __USE_FILE_OFFSET64
- -# undef __USE_FILE_OFFSET64
- -#endif
- -
- -#include <bits/kernel_types.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_sigaction.c uClibc/libc/sysdeps/linux/common/__syscall_sigaction.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/__syscall_sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- #ifndef __NR_rt_sigaction
- #define __NR___syscall_sigaction __NR_sigaction
- #include <signal.h>
- -int __syscall_sigaction (int __signum, const struct sigaction *__act, struct sigaction *__oldact) attribute_hidden;
- _syscall3(int, __syscall_sigaction, int, signum, const struct sigaction *,
- - act, struct sigaction *, oldact)
- + act, struct sigaction *, oldact)
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sysdep.h uClibc/libc/sysdeps/linux/common/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/syscall.h>
-
- @@ -49,6 +48,8 @@
- #define JUMPTARGET(sym) sym
- #endif
-
- +#define ret_ERRVAL ret
- +
- /* Macros to generate eh_frame unwind information. */
- # ifdef HAVE_ASM_CFI_DIRECTIVES
- # define cfi_sections(sect...) .cfi_sections sect
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sysinfo.c uClibc/libc/sysdeps/linux/common/sysinfo.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sysinfo.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/sysinfo.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,5 +8,8 @@
- */
-
- #include <sys/syscall.h>
- -#include <sys/sysinfo.h>
- +
- +#ifdef __NR_sysinfo
- +# include <sys/sysinfo.h>
- _syscall1(int, sysinfo, struct sysinfo *, info)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/tee.c uClibc/libc/sysdeps/linux/common/tee.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/tee.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/tee.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,9 +8,10 @@
- */
-
- #include <sys/syscall.h>
- -#include <fcntl.h>
-
- -#ifdef __NR_tee
- +#if defined __NR_tee && defined __USE_GNU
- +# include <fcntl.h>
- +
- _syscall4(ssize_t, tee, int, __fdin, int, __fdout, size_t, __len,
- - unsigned int, __flags)
- + unsigned int, __flags)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/time.c uClibc/libc/sysdeps/linux/common/time.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/time.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/time.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,12 +9,11 @@
-
- #include <sys/syscall.h>
- #include <time.h>
- -#include <sys/time.h>
- -
-
- #ifdef __NR_time
- _syscall_noerr1(time_t, time, time_t *, t)
- #else
- +# include <sys/time.h>
- time_t time(time_t * t)
- {
- time_t result;
- @@ -25,9 +24,8 @@
- */
- gettimeofday(&tv, NULL);
- result = (time_t) tv.tv_sec;
- - if (t != NULL) {
- + if (t != NULL)
- *t = result;
- - }
- return result;
- }
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/times.c uClibc/libc/sysdeps/linux/common/times.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/times.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/times.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,5 @@
- #include <sys/syscall.h>
- #include <sys/times.h>
-
- -
- _syscall_noerr1(clock_t, times, struct tms *, buf)
- libc_hidden_def(times)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/truncate64.c uClibc/libc/sysdeps/linux/common/truncate64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/truncate64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/truncate64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,49 +7,35 @@
- * and on 32 bit machines this sends things into the kernel as
- * two 32-bit arguments (high and low 32 bits of length) that
- * are ordered based on endianess. It turns out endian.h has
- - * just the macro we need to order things, __LONG_LONG_PAIR.
- + * just the macro we need to order things, OFF64_HI_LO.
- */
-
- -#include <features.h>
- -#include <unistd.h>
- -#include <errno.h>
- -#include <endian.h>
- -#include <stdint.h>
- -#include <sys/types.h>
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- +#include <unistd.h>
-
- -#if defined __UCLIBC_HAS_LFS__
- -
- -#if defined __NR_truncate64
- -
- -#if __WORDSIZE == 64
- +#ifdef __NR_truncate64
- +# include <bits/wordsize.h>
-
- -/* For a 64 bit machine, life is simple... */
- +# if __WORDSIZE == 64
- _syscall2(int, truncate64, const char *, path, __off64_t, length)
- -
- -#elif __WORDSIZE == 32
- -
- -/* The exported truncate64 function. */
- +# elif __WORDSIZE == 32
- +# include <endian.h>
- +# include <stdint.h>
- int truncate64(const char * path, __off64_t length)
- {
- - uint32_t low = length & 0xffffffff;
- - uint32_t high = length >> 32;
- -#if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
- - return INLINE_SYSCALL(truncate64, 4, path, 0,
- - __LONG_LONG_PAIR(high, low));
- -#else
- - return INLINE_SYSCALL(truncate64, 3, path,
- - __LONG_LONG_PAIR(high, low));
- -#endif
- +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
- + return INLINE_SYSCALL(truncate64, 4, path, 0, OFF64_HI_LO(length));
- +# else
- + return INLINE_SYSCALL(truncate64, 3, path, OFF64_HI_LO(length));
- +# endif
- }
- +# else
- +# error Your machine is not 64 bit nor 32 bit, I am dazed and confused.
- +# endif
-
- -#else /* __WORDSIZE */
- -#error Your machine is not 64 bit nor 32 bit, I am dazed and confused.
- -#endif /* __WORDSIZE */
- -
- -#else /* __NR_truncate64 */
- -
- -
- +#else
- +# include <errno.h>
- int truncate64(const char * path, __off64_t length)
- {
- __off_t x = (__off_t) length;
- @@ -64,5 +50,4 @@
- }
-
- #endif /* __NR_truncate64 */
- -
- -#endif /* __UCLIBC_HAS_LFS__ */
- +libc_hidden_def(truncate64)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/truncate.c uClibc/libc/sysdeps/linux/common/truncate.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/truncate.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/truncate.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,25 @@
- #include <sys/syscall.h>
- #include <unistd.h>
-
- +#if defined(__NR_truncate64) && !defined(__NR_truncate)
- +# include <endian.h>
- +# include <stdint.h>
-
- +int truncate(const char *path, __off_t length)
- +{
- +# if defined __UCLIBC_HAS_LFS
- + return truncate64(path, length);
- +# elif __WORDSIZE == 32
- +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
- + return INLINE_SYSCALL(truncate64, 4, path, 0, OFF_HI_LO(length));
- +# else
- + return INLINE_SYSCALL(truncate64, 3, path, OFF_HI_LO(length));
- +# endif
- +# endif
- +}
- +libc_hidden_def(truncate);
- +
- +#else
- _syscall2(int, truncate, const char *, path, __off_t, length)
- libc_hidden_def(truncate)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/umask.c uClibc/libc/sysdeps/linux/common/umask.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/umask.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/umask.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,10 +10,4 @@
- #include <sys/syscall.h>
- #include <sys/stat.h>
-
- -#define __NR___syscall_umask __NR_umask
- -static __inline__ _syscall1(__kernel_mode_t, __syscall_umask, __kernel_mode_t, mode)
- -
- -mode_t umask(mode_t mode)
- -{
- - return __syscall_umask(mode);
- -}
- +_syscall_noerr1(mode_t, umask, mode_t, mode)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/umount2.c uClibc/libc/sysdeps/linux/common/umount2.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/umount2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/umount2.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,9 +9,8 @@
-
- #include <sys/syscall.h>
-
- -#if defined __USE_GNU
- -#include <sys/mount.h>
- -#ifdef __NR_umount2 /* Old kernels don't have umount2 */
- +#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __NR_umount2
- +# include <sys/mount.h>
- _syscall2(int, umount2, const char *, special_file, int, flags)
- -#endif
- +libc_hidden_def(umount2)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/umount.c uClibc/libc/sysdeps/linux/common/umount.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/umount.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/umount.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,24 +9,15 @@
-
- #include <sys/syscall.h>
-
- -#if defined __USE_GNU
- #include <sys/mount.h>
- -
- -/* arch provides umount() syscall */
- #ifdef __NR_umount
- -
- _syscall1(int, umount, const char *, specialfile)
- -
- -/* arch provides umount2() syscall */
- #elif defined __NR_umount2
- -
- -# define __NR___syscall_umount2 __NR_umount2
- -static __inline__ _syscall2(int, __syscall_umount2, const char *, special_file, int, flags)
- -
- +# ifndef __UCLIBC_LINUX_SPECIFIC__
- +static __always_inline _syscall2(int, umount2, const char *, special_file, int, flags)
- +# endif
- int umount(const char *special_file)
- {
- - return (__syscall_umount2(special_file, 0));
- + return umount2(special_file, 0);
- }
- -
- -#endif
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/uname.c uClibc/libc/sysdeps/linux/common/uname.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/uname.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/uname.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,5 @@
- #include <sys/syscall.h>
- #include <sys/utsname.h>
-
- -
- _syscall1(int, uname, struct utsname *, buf)
- libc_hidden_def(uname)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/unlinkat.c uClibc/libc/sysdeps/linux/common/unlinkat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/unlinkat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/unlinkat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,6 +11,7 @@
-
- #ifdef __NR_unlinkat
- _syscall3(int, unlinkat, int, fd, const char *, file, int, flag)
- +libc_hidden_def(unlinkat)
- #else
- /* should add emulation with unlink() and /proc/self/fd/ ... */
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/unlink.c uClibc/libc/sysdeps/linux/common/unlink.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/unlink.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/unlink.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,6 +10,13 @@
- #include <sys/syscall.h>
- #include <unistd.h>
-
- -
- +#if defined __NR_unlinkat && !defined __NR_unlink
- +# include <fcntl.h>
- +int unlink(const char *pathname)
- +{
- + return unlinkat(AT_FDCWD, pathname, 0);
- +}
- +#else
- _syscall1(int, unlink, const char *, pathname)
- +#endif
- libc_hidden_def(unlink)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/unwind.h uClibc/libc/sysdeps/linux/common/unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This is derived from the C++ ABI for IA-64. Where we diverge
- for cross-architecture compatibility are noted with "@@@". */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ustat.c uClibc/libc/sysdeps/linux/common/ustat.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ustat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/ustat.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,16 +11,18 @@
- #include <sys/ustat.h>
- #include <sys/sysmacros.h>
-
- -#define __NR___syscall_ustat __NR_ustat
- +#ifdef __NR_ustat
- +# define __NR___syscall_ustat __NR_ustat
- /* Kernel's fs/super.c defines this:
- * long sys_ustat(unsigned dev, struct ustat __user * ubuf),
- * thus we use unsigned, not __kernel_dev_t.
- */
- -static __inline__ _syscall2(int, __syscall_ustat,
- - unsigned, kdev_t,
- - struct ustat *, ubuf)
- +static __always_inline _syscall2(int, __syscall_ustat,
- + unsigned, kdev_t,
- + struct ustat *, ubuf)
-
- int ustat(dev_t dev, struct ustat *ubuf)
- {
- return __syscall_ustat(dev, ubuf);
- }
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/utime.c uClibc/libc/sysdeps/linux/common/utime.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/utime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/utime.c 2014-02-03 12:32:56.000000000 +0100
- @@ -10,13 +10,33 @@
- #include <sys/syscall.h>
- #include <utime.h>
-
- +#if defined __NR_utimensat && !defined __NR_utime
- +# include <fcntl.h>
- +# include <stddef.h>
-
- -#ifdef __NR_utime
- -_syscall2(int, utime, const char *, file, const struct utimbuf *, times)
- -#else
- -#include <stdlib.h>
- -#include <sys/time.h>
- +int utime(const char *file, const struct utimbuf *times)
- +{
- + struct timespec tspecs[2], *ts;
- +
- + if (times) {
- + ts = tspecs;
- + ts[0].tv_sec = times->actime;
- + ts[0].tv_nsec = 0;
- + ts[1].tv_sec = times->modtime;
- + ts[1].tv_nsec = 0;
- + } else {
- + ts = NULL;
- + }
-
- + return utimensat(AT_FDCWD, file, ts, 0);
- +}
- +
- +#elif defined(__NR_utime)
- +_syscall2(int, utime, const char *, file, const struct utimbuf *, times)
- +#elif defined __NR_utimes /* alpha || ia64 */
- +# define __need_NULL
- +# include <stddef.h>
- +# include <sys/time.h>
-
- int utime(const char *file, const struct utimbuf *times)
- {
- @@ -25,11 +45,15 @@
- if (times != NULL) {
- timevals[0].tv_usec = 0L;
- timevals[1].tv_usec = 0L;
- - timevals[0].tv_sec = (long int) times->actime;
- - timevals[1].tv_sec = (long int) times->modtime;
- + timevals[0].tv_sec = (time_t) times->actime;
- + timevals[1].tv_sec = (time_t) times->modtime;
- }
- return utimes(file, times ? timevals : NULL);
- }
- #endif
- +
- +#if (defined __NR_utimensat && !defined __NR_utime) || \
- + defined __NR_utime || defined __NR_utimes
- link_warning(utime, "the use of OBSOLESCENT `utime' is discouraged, use `utimes'")
- libc_hidden_def(utime)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/utimes.c uClibc/libc/sysdeps/linux/common/utimes.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/utimes.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/utimes.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,15 +8,33 @@
- */
-
- #include <sys/syscall.h>
- -#include <utime.h>
- #include <sys/time.h>
-
- +#if defined __NR_utimensat && !defined __NR_utimes
- +# include <fcntl.h>
- +# include <stddef.h>
- +int utimes(const char *file, const struct timeval tvp[2])
- +{
- + struct timespec ts[2], *times;
- + if (tvp) {
- + times = ts;
- + times[0].tv_sec = tvp[0].tv_sec;
- + times[0].tv_nsec = tvp[0].tv_usec * 1000;
- + times[1].tv_sec = tvp[1].tv_sec;
- + times[1].tv_nsec = tvp[1].tv_usec * 1000;
- + } else {
- + times = NULL;
- + }
-
- -#ifdef __NR_utimes
- -_syscall2(int, utimes, const char *, file, const struct timeval *, tvp)
- -#else
- -#include <stdlib.h>
- + return utimensat(AT_FDCWD, file, times, 0);
- +}
-
- +#elif defined __NR_utimes
- +_syscall2(int, utimes, const char *, file, const struct timeval *, tvp)
- +#elif defined __NR_utime
- +# define __need_NULL
- +# include <stddef.h>
- +# include <utime.h>
-
- int utimes(const char *file, const struct timeval tvp[2])
- {
- @@ -32,4 +50,7 @@
- return utime(file, times);
- }
- #endif
- +
- +#if defined __NR_utimensat || defined __NR_utimes || defined __NR_utime
- libc_hidden_def(utimes)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/vfork.c uClibc/libc/sysdeps/linux/common/vfork.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/vfork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/vfork.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,30 +4,37 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <unistd.h>
- -#include <sys/types.h>
- #include <sys/syscall.h>
-
- +#if (defined __NR_vfork || defined __NR_clone || (defined __ARCH_USE_MMU__ && defined __NR_fork)) && (defined __USE_BSD || defined __USE_XOPEN_EXTENDED)
- +# include <unistd.h>
- extern __typeof(vfork) __vfork attribute_hidden;
-
- -#ifdef __NR_vfork
- +# if defined __NR_clone && !defined __NR_vfork
- +# include <signal.h>
- +# include <sys/types.h>
-
- -# define __NR___vfork __NR_vfork
- -_syscall0(pid_t, __vfork)
- +pid_t __vfork(void)
- +{
- + pid_t pid = INLINE_SYSCALL(clone, 4, SIGCHLD,
- + NULL, NULL, NULL);
-
- -weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- + if (pid < 0)
- + return -1;
-
- -#elif defined __ARCH_USE_MMU__ && defined __NR_fork
- + return pid;
- +}
-
- +# elif defined __NR_vfork
- +# define __NR___vfork __NR_vfork
- +_syscall0(pid_t, __vfork)
- +# else
- /* Trivial implementation for arches that lack vfork */
- -
- pid_t __vfork(void)
- {
- return fork();
- }
- -
- -weak_alias(__vfork,vfork)
- +# endif
- +strong_alias(__vfork,vfork)
- libc_hidden_weak(vfork)
- -
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/vmsplice.c uClibc/libc/sysdeps/linux/common/vmsplice.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/vmsplice.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/vmsplice.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,9 +8,10 @@
- */
-
- #include <sys/syscall.h>
- -#include <fcntl.h>
-
- -#ifdef __NR_vmsplice
- +#if defined __NR_vmsplice && defined __USE_GNU
- +# include <fcntl.h>
- +
- _syscall4(ssize_t, vmsplice, int, __fdout, const struct iovec *, __iov,
- - size_t, __count, unsigned int, __flags)
- + size_t, __count, unsigned int, __flags)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/wait3.c uClibc/libc/sysdeps/linux/common/wait3.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/wait3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/wait3.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,20 +5,12 @@
- */
-
- #include <sys/syscall.h>
- -#include <sys/types.h>
- -#include <sys/wait.h>
- -#include <sys/resource.h>
-
- -#if defined __USE_BSD
- +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- +# include <sys/wait.h>
-
- -
- -/* Wait for a child to exit. When one does, put its status in *STAT_LOC and
- - * return its process ID. For errors return (pid_t) -1. If USAGE is not nil,
- - * store information about the child's resource usage (as a `struct rusage')
- - * there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
- - * children; otherwise don't. */
- -pid_t wait3 (__WAIT_STATUS stat_loc, int options, struct rusage * usage)
- +pid_t wait3(__WAIT_STATUS stat_loc, int options, struct rusage *usage)
- {
- - return wait4 (WAIT_ANY, stat_loc, options, usage);
- + return __wait4_nocancel(WAIT_ANY, stat_loc, options, usage);
- }
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/wait4.c uClibc/libc/sysdeps/linux/common/wait4.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/wait4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/wait4.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,18 +8,16 @@
- */
-
- #include <sys/syscall.h>
- -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- #include <sys/wait.h>
- -#include <sys/resource.h>
-
- +# define __NR___syscall_wait4 __NR_wait4
- +static __always_inline _syscall4(int, __syscall_wait4, __kernel_pid_t, pid,
- + int *, status, int, opts, struct rusage *, rusage)
-
- -#define __NR___syscall_wait4 __NR_wait4
- -static __inline__ _syscall4(int, __syscall_wait4, __kernel_pid_t, pid,
- - int *, status, int, opts, struct rusage *, rusage)
- -
- -pid_t wait4(pid_t pid, int *status, int opts, struct rusage *rusage)
- +pid_t __wait4_nocancel(pid_t pid, int *status, int opts, struct rusage *rusage)
- {
- - return (__syscall_wait4(pid, status, opts, rusage));
- + return __syscall_wait4(pid, status, opts, rusage);
- }
- -libc_hidden_def(wait4)
- +#ifdef __USE_BSD
- +strong_alias(__wait4_nocancel,wait4)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/wait.c uClibc/libc/sysdeps/linux/common/wait.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/wait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/wait.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,41 +4,11 @@
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
- -#include <stdlib.h>
- -#include <syscall.h>
- -#include <sys/types.h>
- #include <sys/wait.h>
- -#include <sys/resource.h>
- +#include <cancel.h>
-
- -extern __typeof(wait) __libc_wait;
- -/* Wait for a child to die. When one does, put its status in *STAT_LOC
- - * and return its process ID. For errors, return (pid_t) -1. */
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <errno.h>
- -#include <sysdep-cancel.h>
- -
- -pid_t attribute_hidden
- -__libc_wait (__WAIT_STATUS_DEFN stat_loc)
- -{
- - if (SINGLE_THREAD_P)
- - return INLINE_SYSCALL (wait4, 4, WAIT_ANY, stat_loc, 0,
- - (struct rusage *) NULL);
- -
- - int oldtype = LIBC_CANCEL_ASYNC ();
- -
- - pid_t result = INLINE_SYSCALL (wait4, 4, WAIT_ANY, stat_loc, 0,
- - (struct rusage *) NULL);
- -
- - LIBC_CANCEL_RESET (oldtype);
- -
- - return result;
- -}
- -#else
- -/* Wait for a child to die. When one does, put its status in *STAT_LOC
- - * and return its process ID. For errors, return (pid_t) -1. */
- -__pid_t __libc_wait (__WAIT_STATUS_DEFN stat_loc)
- +static pid_t __NC(wait)(__WAIT_STATUS_DEFN stat_loc)
- {
- - return wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL);
- + return __wait4_nocancel(WAIT_ANY, stat_loc, 0, (struct rusage *)NULL);
- }
- -#endif
- -weak_alias(__libc_wait,wait)
- +CANCELLABLE_SYSCALL(pid_t, wait, (__WAIT_STATUS_DEFN stat_loc), (stat_loc))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/waitid.c uClibc/libc/sysdeps/linux/common/waitid.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/waitid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/waitid.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,43 +8,19 @@
- #include <features.h>
-
- #if defined __USE_SVID || defined __USE_XOPEN
- -# include <string.h>
- -# include <sys/types.h>
- -# include <sys/wait.h>
- -# include <sys/syscall.h>
- -
- -# ifdef __NR_waitid
- -
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -# include <sysdep-cancel.h>
- -# else
- -# define SINGLE_THREAD_P 1
- -# endif
-
- -/* The waitid() POSIX interface takes 4 arguments, but the kernel function
- - * actually takes 5. The fifth is a pointer to struct rusage. Make sure
- - * we pass NULL rather than letting whatever was in the register bleed up.
- - */
- -#define __NR_waitid5 __NR_waitid
- -static __always_inline
- -_syscall5(int, waitid5, idtype_t, idtype, id_t, id, siginfo_t*, infop,
- - int, options, struct rusage*, ru)
- -# endif
- +#include <sys/syscall.h>
- +#include <sys/wait.h>
- +#include <cancel.h>
- +#ifndef __NR_waitid
- +# include <string.h>
- +#endif
-
- -int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options)
- +static int __NC(waitid)(idtype_t idtype, id_t id, siginfo_t *infop, int options)
- {
- -# ifdef __NR_waitid
- - if (SINGLE_THREAD_P)
- - return waitid5(idtype, id, infop, options, NULL);
- -
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = waitid5(idtype, id, infop, options, NULL);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -# endif
- -
- -# elif defined __NR_waitpid
- +#ifdef __NR_waitid
- + return INLINE_SYSCALL(waitid, 5, idtype, id, infop, options, NULL);
- +#else
- switch (idtype) {
- case P_PID:
- if (id <= 0)
- @@ -65,17 +41,17 @@
- }
-
- memset(infop, 0, sizeof *infop);
- - infop->si_pid = waitpid(id, &infop->si_status, options
- -# ifdef WEXITED
- + infop->si_pid = __NC(waitpid)(id, &infop->si_status, options
- +# ifdef WEXITED
- &~ WEXITED
- -# endif
- +# endif
- );
- if (infop->si_pid < 0)
- return infop->si_pid;
- return 0;
- -# else
- - __set_errno(ENOSYS);
- - return -1;
- -# endif
- +#endif
- }
- +CANCELLABLE_SYSCALL(int, waitid, (idtype_t idtype, id_t id, siginfo_t *infop, int options),
- + (idtype, id, infop, options))
- +
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/waitpid.c uClibc/libc/sysdeps/linux/common/waitpid.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/waitpid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/waitpid.c 2014-02-03 12:32:56.000000000 +0100
- @@ -6,32 +6,16 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <stdlib.h>
- -#include <sys/types.h>
- #include <sys/wait.h>
- -#include <sys/resource.h>
- +#include <cancel.h>
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include "sysdep-cancel.h"
- -#else
- -#define SINGLE_THREAD_P 1
- -#endif
- -
- -libc_hidden_proto(wait4)
- -
- -extern __typeof(waitpid) __libc_waitpid;
- -__pid_t __libc_waitpid(__pid_t pid, int *wait_stat, int options)
- +pid_t __NC(waitpid)(pid_t pid, int *wait_stat, int options)
- {
- - if (SINGLE_THREAD_P)
- - return wait4(pid, wait_stat, options, NULL);
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - int result = wait4(pid, wait_stat, options, NULL);
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- +#if 1 /* kernel/exit.c says to avoid waitpid syscall */
- + return __wait4_nocancel(pid, wait_stat, options, NULL);
- +#else
- + return INLINE_SYSCALL(waitpid, 3, pid, wait_stat, options);
- #endif
- }
- -libc_hidden_proto(waitpid)
- -weak_alias(__libc_waitpid,waitpid)
- -libc_hidden_weak(waitpid)
- +CANCELLABLE_SYSCALL(pid_t, waitpid, (pid_t pid, int *wait_stat, int options), (pid, wait_stat, options))
- +lt_libc_hidden(waitpid)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/write.c uClibc/libc/sysdeps/linux/common/write.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/write.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/write.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,17 +9,11 @@
-
- #include <sys/syscall.h>
- #include <unistd.h>
- +#include <cancel.h>
-
- -_syscall3(ssize_t, write, int, fd, const __ptr_t, buf, size_t, count)
- -#ifndef __LINUXTHREADS_OLD__
- -libc_hidden_def(write)
- -#else
- -libc_hidden_weak(write)
- -strong_alias(write,__libc_write)
- -#endif
- +#define __NR___write_nocancel __NR_write
- +_syscall3(ssize_t, __NC(write), int, fd, const void *, buf, size_t, count)
-
- -#if 0
- -/* Stupid libgcc.a from gcc 2.95.x uses __write in pure.o
- - * which is a blatant GNU libc-ism... */
- -strong_alias(write,__write)
- -#endif
- +CANCELLABLE_SYSCALL(ssize_t, write, (int fd, const void *buf, size_t count),
- + (fd, buf, count))
- +lt_libc_hidden(write)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/writev.c uClibc/libc/sysdeps/linux/common/writev.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/writev.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/writev.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,42 +9,20 @@
-
- #include <sys/syscall.h>
- #include <sys/uio.h>
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <errno.h>
- -#include <sysdep-cancel.h>
- +#include <cancel.h>
-
- /* We should deal with kernel which have a smaller UIO_FASTIOV as well
- as a very big count. */
- -static ssize_t __writev (int fd, const struct iovec *vector, int count)
- +static ssize_t __NC(writev)(int fd, const struct iovec *vector, int count)
- {
- - ssize_t bytes_written;
- -
- - bytes_written = INLINE_SYSCALL (writev, 3, fd, vector, count);
- -
- - if (bytes_written >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
- - return bytes_written;
- -
- - /* glibc tries again, but we do not. */
- - /* return __atomic_writev_replacement (fd, vector, count); */
- -
- - return -1;
- -}
- -
- -ssize_t writev (int fd, const struct iovec *vector, int count)
- -{
- - if (SINGLE_THREAD_P)
- - return __writev (fd, vector, count);
- -
- - int oldtype = LIBC_CANCEL_ASYNC ();
- + ssize_t bytes_written = INLINE_SYSCALL(writev, 3, fd, vector, count);
-
- - ssize_t result = __writev (fd, vector, count);
- + if (bytes_written >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
- + return bytes_written;
-
- - LIBC_CANCEL_RESET (oldtype);
- + /* glibc tries again, but we do not. */
- + /* return __atomic_writev_replacement (fd, vector, count); */
-
- - return result;
- + return -1;
- }
- -#else
- -_syscall3(ssize_t, writev, int, filedes, const struct iovec *, vector,
- - int, count)
- -#endif
- +CANCELLABLE_SYSCALL(ssize_t, writev, (int fd, const struct iovec *vector, int count), (fd, vector, count))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/xstatconv.c uClibc/libc/sysdeps/linux/common/xstatconv.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/xstatconv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/xstatconv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>.
-
- Modified for uClibc by Erik Andersen <andersen@codepoet.org>
- */
-
- -#include <sys/syscall.h>
- #include <sys/stat.h>
- #include <string.h>
- #include "xstatconv.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/xstatconv.h uClibc/libc/sysdeps/linux/common/xstatconv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common/xstatconv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/common/xstatconv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>.
-
- Modified for uClibc by Erik Andersen <andersen@codepoet.org>
- */
- @@ -23,11 +22,14 @@
- /* Pull in whatever this particular arch's kernel thinks the kernel version of
- * struct stat should look like. It turns out that each arch has a different
- * opinion on the subject, and different kernel revs use different names... */
- +#include <features.h>
- #include <bits/kernel_stat.h>
-
- +#ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
- extern void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf) attribute_hidden;
- extern void __xstat32_conv(struct kernel_stat64 *kbuf, struct stat *buf) attribute_hidden;
- #if defined __UCLIBC_HAS_LFS__
- extern void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf) attribute_hidden;
- #endif
- +#endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/align64bit.h uClibc/libc/sysdeps/linux/common-generic/bits/align64bit.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/align64bit.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common-generic/bits/align64bit.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,17 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _ALIGN_64_BIT_H
- +#define _ALIGN_64_BIT_H
- +
- +/* Simple macro for getting the 64-bit struct arch alignment */
- +
- +struct __longlong_aligned { long long x; };
- +
- +#define __ARCH_64BIT_ALIGNMENT__ \
- + __attribute__((aligned(__alignof__(struct __longlong_aligned))))
- +
- +#endif /* bits/align64bit.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/dirent.h uClibc/libc/sysdeps/linux/common-generic/bits/dirent.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/dirent.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common-generic/bits/dirent.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,53 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _DIRENT_H
- +# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
- +#endif
- +
- +#include <bits/align64bit.h>
- +#include <endian.h>
- +
- +struct dirent
- + {
- +#ifndef __USE_FILE_OFFSET64
- +# if __BYTE_ORDER == __LITTLE_ENDIAN
- + __U32_TYPE d_ino;
- + __U32_TYPE __pad1;
- + __S32_TYPE d_off;
- + __S32_TYPE __pad2;
- +# else
- + __U32_TYPE __pad1;
- + __U32_TYPE d_ino;
- + __S32_TYPE __pad2;
- + __S32_TYPE d_off;
- +# endif /* __LITTLE_ENDIAN */
- +#else
- + __U64_TYPE d_ino;
- + __S64_TYPE d_off;
- +#endif
- + unsigned short int d_reclen;
- + unsigned char d_type;
- + char d_name[256]; /* We must not include limits.h! */
- + } __ARCH_64BIT_ALIGNMENT__;
- +
- +#ifdef __USE_LARGEFILE64
- +struct dirent64
- + {
- + __U64_TYPE d_ino;
- + __S64_TYPE d_off;
- + unsigned short int d_reclen;
- + unsigned char d_type;
- + char d_name[256]; /* We must not include limits.h! */
- + };
- +#endif
- +
- +#define d_fileno d_ino /* Backwards compatibility. */
- +
- +#undef _DIRENT_HAVE_D_NAMLEN
- +#define _DIRENT_HAVE_D_RECLEN
- +#define _DIRENT_HAVE_D_OFF
- +#define _DIRENT_HAVE_D_TYPE
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/kernel_stat.h uClibc/libc/sysdeps/linux/common-generic/bits/kernel_stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/kernel_stat.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common-generic/bits/kernel_stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,28 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _BITS_STAT_STRUCT_H
- +#define _BITS_STAT_STRUCT_H
- +
- +#include <sys/stat.h>
- +
- +/*
- + * The stat structure defined in
- + * libc/sysdeps/linux/common-generic/bits/stat.h
- + * is the same as the kernel one for new architectures
- + *
- + * For the common-generic ABI we really don't need this file at all
- + * However that requires more #ifndef in relevant wrappers,
- + * further uglifying them
- + */
- +#if defined __UCLIBC_HAS_LFS__
- +#define kernel_stat64 stat64
- +#else
- +#define kernel_stat64 stat
- +#endif
- +
- +#endif /* _BITS_STAT_STRUCT_H */
- +
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/statfs.h uClibc/libc/sysdeps/linux/common-generic/bits/statfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/statfs.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common-generic/bits/statfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,78 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _SYS_STATFS_H
- +# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
- +#endif
- +
- +#include <endian.h>
- +#include <bits/align64bit.h>
- +#include <bits/types.h>
- +
- +
- +struct statfs
- + {
- + __U32_TYPE f_type;
- + __U32_TYPE f_bsize;
- +#ifndef __USE_FILE_OFFSET64
- +# if __BYTE_ORDER == __LITTLE_ENDIAN
- + __U32_TYPE f_blocks;
- + __U32_TYPE __pad1;
- + __U32_TYPE f_bfree;
- + __U32_TYPE __pad2;
- + __U32_TYPE f_bavail;
- + __U32_TYPE __pad3;
- + __U32_TYPE f_files;
- + __U32_TYPE __pad4;
- + __U32_TYPE f_ffree;
- + __U32_TYPE __pad5;
- +# else
- + __U32_TYPE __pad1;
- + __U32_TYPE f_blocks;
- + __U32_TYPE __pad2;
- + __U32_TYPE f_bfree;
- + __U32_TYPE __pad3;
- + __U32_TYPE f_bavail;
- + __U32_TYPE __pad4;
- + __U32_TYPE f_files;
- + __U32_TYPE __pad5;
- + __U32_TYPE f_ffree;
- +# endif /* __LITTLE_ENDIAN */
- +#else
- + __U64_TYPE f_blocks;
- + __U64_TYPE f_bfree;
- + __U64_TYPE f_bavail;
- + __U64_TYPE f_files;
- + __U64_TYPE f_ffree;
- +#endif /* __USE_FILE_OFFSET64 */
- + __fsid_t f_fsid;
- + __U32_TYPE f_namelen;
- + __U32_TYPE f_frsize;
- + __U32_TYPE f_flags;
- + __U32_TYPE f_spare[4];
- + } __ARCH_64BIT_ALIGNMENT__;
- +
- +#ifdef __USE_LARGEFILE64
- +struct statfs64
- + {
- + __U32_TYPE f_type;
- + __U32_TYPE f_bsize;
- + __U64_TYPE f_blocks;
- + __U64_TYPE f_bfree;
- + __U64_TYPE f_bavail;
- + __U64_TYPE f_files;
- + __U64_TYPE f_ffree;
- + __fsid_t f_fsid;
- + __U32_TYPE f_namelen;
- + __U32_TYPE f_frsize;
- + __U32_TYPE f_flags;
- + __U32_TYPE f_spare[4];
- + };
- +#endif
- +
- +/* Tell code we have these members. */
- +#define _STATFS_F_NAMELEN
- +#define _STATFS_F_FRSIZE
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/stat.h uClibc/libc/sysdeps/linux/common-generic/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/stat.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/common-generic/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,195 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _SYS_STAT_H
- +# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- +#endif
- +
- +#include <bits/align64bit.h>
- +#include <endian.h>
- +
- +/* Versions of the `struct stat' data structure. */
- +#define _STAT_VER_LINUX_OLD 1
- +#define _STAT_VER_KERNEL 1
- +#define _STAT_VER_SVR4 2
- +#define _STAT_VER_LINUX 3
- +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
- +
- +/* Versions of the `xmknod' interface. */
- +#define _MKNOD_VER_LINUX 1
- +#define _MKNOD_VER_SVR4 2
- +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
- +
- +/*
- + * For 32-bit architectures, this struct is similar to the stat64 but it
- + * uses 32-bit members along with 32-bit padding. For 64-bit architectures
- + * this struct is exactly the same with the stat64 one
- + */
- +struct stat
- + {
- +#ifndef __USE_FILE_OFFSET64
- +# if __BYTE_ORDER == __LITTLE_ENDIAN
- + unsigned long st_dev; /* Device. */
- + unsigned long __pad1;
- + unsigned long st_ino; /* 32bit file serial number. */
- + unsigned long __pad2;
- + unsigned int st_mode; /* File mode. */
- + unsigned int st_nlink; /* Link count. */
- + unsigned int st_uid; /* User ID of the file's owner. */
- + unsigned int st_gid; /* Group ID of the file's group.*/
- + unsigned long st_rdev; /* Device number, if device. */
- + unsigned long __pad3;
- + unsigned long long __pad4;
- + long st_size; /* SIze of file, in bytes. */
- + long __pad5;
- + int st_blksize; /* Optimal block size for I/O. */
- + int __pad6;
- + long st_blocks; /* Number 512-byte blocks allocated */
- + long __pad7;
- +# else
- + unsigned long __pad1;
- + unsigned long st_dev; /* Device. */
- + unsigned long __pad2;
- + unsigned long st_ino; /* 32bit file serial number. */
- + unsigned int st_mode; /* File mode. */
- + unsigned int st_nlink; /* Link count. */
- + unsigned int st_uid; /* User ID of the file's owner. */
- + unsigned int st_gid; /* Group ID of the file's group.*/
- + unsigned long __pad3;
- + unsigned long st_rdev; /* Device number, if device. */
- + unsigned long long __pad4;
- + long __pad5;
- + long st_size; /* Size of file, in bytes. */
- + int st_blksize; /* Optimal block size for I/O. */
- + int __pad6;
- + long __pad7;
- + long st_blocks; /* Number 512-byte blocks allocated */
- +# endif /* __LITTLE_ENDIAN */
- +#else
- + unsigned long long st_dev; /* Device. */
- + unsigned long long st_ino; /* 32bit file serial number. */
- + unsigned int st_mode; /* File mode. */
- + unsigned int st_nlink; /* Link count. */
- + unsigned int st_uid; /* User ID of the file's owner. */
- + unsigned int st_gid; /* Group ID of the file's group.*/
- + unsigned long long st_rdev; /* Device number, if device. */
- + unsigned long long _pad1;
- + long long st_size; /* SIze of file, in bytes. */
- + int st_blksize; /* Optimal block size for I/O. */
- + int __pad2;
- + long long st_blocks; /* Number 512-byte blocks allocated */
- +#endif
- +#ifdef __USE_MISC
- + /* Nanosecond resolution timestamps are stored in a format
- + equivalent to 'struct timespec'. This is the type used
- + whenever possible but the Unix namespace rules do not allow the
- + identifier 'timespec' to appear in the <sys/stat.h> header.
- + Therefore we have to handle the use of this header in strictly
- + standard-compliant sources special. */
- + struct timespec st_atim; /* Time of last access. */
- + struct timespec st_mtim; /* Time of last modification. */
- + struct timespec st_ctim; /* Time of last status change. */
- +# define st_atime st_atim.tv_sec /* Backward compatibility. */
- +# define st_mtime st_mtim.tv_sec
- +# define st_ctime st_ctim.tv_sec
- +#else
- +# ifndef __USE_FILE_OFFSET64
- + long st_atime; /* Time of last access. */
- + unsigned long st_atime_nsec;
- + long st_mtime; /* Time of last modification. */
- + unsigned long st_mtime_nsec;
- + long st_ctime; /* Time of last status change. */
- + unsigned long st_ctime_nsec;
- +# else
- + int st_atime; /* Time of last access. */
- + unsigned int st_atime_nsec;
- + int st_mtime; /* Time of last modification. */
- + unsigned int st_mtime_nsec;
- + int st_ctime; /* Time of last status change. */
- + unsigned int st_ctime_nsec;
- +# endif
- +#endif
- + unsigned int __unused4;
- + unsigned int __unused5;
- + } __ARCH_64BIT_ALIGNMENT__;
- +
- +
- +#ifdef __USE_LARGEFILE64
- +struct stat64
- + {
- + unsigned long long st_dev; /* Device. */
- + unsigned long long st_ino; /* 32bit file serial number. */
- + unsigned int st_mode; /* File mode. */
- + unsigned int st_nlink; /* Link count. */
- + unsigned int st_uid; /* User ID of the file's owner. */
- + unsigned int st_gid; /* Group ID of the file's group.*/
- + unsigned long long st_rdev; /* Device number, if device. */
- + unsigned long long __pad3;
- + long long st_size; /* Size of file, in bytes. */
- + int st_blksize; /* Optimal block size for I/O. */
- + int __pad4;
- + long long st_blocks; /* Number 512-byte blocks allocated */
- +# ifdef __USE_MISC
- + /* Nanosecond resolution timestamps are stored in a format
- + equivalent to 'struct timespec'. This is the type used
- + whenever possible but the Unix namespace rules do not allow the
- + identifier 'timespec' to appear in the <sys/stat.h> header.
- + Therefore we have to handle the use of this header in strictly
- + standard-compliant sources special. */
- + struct timespec st_atim; /* Time of last access. */
- + struct timespec st_mtim; /* Time of last modification. */
- + struct timespec st_ctim; /* Time of last status change. */
- +# else
- + int st_atime; /* Time of last access. */
- + unsigned int st_atime_nsec;
- + int st_mtime; /* Time of last modification. */
- + unsigned int st_mtime_nsec;
- + int st_ctime; /* Time of last status change. */
- + unsigned int st_ctime_nsec;
- +# endif
- + unsigned int __unused4;
- + unsigned int __unused5;
- +};
- +#endif
- +
- +/* Tell code we have these members. */
- +#define _STATBUF_ST_BLKSIZE
- +#define _STATBUF_ST_RDEV
- +/* Nanosecond resolution time values are supported. */
- +#define _STATBUF_ST_NSEC
- +
- +/* Encoding of the file mode. */
- +
- +#define __S_IFMT 0170000 /* These bits determine file type. */
- +
- +/* File types. */
- +#define __S_IFDIR 0040000 /* Directory. */
- +#define __S_IFCHR 0020000 /* Character device. */
- +#define __S_IFBLK 0060000 /* Block device. */
- +#define __S_IFREG 0100000 /* Regular file. */
- +#define __S_IFIFO 0010000 /* FIFO. */
- +#define __S_IFLNK 0120000 /* Symbolic link. */
- +#define __S_IFSOCK 0140000 /* Socket. */
- +
- +/* POSIX.1b objects. Note that these macros always evaluate to zero. But
- + they do it by enforcing the correct use of the macros. */
- +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
- +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
- +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
- +
- +/* Protection bits. */
- +
- +#define __S_ISUID 04000 /* Set user ID on execution. */
- +#define __S_ISGID 02000 /* Set group ID on execution. */
- +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
- +#define __S_IREAD 0400 /* Read by owner. */
- +#define __S_IWRITE 0200 /* Write by owner. */
- +#define __S_IEXEC 0100 /* Execute by owner. */
- +
- +#ifdef __USE_ATFILE
- +# define UTIME_NOW ((1l << 30) - 1l)
- +# define UTIME_OMIT ((1l << 30) - 2l)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/fcntl.h uClibc/libc/sysdeps/linux/cris/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/kernel_types.h uClibc/libc/sysdeps/linux/cris/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -28,6 +28,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- #ifdef __GNUC__
- typedef long long __kernel_loff_t;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/setjmp.h uClibc/libc/sysdeps/linux/cris/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- +/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,11 +12,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -/* Define the machine-dependent type `jmp_buf'. CRIS version. */
- +/* Define the machine-dependent type `jmp_buf', CRIS version. */
- #ifndef _BITS_SETJMP_H
- #define _BITS_SETJMP_H 1
-
- @@ -24,10 +23,8 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -/*
- - Note that we save and restore CCR to be able to
- - correctly handle DI/EI. Note also that the "move x,ccr" does NOT affect
- - the DMA enable bits (E and D).
- +/* Note that saving and restoring CCR has no meaning in user mode, so we
- + don't actually do it; the slot is now reserved.
-
- jmp_buf[0] - PC
- jmp_buf[1] - SP (R14)
- @@ -46,21 +43,8 @@
- jmp_buf[14] - R1
- jmp_buf[15] - R0
- jmp_buf[16] - SRP
- - jmp_buf[17] - CCR
- - */
- + jmp_buf[17] - CCR */
-
- -#define _JBLEN 18
- -#if defined (__USE_MISC) || defined (_ASM)
- -#define JB_SP 1
- -#endif
- -
- -#ifndef _ASM
- -typedef int __jmp_buf[_JBLEN];
- -#endif
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)[JB_SP])
- +typedef int __jmp_buf[18];
-
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/stackinfo.h uClibc/libc/sysdeps/linux/cris/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/termios.h uClibc/libc/sysdeps/linux/cris/bits/termios.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/bits/termios.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TERMIOS_H
- # error "Never include <bits/termios.h> directly; use <termios.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #define __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/uClibc_page.h uClibc/libc/sysdeps/linux/cris/bits/uClibc_page.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/bits/uClibc_page.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* Supply an architecture specific value for PAGE_SIZE and friends. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/wordsize.h uClibc/libc/sysdeps/linux/cris/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,7 +13,6 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/clone.S uClibc/libc/sysdeps/linux/cris/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <sys/syscall.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/fork.c uClibc/libc/sysdeps/linux/cris/fork.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/fork.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,18 +0,0 @@
- -/*
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include "sysdep.h"
- -
- -#define __NR___libc_fork __NR_fork
- -SYSCALL__ (__libc_fork, 0)
- - /* R1 is now 0 for the parent and 1 for the child. Decrement it to
- - make it -1 (all bits set) for the parent, and 0 (no bits set)
- - for the child. Then AND it with R0, so the parent gets
- - R0&-1==R0, and the child gets R0&0==0. */
- - /* i dunno what the blurb above is useful for. we just return. */
- -__asm__("ret\n\tnop");
- -weak_alias(__libc_fork,fork)
- -libc_hidden_weak(fork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/cris/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/cris/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,8 @@
- +/* Private macros for accessing __jmp_buf contents. BFIN version. */
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#define JB_SP 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/cris/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/cris/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,12 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)[JB_SP])
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/__longjmp.S uClibc/libc/sysdeps/linux/cris/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,14 +14,9 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- #include "sysdep.h"
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
-
- .syntax no_register_prefix
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/Makefile.arch uClibc/libc/sysdeps/linux/cris/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,9 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := __init_brk.c brk.c sbrk.c
- +CSRC-y := __init_brk.c brk.c sbrk.c
-
- -SSRC := setjmp.S __longjmp.S clone.S sysdep.S syscall.S vfork.S
- -ifeq ($(UNIFIED_SYSCALL),y)
- -SSRC += __uClibc_syscall.S
- -endif
- +SSRC-y := setjmp.S __longjmp.S clone.S sysdep.S syscall.S vfork.S
- +SSRC-$(UNIFIED_SYSCALL) += __uClibc_syscall.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/setjmp.S uClibc/libc/sysdeps/linux/cris/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,13 +14,9 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include "sysdep.h"
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
-
- .syntax no_register_prefix
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/sys/procfs.h uClibc/libc/sysdeps/linux/cris/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/sys/ucontext.h uClibc/libc/sysdeps/linux/cris/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* System V/cris ABI compliant context switching support. */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/syscall.S uClibc/libc/sysdeps/linux/cris/syscall.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/syscall.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/syscall.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include "sysdep.h"
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/sysdep.h uClibc/libc/sysdeps/linux/cris/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,13 +14,12 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYSDEP_H_
- #define _SYSDEP_H_
-
- -#include <sys/syscall.h>
- +#include <common/sysdep.h>
-
- #ifndef C_LABEL
-
- @@ -126,6 +125,14 @@
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME (name), function) @ \
- .align ALIGNARG (2) @ \
- C_LABEL(name)
- +
- +#define HIDDEN_ENTRY(name) \
- + .text @ \
- + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (name) @ \
- + .hidden C_SYMBOL_NAME (name) @ \
- + ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME (name), function) @ \
- + .align ALIGNARG (2) @ \
- + C_LABEL(name)
-
- #undef END
- #define END(name) \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/sysdep.S uClibc/libc/sysdeps/linux/cris/sysdep.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/sysdep.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/sysdep.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include "sysdep.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/vfork.S uClibc/libc/sysdeps/linux/cris/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/cris/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,7 +16,7 @@
- * enclosing function
- */
-
- -ENTRY(__vfork)
- +HIDDEN_ENTRY(__vfork)
- movu.w __NR_vfork,$r9
- break 13
- cmps.w -4096,$r10
- @@ -27,4 +27,4 @@
- PSEUDO_END(__vfork)
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fcntl.h uClibc/libc/sysdeps/linux/e1/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fenv.h uClibc/libc/sysdeps/linux/e1/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fenvinline.h uClibc/libc/sysdeps/linux/e1/bits/fenvinline.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fenvinline.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/bits/fenvinline.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_MATH_INLINES
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/kernel_types.h uClibc/libc/sysdeps/linux/e1/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -31,6 +31,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- /*
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/unistd.h uClibc/libc/sysdeps/linux/e1/bits/unistd.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/unistd.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/bits/unistd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -378,13 +378,6 @@
- return (type)(par1); \
- }
-
- -#include <sys/types.h>
- -/* Taken from <bits/errno.h> */
- -#ifndef _LIBC
- -/* We don't support pthreads for the moment*/
- -#define __set_errno(val) ((errno) = (val))
- -#endif
- -
- #if 0
- #define _syscall3(type, name,atype, a , btype, b, ctype, c) \
- type name(atype a, btype b, ctype c,) \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/wordsize.h uClibc/libc/sysdeps/linux/e1/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/crt1.c uClibc/libc/sysdeps/linux/e1/crt1.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/crt1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/crt1.c 2014-02-03 12:32:56.000000000 +0100
- @@ -18,8 +18,8 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* Stick in a dummy reference to main(), so that if an application
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/Makefile uClibc/libc/sysdeps/linux/e1/Makefile
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -17,7 +17,7 @@
- CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-
- # why is crt1.c listed in CSRC ?
- -CSRC := crt1.c syscalls.c longjmp.c setjmp.c vfork.c
- +CSRC := crt1.c syscalls.c longjmp.c setjmp.c
- OBJS := $(patsubst %.c,%.o, $(CSRC))
-
- OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/procfs.h uClibc/libc/sysdeps/linux/e1/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/reg.h uClibc/libc/sysdeps/linux/e1/sys/reg.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/reg.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/sys/reg.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_REG_H
- #define _SYS_REG_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/ucontext.h uClibc/libc/sysdeps/linux/e1/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* System V/m68k ABI compliant context switching support. */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/vfork.c uClibc/libc/sysdeps/linux/e1/vfork.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/vfork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/e1/vfork.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,14 +0,0 @@
- -/*
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <sys/types.h>
- -#include <sys/syscall.h>
- -#include <errno.h>
- -
- -#define __NR___vfork __NR_vfork
- -attribute_hidden _syscall0(pid_t, __vfork)
- -weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/elf-fdpic.h uClibc/libc/sysdeps/linux/frv/bits/elf-fdpic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/elf-fdpic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/bits/elf-fdpic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -22,8 +22,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_ELF_FDPIC_H
- #define _BITS_ELF_FDPIC_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/fcntl.h uClibc/libc/sysdeps/linux/frv/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/setjmp.h uClibc/libc/sysdeps/linux/frv/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. FRV version. */
-
- @@ -35,7 +34,6 @@
- #define __SETJMP_FP (__SETJMP_SP+1)
-
-
- -#ifndef _ASM
- typedef struct
- /* Demand 64-bit alignment such that we can use std/ldd in
- setjmp/longjmp. */
- @@ -48,11 +46,5 @@
- unsigned long __sp; /* stack pointer */
- unsigned long __fp; /* frame pointer */
- } __jmp_buf[1];
- -#endif
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)->__sp)
-
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/stackinfo.h uClibc/libc/sysdeps/linux/frv/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/stat.h uClibc/libc/sysdeps/linux/frv/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/syscalls.h uClibc/libc/sysdeps/linux/frv/bits/syscalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/bits/syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,7 @@
- # define __syscall_return(type, res) \
- do { \
- unsigned long __sr2 = (res); \
- - if (__builtin_expect ((unsigned long)(__sr2) \
- - >= (unsigned long)(-4095), 0)) { \
- + if (unlikely ((unsigned long)(__sr2) >= (unsigned long)(-4095))) { \
- extern int __syscall_error (int); \
- return (type) __syscall_error (__sr2); \
- } \
- @@ -26,8 +25,7 @@
- # define __syscall_return(type, res) \
- do { \
- unsigned long __sr2 = (res); \
- - if (__builtin_expect ((unsigned long)(__sr2) \
- - >= (unsigned long)(-4095), 0)) { \
- + if (unlikely ((unsigned long)(__sr2) >= (unsigned long)(-4095))) { \
- __set_errno (-__sr2); \
- __sr2 = -1; \
- } \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/uClibc_page.h uClibc/libc/sysdeps/linux/frv/bits/uClibc_page.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/bits/uClibc_page.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* Supply an architecture specific value for PAGE_SIZE and friends. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/wordsize.h uClibc/libc/sysdeps/linux/frv/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/clone.S uClibc/libc/sysdeps/linux/frv/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/crt0.S uClibc/libc/sysdeps/linux/frv/crt0.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/crt0.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/crt0.S 2014-02-03 12:32:56.000000000 +0100
- @@ -22,8 +22,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
-
- /* Based on ../i386/crt0.S and newlib's libgloss/frv/crt0.S */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/crti.S uClibc/libc/sysdeps/linux/frv/crti.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/crti.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/crti.S 2014-02-03 12:32:56.000000000 +0100
- @@ -22,8 +22,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- .section .init,"x"
- .p2align 2
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/crtn.S uClibc/libc/sysdeps/linux/frv/crtn.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/crtn.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/crtn.S 2014-02-03 12:32:56.000000000 +0100
- @@ -22,8 +22,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- .section .init,"x"
- .globl _init
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/crtreloc.c uClibc/libc/sysdeps/linux/frv/crtreloc.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/crtreloc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/crtreloc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -23,8 +23,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- #include <sys/types.h>
- #include <link.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/dl-iterate-phdr.c uClibc/libc/sysdeps/linux/frv/dl-iterate-phdr.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/dl-iterate-phdr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/dl-iterate-phdr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- #include <link.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/fstat64.c uClibc/libc/sysdeps/linux/frv/fstat64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/fstat64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/fstat64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,11 +9,9 @@
- * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
- */
-
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- -#include <unistd.h>
- #include <sys/stat.h>
-
- -#ifdef __UCLIBC_HAS_LFS__
- _syscall2(int, fstat64, int, fd, struct stat64 *, buf)
- libc_hidden_def(fstat64)
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/frv/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/frv/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,14 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)->__sp)
- +
- +#endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/__longjmp.S uClibc/libc/sysdeps/linux/frv/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -4,10 +4,6 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
- -
- # setjmp/longjmp for Frv. The jmpbuf looks like this:
- #
- # Register jmpbuf offset
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/lstat64.c uClibc/libc/sysdeps/linux/frv/lstat64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/lstat64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/lstat64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,11 +9,9 @@
- * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
- */
-
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- -#include <unistd.h>
- #include <sys/stat.h>
-
- -#ifdef __UCLIBC_HAS_LFS__
- _syscall2(int, lstat64, const char *, file_name, struct stat64 *, buf)
- libc_hidden_def(lstat64)
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/Makefile uClibc/libc/sysdeps/linux/frv/Makefile
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -17,7 +17,7 @@
- SSRC := __longjmp.S setjmp.S clone.S vfork.S
- SOBJ := $(patsubst %.S,%.o, $(SSRC))
-
- -CSRC = mmap.c sysdep.c syscall.c brk.c sbrk.c __init_brk.c dl-iterate-phdr.c
- +CSRC = sysdep.c syscall.c brk.c sbrk.c __init_brk.c dl-iterate-phdr.c
- CSRC += xstatconv.c stat.c stat64.c fstat.c fstat64.c lstat.c lstat64.c
- COBJ := $(patsubst %.c,%.o, $(CSRC))
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/mmap.c uClibc/libc/sysdeps/linux/frv/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/mmap.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,50 +0,0 @@
- -/* Copyright (C) 1997, 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- - Contributed by Daniel Jacobowitz <dan@debian.org>, 1999.
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -/* Massivly hacked up for uClibc by Erik Andersen */
- -
- -/* Extracted from ../common/mmap64.c by Alexandre Oliva <aoliva@redhat.com>
- -
- - We don't want to use the old mmap interface. */
- -
- -#include <features.h>
- -#include <errno.h>
- -#include <unistd.h>
- -#include <sys/syscall.h>
- -#include <sys/mman.h>
- -
- -
- -#define __NR___syscall_mmap2 __NR_mmap2
- -static __inline__ _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
- - size_t, len, int, prot, int, flags, int, fd, off_t, offset)
- -
- -/* This is always 12, even on architectures where PAGE_SHIFT != 12. */
- -# ifndef MMAP2_PAGE_SHIFT
- -# define MMAP2_PAGE_SHIFT 12
- -# endif
- -
- -__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
- -{
- - if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) {
- - __set_errno (EINVAL);
- - return MAP_FAILED;
- - }
- - return(__syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)));
- -}
- -libc_hidden_def(mmap)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/stat64.c uClibc/libc/sysdeps/linux/frv/stat64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/stat64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/stat64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -9,11 +9,9 @@
- * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
- */
-
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- -#include <unistd.h>
- #include <sys/stat.h>
-
- -#ifdef __UCLIBC_HAS_LFS__
- _syscall2(int, stat64, const char *, file_name, struct stat64 *, buf)
- libc_hidden_def(stat64)
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/procfs.h uClibc/libc/sysdeps/linux/frv/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/ptrace.h uClibc/libc/sysdeps/linux/frv/sys/ptrace.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/sys/ptrace.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PTRACE_H
- #define _SYS_PTRACE_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/ucontext.h uClibc/libc/sysdeps/linux/frv/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/syscall.c uClibc/libc/sysdeps/linux/frv/syscall.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/syscall.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/syscall.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,8 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- #include <features.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/sysdep.c uClibc/libc/sysdeps/linux/frv/sysdep.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/sysdep.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/sysdep.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/vfork.S uClibc/libc/sysdeps/linux/frv/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/frv/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,15 +13,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#include <features.h>
- -
- -#include <asm/unistd.h>
- -#define _ERRNO_H 1
- -#include <bits/errno.h>
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sys/syscall.h>
-
- .text
- .globl __vfork
- @@ -44,4 +39,4 @@
- .size __vfork,.-__vfork
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/byteswap.h uClibc/libc/sysdeps/linux/h8300/bits/byteswap.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/bits/byteswap.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _ASM_BITS_BYTESWAP_H
- #define _ASM_BITS_BYTESWAP_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/fcntl.h uClibc/libc/sysdeps/linux/h8300/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/kernel_types.h uClibc/libc/sysdeps/linux/h8300/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -32,6 +32,8 @@
- typedef unsigned short __kernel_old_gid_t;
- typedef long long __kernel_loff_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/setjmp.h uClibc/libc/sysdeps/linux/h8300/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -9,24 +9,10 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#ifndef _ASM
- -
- typedef struct
- {
- unsigned long __regs[4]; /* save er4 - er7(sp) */
- unsigned long __pc; /* the return address */
- } __jmp_buf[1];
-
- -#endif /* _ASM */
- -
- -#define JB_REGS 0
- -#define JB_PC 16
- -#define JB_SIZE 20
- -
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)->__regs[3])
- -
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/h8300/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT int _code, struct sigcontext *
- #define SIGCONTEXT_EXTRA_ARGS _code,
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/stackinfo.h uClibc/libc/sysdeps/linux/h8300/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bsd-_setjmp.S uClibc/libc/sysdeps/linux/h8300/bsd-_setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/bsd-_setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -1,8 +1,6 @@
- /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. H8/300 version. */
-
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- #ifdef __H8300S__
- .h8300s
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bsd-setjmp.S uClibc/libc/sysdeps/linux/h8300/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -1,8 +1,6 @@
- /* BSD `_setjmp' entry point to `sigsetjmp (..., 1)'. H8/300 version. */
-
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- #ifdef __H8300S__
- .h8300s
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/crt0.S uClibc/libc/sysdeps/linux/h8300/crt0.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/crt0.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/crt0.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/h8300/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/h8300/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,9 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#define JB_REGS 0
- +#define JB_PC 16
- +#define JB_SIZE 20
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/h8300/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/h8300/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,12 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)->__regs[3])
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/__longjmp.S uClibc/libc/sysdeps/linux/h8300/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -20,3 +20,5 @@
- mov.l @er0+,er3 ; return PC
- adds #4,sp ; adjust return stack
- jmp @er3
- +
- +libc_hidden_def(__longjmp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/setjmp.S uClibc/libc/sysdeps/linux/h8300/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -1,6 +1,4 @@
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- #ifdef __H8300S__
- .h8300s
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/sys/procfs.h uClibc/libc/sysdeps/linux/h8300/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/sys/ucontext.h uClibc/libc/sysdeps/linux/h8300/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* H8/300 compliant context switching support. */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/vfork.S uClibc/libc/sysdeps/linux/h8300/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/h8300/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,5 @@
-
- -#include <asm/unistd.h>
- +#include <sys/syscall.h>
-
- #ifndef __NR_vfork
- #define __NR_vfork __NR_fork /* uClinux-2.0 only has fork which is vfork */
- @@ -12,7 +12,6 @@
- #endif
- .text
- .align 2
- - .globl _errno
- .globl ___vfork
- .hidden ___vfork
- .type ___vfork,@function
- @@ -38,4 +37,4 @@
- jmp @er1 /* don't return, just jmp directly */
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/add_n.s uClibc/libc/sysdeps/linux/hppa/add_n.s
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/add_n.s 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/add_n.s 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- ;! License for more details.
-
- ;! You should have received a copy of the GNU Lesser General Public License
- -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- -;! MA 02111-1307, USA.
- +;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
- +;! <http://www.gnu.org/licenses/>.
-
-
- ;! INPUT PARAMETERS
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/atomic.h uClibc/libc/sysdeps/linux/hppa/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,11 +13,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdint.h>
- +#include <errno.h>
- #include <bits/kernel-features.h>
-
- #define ABORT_INSTRUCTION __asm__(__UCLIBC_ABORT_INSTRUCTION__)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/eventfd.h uClibc/libc/sysdeps/linux/hppa/bits/eventfd.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/eventfd.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/hppa/bits/eventfd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,32 @@
- +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library. If not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SYS_EVENTFD_H
- +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
- +#endif
- +
- +/* Flags for signalfd. */
- +enum
- + {
- + EFD_SEMAPHORE = 000000001,
- +#define EFD_SEMAPHORE EFD_SEMAPHORE
- + EFD_CLOEXEC = 010000000,
- +#define EFD_CLOEXEC EFD_CLOEXEC
- +/* the below value looks suspicious, should be 000200004 for consistency */
- + EFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
- +#define EFD_NONBLOCK EFD_NONBLOCK
- + };
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/fcntl.h uClibc/libc/sysdeps/linux/hppa/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/fenv.h uClibc/libc/sysdeps/linux/hppa/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/ipc.h uClibc/libc/sysdeps/linux/hppa/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h uClibc/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,12 +12,4 @@
- unsigned long sa_flags;
- };
-
- -/* In uclibc, userspace struct sigaction is identical to
- - * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
- - * See sigaction.h
- - */
- -
- -extern int __syscall_rt_sigaction (int, const struct sigaction *,
- - struct sigaction *, size_t) attribute_hidden;
- -
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/kernel_types.h uClibc/libc/sysdeps/linux/hppa/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -45,6 +45,8 @@
- typedef unsigned long long __kernel_ino64_t;
-
- typedef unsigned int __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/mman.h uClibc/libc/sysdeps/linux/hppa/bits/mman.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/mman.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MMAN_H
- # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
- @@ -45,7 +44,7 @@
- #define MAP_GROWSDOWN 0x8000 /* stack-like segment */
- #define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
- #define MAP_NONBLOCK 0x20000 /* do not block on IO */
- -#define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
- +#define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
- be uninitialized. */
-
- #define MS_SYNC 1 /* synchronous memory sync */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/setjmp.h uClibc/libc/sysdeps/linux/hppa/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 2000 Free Software Foundation, Inc.
- +/* Copyright (C) 2000, 2005, 2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. HPPA version. */
- #ifndef _BITS_SETJMP_H
- @@ -29,17 +28,6 @@
- easier, and to ensure proper alignment. Naturally, user code should
- not depend on either representation. */
-
- -#if defined __USE_MISC || defined _ASM
- -#define JB_SP (76/4)
- -#endif
- -
- -#ifndef _ASM
- typedef double __jmp_buf[21];
- -#endif
- -
- -/* Test if longjmp to JMPBUF would unwind the frame containing a local
- - variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- - ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
-
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/sigaction.h uClibc/libc/sysdeps/linux/hppa/bits/sigaction.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/sigaction.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/signum.h uClibc/libc/sysdeps/linux/hppa/bits/signum.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/signum.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/signum.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef _SIGNAL_H
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/socket_type.h uClibc/libc/sysdeps/linux/hppa/bits/socket_type.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/socket_type.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/hppa/bits/socket_type.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,54 @@
- +/* Define enum __socket_type for Linux/HP-PARISC.
- + Copyright (C) 2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SYS_SOCKET_H
- +# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
- +#endif
- +
- +/* Types of sockets. */
- +enum __socket_type
- +{
- + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
- + byte streams. */
- +#define SOCK_STREAM SOCK_STREAM
- + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
- + of fixed maximum length. */
- +#define SOCK_DGRAM SOCK_DGRAM
- + SOCK_RAW = 3, /* Raw protocol interface. */
- +#define SOCK_RAW SOCK_RAW
- + SOCK_RDM = 4, /* Reliably-delivered messages. */
- +#define SOCK_RDM SOCK_RDM
- + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- + datagrams of fixed maximum length. */
- +#define SOCK_SEQPACKET SOCK_SEQPACKET
- + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
- +#define SOCK_DCCP SOCK_DCCP
- + SOCK_PACKET = 10, /* Linux specific way of getting packets
- + at the dev level. For writing rarp and
- + other similar things on the user level. */
- +#define SOCK_PACKET SOCK_PACKET
- +
- + /* Flags to be ORed into the type parameter of socket and socketpair. */
- +
- + SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the
- + new descriptor(s). */
- +#define SOCK_CLOEXEC SOCK_CLOEXEC
- + SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as
- + non-blocking. */
- +#define SOCK_NONBLOCK SOCK_NONBLOCK
- +};
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/stackinfo.h uClibc/libc/sysdeps/linux/hppa/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -9,10 +9,10 @@
- #define __UCLIBC_ABORT_INSTRUCTION__ "iitlbp %r0,(%sr0,%r0)"
-
- /* can your target use syscall6() for mmap ? */
- -#undef __UCLIBC_MMAP_HAS_6_ARGS__
- +#define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/brk.c uClibc/libc/sysdeps/linux/hppa/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sys/syscall.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bsd-_setjmp.S uClibc/libc/sysdeps/linux/hppa/bsd-_setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bsd-_setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bsd-setjmp.S uClibc/libc/sysdeps/linux/hppa/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/clone.S uClibc/libc/sysdeps/linux/hppa/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/crt1.S uClibc/libc/sysdeps/linux/hppa/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -30,9 +30,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- .import main, code
- .import $global$, data
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/hppa/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/hppa/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,19 @@
- +/* Private macros for accessing __jmp_buf contents. HPPA version.
- + Copyright (C) 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#define JB_SP (76/4)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/hppa/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/hppa/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,12 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame containing a local
- + variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- + ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/__longjmp.S uClibc/libc/sysdeps/linux/hppa/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#include <features.h>
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* __longjmp(jmpbuf, val) */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/lshift.s uClibc/libc/sysdeps/linux/hppa/lshift.s
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/lshift.s 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/lshift.s 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- ;! License for more details.
-
- ;! You should have received a copy of the GNU Lesser General Public License
- -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- -;! MA 02111-1307, USA.
- +;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
- +;! <http://www.gnu.org/licenses/>.
-
-
- ;! INPUT PARAMETERS
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/Makefile.arch uClibc/libc/sysdeps/linux/hppa/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := __syscall_error.c brk.c mmap.c syscall.c
- +CSRC-y := __syscall_error.c brk.c syscall.c
-
- -SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S \
- +SSRC-y := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S \
- add_n.s lshift.s rshift.s sub_n.s udiv_qrnnd.s
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/mmap.c uClibc/libc/sysdeps/linux/hppa/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/mmap.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,19 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * mmap() for uClibc/x86_64
- - *
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - * Copyright (C) 2005 by Mike Frysinger <vapier@gentoo.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <errno.h>
- -#include <unistd.h>
- -#include <sys/mman.h>
- -#include <sys/syscall.h>
- -
- -
- -_syscall6(void *, mmap, void *, start, size_t, length, int, prot,
- - int, flags, int, fd, off_t, offset)
- -libc_hidden_def(mmap)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/rshift.s uClibc/libc/sysdeps/linux/hppa/rshift.s
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/rshift.s 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/rshift.s 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- ;! License for more details.
-
- ;! You should have received a copy of the GNU Lesser General Public License
- -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- -;! MA 02111-1307, USA.
- +;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
- +;! <http://www.gnu.org/licenses/>.
-
-
- ;! INPUT PARAMETERS
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/setjmp.S uClibc/libc/sysdeps/linux/hppa/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- .text
- .align 4
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sub_n.s uClibc/libc/sysdeps/linux/hppa/sub_n.s
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sub_n.s 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/sub_n.s 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- ;! License for more details.
-
- ;! You should have received a copy of the GNU Lesser General Public License
- -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- -;! MA 02111-1307, USA.
- +;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
- +;! <http://www.gnu.org/licenses/>.
-
-
- ;! INPUT PARAMETERS
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sys/procfs.h uClibc/libc/sysdeps/linux/hppa/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sys/ucontext.h uClibc/libc/sysdeps/linux/hppa/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Don't rely on this, the interface is currently messed up and may need to
- be broken to be fixed. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/syscall.c uClibc/libc/sysdeps/linux/hppa/syscall.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/syscall.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/syscall.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdarg.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/udiv_qrnnd.s uClibc/libc/sysdeps/linux/hppa/udiv_qrnnd.s
- --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/udiv_qrnnd.s 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/hppa/udiv_qrnnd.s 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- ;! License for more details.
-
- ;! You should have received a copy of the GNU Lesser General Public License
- -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- -;! MA 02111-1307, USA.
- +;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
- +;! <http://www.gnu.org/licenses/>.
-
-
- ;! INPUT PARAMETERS
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/atomic.h uClibc/libc/sysdeps/linux/i386/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdint.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/byteswap.h uClibc/libc/sysdeps/linux/i386/bits/byteswap.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/byteswap.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ASM_BITS_BYTESWAP_H
- #define _ASM_BITS_BYTESWAP_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/fcntl.h uClibc/libc/sysdeps/linux/i386/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/fenv.h uClibc/libc/sysdeps/linux/i386/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- @@ -82,9 +81,9 @@
- fenv_t;
-
- /* If the default argument is used we use this value. */
- -#define FE_DFL_ENV ((__const fenv_t *) -1)
- +#define FE_DFL_ENV ((const fenv_t *) -1)
-
- #ifdef __USE_GNU
- /* Floating-point environment where none of the exception is masked. */
- -# define FE_NOMASK_ENV ((__const fenv_t *) -2)
- +# define FE_NOMASK_ENV ((const fenv_t *) -2)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/huge_vall.h uClibc/libc/sysdeps/linux/i386/bits/huge_vall.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/huge_vall.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/i386/bits/huge_vall.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,42 @@
- +/* `HUGE_VALL' constant for ix86 (where it is infinity).
- + Used by <stdlib.h> and <math.h> functions for overflow.
- + Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
- + Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _MATH_H
- +# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
- +#endif
- +
- +#if __GNUC_PREREQ(3,3)
- +# define HUGE_VALL (__builtin_huge_vall())
- +#elif __GNUC_PREREQ(2,96)
- +# define HUGE_VALL (__extension__ 0x1.0p32767L)
- +#else
- +
- +# define __HUGE_VALL_bytes { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
- +
- +# define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
- +# ifdef __GNUC__
- +# define HUGE_VALL (__extension__ \
- + ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
- +# else /* Not GCC. */
- +static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
- +# define HUGE_VALL (__huge_vall.__ld)
- +# endif /* GCC. */
- +
- +#endif /* GCC 2.95 */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/kernel_types.h uClibc/libc/sysdeps/linux/i386/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -40,6 +40,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- typedef struct {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/mathdef.h uClibc/libc/sysdeps/linux/i386/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/mathinline.h uClibc/libc/sysdeps/linux/i386/bits/mathinline.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/mathinline.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/select.h uClibc/libc/sysdeps/linux/i386/bits/select.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/select.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/select.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SELECT_H
- # error "Never use <bits/select.h> directly; include <sys/select.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/setjmp.h uClibc/libc/sysdeps/linux/i386/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,5 @@
- -/* Copyright (C) 1997, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
- +/* Copyright (C) 1997,1998,2000,2001,2003,2005,2006
- + Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. Intel 386 version. */
- #ifndef _BITS_SETJMP_H
- @@ -24,23 +24,6 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#if defined __USE_MISC || defined _ASM
- -# define JB_BX 0
- -# define JB_SI 1
- -# define JB_DI 2
- -# define JB_BP 3
- -# define JB_SP 4
- -# define JB_PC 5
- -# define JB_SIZE 24
- -#endif
- -
- -#ifndef _ASM
- typedef int __jmp_buf[6];
- -#endif
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)[JB_SP])
-
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/i386/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT struct sigcontext
- #define SIGCONTEXT_EXTRA_ARGS
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/stackinfo.h uClibc/libc/sysdeps/linux/i386/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/syscalls.h uClibc/libc/sysdeps/linux/i386/bits/syscalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -136,7 +136,7 @@
- #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \
- , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5)
- #define ASMFMT_6(arg1, arg2, arg3, arg4, arg5, arg6) \
- - , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "m" (arg6)
- + , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "g" (arg6)
-
- #else /* !PIC */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #define __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/wchar.h uClibc/libc/sysdeps/linux/i386/bits/wchar.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/wchar.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/wchar.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_WCHAR_H
- #define _BITS_WCHAR_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/wordsize.h uClibc/libc/sysdeps/linux/i386/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/brk.c uClibc/libc/sysdeps/linux/i386/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bsd-_setjmp.S uClibc/libc/sysdeps/linux/i386/bsd-_setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bsd-_setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,17 +13,14 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- in setjmp doesn't clobber the state restored by longjmp. */
-
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- .global _setjmp
- .type _setjmp,%function
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bsd-setjmp.S uClibc/libc/sysdeps/linux/i386/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,13 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- .global setjmp
- .type setjmp,%function
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/clone.S uClibc/libc/sysdeps/linux/i386/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over.
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/crt1.S uClibc/libc/sysdeps/linux/i386/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -31,9 +31,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This is the canonical entry point, usually the first thing in the text
- segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/fpu_control.h uClibc/libc/sysdeps/linux/i386/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/getcontext.S uClibc/libc/sysdeps/linux/i386/getcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/getcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/i386/getcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,84 @@
- +/* Save current context.
- + Copyright (C) 2001-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +#include "ucontext_i.h"
- +
- +
- +ENTRY(__getcontext)
- + /* Load address of the context data structure. */
- + movl 4(%esp), %eax
- +
- + /* Return value of getcontext. EAX is the only register whose
- + value is not preserved. */
- + movl $0, oEAX(%eax)
- +
- + /* Save the 32-bit register values and the return address. */
- + movl %ecx, oECX(%eax)
- + movl %edx, oEDX(%eax)
- + movl %edi, oEDI(%eax)
- + movl %esi, oESI(%eax)
- + movl %ebp, oEBP(%eax)
- + movl (%esp), %ecx
- + movl %ecx, oEIP(%eax)
- + leal 4(%esp), %ecx /* Exclude the return address. */
- + movl %ecx, oESP(%eax)
- + movl %ebx, oEBX(%eax)
- +
- + /* Save the FS segment register. We don't touch the GS register
- + since it is used for threads. */
- + xorl %edx, %edx
- + movw %fs, %dx
- + movl %edx, oFS(%eax)
- +
- + /* We have separate floating-point register content memory on the
- + stack. We use the __fpregs_mem block in the context. Set the
- + links up correctly. */
- + leal oFPREGSMEM(%eax), %ecx
- + movl %ecx, oFPREGS(%eax)
- + /* Save the floating-point context. */
- + fnstenv (%ecx)
- + /* And load it right back since the processor changes the mask.
- + Intel thought this opcode to be used in interrupt handlers which
- + would block all exceptions. */
- + fldenv (%ecx)
- +
- + /* Save the current signal mask. */
- + pushl %ebx
- + cfi_adjust_cfa_offset (4)
- + cfi_rel_offset (ebx, 0)
- + leal oSIGMASK(%eax), %edx
- + xorl %ecx, %ecx
- + movl $SIG_BLOCK, %ebx
- + movl $__NR_sigprocmask, %eax
- + ENTER_KERNEL
- + popl %ebx
- + cfi_adjust_cfa_offset (-4)
- + cfi_restore (ebx)
- + cmpl $-4095, %eax /* Check %eax for error. */
- + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
- +
- + /* All done, return 0 for success. */
- + xorl %eax, %eax
- +L(pseudo_end):
- + ret
- +PSEUDO_END(__getcontext)
- +
- +weak_alias (__getcontext, getcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/i386/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/i386/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,25 @@
- +/* Private macros for accessing __jmp_buf contents. i386 version.
- + Copyright (C) 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#define JB_BX 0
- +#define JB_SI 1
- +#define JB_DI 2
- +#define JB_BP 3
- +#define JB_SP 4
- +#define JB_PC 5
- +#define JB_SIZE 24
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/i386/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/i386/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,23 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)[JB_SP])
- +
- +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +#include <stdint.h>
- +#include <unwind.h>
- +
- +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
- +
- +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/__longjmp.S uClibc/libc/sysdeps/linux/i386/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,13 +14,9 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- .global __longjmp
- .type __longjmp,%function
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/makecontext.S uClibc/libc/sysdeps/linux/i386/makecontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/makecontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/i386/makecontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,123 @@
- +/* Create new context.
- + Copyright (C) 2001,2002,2005,2007,2008,2009 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +#include "ucontext_i.h"
- +
- +
- +ENTRY(__makecontext)
- + movl 4(%esp), %eax
- +
- + /* Load the address of the function we are supposed to run. */
- + movl 8(%esp), %ecx
- +
- + /* Compute the address of the stack. The information comes from
- + to us_stack element. */
- + movl oSS_SP(%eax), %edx
- + movl %ecx, oEIP(%eax)
- + addl oSS_SIZE(%eax), %edx
- +
- + /* Remember the number of parameters for the exit handler since
- + it has to remove them. We store the number in the EBX register
- + which the function we will call must preserve. */
- + movl 12(%esp), %ecx
- + movl %ecx, oEBX(%eax)
- +
- + /* Make room on the new stack for the parameters.
- + Room for the arguments, return address (== L(exitcode)) and
- + oLINK pointer is needed. One of the pointer sizes is subtracted
- + after aligning the stack. */
- + negl %ecx
- + leal -4(%edx,%ecx,4), %edx
- + negl %ecx
- +
- + /* Align the stack. */
- + andl $0xfffffff0, %edx
- + subl $4, %edx
- +
- + /* Store the future stack pointer. */
- + movl %edx, oESP(%eax)
- +
- + /* Put the next context on the new stack (from the uc_link
- + element). */
- + movl oLINK(%eax), %eax
- + movl %eax, 4(%edx,%ecx,4)
- +
- + /* Copy all the parameters. */
- + jecxz 2f
- +1: movl 12(%esp,%ecx,4), %eax
- + movl %eax, (%edx,%ecx,4)
- + decl %ecx
- + jnz 1b
- +2:
- +
- + /* If the function we call returns we must continue with the
- + context which is given in the uc_link element. To do this
- + set the return address for the function the user provides
- + to a little bit of helper code which does the magic (see
- + below). */
- +#ifdef __PIC__
- + call 1f
- + cfi_adjust_cfa_offset (4)
- +1: popl %ecx
- + cfi_adjust_cfa_offset (-4)
- + addl $L(exitcode)-1b, %ecx
- + movl %ecx, (%edx)
- +#else
- + movl $L(exitcode), (%edx)
- +#endif
- + /* 'makecontext' returns no value. */
- +L(pseudo_end):
- + ret
- +
- + /* This is the helper code which gets called if a function which
- + is registered with 'makecontext' returns. In this case we
- + have to install the context listed in the uc_link element of
- + the context 'makecontext' manipulated at the time of the
- + 'makecontext' call. If the pointer is NULL the process must
- + terminate. */
- + cfi_endproc
- +L(exitcode):
- + /* This removes the parameters passed to the function given to
- + 'makecontext' from the stack. EBX contains the number of
- + parameters (see above). */
- + leal (%esp,%ebx,4), %esp
- +
- +#ifdef __PIC__
- + call 1f
- +1: popl %ebx
- + addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx
- +#endif
- + cmpl $0, (%esp) /* Check the next context. */
- + je 2f /* If it is zero exit. */
- +
- + call JUMPTARGET(__setcontext)
- + /* If this returns (which can happen if the syscall fails) we'll
- + exit the program with the return error value (-1). */
- +
- + movl %eax, (%esp)
- +2: call HIDDEN_JUMPTARGET(exit)
- + /* The 'exit' call should never return. In case it does cause
- + the process to terminate. */
- + hlt
- + cfi_startproc
- +END(__makecontext)
- +
- +weak_alias (__makecontext, makecontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/Makefile.arch uClibc/libc/sysdeps/linux/i386/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,13 +5,13 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c __syscall_error.c sigaction.c
- +CSRC-y := brk.c __syscall_error.c sigaction.c
-
- -SSRC := \
- +SSRC-y := \
- __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
- - sync_file_range.S syscall.S mmap.S mmap64.S posix_fadvise64.S
- + sync_file_range.S syscall.S mmap.S
-
- -
- -ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- -SSRC += vfork.S clone.S
- -endif
- +SSRC-$(UCLIBC_HAS_LFS) += mmap64.S
- +SSRC-$(if $(findstring yy,$(UCLIBC_HAS_ADVANCED_REALTIME)$(UCLIBC_HAS_LFS)),y) += posix_fadvise64.S
- +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += vfork.S clone.S
- +SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.S setcontext.S getcontext.S swapcontext.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/mmap64.S uClibc/libc/sysdeps/linux/i386/mmap64.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/mmap64.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/mmap64.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,18 +12,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- +#include <_lfs_64.h>
- #define _ERRNO_H 1
- -#include <features.h>
- #include <bits/errno.h>
- #include <sys/syscall.h>
-
- -#if defined __UCLIBC_HAS_LFS__ && defined __NR_mmap2
- -
- +#ifdef __NR_mmap2
-
- #define LINKAGE 4
- #define PTR_SIZE 4
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/mmap.S uClibc/libc/sysdeps/linux/i386/mmap.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/mmap.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/mmap.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define _ERRNO_H 1
- #include <features.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/posix_fadvise64.S uClibc/libc/sysdeps/linux/i386/posix_fadvise64.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/posix_fadvise64.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/posix_fadvise64.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,29 +13,18 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#define _ERRNO_H 1
- -#include <features.h>
- -#include <bits/errno.h>
- -#include <sys/syscall.h>
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#if defined __NR_fadvise64_64 || defined __NR_fadvise64
- +#include <_lfs_64.h>
- +#include <sys/syscall.h>
-
- -/* Was named __libc_posix_fadvise64 for some inexplicable reason.
- -** google says only uclibc has *__libc*_posix_fadviseXXX,
- -** so it cannot be compat with anything.
- -**
- -** Remove this comment and one at the end after 0.9.31
- -*/
- +#ifdef __NR_fadvise64_64
-
- .text
- .global posix_fadvise64
- .type posix_fadvise64,%function
- posix_fadvise64:
- -#if defined __NR_fadvise64_64
- /* Save regs */
- pushl %ebp
- pushl %ebx
- @@ -63,47 +52,7 @@
- /* Returns 0 on success, else an error code. */
- negl %eax
-
- -#elif defined __NR_fadvise64
- - /* Save regs */
- - pushl %ebx
- - pushl %esi
- - pushl %edi
- -#if 0
- - /* does len overflow long? */
- - cmpl $0, 28(%esp)
- - movl $-EOVERFLOW, %eax
- - jne overflow
- -#endif
- - movl $__NR_fadvise64, %eax /* Syscall number in %eax. */
- -
- - movl 16(%esp), %ebx
- - movl 20(%esp), %ecx
- - movl 24(%esp), %edx
- - movl 28(%esp), %esi
- - movl 32(%esp), %edi
- -
- - /* Do the system call trap. */
- - int $0x80
- -overflow:
- - /* Restore regs */
- - popl %edi
- - popl %esi
- - popl %ebx
- -
- - /* Returns 0 on success, else an error code. */
- - negl %eax
- -#endif
- -
- /* Successful; return the syscall's value. */
- ret
- -
- .size posix_fadvise64,.-posix_fadvise64
- -
- -/*
- -** libc_hidden_def(__libc_posix_fadvise64)
- -** #if defined __UCLIBC_HAS_LFS__ && defined __UCLIBC_HAS_ADVANCED_REALTIME__
- -** weak_alias(__libc_posix_fadvise64,posix_fadvise64)
- -** #endif
- -*/
- -
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/setcontext.S uClibc/libc/sysdeps/linux/i386/setcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/setcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/i386/setcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,96 @@
- +/* Install given context.
- + Copyright (C) 2001-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +#include "ucontext_i.h"
- +
- +
- +ENTRY(__setcontext)
- + /* Load address of the context data structure. */
- + movl 4(%esp), %eax
- +
- + /* Get the current signal mask. Note that we preserve EBX in case
- + the system call fails and we return from the function with an
- + error. */
- + pushl %ebx
- + cfi_adjust_cfa_offset (4)
- + xorl %edx, %edx
- + leal oSIGMASK(%eax), %ecx
- + movl $SIG_SETMASK, %ebx
- + cfi_rel_offset (ebx, 0)
- + movl $__NR_sigprocmask, %eax
- + ENTER_KERNEL
- + popl %ebx
- + cfi_adjust_cfa_offset (-4)
- + cfi_restore (ebx)
- + cmpl $-4095, %eax /* Check %eax for error. */
- + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
- +
- + /* EAX was modified, reload it. */
- + movl 4(%esp), %eax
- +
- + /* Restore the floating-point context. Not the registers, only the
- + rest. */
- + movl oFPREGS(%eax), %ecx
- + fldenv (%ecx)
- +
- + /* Restore the FS segment register. We don't touch the GS register
- + since it is used for threads. */
- + movl oFS(%eax), %ecx
- + movw %cx, %fs
- +
- + /* Fetch the address to return to. */
- + movl oEIP(%eax), %ecx
- +
- + /* Load the new stack pointer. */
- + cfi_def_cfa (eax, 0)
- + cfi_offset (edi, oEDI)
- + cfi_offset (esi, oESI)
- + cfi_offset (ebp, oEBP)
- + cfi_offset (ebx, oEBX)
- + cfi_offset (edx, oEDX)
- + cfi_offset (ecx, oECX)
- + movl oESP(%eax), %esp
- +
- + /* Push the return address on the new stack so we can return there. */
- + pushl %ecx
- +
- + /* Load the values of all the 32-bit registers (except ESP).
- + Since we are loading from EAX, it must be last. */
- + movl oEDI(%eax), %edi
- + movl oESI(%eax), %esi
- + movl oEBP(%eax), %ebp
- + movl oEBX(%eax), %ebx
- + movl oEDX(%eax), %edx
- + movl oECX(%eax), %ecx
- + movl oEAX(%eax), %eax
- +
- + /* End FDE here, we fall into another context. */
- + cfi_endproc
- + cfi_startproc
- +
- + /* The following 'ret' will pop the address of the code and jump
- + to it. */
- +
- +L(pseudo_end):
- + ret
- +PSEUDO_END(__setcontext)
- +
- +weak_alias (__setcontext, setcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/setjmp.S uClibc/libc/sysdeps/linux/i386/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- -
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- .global __sigsetjmp
- .type __sigsetjmp,%function
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sigaction.c uClibc/libc/sysdeps/linux/i386/sigaction.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA.
- + see <http://www.gnu.org/licenses/>.
-
- Totally hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
- */
- @@ -27,9 +26,6 @@
-
- #define SA_RESTORER 0x04000000
-
- -extern __typeof(sigaction) __libc_sigaction;
- -
- -
- #if defined __NR_rt_sigaction
-
- extern void restore_rt(void) __asm__ ("__restore_rt") attribute_hidden;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/swapcontext.S uClibc/libc/sysdeps/linux/i386/swapcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/swapcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/i386/swapcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,110 @@
- +/* Save current context and install the given one.
- + Copyright (C) 2001-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +#include "ucontext_i.h"
- +
- +
- +ENTRY(__swapcontext)
- + /* Load address of the context data structure we save in. */
- + movl 4(%esp), %eax
- +
- + /* Return value of swapcontext. EAX is the only register whose
- + value is not preserved. */
- + movl $0, oEAX(%eax)
- +
- + /* Save the 32-bit register values and the return address. */
- + movl %ecx, oECX(%eax)
- + movl %edx, oEDX(%eax)
- + movl %edi, oEDI(%eax)
- + movl %esi, oESI(%eax)
- + movl %ebp, oEBP(%eax)
- + movl (%esp), %ecx
- + movl %ecx, oEIP(%eax)
- + leal 4(%esp), %ecx
- + movl %ecx, oESP(%eax)
- + movl %ebx, oEBX(%eax)
- +
- + /* Save the FS segment register. */
- + xorl %edx, %edx
- + movw %fs, %dx
- + movl %edx, oFS(%eax)
- +
- + /* We have separate floating-point register content memory on the
- + stack. We use the __fpregs_mem block in the context. Set the
- + links up correctly. */
- + leal oFPREGSMEM(%eax), %ecx
- + movl %ecx, oFPREGS(%eax)
- + /* Save the floating-point context. */
- + fnstenv (%ecx)
- +
- + /* Load address of the context data structure we have to load. */
- + movl 8(%esp), %ecx
- +
- + /* Save the current signal mask and install the new one. */
- + pushl %ebx
- + leal oSIGMASK(%eax), %edx
- + leal oSIGMASK(%ecx), %ecx
- + movl $SIG_SETMASK, %ebx
- + movl $__NR_sigprocmask, %eax
- + ENTER_KERNEL
- + popl %ebx
- + cmpl $-4095, %eax /* Check %eax for error. */
- + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
- +
- + /* EAX was modified, reload it. */
- + movl 8(%esp), %eax
- +
- + /* Restore the floating-point context. Not the registers, only the
- + rest. */
- + movl oFPREGS(%eax), %ecx
- + fldenv (%ecx)
- +
- + /* Restore the FS segment register. We don't touch the GS register
- + since it is used for threads. */
- + movl oFS(%eax), %edx
- + movw %dx, %fs
- +
- + /* Fetch the address to return to. */
- + movl oEIP(%eax), %ecx
- +
- + /* Load the new stack pointer. */
- + movl oESP(%eax), %esp
- +
- + /* Push the return address on the new stack so we can return there. */
- + pushl %ecx
- +
- + /* Load the values of all the 32-bit registers (except ESP).
- + Since we are loading from EAX, it must be last. */
- + movl oEDI(%eax), %edi
- + movl oESI(%eax), %esi
- + movl oEBP(%eax), %ebp
- + movl oEBX(%eax), %ebx
- + movl oEDX(%eax), %edx
- + movl oECX(%eax), %ecx
- + movl oEAX(%eax), %eax
- +
- + /* The following 'ret' will pop the address of the code and jump
- + to it. */
- +L(pseudo_end):
- + ret
- +PSEUDO_END(__swapcontext)
- +
- +weak_alias (__swapcontext, swapcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sync_file_range.S uClibc/libc/sysdeps/linux/i386/sync_file_range.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sync_file_range.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sync_file_range.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define _ERRNO_H 1
- #include <features.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/debugreg.h uClibc/libc/sysdeps/linux/i386/sys/debugreg.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/debugreg.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sys/debugreg.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_DEBUGREG_H
- #define _SYS_DEBUGREG_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/elf.h uClibc/libc/sysdeps/linux/i386/sys/elf.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/elf.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sys/elf.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_ELF_H
- #define _SYS_ELF_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/io.h uClibc/libc/sysdeps/linux/i386/sys/io.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/io.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sys/io.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IO_H
- #define _SYS_IO_H 1
- @@ -33,7 +32,6 @@
- E.g., Linux/Alpha for Alpha PCs supports this. */
- extern int ioperm (unsigned long int __from, unsigned long int __num,
- int __turn_on) __THROW;
- -libc_hidden_proto(ioperm)
-
- /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
- access any I/O port is granted. This call requires root
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/perm.h uClibc/libc/sysdeps/linux/i386/sys/perm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/perm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sys/perm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PERM_H
-
- @@ -26,7 +25,6 @@
- /* Set port input/output permissions. */
- extern int ioperm (unsigned long int __from, unsigned long int __num,
- int __turn_on) __THROW;
- -libc_hidden_proto(ioperm)
-
-
- /* Change I/O privilege level. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/procfs.h uClibc/libc/sysdeps/linux/i386/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/reg.h uClibc/libc/sysdeps/linux/i386/sys/reg.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/reg.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sys/reg.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_REG_H
- #define _SYS_REG_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/ucontext.h uClibc/libc/sysdeps/linux/i386/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/user.h uClibc/libc/sysdeps/linux/i386/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/vm86.h uClibc/libc/sysdeps/linux/i386/sys/vm86.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/vm86.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sys/vm86.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_VM86_H
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sysdep.h uClibc/libc/sysdeps/linux/i386/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LINUX_I386_SYSDEP_H
- #define _LINUX_I386_SYSDEP_H 1
- @@ -44,12 +43,9 @@
- incomplete stabs information. Fake some entries here which specify
- the current source file. */
- #define ENTRY(name) \
- - STABS_CURRENT_FILE1("") \
- - STABS_CURRENT_FILE(name) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
- .align ALIGNARG(4); \
- - STABS_FUN(name) \
- C_LABEL(name) \
- cfi_startproc; \
- CALL_MCOUNT
- @@ -58,30 +54,6 @@
- #define END(name) \
- cfi_endproc; \
- ASM_SIZE_DIRECTIVE(name) \
- - STABS_FUN_END(name)
- -
- -#ifdef HAVE_CPP_ASM_DEBUGINFO
- -/* Disable that goop, because we just pass -g through to the assembler
- - and it generates proper line number information directly. */
- -# define STABS_CURRENT_FILE1(name)
- -# define STABS_CURRENT_FILE(name)
- -# define STABS_FUN(name)
- -# define STABS_FUN_END(name)
- -#else
- -/* Remove the following two lines once the gdb bug is fixed. */
- -#define STABS_CURRENT_FILE(name) \
- - STABS_CURRENT_FILE1 (#name)
- -#define STABS_CURRENT_FILE1(name) \
- - 1: .stabs name,100,0,0,1b;
- -/* Emit stabs definition lines. We use F(0,1) and define t(0,1) as `int',
- - the same way gcc does it. */
- -#define STABS_FUN(name) STABS_FUN2(name, name##:F(0,1))
- -#define STABS_FUN2(name, namestr) \
- - .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; \
- - .stabs #namestr,36,0,0,name;
- -#define STABS_FUN_END(name) \
- - 1: .stabs "",36,0,0,1b-name;
- -#endif
-
- /* If compiled for profiling, call `mcount' at the start of each function. */
- #ifdef PROF
- @@ -150,10 +122,6 @@
- #undef __i686
- #endif /* __ASSEMBLER__ */
-
- -#ifndef offsetof
- -# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
- -#endif
- -
- /* For Linux we can use the system call table in the header file
- /usr/include/asm/unistd.h
- of the kernel. But these symbols do not follow the SYS_* syntax
- @@ -227,8 +195,6 @@
- #define PSEUDO_END_ERRVAL(name) \
- END (name)
-
- -#define ret_ERRVAL ret
- -
- #ifndef __PIC__
- # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
- #else
- @@ -444,6 +410,7 @@
- # define PTR_DEMANGLE(reg) rorl $9, reg; \
- xorl %gs:POINTER_GUARD, reg
- # else
- +# include <stddef.h>
- # define PTR_MANGLE(var) __asm__ ("xorl %%gs:%c2, %0\n" \
- "roll $9, %0" \
- : "=r" (var) \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/ucontext_i.sym uClibc/libc/sysdeps/linux/i386/ucontext_i.sym
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/ucontext_i.sym 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/i386/ucontext_i.sym 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,30 @@
- +#include <stddef.h>
- +#include <signal.h>
- +#include <sys/ucontext.h>
- +
- +--
- +
- +SIG_BLOCK
- +SIG_SETMASK
- +
- +#define ucontext(member) offsetof (ucontext_t, member)
- +#define mcontext(member) ucontext (uc_mcontext.member)
- +#define mreg(reg) mcontext (gregs[REG_##reg])
- +
- +oLINK ucontext (uc_link)
- +oSS_SP ucontext (uc_stack.ss_sp)
- +oSS_SIZE ucontext (uc_stack.ss_size)
- +oGS mreg (GS)
- +oFS mreg (FS)
- +oEDI mreg (EDI)
- +oESI mreg (ESI)
- +oEBP mreg (EBP)
- +oESP mreg (ESP)
- +oEBX mreg (EBX)
- +oEDX mreg (EDX)
- +oECX mreg (ECX)
- +oEAX mreg (EAX)
- +oEIP mreg (EIP)
- +oFPREGS mcontext (fpregs)
- +oSIGMASK ucontext (uc_sigmask)
- +oFPREGSMEM ucontext (__fpregs_mem)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/vfork.S uClibc/libc/sysdeps/linux/i386/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i386/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -38,4 +38,4 @@
- .size __vfork,.-__vfork
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/fcntl.h uClibc/libc/sysdeps/linux/i960/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i960/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #define __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/wordsize.h uClibc/libc/sysdeps/linux/i960/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i960/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/clone.S uClibc/libc/sysdeps/linux/i960/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i960/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
- # details.
- #
- # You should have received a copy of the GNU Library General Public License
- -# along with this program; if not, write to the Free Software Foundation, Inc.,
- -# at 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- +# along with this program; if not, see <http://www.gnu.org/licenses/>.
- #
- # Derived from an old port of uC-libc to the i960 by Keith Adams (kma@cse.ogi.edu).
- #
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/crt0.S uClibc/libc/sysdeps/linux/i960/crt0.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/crt0.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i960/crt0.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
- # details.
- #
- # You should have received a copy of the GNU Library General Public License
- -# along with this program; if not, write to the Free Software Foundation, Inc.,
- -# at 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- +# along with this program; if not, see <http://www.gnu.org/licenses/>.
- #
-
- /*
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/mmap.S uClibc/libc/sysdeps/linux/i960/mmap.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/mmap.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i960/mmap.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
- # details.
- #
- # You should have received a copy of the GNU Library General Public License
- -# along with this program; if not, write to the Free Software Foundation, Inc.,
- -# at 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- +# along with this program; if not, see <http://www.gnu.org/licenses/>.
- #
- # Derived from an old port of uC-libc to the i960 by Keith Adams (kma@cse.ogi.edu).
- #
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/setjmp.S uClibc/libc/sysdeps/linux/i960/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i960/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -122,3 +122,5 @@
- mov 1, g0 /* return 1 by default */
- 0:
- ret /* return to caller of __sigsetjmp */
- +
- +libc_hidden_def(__longjmp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/sys/procfs.h uClibc/libc/sysdeps/linux/i960/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i960/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/sys/ucontext.h uClibc/libc/sysdeps/linux/i960/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i960/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Don't rely on this, the interface is currently messed up and may need to
- be broken to be fixed. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/vfork.S uClibc/libc/sysdeps/linux/i960/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/i960/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -18,6 +18,7 @@
-
- .globl ___vfork
- .hidden ___vfork
- + .type ___vfork,@function
- ___vfork:
- mov g13, r3
- ldconst __NR_vfork, g13
- @@ -30,4 +31,4 @@
- ret
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/atomic.h uClibc/libc/sysdeps/linux/ia64/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdint.h>
- #include <ia64intrin.h>
- @@ -92,12 +91,12 @@
- do \
- { \
- __oldval = __val; \
- - if (__builtin_expect (__val <= 0, 0)) \
- + if (unlikely (__val <= 0)) \
- break; \
- __val = atomic_compare_and_exchange_val_acq (__memp, __oldval - 1, \
- __oldval); \
- } \
- - while (__builtin_expect (__val != __oldval, 0)); \
- + while (unlikely (__val != __oldval)); \
- __oldval; })
-
- #define atomic_bit_test_set(mem, bit) \
- @@ -113,7 +112,7 @@
- __oldval | __mask, \
- __oldval); \
- } \
- - while (__builtin_expect (__val != __oldval, 0)); \
- + while (unlikely (__val != __oldval)); \
- __oldval & __mask; })
-
- #define atomic_full_barrier() __sync_synchronize ()
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/byteswap.h uClibc/libc/sysdeps/linux/ia64/bits/byteswap.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/byteswap.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ASM_BITS_BYTESWAP_H
- #define _ASM_BITS_BYTESWAP_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/fcntl.h uClibc/libc/sysdeps/linux/ia64/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/fenv.h uClibc/libc/sysdeps/linux/ia64/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- @@ -73,15 +72,15 @@
- typedef unsigned long int fenv_t;
-
- /* If the default argument is used we use this value. */
- -#define FE_DFL_ENV ((__const fenv_t *) 0xc009804c0270033fUL)
- +#define FE_DFL_ENV ((const fenv_t *) 0xc009804c0270033fUL)
-
- #ifdef __USE_GNU
- /* Floating-point environment where only FE_UNNORMAL is masked since this
- exception is not generally supported by glibc. */
- -# define FE_NOMASK_ENV ((__const fenv_t *) 0xc009804c02700302UL)
- +# define FE_NOMASK_ENV ((const fenv_t *) 0xc009804c02700302UL)
-
- /* Floating-point environment with (processor-dependent) non-IEEE
- floating point. In this case, turning on flush-to-zero mode for
- s0, s2, and s3. */
- -# define FE_NONIEEE_ENV ((__const fenv_t *) 0xc009a04d0270037fUL)
- +# define FE_NONIEEE_ENV ((const fenv_t *) 0xc009a04d0270037fUL)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/huge_vall.h uClibc/libc/sysdeps/linux/ia64/bits/huge_vall.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/huge_vall.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/ia64/bits/huge_vall.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,41 @@
- +/* `HUGE_VALL' constant for ia64 (where it is infinity).
- + Used by <stdlib.h> and <math.h> functions for overflow.
- + Copyright (C) 2000, 2004 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _MATH_H
- +# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
- +#endif
- +
- +#if __GNUC_PREREQ(3,3)
- +# define HUGE_VALL (__builtin_huge_vall())
- +#elif __GNUC_PREREQ(2,96)
- +# define HUGE_VALL (__extension__ 0x1.0p32767L)
- +#else
- +
- +# define __HUGE_VALL_bytes { 0,0,0,0,0,0,0, 0x80, 0xff, 0x7f, 0,0,0,0,0,0}
- +
- +# define __huge_vall_t union { unsigned char __c[16]; long double __ld; }
- +# ifdef __GNUC__
- +# define HUGE_VALL (__extension__ \
- + ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
- +# else /* Not GCC. */
- +static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
- +# define HUGE_VALL (__huge_vall.__ld)
- +# endif /* GCC. */
- +
- +#endif /* GCC 2.95 */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/ipc.h uClibc/libc/sysdeps/linux/ia64/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/kernel_types.h uClibc/libc/sysdeps/linux/ia64/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -52,5 +52,7 @@
-
- typedef unsigned int __kernel_dev_t;
- typedef unsigned int __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- #endif /* _ASM_IA64_POSIX_TYPES_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/local_lim.h uClibc/libc/sysdeps/linux/ia64/bits/local_lim.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/local_lim.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/ia64/bits/local_lim.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,99 @@
- +/* Minimum guaranteed maximum values for system limits. Linux/IA-64 version.
- + Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Library General Public License as
- + published by the Free Software Foundation; either version 2 of the
- + License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Library General Public License for more details.
- +
- + You should have received a copy of the GNU Library General Public
- + License along with the GNU C Library; see the file COPYING.LIB. If not,
- + see <http://www.gnu.org/licenses/>. */
- +
- +/* The kernel header pollutes the namespace with the NR_OPEN symbol
- + and defines LINK_MAX although filesystems have different maxima. A
- + similar thing is true for OPEN_MAX: the limit can be changed at
- + runtime and therefore the macro must not be defined. Remove this
- + after including the header if necessary. */
- +#ifndef NR_OPEN
- +# define __undef_NR_OPEN
- +#endif
- +#ifndef LINK_MAX
- +# define __undef_LINK_MAX
- +#endif
- +#ifndef OPEN_MAX
- +# define __undef_OPEN_MAX
- +#endif
- +#ifndef ARG_MAX
- +# define __undef_ARG_MAX
- +#endif
- +
- +/* The kernel sources contain a file with all the needed information. */
- +#include <linux/limits.h>
- +
- +/* Have to remove NR_OPEN? */
- +#ifdef __undef_NR_OPEN
- +# undef NR_OPEN
- +# undef __undef_NR_OPEN
- +#endif
- +/* Have to remove LINK_MAX? */
- +#ifdef __undef_LINK_MAX
- +# undef LINK_MAX
- +# undef __undef_LINK_MAX
- +#endif
- +/* Have to remove OPEN_MAX? */
- +#ifdef __undef_OPEN_MAX
- +# undef OPEN_MAX
- +# undef __undef_OPEN_MAX
- +#endif
- +/* Have to remove ARG_MAX? */
- +#ifdef __undef_ARG_MAX
- +# undef ARG_MAX
- +# undef __undef_ARG_MAX
- +#endif
- +
- +/* The number of data keys per process. */
- +#define _POSIX_THREAD_KEYS_MAX 128
- +/* This is the value this implementation supports. */
- +#define PTHREAD_KEYS_MAX 1024
- +
- +/* Controlling the iterations of destructors for thread-specific data. */
- +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
- +/* Number of iterations this implementation does. */
- +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
- +
- +/* The number of threads per process. */
- +#define _POSIX_THREAD_THREADS_MAX 64
- +/* We have no predefined limit on the number of threads. */
- +#undef PTHREAD_THREADS_MAX
- +
- +/* Maximum amount by which a process can descrease its asynchronous I/O
- + priority level. */
- +#define AIO_PRIO_DELTA_MAX 20
- +
- +/* Minimum size for a thread. We are free to choose a reasonable value. */
- +#define PTHREAD_STACK_MIN 196608
- +
- +/* Maximum number of timer expiration overruns. */
- +#define DELAYTIMER_MAX 2147483647
- +
- +/* Maximum tty name length. */
- +#define TTY_NAME_MAX 32
- +
- +/* Maximum login name length. This is arbitrary. */
- +#define LOGIN_NAME_MAX 256
- +
- +/* Maximum host name length. */
- +#define HOST_NAME_MAX 64
- +
- +/* Maximum message queue priority level. */
- +#define MQ_PRIO_MAX 32768
- +
- +/* Maximum value the semaphore can have. */
- +#define SEM_VALUE_MAX (2147483647)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/mathdef.h uClibc/libc/sysdeps/linux/ia64/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/mathinline.h uClibc/libc/sysdeps/linux/ia64/bits/mathinline.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/mathinline.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/msq.h uClibc/libc/sysdeps/linux/ia64/bits/msq.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/msq.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MSG_H
- #error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sem.h uClibc/libc/sysdeps/linux/ia64/bits/sem.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/sem.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SEM_H
- # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/setjmp.h uClibc/libc/sysdeps/linux/ia64/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,5 +1,5 @@
- /* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version.
- - Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
- + Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
-
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SETJMP_H
- #define _BITS_SETJMP_H 1
- @@ -32,9 +31,4 @@
- /* the __jmp_buf element type should be __float80 per ABI... */
- typedef long __jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
-
- -/* Test if longjmp to JMPBUF would unwind the frame containing a local
- - variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- - ((void *)(_address) < (void *)(((long *)_jmpbuf)[0]))
- -
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/shm.h uClibc/libc/sysdeps/linux/ia64/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigaction.h uClibc/libc/sysdeps/linux/ia64/bits/sigaction.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/sigaction.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigcontext.h uClibc/libc/sysdeps/linux/ia64/bits/sigcontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/sigcontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
- # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/siginfo.h uClibc/libc/sysdeps/linux/ia64/bits/siginfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/siginfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/siginfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SIGNAL_H && !defined __need_siginfo_t \
- && !defined __need_sigevent_t
- @@ -298,7 +297,11 @@
-
- /* Structure to transport application-defined values with signals. */
- # define __SIGEV_MAX_SIZE 64
- -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
- +# if __WORDSIZE == 64
- +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
- +# else
- +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
- +# endif
-
- typedef struct sigevent
- {
- @@ -310,6 +313,10 @@
- {
- int _pad[__SIGEV_PAD_SIZE];
-
- + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
- + thread to receive the signal. */
- + __pid_t _tid;
- +
- struct
- {
- void (*_function) (sigval_t); /* Function to start. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigstack.h uClibc/libc/sysdeps/linux/ia64/bits/sigstack.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigstack.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/sigstack.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include this file directly. Use <signal.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/stackinfo.h uClibc/libc/sysdeps/linux/ia64/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/stat.h uClibc/libc/sysdeps/linux/ia64/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/syscalls.h uClibc/libc/sysdeps/linux/ia64/bits/syscalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SYSCALLS_H
- #define _BITS_SYSCALLS_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/wordsize.h uClibc/libc/sysdeps/linux/ia64/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 64
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/brk.S uClibc/libc/sysdeps/linux/ia64/brk.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/brk.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/brk.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "sysdep.h"
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/clone2.S uClibc/libc/sysdeps/linux/ia64/clone2.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/clone2.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/clone2.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "sysdep.h"
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/crt1.S uClibc/libc/sysdeps/linux/ia64/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -30,9 +30,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __ASSEMBLY__
- #include "sysdep.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/fork.S uClibc/libc/sysdeps/linux/ia64/fork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/fork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/fork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- #include "sysdep.h"
- @@ -24,7 +23,10 @@
- /* pid_t fork(void); */
- /* Implemented as a clone system call with parameters SIGCHLD and 0 */
-
- -ENTRY(__libc_fork)
- +#ifdef __UCLIBC_HAS_THREADS__
- +.weak fork
- +#endif
- +ENTRY(fork)
- alloc r2=ar.pfs,0,0,2,0
- mov out0=SIGCHLD /* Return SIGCHLD when child finishes */
- /* no other clone flags; nothing shared */
- @@ -34,9 +36,8 @@
- cmp.eq p6,p0=-1,r10
- (p6) br.cond.spnt.few __syscall_error
- ret
- -PSEUDO_END(__libc_fork)
- -
- -weak_alias (__libc_fork, __fork)
- -libc_hidden_def (__fork)
- -weak_alias (__libc_fork, fork)
- -libc_hidden_weak (fork)
- +PSEUDO_END(fork)
- +#ifdef __UCLIBC_HAS_THREADS__
- +strong_alias(fork,__libc_fork)
- +#endif
- +libc_hidden_def(fork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/ia64/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/ia64/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame containing a local
- + variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- + ((void *)(_address) < (void *)(((long *)_jmpbuf)[0]))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/__longjmp.S uClibc/libc/sysdeps/linux/ia64/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>.
-
- Note that __sigsetjmp() did NOT flush the register stack. Instead,
- we do it here since __longjmp() is usually much less frequently
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/Makefile.arch uClibc/libc/sysdeps/linux/ia64/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,8 +5,8 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := __syscall_error.c
- +CSRC-y := __syscall_error.c
-
- -SSRC := \
- +SSRC-y := \
- __longjmp.S brk.S bsd-setjmp.S bsd-_setjmp.S clone2.S fork.S \
- pipe.S setjmp.S syscall.S vfork.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/pipe.S uClibc/libc/sysdeps/linux/ia64/pipe.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/pipe.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/pipe.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* __pipe is a special syscall since it returns two values. */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/setjmp.S uClibc/libc/sysdeps/linux/ia64/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>.
-
- The layout of the jmp_buf is as follows. This is subject to change
- and user-code should never depend on the particular layout of
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/io.h uClibc/libc/sysdeps/linux/ia64/sys/io.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/io.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/sys/io.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IO_H
- #define _SYS_IO_H 1
- @@ -24,6 +23,7 @@
-
- __BEGIN_DECLS
-
- +#if defined __UCLIBC_LINUX_SPECIFIC__
- /* If TURN_ON is TRUE, request for permission to do direct i/o on the
- port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
- permission off for that range. This call requires root privileges.
- @@ -33,12 +33,12 @@
- E.g., Linux/Alpha for Alpha PCs supports this. */
- extern int ioperm (unsigned long int __from, unsigned long int __num,
- int __turn_on);
- -libc_hidden_proto(ioperm)
-
- /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
- access any I/O port is granted. This call requires root
- privileges. */
- extern int iopl (int __level);
- +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
-
- extern unsigned int _inb (unsigned long int __port);
- extern unsigned int _inb (unsigned long int __port);
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/procfs.h uClibc/libc/sysdeps/linux/ia64/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/ptrace.h uClibc/libc/sysdeps/linux/ia64/sys/ptrace.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/sys/ptrace.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PTRACE_H
- #define _SYS_PTRACE_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/ucontext.h uClibc/libc/sysdeps/linux/ia64/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/user.h uClibc/libc/sysdeps/linux/ia64/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/syscall.S uClibc/libc/sysdeps/linux/ia64/syscall.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/syscall.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/syscall.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "sysdep.h"
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sysdep.h uClibc/libc/sysdeps/linux/ia64/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,13 +14,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LINUX_IA64_SYSDEP_H
- #define _LINUX_IA64_SYSDEP_H 1
-
- +#include <common/sysdep.h>
- #include <features.h>
- #include <asm/unistd.h>
-
- @@ -49,6 +49,15 @@
- C_LABEL(name) \
- CALL_MCOUNT
-
- +#define HIDDEN_ENTRY(name) \
- + .text; \
- + .align 32; \
- + .proc C_SYMBOL_NAME(name); \
- + .global C_SYMBOL_NAME(name); \
- + .hidden C_SYMBOL_NAME(name); \
- + C_LABEL(name) \
- + CALL_MCOUNT
- +
- #define LEAF(name) \
- .text; \
- .align 32; \
- @@ -161,7 +170,6 @@
-
- #define ret br.ret.sptk.few b0
- #define ret_NOERRNO ret
- -#define ret_ERRVAL ret
-
- #endif /* not __ASSEMBLER__ */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/vfork.S uClibc/libc/sysdeps/linux/ia64/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/ia64/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- #include "sysdep.h"
- @@ -29,7 +28,7 @@
- /* pid_t vfork(void); */
- /* Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */
-
- -ENTRY(__vfork)
- +HIDDEN_ENTRY(__vfork)
- alloc r2=ar.pfs,0,0,2,0
- mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD
- mov out1=0 /* Standard sp value. */
- @@ -41,4 +40,4 @@
- PSEUDO_END(__vfork)
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/byteswap.h uClibc/libc/sysdeps/linux/m68k/bits/byteswap.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/byteswap.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ASM_BITS_BYTESWAP_H
- #define _ASM_BITS_BYTESWAP_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/fcntl.h uClibc/libc/sysdeps/linux/m68k/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/fenv.h uClibc/libc/sysdeps/linux/m68k/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- @@ -71,9 +70,9 @@
- fenv_t;
-
- /* If the default argument is used we use this value. */
- -#define FE_DFL_ENV ((__const fenv_t *) -1)
- +#define FE_DFL_ENV ((const fenv_t *) -1)
-
- #ifdef __USE_GNU
- /* Floating-point environment where none of the exceptions are masked. */
- -# define FE_NOMASK_ENV ((__const fenv_t *) -2)
- +# define FE_NOMASK_ENV ((const fenv_t *) -2)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/huge_vall.h uClibc/libc/sysdeps/linux/m68k/bits/huge_vall.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/huge_vall.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/m68k/bits/huge_vall.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,42 @@
- +/* `HUGE_VALL' constant for m68k (where it is infinity).
- + Used by <stdlib.h> and <math.h> functions for overflow.
- + Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
- + Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _MATH_H
- +# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
- +#endif
- +
- +#if __GNUC_PREREQ(3,3)
- +# define HUGE_VALL (__builtin_huge_vall ())
- +#elif __GNUC_PREREQ(2,96)
- +# define HUGE_VALL (__extension__ 0x1.0p32767L)
- +#elif defined__GNUC__
- +
- +# define HUGE_VALL \
- + (__extension__ \
- + ((union { unsigned long __l[3]; long double __ld; }) \
- + { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld)
- +
- +#else /* not GCC */
- +
- +static union { unsigned char __c[12]; long double __ld; } __huge_vall =
- + { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } };
- +# define HUGE_VALL (__huge_vall.__ld)
- +
- +#endif /* GCC 2.95. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/kernel_types.h uClibc/libc/sysdeps/linux/m68k/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -32,6 +32,8 @@
- typedef unsigned short __kernel_old_gid_t;
- typedef long long __kernel_loff_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/mathdef.h uClibc/libc/sysdeps/linux/m68k/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/mathinline.h uClibc/libc/sysdeps/linux/m68k/bits/mathinline.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/mathinline.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef __GNUC__
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/poll.h uClibc/libc/sysdeps/linux/m68k/bits/poll.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/poll.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_POLL_H
- # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/setjmp.h uClibc/libc/sysdeps/linux/m68k/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. m68k version. */
- #ifndef _BITS_SETJMP_H
- @@ -25,7 +24,7 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#ifndef _ASM
- +#include <features.h>
-
- typedef struct
- {
- @@ -37,7 +36,7 @@
- int *__fp;
- int *__sp;
-
- -#if defined __HAVE_68881__ || defined __HAVE_FPU__
- +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
- /* There are eight floating point registers which
- are saved in IEEE 96-bit extended format. */
- char __fpregs[8 * (96 / 8)];
- @@ -45,24 +44,4 @@
-
- } __jmp_buf[1];
-
- -#endif
- -
- -#define JB_REGS 0
- -#define JB_DREGS 0
- -#define JB_AREGS 24
- -#define JB_PC 48
- -#define JB_FPREGS 52
- -
- -#if defined __HAVE_68881__ || defined __HAVE_FPU__
- -# define JB_SIZE 76
- -#else
- -# define JB_SIZE 52
- -#endif
- -
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)->__aregs[5])
- -
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/m68k/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT int _code, struct sigcontext *
- #define SIGCONTEXT_EXTRA_ARGS _code,
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/stackinfo.h uClibc/libc/sysdeps/linux/m68k/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/stat.h uClibc/libc/sysdeps/linux/m68k/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,8 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #define __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/uClibc_page.h uClibc/libc/sysdeps/linux/m68k/bits/uClibc_page.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/uClibc_page.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* Supply an architecture specific value for PAGE_SIZE and friends. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/wordsize.h uClibc/libc/sysdeps/linux/m68k/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bsd-_setjmp.S uClibc/libc/sysdeps/linux/m68k/bsd-_setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bsd-_setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -2,9 +2,8 @@
- /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
- /* This file is released under the LGPL, any version you like */
-
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <features.h>
- +#include <jmpbuf-offsets.h>
-
- .globl _setjmp;
- .type _setjmp,@function
- @@ -14,7 +13,7 @@
- moveal %sp@(4), %a0
- movel %sp@(0), %a0@(JB_PC)
- moveml %d2-%d7/%a2-%a7, %a0@(JB_REGS)
- -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
- +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
- fmovemx %fp2-%fp7, %a0@(JB_FPREGS)
- #endif
- clrl %d0
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bsd-setjmp.S uClibc/libc/sysdeps/linux/m68k/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -2,9 +2,8 @@
- /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
- /* This file is released under the LGPL, any version you like */
-
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <features.h>
- +#include <jmpbuf-offsets.h>
- #include "m68k_pic.S"
-
- .globl setjmp;
- @@ -15,7 +14,7 @@
- moveal %sp@(4), %a0
- movel %sp@(0), %a0@(JB_PC)
- moveml %d2-%d7/%a2-%a7, %a0@(JB_REGS)
- -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
- +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
- fmovemx %fp2-%fp7, %a0@(JB_FPREGS)
- #endif
- clrl %d0
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/crt1.S uClibc/libc/sysdeps/linux/m68k/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -30,9 +30,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include "m68k_pic.S"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/fpu_control.h uClibc/libc/sysdeps/linux/m68k/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/m68k/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/m68k/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,19 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <features.h>
- +
- +#define JB_REGS 0
- +#define JB_DREGS 0
- +#define JB_AREGS 24
- +#define JB_PC 48
- +#define JB_FPREGS 52
- +
- +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
- +# define JB_SIZE 76
- +#else
- +# define JB_SIZE 52
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/m68k/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/m68k/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)->__aregs[5])
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/__longjmp.S uClibc/libc/sysdeps/linux/m68k/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -2,10 +2,8 @@
- /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
- /* This file is released under the LGPL, any version you like */
-
- -#define _ASM
- -#define _SETJMP_H
- #include <features.h>
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- .globl __longjmp
- .type __longjmp,@function
- @@ -17,7 +15,7 @@
- movel #1, %d0
- 1:
- moveml %a0@(JB_REGS), %d2-%d7/%a2-%a7
- -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
- +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
- fmovemx %a0@(JB_FPREGS), %fp2-%fp7
- #endif
- movel %a0@(JB_PC), %sp@
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/Makefile.arch uClibc/libc/sysdeps/linux/m68k/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,6 +5,6 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c __syscall_error.c
- +CSRC-y := brk.c __syscall_error.c
-
- -SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
- +SSRC-y := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/setjmp.S uClibc/libc/sysdeps/linux/m68k/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -2,9 +2,8 @@
- /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
- /* This file is released under the LGPL, any version you like */
-
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <features.h>
- +#include <jmpbuf-offsets.h>
- #include "m68k_pic.S"
-
- .globl __sigsetjmp;
- @@ -15,7 +14,7 @@
- moveal %sp@(4), %a0
- movel %sp@(0), %a0@(JB_PC)
- moveml %d2-%d7/%a2-%a7, %a0@(JB_REGS)
- -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
- +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
- fmovemx %fp2-%fp7, %a0@(JB_FPREGS)
- #endif
- clrl %d0
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/procfs.h uClibc/libc/sysdeps/linux/m68k/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/reg.h uClibc/libc/sysdeps/linux/m68k/sys/reg.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/reg.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/sys/reg.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_REG_H
- #define _SYS_REG_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/ucontext.h uClibc/libc/sysdeps/linux/m68k/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* System V/m68k ABI compliant context switching support. */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/vfork.S uClibc/libc/sysdeps/linux/m68k/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/m68k/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -4,9 +4,7 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <features.h>
- -
- -#include <asm/unistd.h>
- +#include <sys/syscall.h>
-
- #ifndef __NR_vfork
- #define __NR_vfork __NR_fork /* uClinux-2.0 only has fork which is vfork */
- @@ -16,7 +14,6 @@
-
- .text
- .align 2
- - .globl errno
- .globl __vfork
- .hidden __vfork
- .type __vfork,@function
- @@ -42,4 +39,4 @@
-
- .size __vfork,.-__vfork
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/Makefile.commonarch uClibc/libc/sysdeps/linux/Makefile.commonarch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/Makefile.commonarch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/Makefile.commonarch 2014-02-03 12:32:56.000000000 +0100
- @@ -8,15 +8,15 @@
- ARCH_DIR := $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
- ARCH_OUT := $(top_builddir)libc/sysdeps/linux/$(TARGET_ARCH)
-
- -ARCH_CSRC := $(patsubst %.c,$(ARCH_DIR)/%.c,$(CSRC))
- -ARCH_COBJ := $(patsubst %.c,$(ARCH_OUT)/%.o,$(CSRC))
- -ARCH_SSRC = $(patsubst %.s,$(ARCH_DIR)/%.s,$(patsubst %.S,$(ARCH_DIR)/%.S,$(SSRC)))
- -ARCH_SOBJ = $(patsubst %.s,$(ARCH_OUT)/%.o,$(patsubst %.S,$(ARCH_OUT)/%.o,$(SSRC)))
- +ARCH_CSRC := $(addprefix $(ARCH_DIR)/,$(CSRC-y))
- +ARCH_COBJ := $(addprefix $(ARCH_OUT)/,$(CSRC-y:.c=.o))
- +ARCH_SSRC = $(addprefix $(ARCH_DIR)/,$(SSRC-y))
- +ARCH_SOBJ = $(patsubst %.s,%.o,$(patsubst %.S,%.o,$(addprefix $(ARCH_OUT)/,$(SSRC-y))))
-
- -ARCH_OBJS = $(ARCH_COBJ) $(ARCH_SOBJ)
- +ARCH_OBJS-y = $(ARCH_COBJ) $(ARCH_SOBJ)
-
- crt-y := FORCE
- -libc-y += $(ARCH_OBJS)
- +libc-y += $(ARCH_OBJS-y)
- libc-nomulti-y += $(ARCH_SOBJ)
- objclean-y += CLEAN_$(subst $(top_builddir),,$(ARCH_OUT))
-
- @@ -37,5 +37,23 @@
- headers_clean-y += HEADERCLEAN_$(subst $(top_builddir),,$(ARCH_OUT))
- HEADERCLEAN_$(subst $(top_builddir),,$(ARCH_OUT)):
- $(do_rm) $(ARCH_HEADERS_OUT)
- -
- endif
- +
- +CFLAGS-ucontext_i.c = -S
- +
- +$(ARCH_OUT)/ucontext_i.c: $(ARCH_DIR)/ucontext_i.sym
- + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@
- +
- +$(ARCH_OUT)/ucontext_i.s: $(ARCH_OUT)/ucontext_i.c
- + $(compile.c)
- +
- +$(ARCH_OUT)/ucontext_i.h: $(ARCH_OUT)/ucontext_i.s
- + $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@
- +
- +pregen-headers-$(UCLIBC_HAS_CONTEXT_FUNCS) += $(ARCH_OUT)/ucontext_i.h
- +
- +headers_clean-$(UCLIBC_HAS_CONTEXT_FUNCS) += \
- + HEADERCLEAN_$(subst $(top_builddir),,$(ARCH_OUT)/ucontext_i)
- +
- +HEADERCLEAN_$(subst $(top_builddir),,$(ARCH_OUT)/ucontext_i):
- + $(do_rm) $(addprefix $(ARCH_OUT)/ucontext_i., c h s)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/atomic.h uClibc/libc/sysdeps/linux/metag/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/atomic.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,66 @@
- +/*
- + * Copyrith (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + *
- + */
- +
- +#include <stdint.h>
- +#include <sysdep.h>
- +
- +typedef int8_t atomic8_t;
- +typedef uint8_t uatomic8_t;
- +typedef int_fast8_t atomic_fast8_t;
- +typedef uint_fast8_t uatomic_fast8_t;
- +
- +typedef int32_t atomic32_t;
- +typedef uint32_t uatomic32_t;
- +typedef int_fast32_t atomic_fast32_t;
- +typedef uint_fast32_t uatomic_fast32_t;
- +
- +typedef intptr_t atomicptr_t;
- +typedef uintptr_t uatomicptr_t;
- +typedef intmax_t atomic_max_t;
- +typedef uintmax_t uatomic_max_t;
- +
- +void __metag_link_error (void);
- +
- +#define atomic_full_barrier() \
- + __asm__ __volatile__("": : :"memory")
- +
- +/* Atomic compare and exchange. This sequence relies on the kernel to
- + provide a compare and exchange operation which is atomic. */
- +
- +#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
- + ({ __metag_link_error (); oldval; })
- +
- +#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
- + ({ __metag_link_error (); oldval; })
- +
- +/* This code uses the kernel helper to do cmpxchg. It relies on the fact
- + the helper code only clobbers D0Re0. */
- +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- + ({ register __typeof (oldval) a_current __asm__ ("D1Ar1"); \
- + register __typeof (oldval) a_newval __asm__ ("D0Ar2") = (newval); \
- + register __typeof (mem) a_ptr __asm__ ("D1Ar3") = (mem); \
- + register __typeof (oldval) a_oldval __asm__ ("D0Ar4") = (oldval); \
- + __asm__ __volatile__ \
- + ("0:\n\t" \
- + "GETD %[cur], [%[ptr]]\n\t" \
- + "CMP %[cur], %[old]\n\t" \
- + "BNE 1f\n\t" \
- + "MOVT D1RtP, #0x6fff\n\t" \
- + "ADD D1RtP, D1RtP, #0xf040\n\t" \
- + "SWAP D1RtP, PC\n\t" \
- + "MOV %[cur], %[old]\n\t" \
- + "CMP D0Re0, #0\n\t" \
- + "BNE 0b\n\t" \
- + "1:" \
- + : [cur] "=&r" (a_current) \
- + : [new] "r" (a_newval), [ptr] "r" (a_ptr), \
- + [old] "r" (a_oldval) \
- + : "D0Re0", "D1RtP", "cc", "memory"); \
- + a_current; })
- +
- +#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
- + ({ __metag_link_error (); oldval; })
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/endian.h uClibc/libc/sysdeps/linux/metag/bits/endian.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/endian.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/endian.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,12 @@
- +/* Meta is little endian
- + *
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _ENDIAN_H
- +# error "Never use <bits/endian.h> directly; include <endian.h> instead."
- +#endif
- +
- +#define __BYTE_ORDER __LITTLE_ENDIAN
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/fcntl.h uClibc/libc/sysdeps/linux/metag/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/fcntl.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,238 @@
- +/* O_*, F_*, FD_* bit values for Linux.
- + Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2008
- + Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#ifndef _FCNTL_H
- +# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- +#endif
- +
- +#include <sys/types.h>
- +#ifdef __USE_GNU
- +# include <bits/uio.h>
- +#endif
- +
- +
- +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- + located on an ext2 file system */
- +#define O_ACCMODE 0003
- +#define O_RDONLY 00
- +#define O_WRONLY 01
- +#define O_RDWR 02
- +#define O_CREAT 0100 /* not fcntl */
- +#define O_EXCL 0200 /* not fcntl */
- +#define O_NOCTTY 0400 /* not fcntl */
- +#define O_TRUNC 01000 /* not fcntl */
- +#define O_APPEND 02000
- +#define O_NONBLOCK 04000
- +#define O_NDELAY O_NONBLOCK
- +#define O_SYNC 010000
- +#define O_FSYNC O_SYNC
- +#define O_ASYNC 020000
- +
- +#ifdef __USE_GNU
- +# define O_DIRECT 040000 /* Direct disk access. */
- +# define O_DIRECTORY 0200000 /* Must be a directory. */
- +# define O_NOFOLLOW 0400000 /* Do not follow links. */
- +# define O_NOATIME 01000000 /* Do not set atime. */
- +# define O_CLOEXEC 02000000 /* Set close_on_exec. */
- +#endif
- +
- +/* For now Linux has synchronisity options for data and read operations.
- + We define the symbols here but let them do the same as O_SYNC since
- + this is a superset. */
- +#if defined __USE_POSIX199309 || defined __USE_UNIX98
- +# define O_DSYNC O_SYNC /* Synchronize data. */
- +# define O_RSYNC O_SYNC /* Synchronize read operations. */
- +#endif
- +
- +#ifdef __USE_LARGEFILE64
- +# define O_LARGEFILE 0100000
- +#endif
- +
- +/* Values for the second argument to `fcntl'. */
- +#define F_DUPFD 0 /* Duplicate file descriptor. */
- +#define F_GETFD 1 /* Get file descriptor flags. */
- +#define F_SETFD 2 /* Set file descriptor flags. */
- +#define F_GETFL 3 /* Get file status flags. */
- +#define F_SETFL 4 /* Set file status flags. */
- +#ifndef __USE_FILE_OFFSET64
- +# define F_GETLK 5 /* Get record locking info. */
- +# define F_SETLK 6 /* Set record locking info (non-blocking). */
- +# define F_SETLKW 7 /* Set record locking info (blocking). */
- +#else
- +# define F_GETLK F_GETLK64 /* Get record locking info. */
- +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
- +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
- +#endif
- +#define F_GETLK64 12 /* Get record locking info. */
- +#define F_SETLK64 13 /* Set record locking info (non-blocking). */
- +#define F_SETLKW64 14 /* Set record locking info (blocking). */
- +
- +#if defined __USE_BSD || defined __USE_UNIX98
- +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
- +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
- +#endif
- +
- +#ifdef __USE_GNU
- +# define F_SETSIG 10 /* Set number of signal to be sent. */
- +# define F_GETSIG 11 /* Get number of signal to be sent. */
- +#endif
- +
- +#ifdef __USE_GNU
- +# define F_SETLEASE 1024 /* Set a lease. */
- +# define F_GETLEASE 1025 /* Enquire what lease is active. */
- +# define F_NOTIFY 1026 /* Request notfications on a directory. */
- +# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- + close-on-exit set on new fd. */
- +#endif
- +
- +/* For F_[GET|SET]FD. */
- +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
- +
- +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
- +#define F_RDLCK 0 /* Read lock. */
- +#define F_WRLCK 1 /* Write lock. */
- +#define F_UNLCK 2 /* Remove lock. */
- +
- +/* For old implementation of bsd flock(). */
- +#define F_EXLCK 4 /* or 3 */
- +#define F_SHLCK 8 /* or 4 */
- +
- +#ifdef __USE_BSD
- +/* Operations for bsd flock(), also used by the kernel implementation. */
- +# define LOCK_SH 1 /* shared lock */
- +# define LOCK_EX 2 /* exclusive lock */
- +# define LOCK_NB 4 /* or'd with one of the above to prevent
- + blocking */
- +# define LOCK_UN 8 /* remove lock */
- +#endif
- +
- +#ifdef __USE_GNU
- +# define LOCK_MAND 32 /* This is a mandatory flock: */
- +# define LOCK_READ 64 /* ... which allows concurrent read operations. */
- +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
- +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
- +#endif
- +
- +#ifdef __USE_GNU
- +/* Types of directory notifications that may be requested with F_NOTIFY. */
- +# define DN_ACCESS 0x00000001 /* File accessed. */
- +# define DN_MODIFY 0x00000002 /* File modified. */
- +# define DN_CREATE 0x00000004 /* File created. */
- +# define DN_DELETE 0x00000008 /* File removed. */
- +# define DN_RENAME 0x00000010 /* File renamed. */
- +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
- +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
- +#endif
- +
- +struct flock
- + {
- + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- +#ifndef __USE_FILE_OFFSET64
- + __off_t l_start; /* Offset where the lock begins. */
- + __off_t l_len; /* Size of the locked area; zero means until EOF. */
- +#else
- + __off64_t l_start; /* Offset where the lock begins. */
- + __off64_t l_len; /* Size of the locked area; zero means until EOF. */
- +#endif
- + __pid_t l_pid; /* Process holding the lock. */
- + };
- +
- +#ifdef __USE_LARGEFILE64
- +struct flock64
- + {
- + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- + __off64_t l_start; /* Offset where the lock begins. */
- + __off64_t l_len; /* Size of the locked area; zero means until EOF. */
- + __pid_t l_pid; /* Process holding the lock. */
- + };
- +#endif
- +
- +/* Define some more compatibility macros to be backward compatible with
- + BSD systems which did not managed to hide these kernel macros. */
- +#ifdef __USE_BSD
- +# define FAPPEND O_APPEND
- +# define FFSYNC O_FSYNC
- +# define FASYNC O_ASYNC
- +# define FNONBLOCK O_NONBLOCK
- +# define FNDELAY O_NDELAY
- +#endif /* Use BSD. */
- +
- +/* Advise to `posix_fadvise'. */
- +#ifdef __USE_XOPEN2K
- +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
- +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
- +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
- +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
- +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
- +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
- +#endif
- +
- +
- +#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- +/* Flags for SYNC_FILE_RANGE. */
- +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- + in the range before performing the
- + write. */
- +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- + dirty pages in the range which are
- + not presently under writeback. */
- +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- + the range after performing the
- + write. */
- +
- +/* Flags for SPLICE and VMSPLICE. */
- +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
- +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- + (but we may still block on the fd
- + we splice from/to). */
- +# define SPLICE_F_MORE 4 /* Expect more data. */
- +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
- +#endif
- +
- +__BEGIN_DECLS
- +
- +#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- +
- +/* Provide kernel hint to read ahead. */
- +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- + __THROW;
- +
- +/* Selective file content synch'ing. */
- +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
- + unsigned int __flags);
- +
- +/* Splice address range into a pipe. */
- +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- + size_t __count, unsigned int __flags);
- +
- +/* Splice two files together. */
- +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- + __off64_t *__offout, size_t __len,
- + unsigned int __flags);
- +
- +/* In-kernel implementation of tee for pipe buffers. */
- +extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- + unsigned int __flags);
- +
- +#endif
- +__END_DECLS
- +
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/fenv.h uClibc/libc/sysdeps/linux/metag/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/fenv.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,77 @@
- +/* Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#ifndef _FENV_H
- +# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- +#endif
- +
- +
- +/* Define bits representing the exception. We use the bit positions
- + of the appropriate bits in TXDEFR. */
- +enum
- + {
- + FE_INEXACT = 0x1,
- +#define FE_INEXACT FE_INEXACT
- + FE_UNDERFLOW = 0x2,
- +#define FE_UNDERFLOW FE_UNDERFLOW
- + FE_OVERFLOW = 0x4,
- +#define FE_OVERFLOW FE_OVERFLOW
- + FE_DIVBYZERO = 0x8,
- +#define FE_DIVBYZERO FE_DIVBYZERO
- + FE_INVALID = 0x10,
- +#define FE_INVALID FE_INVALID
- + };
- +
- +#define FE_ALL_EXCEPT \
- + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
- +
- +/* The Meta FPU supports all of the four defined rounding modes. We
- + use the values of the rounding mode bits in TXMODE as the values
- + for the appropriate macros. */
- +enum
- + {
- + FE_TONEAREST = 0x0,
- +#define FE_TONEAREST FE_TONEAREST
- + FE_TOWARDZERO = 0x1,
- +#define FE_TOWARDZERO FE_TOWARDZERO
- + FE_UPWARD = 0x2,
- +#define FE_UPWARD FE_UPWARD
- + FE_DOWNWARD = 0x3
- +#define FE_DOWNWARD FE_DOWNWARD
- + };
- +
- +
- +/* Type representing exception flags. */
- +typedef unsigned int fexcept_t;
- +
- +
- +/* Type representing floating-point environment. */
- +typedef struct
- + {
- + unsigned int txdefr;
- + unsigned int txmode;
- + }
- +fenv_t;
- +
- +/* If the default argument is used we use this value. */
- +#define FE_DFL_ENV ((__const fenv_t *) -1)
- +
- +#ifdef __USE_GNU
- +/* Floating-point environment where none of the exception is masked. */
- +# define FE_NOMASK_ENV ((__const fenv_t *) -2)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/ipc.h uClibc/libc/sysdeps/linux/metag/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/ipc.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,55 @@
- +/* Copyright (C) 1995-1999, 2000, 2005, 2007 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- + Boston, MA 02110-1301, USA. */
- +
- +#ifndef _SYS_IPC_H
- +# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- +#endif
- +
- +#include <bits/types.h>
- +
- +/* Mode bits for `msgget', `semget', and `shmget'. */
- +#define IPC_CREAT 01000 /* Create key if key does not exist. */
- +#define IPC_EXCL 02000 /* Fail if key exists. */
- +#define IPC_NOWAIT 04000 /* Return error on wait. */
- +
- +/* Control commands for `msgctl', `semctl', and `shmctl'. */
- +#define IPC_RMID 0 /* Remove identifier. */
- +#define IPC_SET 1 /* Set `ipc_perm' options. */
- +#define IPC_STAT 2 /* Get `ipc_perm' options. */
- +#ifdef __USE_GNU
- +# define IPC_INFO 3 /* See ipcs. */
- +#endif
- +
- +/* Special key values. */
- +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
- +
- +
- +/* Data structure used to pass permission information to IPC operations. */
- +struct ipc_perm
- + {
- + __key_t __key; /* Key. */
- + __uid_t uid; /* Owner's user ID. */
- + __gid_t gid; /* Owner's group ID. */
- + __uid_t cuid; /* Creator's user ID. */
- + __gid_t cgid; /* Creator's group ID. */
- + unsigned int mode; /* Read/write permission. */
- + unsigned short __seq; /* Sequence number. */
- + unsigned short __pad1;
- + unsigned long __unused1;
- + unsigned long __unused2;
- + };
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/kernel_types.h uClibc/libc/sysdeps/linux/metag/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/kernel_types.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,47 @@
- +/* Note that we use the exact same include guard #define names
- + * as asm/posix_types.h. This will avoid gratuitous conflicts
- + * with the posix_types.h kernel header, and will ensure that
- + * our private content, and not the kernel header, will win.
- + * -Erik
- + *
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef __ASM_GENERIC_POSIX_TYPES_H
- +#define __ASM_GENERIC_POSIX_TYPES_H
- +
- +typedef unsigned int __kernel_dev_t;
- +typedef unsigned int __kernel_ino_t;
- +typedef unsigned int __kernel_mode_t;
- +typedef unsigned long __kernel_nlink_t;
- +typedef long __kernel_off_t;
- +typedef int __kernel_pid_t;
- +typedef unsigned int __kernel_uid_t;
- +typedef unsigned int __kernel_gid_t;
- +typedef unsigned int __kernel_size_t;
- +typedef int __kernel_ssize_t;
- +typedef long __kernel_ptrdiff_t;
- +typedef long __kernel_time_t;
- +typedef long __kernel_suseconds_t;
- +typedef long __kernel_clock_t;
- +typedef int __kernel_daddr_t;
- +typedef char * __kernel_caddr_t;
- +typedef int __kernel_ipc_pid_t;
- +typedef unsigned short __kernel_uid16_t;
- +typedef unsigned short __kernel_gid16_t;
- +typedef unsigned int __kernel_uid32_t;
- +typedef unsigned int __kernel_gid32_t;
- +typedef unsigned int __kernel_old_uid_t;
- +typedef unsigned int __kernel_old_gid_t;
- +typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long long __kernel_loff_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- +
- +typedef struct {
- + int val[2];
- +} __kernel_fsid_t;
- +
- +#endif /* __ASM_GENERIC_POSIX_TYPES_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/profil-counter.h uClibc/libc/sysdeps/linux/metag/bits/profil-counter.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/profil-counter.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/profil-counter.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,17 @@
- +/*
- + * Low-level statistical profiling support function. Linux/Meta version.
- + *
- + * Copyright (C) 2013, Imagination Technologies Ltd.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + *
- + * Based on the SH version from the GNU C Library.
- + */
- +
- +#include <signal.h>
- +
- +static void
- +profil_counter (int signo, struct sigcontext sc)
- +{
- + profil_count (sc.cbuf.ctx.CurrPC);
- +}
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/setjmp.h uClibc/libc/sysdeps/linux/metag/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/setjmp.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,44 @@
- +/*
- + * Copyright (C) 2013, Imagination Technologies Ltd.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +/* Define the machine-dependent type `jmp_buf' */
- +#ifndef _BITS_SETJMP_H
- +#define _BITS_SETJMP_H 1
- +
- +#if !defined _SETJMP_H && !defined _PTHREAD_H
- +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- +#endif
- +
- +/*
- + jmp_buf[0] - A0StP
- + jmp_buf[1] - A1GbP
- + jmp_buf[2] - A0FrP
- + jmp_buf[3] - A1LbP
- + jmp_buf[4] - D0FrT
- + jmp_buf[5] - D1RtP
- + jmp_buf[6] - D0.5
- + jmp_buf[7] - D1.5
- + jmp_buf[8] - D0.6
- + jmp_buf[9] - D1.6
- + jmp_buf[10] - D0.7
- + jmp_buf[11] - D1.7
- + */
- +
- +#define _JBLEN 24
- +#if defined (__USE_MISC) || defined (_ASM)
- +#define JB_SP 0
- +#endif
- +
- +#ifndef _ASM
- +typedef int __jmp_buf[_JBLEN] __attribute__((aligned (8)));
- +#endif
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) > (void *) (jmpbuf)[JB_SP])
- +
- +#endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/metag/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/sigcontextinfo.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,14 @@
- +/*
- + * Copyright (C) 2013, Imagination Technologies Ltd.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + *
- + */
- +
- +#define SIGCONTEXT struct sigcontext
- +#define SIGCONTEXT_EXTRA_ARGS
- +#define GET_PC(ctx) ((void *) ctx.cbuf.ctx.CurrPC)
- +#define GET_FRAME(ctx) ((void *) ctx.cbuf.ctx.AX[1].U0)
- +#define GET_STACK(ctx) ((void *) ctx.cbuf.ctx.AX[0].U0)
- +#define CALL_SIGHANDLER(handler, signo, ctx) \
- + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/stackinfo.h uClibc/libc/sysdeps/linux/metag/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/stackinfo.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,28 @@
- +/* Copyright (C) 2001 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +/* This file contains a bit of information about the stack allocation
- + of the processor. */
- +
- +#ifndef _STACKINFO_H
- +#define _STACKINFO_H 1
- +
- +/* On Meta the stack grows up. */
- +#define _STACK_GROWS_UP 1
- +
- +#endif /* stackinfo.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/syscalls.h uClibc/libc/sysdeps/linux/metag/bits/syscalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/syscalls.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,120 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + *
- + */
- +
- +#ifndef _BITS_SYSCALLS_H
- +#define _BITS_SYSCALLS_H
- +#ifndef _SYSCALL_H
- +# error "Never use <bits/syscalls.h> directly; include <sys/syscall.h> instead."
- +#endif
- +
- +/*
- + Meta version adapted from the ARM version.
- +*/
- +
- +#define SYS_ify(syscall_name) (__NR_##syscall_name)
- +
- +#ifdef __ASSEMBLER__
- +
- +/* Call a given syscall, with arguments loaded. */
- +#undef DO_CALL
- +#define DO_CALL(syscall_name, args) \
- + MOV D1Re0, #SYS_ify (syscall_name); \
- + SWITCH #0x440001
- +
- +#else
- +
- +#include <errno.h>
- +
- +#undef INLINE_SYSCALL_NCS
- +#define INLINE_SYSCALL_NCS(name, nr, args...) \
- +(__extension__ \
- + ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL_NCS (name, , nr, args); \
- + if (unlikely(INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ))) \
- + { \
- + __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, )); \
- + _inline_sys_result = (unsigned int) -1; \
- + } \
- + (int) _inline_sys_result; }) \
- +)
- +
- +#undef INTERNAL_SYSCALL_DECL
- +#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
- +
- +#undef INTERNAL_SYSCALL_NCS
- +#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
- +(__extension__ \
- + ({unsigned int __sys_result; \
- + { \
- + PREP_ARGS_##nr (args); \
- + register int _result __asm__ ("D0Re0"), _nr __asm__ ("D1Re0"); \
- + LOAD_ARGS_##nr; \
- + _nr = (name); \
- + __asm__ volatile ("SWITCH #0x440001 ! syscall " #name \
- + : "=r" (_result) \
- + : "d" (_nr) ASM_ARGS_##nr \
- + : "memory"); \
- + __sys_result = _result; \
- + } \
- + (int) __sys_result; }) \
- +)
- +
- +#undef INTERNAL_SYSCALL_ERROR_P
- +#define INTERNAL_SYSCALL_ERROR_P(val, err) \
- + ((unsigned int) (val) >= 0xfffff001u)
- +
- +#undef INTERNAL_SYSCALL_ERRNO
- +#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
- +
- +#define PREP_ARGS_0()
- +#define PREP_ARGS_1(a1) \
- + int _t1 = (int) (a1); \
- + PREP_ARGS_0 ()
- +#define PREP_ARGS_2(a1, a2) \
- + int _t2 = (int) (a2); \
- + PREP_ARGS_1 (a1)
- +#define PREP_ARGS_3(a1, a2, a3) \
- + int _t3 = (int) (a3); \
- + PREP_ARGS_2 (a1, a2)
- +#define PREP_ARGS_4(a1, a2, a3, a4) \
- + int _t4 = (int) (a4); \
- + PREP_ARGS_3 (a1, a2, a3)
- +#define PREP_ARGS_5(a1, a2, a3, a4, a5) \
- + int _t5 = (int) (a5); \
- + PREP_ARGS_4 (a1, a2, a3, a4)
- +#define PREP_ARGS_6(a1, a2, a3, a4, a5, a6) \
- + int _t6 = (int) (a6); \
- + PREP_ARGS_5 (a1, a2, a3, a4, a5)
- +
- +#define LOAD_ARGS_0
- +#define ASM_ARGS_0
- +#define LOAD_ARGS_1 \
- + register int _a1 __asm__ ("D1Ar1") = (int) (_t1); \
- + LOAD_ARGS_0
- +#define ASM_ARGS_1 ASM_ARGS_0, "d" (_a1)
- +#define LOAD_ARGS_2 \
- + register int _a2 __asm__ ("D0Ar2") = (int) (_t2); \
- + LOAD_ARGS_1
- +#define ASM_ARGS_2 ASM_ARGS_1, "d" (_a2)
- +#define LOAD_ARGS_3 \
- + register int _a3 __asm__ ("D1Ar3") = (int) (_t3); \
- + LOAD_ARGS_2
- +#define ASM_ARGS_3 ASM_ARGS_2, "d" (_a3)
- +#define LOAD_ARGS_4 \
- + register int _a4 __asm__ ("D0Ar4") = (int) (_t4); \
- + LOAD_ARGS_3
- +#define ASM_ARGS_4 ASM_ARGS_3, "d" (_a4)
- +#define LOAD_ARGS_5 \
- + register int _a5 __asm__ ("D1Ar5") = (int) (_t5); \
- + LOAD_ARGS_4
- +#define ASM_ARGS_5 ASM_ARGS_4, "d" (_a5)
- +#define LOAD_ARGS_6 \
- + register int _a6 __asm__ ("D0Ar6") = (int) (_t6); \
- + LOAD_ARGS_5
- +#define ASM_ARGS_6 ASM_ARGS_5, "d" (_a6)
- +
- +#endif /* __ASSEMBLER__ */
- +#endif /* _BITS_SYSCALLS_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/metag/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/uClibc_arch_features.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,46 @@
- +/*
- + * Track misc arch-specific features that aren't config options
- + *
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _BITS_UCLIBC_ARCH_FEATURES_H
- +#define _BITS_UCLIBC_ARCH_FEATURES_H
- +
- +/* instruction used when calling abort() to kill yourself */
- +/*#define __UCLIBC_ABORT_INSTRUCTION__ "asm instruction"*/
- +#undef __UCLIBC_ABORT_INSTRUCTION__
- +
- +/* can your target use syscall6() for mmap ? */
- +#define __UCLIBC_MMAP_HAS_6_ARGS__
- +
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
- +
- +/* does your target have a broken create_module() ? */
- +#undef __UCLIBC_BROKEN_CREATE_MODULE__
- +
- +/* does your target have to worry about older [gs]etrlimit() ? */
- +#undef __UCLIBC_HANDLE_OLDER_RLIMIT__
- +
- +/* does your target have an asm .set ? */
- +#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
- +
- +/* define if target doesn't like .global */
- +#undef __UCLIBC_ASM_GLOBAL_DIRECTIVE__
- +
- +/* define if target supports .weak */
- +#define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
- +
- +/* define if target supports .weakext */
- +#undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
- +
- +/* needed probably only for ppc64 */
- +#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
- +
- +/* define if target supports IEEE signed zero floats */
- +#define __UCLIBC_HAVE_SIGNED_ZERO__
- +
- +#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/wordsize.h uClibc/libc/sysdeps/linux/metag/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/wordsize.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,19 @@
- +/* Copyright (C) 1999 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/brk.c uClibc/libc/sysdeps/linux/metag/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/brk.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,38 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <errno.h>
- +#include <unistd.h>
- +#include <sys/syscall.h>
- +
- +libc_hidden_proto(brk)
- +
- +/* This must be initialized data because commons can't have aliases. */
- +void * __curbrk attribute_hidden = 0;
- +
- +int brk (void *addr)
- +{
- + void *newbrk;
- +
- + __asm__ __volatile__ ("MOV D1Re0,%2\n\t"
- + "MOV D1Ar1,%1\n\t"
- + "SWITCH #0x440001\n\t"
- + "MOV %0,D0Re0"
- + : "=r" (newbrk)
- + : "r" (addr), "K" (__NR_brk)
- + : "D0Re0", "D1Re0", "D1Ar1");
- +
- + __curbrk = newbrk;
- +
- + if (newbrk < addr)
- + {
- + __set_errno (ENOMEM);
- + return -1;
- + }
- +
- + return 0;
- +}
- +libc_hidden_def(brk)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/clone.S uClibc/libc/sysdeps/linux/metag/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/clone.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,101 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +! clone() is even more special than fork() as it mucks with stacks
- +! and invokes a function in the right context after its all over.
- +
- +#include <asm/errno.h>
- +#include <asm/unistd.h>
- +
- +#define CLONE_VM 0x00000100
- +#define CLONE_THREAD 0x00010000
- +
- +#ifdef __PIC__
- +#define __CLONE_METAG_LOAD_TP ___metag_load_tp@PLT
- +#else
- +#define __CLONE_METAG_LOAD_TP ___metag_load_tp
- +#endif
- +
- +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
- + pid_t *ptid, struct user_desc *tls, pid_t *ctid); */
- +
- + .text
- + .global __clone
- + .type __clone,function
- +__clone:
- + ! sanity check args
- + MOV D0Re0, #-EINVAL
- + CMP D1Ar1, #0
- + BEQ ___error
- + CMP D0Ar2, #0
- + BEQ ___error
- +
- + ! save function pointer
- + MOV D0FrT, D1Ar1
- +
- + ! do the system call
- + MOV D1Ar1, D1Ar3
- + MOV D1Ar3, D1Ar5
- + MOV D1Ar5, D0Ar6
- + MOV D0Ar6, D0Ar4
- + GETD D0Ar4, [A0StP+#-4]
- +
- + ! new sp is already in D0Ar2
- + MOV D1Re0, #__NR_clone
- + SWITCH #0x440001
- + CMP D0Re0,#0
- + ! Error on -1
- + BLT ___error
- + ! If non-zero we are the parent
- + MOVNE PC, D1RtP
- + ! BRKPNT
- +
- + ! We are the child
- +#ifdef RESET_PID
- + SETL [A0StP++], D0FrT, D1RtP
- + MOVT D0FrT, #HI(CLONE_THREAD)
- + ADD D0FrT, D0FrT, #LO(CLONE_THREAD)
- + ANDS D0FrT, D0FrT, D1Ar1
- + BNZ 3f
- + MOVT D0FrT, #HI(CLONE_VM)
- + ADD D0FrT, D0FrT, #LO(CLONE_VM)
- + ANDS D0FrT, D0FrT, D1Ar1
- + BZ 1f
- + MOV D1Ar1, #-1
- + BA 2f
- +1: MOV D1Re0, #__NR_getpid
- + SWITCH #0x440001
- + MOV D1Ar1, D0Re0
- +2: CALLR D1RtP, __CLONE_METAG_LOAD_TP
- + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE
- + SETD [D0Re0 + #PID], D1Ar1
- + SETD [D0Re0 + #TID], D1Ar1
- +3: GETL D0FrT, D1RtP, [--A0StP]
- +#endif
- + ! Rearrange the function arg and call address from registers
- + MOV D0Ar2, D0FrT
- + MOV D1Ar1, D0Ar6
- + MOV D1RtP, PC
- + ADD D1RtP, D1RtP, #8
- + MOV PC, D0Ar2
- +
- + ! and we are done, passing the return value D0Re0 through D1Ar1
- + MOV D1Ar1, D0Re0
- +#ifdef __PIC__
- + B _exit@PLT
- +#else
- + B _exit
- +#endif
- +
- +___error:
- + MOV D1Ar1, D0Re0
- +#ifdef __PIC__
- + B ___syscall_error@PLT
- +#else
- + B ___syscall_error
- +#endif
- + .size __clone, .-__clone
- +
- +.weak _clone
- +_clone = __clone
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/crt1.S uClibc/libc/sysdeps/linux/metag/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/crt1.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,75 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +
- +#include <asm/unistd.h>
- +
- + .text
- + .global __start
- + .type __start,function
- +__start:
- + MOV D0FrT,A0StP
- + MOV A0FrP,A0StP
- +
- + MOV A0.2,#0
- + MOV A0.3,#0
- +
- + MOV A1.1,#0
- + MOV A1.2,#0
- + MOV A1.3,#0
- +
- + MOV D0.5,#0
- + MOV D0.6,#0
- + MOV D0.7,#0
- +
- + MOV D1.5,#0
- + MOV D1.6,#0
- + MOV D1.7,#0
- +
- + MOV D1Ar3,D0Ar2 ! argv
- + MOV D0Ar2,D1Ar1 ! argc
- + MOV D0Ar6,D0Ar4 ! rtld_fini
- +
- +#ifdef __PIC__
- + ADDT A1LbP,CPC1,#HI(__GLOBAL_OFFSET_TABLE__)
- + ADD A1LbP,A1LbP,#LO(__GLOBAL_OFFSET_TABLE__+4)
- +
- + MOV D1Ar1,A1LbP
- + ADDT D1Ar1,D1Ar1,#HI(_main@GOTOFF)
- + ADD D1Ar1,D1Ar1,#LO(_main@GOTOFF)
- +
- + MOV D0Ar4,A1LbP
- + ADDT D0Ar4,D0Ar4,#HI(__init@GOTOFF)
- + ADD D0Ar4,D0Ar4,#LO(__init@GOTOFF)
- +
- + MOV D1Ar5,A1LbP
- + ADDT D1Ar5,D1Ar5,#HI(__fini@GOTOFF)
- + ADD D1Ar5,D1Ar5,#LO(__fini@GOTOFF)
- +#else
- + MOVT D1Ar1,#HI(_main)
- + ADD D1Ar1,D1Ar1,#LO(_main)
- + MOVT D0Ar4,#HI(__init)
- + ADD D0Ar4,D0Ar4,#LO(__init)
- + MOVT D1Ar5,#HI(__fini)
- + ADD D1Ar5,D1Ar5,#LO(__fini)
- +#endif
- +
- + MOVT D1Re0,#0x80
- +
- + SETL [A0StP++],D0Re0,D1Re0 ! stack_end (8Mb)
- +
- + MOV D1Re0,#0
- + MOV D0Re0,#0
- +
- +#ifdef __PIC__
- + CALLR D1RtP, ___uClibc_main@PLT
- +#else
- + CALLR D1RtP, ___uClibc_main
- +#endif
- +
- + MOV D1Re0,#__NR_exit
- + MOV D1Ar1,#0x1
- + SWITCH #0x440001 ! exit syscall
- +
- + .size __start,.-__start
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/crti.S uClibc/libc/sysdeps/linux/metag/crti.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/crti.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/crti.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,19 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- + .section .init
- + .global __init
- + .type __init,function
- +__init:
- + MOV D0FrT, A0FrP
- + ADD A0FrP, A0StP, #0
- + SETL [A0StP++], D0.4, D1RtP
- +
- + .section .fini
- + .global __fini
- + .type __fini,function
- +__fini:
- + MOV D0FrT, A0FrP
- + ADD A0FrP, A0StP, #0
- + SETL [A0StP++], D0.4, D1RtP
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/crtn.S uClibc/libc/sysdeps/linux/metag/crtn.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/crtn.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/crtn.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,19 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- + .section .init
- + .global __init
- + .type __init,function
- + GETL D0.4, D1RtP, [A0FrP+#8++]
- + SUB A0StP, A0FrP, #8
- + MOV A0FrP, D0.4
- + MOV PC, D1RtP
- +
- + .section .fini
- + .global __fini
- + .type __fini,function
- + GETL D0.4, D1RtP, [A0FrP+#8++]
- + SUB A0StP, A0FrP, #8
- + MOV A0FrP, D0.4
- + MOV PC, D1RtP
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/libc-metag_load_tp.S uClibc/libc/sysdeps/linux/metag/libc-metag_load_tp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/libc-metag_load_tp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/libc-metag_load_tp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,7 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <ldso/ldso/metag/metag_load_tp.S>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/_longjmp.S uClibc/libc/sysdeps/linux/metag/_longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/_longjmp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/_longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,25 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +
- + .text
- + .global ___longjmp
- + .type ___longjmp,function
- +
- +___longjmp:
- + !! If val is 0, set it to 1
- + CMP D0Ar2,#0
- + ADDZ D0Ar2,D0Ar2,#1
- +
- + !! Restore A0/A1 regs
- + MGETL A0.0,A0.1,[D1Ar1++]
- + !! Restore D0/D1 regs
- + MOV A0.3,D1Ar1
- + MGETL D0FrT,D0.5,D0.6,D0.7,[A0.3++]
- + !! Move 2nd argument to return value
- + MOV D0Re0,D0Ar2
- + MOV PC,D1RtP
- + .size ___longjmp,.-___longjmp
- +
- +libc_hidden_def(__longjmp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/Makefile uClibc/libc/sysdeps/linux/metag/Makefile
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/Makefile 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,13 @@
- +# Makefile for uClibc
- +#
- +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
- +#
- +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +top_srcdir=../../../../
- +top_builddir=../../../../
- +all: objs
- +include $(top_builddir)Rules.mak
- +include Makefile.arch
- +include $(top_srcdir)Makerules
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/Makefile.arch uClibc/libc/sysdeps/linux/metag/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/Makefile.arch 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,12 @@
- +# Makefile for uClibc
- +#
- +# Copyright (C) 2013 Imagination Technologies Ltd.
- +#
- +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +CSRC-y := brk.c syscall.c metag.c __syscall_error.c
- +
- +SSRC-y := _longjmp.S clone.S setjmp.S vfork.S
- +
- +SSRC-$(UCLIBC_HAS_THREADS_NATIVE) += libc-metag_load_tp.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/metag.c uClibc/libc/sysdeps/linux/metag/metag.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/metag.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/metag.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <errno.h>
- +#include <sys/syscall.h>
- +
- +_syscall2(int,metag_setglobalbit,char *,addr,int,mask)
- +_syscall1(void,metag_set_fpu_flags,unsigned int,flags)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/setjmp.S uClibc/libc/sysdeps/linux/metag/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/setjmp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,52 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +!!! setjmp and variants
- + .text
- +
- +!! int _setjmp (jmp_buf __env)
- +!! Store the calling environment in ENV, not saving the signal mask.
- +!! Return 0. */
- + .global __setjmp
- + .type __setjmp,function
- +__setjmp:
- + MOV D0Ar2,#0
- + B ___sigsetjmp1
- + .size __setjmp,.-__setjmp
- +
- +!! int setjmp (jmp_buf __env)
- +!! Store the calling environment in ENV, also saving the signal mask.
- +!! Return 0. */
- + .global _setjmp
- + .type _setjmp,function
- +_setjmp:
- + MOV D0Ar2,#1
- + !! fall through to __sigsetjmp
- + .size _setjmp,.-_setjmp
- +
- +!! int __sigsetjmp (jmp_buf __env, int __savemask)
- +!! Store the calling environment in ENV, also saving the
- +!! signal mask if SAVEMASK is nonzero. Return 0.
- +!! This is the internal name for `sigsetjmp'.
- + .global ___sigsetjmp
- + .type ___sigsetjmp,function
- +___sigsetjmp:
- +___sigsetjmp1:
- + !! Save A0/A1 regs
- + MSETL [D1Ar1++],A0.0,A0.1
- + !! Use A0.3 as temp
- + MOV A0.3,D1Ar1
- + !! Rewind D1Ar1 that was modified above
- + SUB D1Ar1,D1Ar1,#(2*8)
- + !! Save D0/D1 regs
- + MSETL [A0.3++],D0FrT,D0.5,D0.6,D0.7
- + !! Tail call __sigjmp_save
- +#ifdef __PIC__
- + B ___sigjmp_save@PLT
- +#else
- + B ___sigjmp_save
- +#endif
- + .size ___sigsetjmp,.-___sigsetjmp
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/io.h uClibc/libc/sysdeps/linux/metag/sys/io.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/io.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/sys/io.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,48 @@
- +/* Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#ifndef _SYS_IO_H
- +
- +#define _SYS_IO_H 1
- +#include <features.h>
- +
- +__BEGIN_DECLS
- +
- +/* If TURN_ON is TRUE, request for permission to do direct i/o on the
- + port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
- + permission off for that range. This call requires root privileges. */
- +extern int ioperm (unsigned long int __from, unsigned long int __num,
- + int __turn_on) __THROW;
- +
- +/* Set the I/O privilege level to LEVEL. If LEVEL is nonzero,
- + permission to access any I/O port is granted. This call requires
- + root privileges. */
- +extern int iopl (int __level) __THROW;
- +
- +/* The functions that actually perform reads and writes. */
- +extern unsigned char inb (unsigned long int port) __THROW;
- +extern unsigned short int inw (unsigned long int port) __THROW;
- +extern unsigned long int inl (unsigned long int port) __THROW;
- +
- +extern void outb (unsigned char value, unsigned long int port) __THROW;
- +extern void outw (unsigned short value, unsigned long int port) __THROW;
- +extern void outl (unsigned long value, unsigned long int port) __THROW;
- +
- +__END_DECLS
- +
- +#endif /* _SYS_IO_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/procfs.h uClibc/libc/sysdeps/linux/metag/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/procfs.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,121 @@
- +/* Copyright (C) 1996, 1997, 1999, 2007 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- + Boston, MA 02110-1301, USA. */
- +
- +#ifndef _SYS_PROCFS_H
- +#define _SYS_PROCFS_H 1
- +
- +/* This is somewhat modelled after the file of the same name on SVR4
- + systems. It provides a definition of the core file format for ELF
- + used on Linux. It doesn't have anything to do with the /proc file
- + system, even though Linux has one.
- +
- + Anyway, the whole purpose of this file is for GDB and GDB only.
- + Don't read too much into it. Don't use it for anything other than
- + GDB unless you know what you are doing. */
- +
- +#include <features.h>
- +#include <sys/time.h>
- +#include <sys/types.h>
- +#include <sys/user.h>
- +
- +__BEGIN_DECLS
- +
- +/* Type for a general-purpose register. */
- +typedef unsigned long elf_greg_t;
- +
- +#define ELF_NGREG 30
- +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
- +
- +/* Register set for the floating-point registers. */
- +#define ELF_NFPREG 18
- +typedef unsigned long elf_fpreg_t;
- +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
- +
- +/* Signal info. */
- +struct elf_siginfo
- + {
- + int si_signo; /* Signal number. */
- + int si_code; /* Extra code. */
- + int si_errno; /* Errno. */
- + };
- +
- +/* Definitions to generate Intel SVR4-like core files. These mostly
- + have the same names as the SVR4 types with "elf_" tacked on the
- + front to prevent clashes with Linux definitions, and the typedef
- + forms have been avoided. This is mostly like the SVR4 structure,
- + but more Linuxy, with things that Linux does not support and which
- + GDB doesn't really use excluded. */
- +
- +struct elf_prstatus
- + {
- + struct elf_siginfo pr_info; /* Info associated with signal. */
- + short int pr_cursig; /* Current signal. */
- + unsigned long int pr_sigpend; /* Set of pending signals. */
- + unsigned long int pr_sighold; /* Set of held signals. */
- + __pid_t pr_pid;
- + __pid_t pr_ppid;
- + __pid_t pr_pgrp;
- + __pid_t pr_sid;
- + struct timeval pr_utime; /* User time. */
- + struct timeval pr_stime; /* System time. */
- + struct timeval pr_cutime; /* Cumulative user time. */
- + struct timeval pr_cstime; /* Cumulative system time. */
- + elf_gregset_t pr_reg; /* GP registers. */
- + int pr_fpvalid; /* True if math copro being used. */
- + };
- +
- +
- +#define ELF_PRARGSZ (80) /* Number of chars for args. */
- +
- +struct elf_prpsinfo
- + {
- + char pr_state; /* Numeric process state. */
- + char pr_sname; /* Char for pr_state. */
- + char pr_zomb; /* Zombie. */
- + char pr_nice; /* Nice val. */
- + unsigned long int pr_flag; /* Flags. */
- + unsigned short int pr_uid;
- + unsigned short int pr_gid;
- + int pr_pid, pr_ppid, pr_pgrp, pr_sid;
- + /* Lots missing */
- + char pr_fname[16]; /* Filename of executable. */
- + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
- + };
- +
- +/* The rest of this file provides the types for emulation of the
- + Solaris <proc_service.h> interfaces that should be implemented by
- + users of libthread_db. */
- +
- +/* Addresses. */
- +typedef void *psaddr_t;
- +
- +/* Register sets. Linux has different names. */
- +typedef elf_gregset_t prgregset_t;
- +typedef elf_fpregset_t prfpregset_t;
- +
- +/* We don't have any differences between processes and threads,
- + therefore have only one PID type. */
- +typedef __pid_t lwpid_t;
- +
- +/* Process status and info. In the end we do provide typedefs for them. */
- +typedef struct elf_prstatus prstatus_t;
- +typedef struct elf_prpsinfo prpsinfo_t;
- +
- +__END_DECLS
- +
- +#endif /* sys/procfs.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/ucontext.h uClibc/libc/sysdeps/linux/metag/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/ucontext.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,96 @@
- +/* Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +/* Meta ABI compliant context switching support. */
- +
- +#ifndef _SYS_UCONTEXT_H
- +#define _SYS_UCONTEXT_H 1
- +
- +#include <features.h>
- +#include <signal.h>
- +#include <sys/procfs.h>
- +
- +/* We need the signal context definitions even if they are not used
- + included in <signal.h>. */
- +#include <bits/sigcontext.h>
- +
- +typedef int greg_t;
- +
- +/* Number of general registers. */
- +#define NGREG 18
- +
- +/* Container for all general registers. */
- +typedef elf_gregset_t gregset_t;
- +
- +/* Number of each register is the `gregset_t' array. */
- +enum
- +{
- + R0 = 0,
- +#define R0 R0
- + R1 = 1,
- +#define R1 R1
- + R2 = 2,
- +#define R2 R2
- + R3 = 3,
- +#define R3 R3
- + R4 = 4,
- +#define R4 R4
- + R5 = 5,
- +#define R5 R5
- + R6 = 6,
- +#define R6 R6
- + R7 = 7,
- +#define R7 R7
- + R8 = 8,
- +#define R8 R8
- + R9 = 9,
- +#define R9 R9
- + R10 = 10,
- +#define R10 R10
- + R11 = 11,
- +#define R11 R11
- + R12 = 12,
- +#define R12 R12
- + R13 = 13,
- +#define R13 R13
- + R14 = 14,
- +#define R14 R14
- + R15 = 15
- +#define R15 R15
- +};
- +
- +/* Structure to describe FPU registers. */
- +typedef elf_fpregset_t fpregset_t;
- +
- +/* Context to describe whole processor state. This only describes
- + the core registers; coprocessor registers get saved elsewhere
- + (e.g. in uc_regspace, or somewhere unspecified on the stack
- + during non-RT signal handlers). */
- +typedef struct sigcontext mcontext_t;
- +
- +/* Userlevel context. */
- +typedef struct ucontext
- + {
- + unsigned long uc_flags;
- + struct ucontext *uc_link;
- + stack_t uc_stack;
- + mcontext_t uc_mcontext;
- + __sigset_t uc_sigmask;
- + } ucontext_t;
- +
- +#endif /* sys/ucontext.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/user.h uClibc/libc/sysdeps/linux/metag/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/user.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,7 @@
- +/*
- + * This file is not needed, but in practice gdb might try to include it.
- + *
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/syscall.c uClibc/libc/sysdeps/linux/metag/syscall.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/syscall.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/syscall.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,40 @@
- +/* syscall for META/uClibc
- + *
- + * Copyright (C) 2013 Imagination Technologies
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <features.h>
- +#include <errno.h>
- +#include <sys/types.h>
- +#include <sys/syscall.h>
- +
- +long syscall(long sysnum,
- + long arg1, long arg2, long arg3,
- + long arg4, long arg5, long arg6)
- +{
- +
- + register long __call __asm__ ("D1Re0") = sysnum;
- + register long __res __asm__ ("D0Re0");
- + register long __a __asm__ ("D1Ar1") = arg1;
- + register long __b __asm__ ("D0Ar2") = arg2;
- + register long __c __asm__ ("D1Ar3") = arg3;
- + register long __d __asm__ ("D0Ar4") = arg4;
- + register long __e __asm__ ("D1Ar5") = arg5;
- + register long __f __asm__ ("D0Ar6") = arg6;
- +
- +
- + __asm__ __volatile__ ("SWITCH #0x440001"
- + : "=d" (__res)
- + : "d" (__call), "d" (__a), "d" (__b),
- + "d" (__c), "d" (__d), "d" (__e) , "d" (__f)
- + : "memory");
- +
- + if(__res >= (unsigned long) -4095) {
- + long err = __res;
- + (*__errno_location()) = (-err);
- + __res = (unsigned long) -1;
- + }
- + return (long) __res;
- +}
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/__syscall_error.c uClibc/libc/sysdeps/linux/metag/__syscall_error.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/__syscall_error.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/__syscall_error.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,18 @@
- +/* Wrapper for setting errno.
- + *
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <errno.h>
- +#include <features.h>
- +
- +/* This routine is jumped to by all the syscall handlers, to stash
- + * an error number into errno. */
- +int __syscall_error(int err_no) attribute_hidden;
- +int __syscall_error(int err_no)
- +{
- + __set_errno(-err_no);
- + return -1;
- +}
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/sysdep.h uClibc/libc/sysdeps/linux/metag/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/sysdep.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,59 @@
- +/*
- + * Assembler macros for Meta.
- + *
- + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <common/sysdep.h>
- +
- +#include <features.h>
- +#include <libc-internal.h>
- +
- +#ifdef __ASSEMBLER__
- +
- +#ifdef SHARED
- +#define PLTJMP(_x) _x##@PLT
- +#else
- +#define PLTJMP(_x) _x
- +#endif
- +
- +#undef PSEUDO_END
- +#define PSEUDO_END(name) \
- + SYSCALL_ERROR_HANDLER \
- + END (name)
- +
- +#if defined NOT_IN_libc
- +# define SYSCALL_ERROR __local_syscall_error
- +# ifdef RTLD_PRIVATE_ERRNO
- +# define SYSCALL_ERROR_HANDLER \
- +__local_syscall_error: \
- + NEG D0Re0, D0Re0; \
- + ADDT D1Re0, CPC1, #HI(_rtld_errno); \
- + ADD D1Re0, D1Re0, #LO(_rtld_errno) + 4; \
- + SETD [D1Re0], D0Re0; \
- + NEG D0Re0, #0x1; \
- + MOV PC, D1RtP;
- +# else
- +# define SYSCALL_ERROR_HANDLER \
- +__local_syscall_error: \
- + MOV D1Re0, D1RtP; \
- + SETL [A0StP++], D0Re0, D1Re0; \
- + CALLR D1RtP, PLTJMP(___errno_location); \
- + GETD D1Re0, [A0StP+#-8]; \
- + NEG D1Re0, D1Re0; \
- + SETD [D0Re0], D1Re0; \
- + NEG D0Re0, #0x1; \
- + GETD D1RtP, [A0StP+#-4]; \
- + SUB A0StP, A0StP, #0x8; \
- + MOV PC, D1RtP;
- +# endif
- +#else
- +# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
- +# define SYSCALL_ERROR ___syscall_error
- +#endif
- +
- +#endif /* __ASSEMBLER __*/
- +
- +/* Pointer mangling is not yet supported for META. */
- +#define PTR_MANGLE(var) (void) (var)
- +#define PTR_DEMANGLE(var) (void) (var)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/vfork.S uClibc/libc/sysdeps/linux/metag/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/vfork.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/metag/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,67 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +#include <asm/unistd.h>
- +
- +#define _ERRNO_H
- +#include <bits/errno.h>
- +#include <sys/syscall.h>
- +
- +#ifndef SAVE_PID
- +#define SAVE_PID
- +#endif
- +
- +#ifndef RESTORE_PID
- +#define RESTORE_PID
- +#endif
- +
- +#ifdef __NR_vfork
- +#define __VFORK_NR __NR_vfork
- +#else
- +#define __VFORK_NR __NR_fork
- +#endif
- +
- +/* Clone the calling process, but without copying the whole address space.
- + The calling process is suspended until the new process exits or is
- + replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
- + and the process ID of the new process to the old process. */
- +
- + .balign 4
- + .global ___vfork
- + .hidden ___vfork
- + .type ___vfork, @function
- +___vfork:
- +
- + SAVE_PID
- +
- + MOV D1Ar1, #0x4111 /* CLONE_VM | CLONE_VFORK | SIGCHLD */
- + MOV D0Ar2, #0
- + MOV D1Ar3, #0
- + MOV D0Ar4, #0
- + MOV D1Ar5, #0
- + MOV D0Ar6, #0
- + MOV D1Re0, #__NR_clone
- + SWITCH #0x440001
- +
- + RESTORE_PID
- +
- + MOVT D1Re0, #HI(-4096)
- + ADD D1Re0, D1Re0, #LO(-4096)
- + CMP D1Re0, D0Re0
- + BCS error
- +
- + /* Syscall worked. Return to child/parent */
- + MOV PC, D1RtP
- +
- +error:
- + MOV D1Ar1, D0Re0
- +#ifdef __PIC__
- + B ___syscall_error@PLT
- +#else
- + B ___syscall_error
- +#endif
- + .size ___vfork,.-___vfork
- +
- +weak_alias(__vfork,vfork)
- +libc_hidden_weak(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/fcntl.h uClibc/libc/sysdeps/linux/microblaze/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/kernel_types.h uClibc/libc/sysdeps/linux/microblaze/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -44,6 +44,8 @@
- typedef unsigned int __kernel_old_uid_t;
- typedef unsigned int __kernel_old_gid_t;
- typedef unsigned int __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- #ifdef __GNUC__
- typedef long long __kernel_loff_t;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/poll.h uClibc/libc/sysdeps/linux/microblaze/bits/poll.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/bits/poll.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_POLL_H
- # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/setjmp.h uClibc/libc/sysdeps/linux/microblaze/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -19,7 +19,6 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#ifndef _ASM
- typedef struct
- {
- /* Stack pointer. */
- @@ -35,13 +34,5 @@
- /* Callee-saved registers r18-r31. */
- int __regs[14];
- } __jmp_buf[1];
- -#endif
- -
- -#define JB_SIZE (4 * 18)
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)[0].__sp)
-
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/stackinfo.h uClibc/libc/sysdeps/linux/microblaze/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/uClibc_page.h uClibc/libc/sysdeps/linux/microblaze/bits/uClibc_page.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/bits/uClibc_page.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* Supply an architecture specific value for PAGE_SIZE and friends. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/wordsize.h uClibc/libc/sysdeps/linux/microblaze/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,6 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#define JB_SIZE (4 * 18)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)[0].__sp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/__longjmp.S uClibc/libc/sysdeps/linux/microblaze/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,10 +12,6 @@
- * Written by Miles Bader <miles@gnu.org>
- */
-
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
- -
- #include <libc-symbols.h>
-
- .text
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/Makefile uClibc/libc/sysdeps/linux/microblaze/Makefile
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
- # details.
- #
- # You should have received a copy of the GNU Library General Public License
- -# along with this program; if not, write to the Free Software Foundation, Inc.,
- -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- +# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
- top_srcdir=../../../../
- top_builddir=../../../../
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/Makefile.arch uClibc/libc/sysdeps/linux/microblaze/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,8 +5,8 @@
- #
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- -CSRC := mmap.c clone.c fixdfsi.c
- +CSRC-y := clone.c fixdfsi.c
-
- -SSRC := setjmp.S __longjmp.S vfork.S
- +SSRC-y := setjmp.S __longjmp.S vfork.S
-
- ARCH_HEADERS := floatlib.h
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/mmap.c uClibc/libc/sysdeps/linux/microblaze/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/mmap.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,16 +0,0 @@
- -/* Use new style mmap for microblaze */
- -/*
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <unistd.h>
- -#include <errno.h>
- -#include <sys/mman.h>
- -#include <sys/syscall.h>
- -
- -
- -_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
- - int, flags, int, fd, __off_t, offset)
- -libc_hidden_def(mmap)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/setjmp.S uClibc/libc/sysdeps/linux/microblaze/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -25,13 +25,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <libc-symbols.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/procfs.h uClibc/libc/sysdeps/linux/microblaze/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/ptrace.h uClibc/libc/sysdeps/linux/microblaze/sys/ptrace.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/sys/ptrace.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PTRACE_H
- #define _SYS_PTRACE_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/ucontext.h uClibc/libc/sysdeps/linux/microblaze/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/user.h uClibc/libc/sysdeps/linux/microblaze/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/vfork.S uClibc/libc/sysdeps/linux/microblaze/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/microblaze/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,21 +13,15 @@
- * Microblaze port by John Williams
- */
-
- -#define _ERRNO_H 1
- -#include <bits/errno.h>
- -#define _SYSCALL_H
- -#include <bits/sysnum.h>
- -
- -#include <libc-symbols.h>
- +#include <sys/syscall.h>
-
- /* Clone the calling process, but without copying the whole address space.
- The calling process is suspended until the new process exits or is
- replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
- and the process ID of the new process to the old process. */
-
- -.global C_SYMBOL_NAME(errno)
- -
- .globl __vfork
- + .hidden __vfork
- .align 4
- __vfork:
- addi r12, r0, SYS_vfork
- @@ -50,4 +44,4 @@
- .size __vfork, .-__vfork
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/atomic.h uClibc/libc/sysdeps/linux/mips/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MIPS_BITS_ATOMIC_H
- #define _MIPS_BITS_ATOMIC_H 1
- @@ -136,22 +135,22 @@
- /* For all "bool" routines, we return FALSE if exchange succesful. */
-
- #define __arch_compare_and_exchange_bool_8_int(mem, new, old, rel, acq) \
- -({ __typeof (*mem) __prev; int __cmp; \
- +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
- __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \
- !__cmp; })
-
- #define __arch_compare_and_exchange_bool_16_int(mem, new, old, rel, acq) \
- -({ __typeof (*mem) __prev; int __cmp; \
- +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
- __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \
- !__cmp; })
-
- #define __arch_compare_and_exchange_bool_32_int(mem, new, old, rel, acq) \
- -({ __typeof (*mem) __prev; int __cmp; \
- +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
- __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \
- !__cmp; })
-
- #define __arch_compare_and_exchange_bool_64_int(mem, new, old, rel, acq) \
- -({ __typeof (*mem) __prev; int __cmp; \
- +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
- __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \
- !__cmp; })
-
- @@ -159,22 +158,22 @@
- successful or not. */
-
- #define __arch_compare_and_exchange_val_8_int(mem, new, old, rel, acq) \
- -({ __typeof (*mem) __prev; int __cmp; \
- +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
- __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \
- (__typeof (*mem))__prev; })
-
- #define __arch_compare_and_exchange_val_16_int(mem, new, old, rel, acq) \
- -({ __typeof (*mem) __prev; int __cmp; \
- +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
- __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \
- (__typeof (*mem))__prev; })
-
- #define __arch_compare_and_exchange_val_32_int(mem, new, old, rel, acq) \
- -({ __typeof (*mem) __prev; int __cmp; \
- +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
- __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \
- (__typeof (*mem))__prev; })
-
- #define __arch_compare_and_exchange_val_64_int(mem, new, old, rel, acq) \
- -({ __typeof (*mem) __prev; int __cmp; \
- +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
- __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \
- (__typeof (*mem))__prev; })
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/dirent.h uClibc/libc/sysdeps/linux/mips/bits/dirent.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/dirent.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/dirent.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _DIRENT_H
- # error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/dlfcn.h uClibc/libc/sysdeps/linux/mips/bits/dlfcn.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/dlfcn.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/dlfcn.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _DLFCN_H
- # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/eventfd.h uClibc/libc/sysdeps/linux/mips/bits/eventfd.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/eventfd.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/mips/bits/eventfd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,31 @@
- +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SYS_EVENTFD_H
- +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
- +#endif
- +
- +/* Flags for eventfd. */
- +enum
- + {
- + EFD_SEMAPHORE = 00000001,
- +#define EFD_SEMAPHORE EFD_SEMAPHORE
- + EFD_CLOEXEC = 02000000,
- +#define EFD_CLOEXEC EFD_CLOEXEC
- + EFD_NONBLOCK = 00000200
- +#define EFD_NONBLOCK EFD_NONBLOCK
- + };
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/fcntl.h uClibc/libc/sysdeps/linux/mips/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/fenv.h uClibc/libc/sysdeps/linux/mips/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- @@ -69,9 +68,9 @@
- fenv_t;
-
- /* If the default argument is used we use this value. */
- -#define FE_DFL_ENV ((__const fenv_t *) -1)
- +#define FE_DFL_ENV ((const fenv_t *) -1)
-
- #ifdef __USE_GNU
- /* Floating-point environment where none of the exception is masked. */
- -# define FE_NOMASK_ENV ((__const fenv_t *) -2)
- +# define FE_NOMASK_ENV ((const fenv_t *) -2)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/ioctl-types.h uClibc/libc/sysdeps/linux/mips/bits/ioctl-types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/ioctl-types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/ioctl-types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IOCTL_H
- # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/ipc.h uClibc/libc/sysdeps/linux/mips/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/kernel_sigaction.h uClibc/libc/sysdeps/linux/mips/bits/kernel_sigaction.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/kernel_sigaction.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/kernel_sigaction.h 2014-02-03 12:32:56.000000000 +0100
- @@ -24,12 +24,4 @@
- #endif
- };
-
- -/* In uclibc, userspace struct sigaction is identical to
- - * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
- - * See sigaction.h
- - */
- -
- -extern int __syscall_rt_sigaction (int, const struct sigaction *,
- - struct sigaction *, size_t) attribute_hidden;
- -
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/kernel_types.h uClibc/libc/sysdeps/linux/mips/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -32,6 +32,8 @@
- typedef __kernel_uid_t __kernel_old_uid_t;
- typedef __kernel_gid_t __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
- #else
- typedef unsigned int __kernel_dev_t;
- @@ -68,6 +70,8 @@
- typedef __kernel_uid_t __kernel_old_uid_t;
- typedef __kernel_gid_t __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/mathdef.h uClibc/libc/sysdeps/linux/mips/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/mman.h uClibc/libc/sysdeps/linux/mips/bits/mman.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/mman.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MMAN_H
- # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
- @@ -66,7 +65,7 @@
- # define MAP_LOCKED 0x8000 /* pages are locked */
- # define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
- # define MAP_NONBLOCK 0x20000 /* do not block on IO */
- -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
- +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
- be uninitialized. */
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/msq.h uClibc/libc/sysdeps/linux/mips/bits/msq.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/msq.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MSG_H
- # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/poll.h uClibc/libc/sysdeps/linux/mips/bits/poll.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/poll.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_POLL_H
- # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/resource.h uClibc/libc/sysdeps/linux/mips/bits/resource.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/resource.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/resource.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_RESOURCE_H
- # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sem.h uClibc/libc/sysdeps/linux/mips/bits/sem.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/sem.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SEM_H
- # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/setjmp.h uClibc/libc/sysdeps/linux/mips/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SETJMP_H
- #define _BITS_SETJMP_H 1
- @@ -26,13 +25,19 @@
-
- #include <sgidefs.h>
-
- +#if _MIPS_SIM == _MIPS_SIM_ABI32
- +#define ptrsize void *
- +#else
- +#define ptrsize long long
- +#endif
- +
- typedef struct
- {
- /* Program counter. */
- - void * __pc;
- + ptrsize __pc;
-
- /* Stack pointer. */
- - void * __sp;
- + ptrsize __sp;
-
- /* Callee-saved registers s0 through s7. */
- #if _MIPS_SIM == _MIPS_SIM_ABI32
- @@ -42,10 +47,10 @@
- #endif
-
- /* The frame pointer. */
- - void * __fp;
- + ptrsize __fp;
-
- /* The global pointer. */
- - void * __gp;
- + ptrsize __gp;
-
- /* Floating point status register. */
- int __fpc_csr;
- @@ -58,15 +63,4 @@
- #endif /* N32 || O32 */
- } __jmp_buf[1];
-
- -#ifdef __USE_MISC
- -/* Offset to the program counter in `jmp_buf'. */
- -# define JB_PC 0
- -#endif
- -
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)[0].__sp)
- -
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/shm.h uClibc/libc/sysdeps/linux/mips/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigaction.h uClibc/libc/sysdeps/linux/mips/bits/sigaction.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/sigaction.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigcontext.h uClibc/libc/sysdeps/linux/mips/bits/sigcontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/sigcontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SIGCONTEXT_H
- #define _BITS_SIGCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/mips/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- #include <sgidefs.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/siginfo.h uClibc/libc/sysdeps/linux/mips/bits/siginfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/siginfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/siginfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SIGNAL_H && !defined __need_siginfo_t \
- && !defined __need_sigevent_t
- @@ -265,8 +264,11 @@
-
- /* Structure to transport application-defined values with signals. */
- # define __SIGEV_MAX_SIZE 64
- -# define __SIGEV_HEAD_SIZE (sizeof(long) + 2*sizeof(int))
- -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE - __SIGEV_HEAD_SIZE) / sizeof (int))
- +# if __WORDSIZE == 64
- +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
- +# else
- +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
- +# endif
-
- /* Forward declaration of the `pthread_attr_t' type. */
- struct __pthread_attr_s;
- @@ -282,6 +284,10 @@
- {
- int _pad[__SIGEV_PAD_SIZE];
-
- + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
- + thread to receive the signal. */
- + __pid_t _tid;
- +
- struct
- {
- void (*_function) (sigval_t); /* Function to start. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/signum.h uClibc/libc/sysdeps/linux/mips/bits/signum.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/signum.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/signum.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef _SIGNAL_H
-
- @@ -54,7 +53,20 @@
- #define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
- #define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
-
- -/* Biggest signal number + 1 (including real-time signals). */
- -#define _NSIG 129
- +/* MIPS is special by having 128 signals.
- + * All (?) other architectures have at most 64 signals.
- + * Having 128 signals is problematic because signal nos are 1-based
- + * and last signal number is then 128.
- + * This plays havoc with WIFSIGNALED and WCOREDUMP in waitpid status word,
- + * when process dies from signal 128.
- + * Linux kernel 3.9 accepts signal 128, with awful results :/
- + * It is being fixed.
- + *
- + * glibc (accidentally?) papers over this issue by declaring _NSIG to be 128,
- + * not 129 (despite claiming that _NSIG is "biggest signal number + 1"
- + * in the comment above that definition). We follow suit.
- + * Note that this results in __SIGRTMAX == 127. It is intended.
- + */
- +#define _NSIG 128
-
- #endif /* <signal.h> included. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigstack.h uClibc/libc/sysdeps/linux/mips/bits/sigstack.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigstack.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/sigstack.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include this file directly. Use <signal.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/socket.h uClibc/libc/sysdeps/linux/mips/bits/socket.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/socket.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/socket.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,369 +0,0 @@
- -/* System-specific socket constants and types. Linux/MIPS version.
- - Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006
- - Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#ifndef __BITS_SOCKET_H
- -#define __BITS_SOCKET_H
- -
- -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
- -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
- -#endif
- -
- -#define __need_size_t
- -#define __need_NULL
- -#include <stddef.h>
- -
- -#include <limits.h>
- -#include <sys/types.h>
- -
- -/* Type for length arguments in socket calls. */
- -#ifndef __socklen_t_defined
- -typedef __socklen_t socklen_t;
- -# define __socklen_t_defined
- -#endif
- -
- -/* Types of sockets. */
- -enum __socket_type
- -{
- - SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams
- - of fixed maximum length. */
- -#define SOCK_DGRAM SOCK_DGRAM
- - SOCK_STREAM = 2, /* Sequenced, reliable, connection-based
- - byte streams. */
- -#define SOCK_STREAM SOCK_STREAM
- - SOCK_RAW = 3, /* Raw protocol interface. */
- -#define SOCK_RAW SOCK_RAW
- - SOCK_RDM = 4, /* Reliably-delivered messages. */
- -#define SOCK_RDM SOCK_RDM
- - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- - datagrams of fixed maximum length. */
- -#define SOCK_SEQPACKET SOCK_SEQPACKET
- - SOCK_DCCP = 6,
- -#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */
- - SOCK_PACKET = 10, /* Linux specific way of getting packets
- - at the dev level. For writing rarp and
- - other similar things on the user level. */
- -#define SOCK_PACKET SOCK_PACKET
- - /* Flags to be ORed into the type parameter of socket and socketpair and
- - used for the flags parameter of paccept. */
- -
- - SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
- - new descriptor(s). */
- -#define SOCK_CLOEXEC SOCK_CLOEXEC
- - SOCK_NONBLOCK = 0200 /* Atomically mark descriptor(s) as
- - non-blocking. */
- -#define SOCK_NONBLOCK SOCK_NONBLOCK
- -};
- -
- -/* Protocol families. */
- -#define PF_UNSPEC 0 /* Unspecified. */
- -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
- -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
- -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
- -#define PF_INET 2 /* IP protocol family. */
- -#define PF_AX25 3 /* Amateur Radio AX.25. */
- -#define PF_IPX 4 /* Novell Internet Protocol. */
- -#define PF_APPLETALK 5 /* Appletalk DDP. */
- -#define PF_NETROM 6 /* Amateur radio NetROM. */
- -#define PF_BRIDGE 7 /* Multiprotocol bridge. */
- -#define PF_ATMPVC 8 /* ATM PVCs. */
- -#define PF_X25 9 /* Reserved for X.25 project. */
- -#define PF_INET6 10 /* IP version 6. */
- -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
- -#define PF_DECnet 12 /* Reserved for DECnet project. */
- -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
- -#define PF_SECURITY 14 /* Security callback pseudo AF. */
- -#define PF_KEY 15 /* PF_KEY key management API. */
- -#define PF_NETLINK 16
- -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
- -#define PF_PACKET 17 /* Packet family. */
- -#define PF_ASH 18 /* Ash. */
- -#define PF_ECONET 19 /* Acorn Econet. */
- -#define PF_ATMSVC 20 /* ATM SVCs. */
- -#define PF_SNA 22 /* Linux SNA Project */
- -#define PF_IRDA 23 /* IRDA sockets. */
- -#define PF_PPPOX 24 /* PPPoX sockets. */
- -#define PF_WANPIPE 25 /* Wanpipe API sockets. */
- -#define PF_LLC 26 /* Linux LLC. */
- -#define PF_CAN 29 /* Controller Area Network. */
- -#define PF_TIPC 30 /* TIPC sockets. */
- -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
- -#define PF_IUCV 32 /* IUCV sockets. */
- -#define PF_RXRPC 33 /* RxRPC sockets. */
- -#define PF_ISDN 34 /* mISDN sockets. */
- -#define PF_PHONET 35 /* Phonet sockets. */
- -#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
- -#define PF_CAIF 37 /* CAIF sockets. */
- -#define PF_ALG 38 /* Algorithm sockets. */
- -#define PF_MAX 39 /* For now.. */
- -
- -/* Address families. */
- -#define AF_UNSPEC PF_UNSPEC
- -#define AF_LOCAL PF_LOCAL
- -#define AF_UNIX PF_UNIX
- -#define AF_FILE PF_FILE
- -#define AF_INET PF_INET
- -#define AF_AX25 PF_AX25
- -#define AF_IPX PF_IPX
- -#define AF_APPLETALK PF_APPLETALK
- -#define AF_NETROM PF_NETROM
- -#define AF_BRIDGE PF_BRIDGE
- -#define AF_ATMPVC PF_ATMPVC
- -#define AF_X25 PF_X25
- -#define AF_INET6 PF_INET6
- -#define AF_ROSE PF_ROSE
- -#define AF_DECnet PF_DECnet
- -#define AF_NETBEUI PF_NETBEUI
- -#define AF_SECURITY PF_SECURITY
- -#define AF_KEY PF_KEY
- -#define AF_NETLINK PF_NETLINK
- -#define AF_ROUTE PF_ROUTE
- -#define AF_PACKET PF_PACKET
- -#define AF_ASH PF_ASH
- -#define AF_ECONET PF_ECONET
- -#define AF_ATMSVC PF_ATMSVC
- -#define AF_SNA PF_SNA
- -#define AF_IRDA PF_IRDA
- -#define AF_PPPOX PF_PPPOX
- -#define AF_WANPIPE PF_WANPIPE
- -#define AF_LLC PF_LLC
- -#define AF_CAN PF_CAN
- -#define AF_TIPC PF_TIPC
- -#define AF_BLUETOOTH PF_BLUETOOTH
- -#define AF_IUCV PF_IUCV
- -#define AF_RXRPC PF_RXRPC
- -#define AF_ISDN PF_ISDN
- -#define AF_PHONET PF_PHONET
- -#define AF_IEEE802154 PF_IEEE802154
- -#define AF_CAIF PF_CAIF
- -#define AF_ALG PF_ALG
- -#define AF_MAX PF_MAX
- -
- -/* Socket level values. Others are defined in the appropriate headers.
- -
- - XXX These definitions also should go into the appropriate headers as
- - far as they are available. */
- -#define SOL_RAW 255
- -#define SOL_DECNET 261
- -#define SOL_X25 262
- -#define SOL_PACKET 263
- -#define SOL_ATM 264 /* ATM layer (cell level). */
- -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
- -#define SOL_IRDA 266
- -
- -/* Maximum queue length specifiable by listen. */
- -#define SOMAXCONN 128
- -
- -/* Get the definition of the macro to define the common sockaddr members. */
- -#include <bits/sockaddr.h>
- -
- -/* Structure describing a generic socket address. */
- -struct sockaddr
- - {
- - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
- - char sa_data[14]; /* Address data. */
- - };
- -
- -
- -/* Structure large enough to hold any socket address (with the historical
- - exception of AF_UNIX). We reserve 128 bytes. */
- -#define __ss_aligntype unsigned long int
- -#define _SS_SIZE 128
- -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
- -
- -struct sockaddr_storage
- - {
- - __SOCKADDR_COMMON (ss_); /* Address family, etc. */
- - __ss_aligntype __ss_align; /* Force desired alignment. */
- - char __ss_padding[_SS_PADSIZE];
- - };
- -
- -
- -/* Bits in the FLAGS argument to `send', `recv', et al. */
- -enum
- - {
- - MSG_OOB = 0x01, /* Process out-of-band data. */
- -#define MSG_OOB MSG_OOB
- - MSG_PEEK = 0x02, /* Peek at incoming messages. */
- -#define MSG_PEEK MSG_PEEK
- - MSG_DONTROUTE = 0x04, /* Don't use local routing. */
- -#define MSG_DONTROUTE MSG_DONTROUTE
- -#ifdef __USE_GNU
- - /* DECnet uses a different name. */
- - MSG_TRYHARD = MSG_DONTROUTE,
- -# define MSG_TRYHARD MSG_DONTROUTE
- -#endif
- - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
- -#define MSG_CTRUNC MSG_CTRUNC
- - MSG_PROXY = 0x10, /* Supply or ask second address. */
- -#define MSG_PROXY MSG_PROXY
- - MSG_TRUNC = 0x20,
- -#define MSG_TRUNC MSG_TRUNC
- - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
- -#define MSG_DONTWAIT MSG_DONTWAIT
- - MSG_EOR = 0x80, /* End of record. */
- -#define MSG_EOR MSG_EOR
- - MSG_WAITALL = 0x100, /* Wait for a full request. */
- -#define MSG_WAITALL MSG_WAITALL
- - MSG_FIN = 0x200,
- -#define MSG_FIN MSG_FIN
- - MSG_SYN = 0x400,
- -#define MSG_SYN MSG_SYN
- - MSG_CONFIRM = 0x800, /* Confirm path validity. */
- -#define MSG_CONFIRM MSG_CONFIRM
- - MSG_RST = 0x1000,
- -#define MSG_RST MSG_RST
- - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
- -#define MSG_ERRQUEUE MSG_ERRQUEUE
- - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
- -#define MSG_NOSIGNAL MSG_NOSIGNAL
- - MSG_MORE = 0x8000, /* Sender will send more. */
- -#define MSG_MORE MSG_MORE
- - MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
- -#define MSG_WAITFORONE MSG_WAITFORONE
- -
- - MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
- - descriptor received through
- - SCM_RIGHTS. */
- -#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
- - };
- -
- -
- -/* Structure describing messages sent by
- - `sendmsg' and received by `recvmsg'. */
- -/* Note: do not change these members to match glibc; these match the
- - SuSv3 spec already (e.g. msg_iovlen/msg_controllen).
- - http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html */
- -/* Note: linux kernel uses __kernel_size_t (which is 8bytes on 64bit
- - platforms, and 4bytes on 32bit platforms) for msg_iovlen/msg_controllen */
- -struct msghdr
- - {
- - void *msg_name; /* Address to send to/receive from. */
- - socklen_t msg_namelen; /* Length of address data. */
- -
- - struct iovec *msg_iov; /* Vector of data to send/receive into. */
- -#if __WORDSIZE == 32
- - int msg_iovlen; /* Number of elements in the vector. */
- -#else
- - size_t msg_iovlen; /* Number of elements in the vector. */
- -#endif
- -
- - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
- -#if __WORDSIZE == 32
- - socklen_t msg_controllen; /* Ancillary data buffer length. */
- -#else
- - size_t msg_controllen; /* Ancillary data buffer length. */
- -#endif
- -
- - int msg_flags; /* Flags on received message. */
- - };
- -
- -/* Structure used for storage of ancillary data object information. */
- -struct cmsghdr
- - {
- - size_t cmsg_len; /* Length of data in cmsg_data plus length
- - of cmsghdr structure. */
- - int cmsg_level; /* Originating protocol. */
- - int cmsg_type; /* Protocol specific type. */
- -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
- - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
- -#endif
- - };
- -
- -/* Ancillary data object manipulation macros. */
- -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
- -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
- -#else
- -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
- -#endif
- -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
- -#define CMSG_FIRSTHDR(mhdr) \
- - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
- - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
- -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
- - & (size_t) ~(sizeof (size_t) - 1))
- -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
- - + CMSG_ALIGN (sizeof (struct cmsghdr)))
- -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
- -
- -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
- - struct cmsghdr *__cmsg) __THROW;
- -libc_hidden_proto(__cmsg_nxthdr)
- -#ifdef __USE_EXTERN_INLINES
- -# ifndef _EXTERN_INLINE
- -# define _EXTERN_INLINE extern __inline
- -# endif
- -_EXTERN_INLINE struct cmsghdr *
- -__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
- -{
- - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
- - /* The kernel header does this so there may be a reason. */
- - return 0;
- -
- - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
- - + CMSG_ALIGN (__cmsg->cmsg_len));
- - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
- - + __mhdr->msg_controllen)
- - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
- - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
- - /* No more entries. */
- - return 0;
- - return __cmsg;
- -}
- -#endif /* Use `extern inline'. */
- -
- -/* Socket level message types. This must match the definitions in
- - <linux/socket.h>. */
- -enum
- - {
- - SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
- -#define SCM_RIGHTS SCM_RIGHTS
- -#ifdef __USE_BSD
- - , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
- -# define SCM_CREDENTIALS SCM_CREDENTIALS
- -#endif
- - };
- -
- -/* User visible structure for SCM_CREDENTIALS message */
- -
- -struct ucred
- -{
- - pid_t pid; /* PID of sending process. */
- - uid_t uid; /* UID of sending process. */
- - gid_t gid; /* GID of sending process. */
- -};
- -
- -/* Get socket manipulation related informations from kernel headers. */
- -#ifndef __GLIBC__
- -#define __GLIBC__ 2
- -#include <asm/socket.h>
- -#undef __GLIBC__
- -#else
- -#include <asm/socket.h>
- -#endif
- -
- -
- -/* Structure used to manipulate the SO_LINGER option. */
- -struct linger
- - {
- - int l_onoff; /* Nonzero to linger on close. */
- - int l_linger; /* Time to linger. */
- - };
- -
- -#endif /* bits/socket.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/socket_type.h uClibc/libc/sysdeps/linux/mips/bits/socket_type.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/socket_type.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/mips/bits/socket_type.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,55 @@
- +/* System-specific socket constants and types. Linux/MIPS version.
- + Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006
- + Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SYS_SOCKET_H
- +# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
- +#endif
- +
- +/* Types of sockets. */
- +enum __socket_type
- +{
- + SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams
- + of fixed maximum length. */
- +#define SOCK_DGRAM SOCK_DGRAM
- + SOCK_STREAM = 2, /* Sequenced, reliable, connection-based
- + byte streams. */
- +#define SOCK_STREAM SOCK_STREAM
- + SOCK_RAW = 3, /* Raw protocol interface. */
- +#define SOCK_RAW SOCK_RAW
- + SOCK_RDM = 4, /* Reliably-delivered messages. */
- +#define SOCK_RDM SOCK_RDM
- + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- + datagrams of fixed maximum length. */
- +#define SOCK_SEQPACKET SOCK_SEQPACKET
- + SOCK_DCCP = 6,
- +#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */
- + SOCK_PACKET = 10, /* Linux specific way of getting packets
- + at the dev level. For writing rarp and
- + other similar things on the user level. */
- +#define SOCK_PACKET SOCK_PACKET
- +
- + /* Flags to be ORed into the type parameter of socket and socketpair. */
- +
- + SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
- + new descriptor(s). */
- +#define SOCK_CLOEXEC SOCK_CLOEXEC
- + SOCK_NONBLOCK = 00000200 /* Atomically mark descriptor(s) as
- + non-blocking. */
- +#define SOCK_NONBLOCK SOCK_NONBLOCK
- +};
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/stackinfo.h uClibc/libc/sysdeps/linux/mips/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/statfs.h uClibc/libc/sysdeps/linux/mips/bits/statfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/statfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/statfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STATFS_H
- # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/stat.h uClibc/libc/sysdeps/linux/mips/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/syscalls.h uClibc/libc/sysdeps/linux/mips/bits/syscalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -29,7 +29,7 @@
- } \
- result_var; })
-
- -#define INTERNAL_SYSCALL_DECL(err) long err
- +#define INTERNAL_SYSCALL_DECL(err) long err attribute_unused
-
- #define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err))
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/termios.h uClibc/libc/sysdeps/linux/mips/bits/termios.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/termios.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TERMIOS_H
- # error "Never include <bits/termios.h> directly; use <termios.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -4,6 +4,7 @@
-
- #ifndef _BITS_UCLIBC_ARCH_FEATURES_H
- #define _BITS_UCLIBC_ARCH_FEATURES_H
- +#include <sgidefs.h>
-
- /* instruction used when calling abort() to kill yourself */
- #define __UCLIBC_ABORT_INSTRUCTION__ "break 255"
- @@ -11,8 +12,12 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#if _MIPS_SIM == _ABIO32
- +#define __UCLIBC_SYSCALL_ALIGN_64BIT__
- +#else
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
- +#endif
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/uClibc_page.h uClibc/libc/sysdeps/linux/mips/bits/uClibc_page.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/uClibc_page.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* Supply an architecture specific value for PAGE_SIZE and friends. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/wordsize.h uClibc/libc/sysdeps/linux/mips/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE _MIPS_SZPTR
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/brk.c uClibc/libc/sysdeps/linux/mips/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bsd-_setjmp.S uClibc/libc/sysdeps/linux/mips/bsd-_setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bsd-_setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bsd-setjmp.S uClibc/libc/sysdeps/linux/mips/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/cacheflush.c uClibc/libc/sysdeps/linux/mips/cacheflush.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/cacheflush.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/cacheflush.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,19 +12,18 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the uClibc Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the uClibc Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <errno.h>
- -#include <unistd.h>
- #include <sys/syscall.h>
-
- #ifdef __NR_cacheflush
- +# include <sys/cachectl.h>
- _syscall3(int, cacheflush, void *, addr, const int, nbytes, const int, op)
- -strong_alias(cacheflush, _flush_cache)
- +strong_alias_untyped(cacheflush, _flush_cache)
- #endif
-
- #ifdef __NR_cachectl
- +# include <sys/cachectl.h>
- _syscall3(int, cachectl, void *, addr, const int, nbytes, const int, op)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/clone.S uClibc/libc/sysdeps/linux/mips/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/crt1.S uClibc/libc/sysdeps/linux/mips/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -31,9 +31,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- #include <sys/regdef.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/fpu_control.h uClibc/libc/sysdeps/linux/mips/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/getcontext.S uClibc/libc/sysdeps/linux/mips/getcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/getcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/mips/getcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,148 @@
- +/* Save current context.
- + Copyright (C) 2009 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library. If not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +#include <sys/asm.h>
- +#include <sys/fpregdef.h>
- +#include <sys/regdef.h>
- +
- +#include "ucontext_i.h"
- +
- +/* int getcontext (ucontext_t *ucp) */
- +
- + .text
- +LOCALSZ = 0
- +MASK = 0x00000000
- +#ifdef __PIC__
- +LOCALSZ = 1 /* save gp */
- +# if _MIPS_SIM != _ABIO32
- +MASK = 0x10000000
- +# endif
- +#endif
- +FRAMESZ = ((LOCALSZ * SZREG) + ALSZ) & ALMASK
- +GPOFF = FRAMESZ - (1 * SZREG)
- +
- +NESTED (__getcontext, FRAMESZ, ra)
- + .mask MASK, 0
- + .fmask 0x00000000, 0
- +
- +#ifdef __PIC__
- + SETUP_GP
- +
- + move a2, sp
- +# define _SP a2
- +
- +# if _MIPS_SIM != _ABIO32
- + move a3, gp
- +# define _GP a3
- +# endif
- +
- + PTR_ADDIU sp, -FRAMESZ
- + SETUP_GP64 (GPOFF, __getcontext)
- + SAVE_GP (GPOFF)
- +
- +#else /* ! __PIC__ */
- +# define _SP sp
- +# define _GP gp
- +
- +#endif /* ! __PIC__ */
- +
- +#ifdef PROF
- + .set noat
- + move AT, ra
- + jal _mcount
- + .set at
- +#endif
- +
- + /* Store a magic flag. */
- + li v1, 1
- + REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
- +
- + REG_S s0, (16 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s1, (17 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s2, (18 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s3, (19 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s4, (20 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s5, (21 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s6, (22 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s7, (23 * SZREG + MCONTEXT_GREGS)(a0)
- +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
- + REG_S _GP, (28 * SZREG + MCONTEXT_GREGS)(a0)
- +#endif
- + REG_S _SP, (29 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S fp, (30 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S ra, (31 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S ra, MCONTEXT_PC(a0)
- +
- +#ifdef __mips_hard_float
- +# if _MIPS_SIM == _ABI64
- + s.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(a0)
- +
- +# else /* _MIPS_SIM != _ABI64 */
- + s.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(a0)
- +
- +# endif /* _MIPS_SIM != _ABI64 */
- +
- + cfc1 v1, fcr31
- + sw v1, MCONTEXT_FPC_CSR(a0)
- +#endif /* __mips_hard_float */
- +
- +/* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG8) */
- + li a3, _NSIG8
- + PTR_ADDU a2, a0, UCONTEXT_SIGMASK
- + move a1, zero
- + li a0, SIG_BLOCK
- +
- + li v0, SYS_ify (rt_sigprocmask)
- + syscall
- + bnez a3, 99f
- +
- +#ifdef __PIC__
- + RESTORE_GP64
- + PTR_ADDIU sp, FRAMESZ
- +#endif
- + move v0, zero
- + jr ra
- +
- +99:
- +#ifdef __PIC__
- + PTR_LA t9, JUMPTARGET (__syscall_error)
- + RESTORE_GP64
- + PTR_ADDIU sp, FRAMESZ
- + jr t9
- +
- +#else /* ! __PIC__ */
- +
- + j JUMPTARGET (__syscall_error)
- +#endif /* ! __PIC__ */
- +PSEUDO_END (__getcontext)
- +
- +weak_alias (__getcontext, getcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/mips/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/mips/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,22 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)[0].__sp)
- +
- +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +#include <stdint.h>
- +#include <unwind.h>
- +
- +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
- +
- +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].__sp - (_adj))
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/kernel_rt_sigframe.h uClibc/libc/sysdeps/linux/mips/kernel_rt_sigframe.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/kernel_rt_sigframe.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/mips/kernel_rt_sigframe.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,10 @@
- +/* Linux kernel RT signal frame. */
- +typedef struct kernel_rt_sigframe
- + {
- + uint32_t rs_ass[4];
- + uint32_t rs_code[2];
- + siginfo_t rs_info;
- + struct ucontext rs_uc;
- + uint32_t rs_altcode[8] __attribute__ ((__aligned__ (1 << 7)));
- + }
- +kernel_rt_sigframe_t;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/__longjmp.c uClibc/libc/sysdeps/linux/mips/__longjmp.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/__longjmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/__longjmp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <setjmp.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/makecontext.S uClibc/libc/sysdeps/linux/mips/makecontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/makecontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/mips/makecontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,188 @@
- +/* Modify saved context.
- + Copyright (C) 2009 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library. If not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +#include <sys/asm.h>
- +#include <sys/fpregdef.h>
- +#include <sys/regdef.h>
- +
- +#include "ucontext_i.h"
- +
- +/* int makecontext (ucontext_t *ucp, (void *func) (), int argc, ...) */
- +
- + .text
- +LOCALSZ = 0
- +ARGSZ = 0
- +MASK = 0x00000000
- +#ifdef __PIC__
- +LOCALSZ = 1 /* save gp */
- +#endif
- +#if _MIPS_SIM != _ABIO32
- +ARGSZ = 5 /* save a3-a7 */
- +# ifdef __PIC__
- +MASK = 0x10000000
- +# endif
- +#endif
- +FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK
- +GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG)
- +#if _MIPS_SIM != _ABIO32
- +A3OFF = FRAMESZ - (5 * SZREG) /* callee-allocated */
- +A4OFF = FRAMESZ - (4 * SZREG)
- +A5OFF = FRAMESZ - (3 * SZREG)
- +A6OFF = FRAMESZ - (2 * SZREG)
- +A7OFF = FRAMESZ - (1 * SZREG)
- +NARGREGS = 8
- +#else
- +A3OFF = FRAMESZ + (3 * SZREG) /* caller-allocated */
- +NARGREGS = 4
- +#endif
- +
- +NESTED (__makecontext, FRAMESZ, ra)
- + .mask MASK, -(ARGSZ * SZREG)
- + .fmask 0x00000000, 0
- +
- +98:
- +#ifdef __PIC__
- + SETUP_GP
- +#endif
- +
- + PTR_ADDIU sp, -FRAMESZ
- +
- +#ifdef __PIC__
- + SETUP_GP64 (GPOFF, __makecontext)
- + SAVE_GP (GPOFF)
- +#endif
- +
- +#ifdef PROF
- + .set noat
- + move AT, ra
- + jal _mcount
- + .set at
- +#endif
- +
- + /* Store args to be passed. */
- + REG_S a3, A3OFF(sp)
- +#if _MIPS_SIM != _ABIO32
- + REG_S a4, A4OFF(sp)
- + REG_S a5, A5OFF(sp)
- + REG_S a6, A6OFF(sp)
- + REG_S a7, A7OFF(sp)
- +#endif
- +
- + /* Store a magic flag. */
- + li v1, 1
- + REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
- +
- + /* Set up the stack. */
- + PTR_L t0, STACK_SP(a0)
- + PTR_L t2, STACK_SIZE(a0)
- + PTR_ADDIU t1, sp, A3OFF
- + PTR_ADDU t0, t2
- + and t0, ALMASK
- + blez a2, 2f /* no arguments */
- +
- + /* Store register arguments. */
- + PTR_ADDIU t2, a0, MCONTEXT_GREGS + 4 * SZREG
- + move t3, zero
- +0:
- + addiu t3, 1
- + REG_L v1, (t1)
- + PTR_ADDIU t1, SZREG
- + REG_S v1, (t2)
- + PTR_ADDIU t2, SZREG
- + bgeu t3, a2, 2f /* all done */
- + bltu t3, NARGREGS, 0b /* next */
- +
- + /* Make room for stack arguments. */
- + PTR_SUBU t2, a2, t3
- + PTR_SLL t2, 3
- + PTR_SUBU t0, t2
- + and t0, ALMASK
- +
- + /* Store stack arguments. */
- + move t2, t0
- +1:
- + addiu t3, 1
- + REG_L v1, (t1)
- + PTR_ADDIU t1, SZREG
- + REG_S v1, (t2)
- + PTR_ADDIU t2, SZREG
- + bltu t3, a2, 1b /* next */
- +
- +2:
- +#if _MIPS_SIM == _ABIO32
- + /* Make room for a0-a3 storage. */
- + PTR_ADDIU t0, -(NARGSAVE * SZREG)
- +#endif
- + PTR_L v1, UCONTEXT_LINK(a0)
- +#ifdef __PIC__
- + PTR_ADDIU t9, 99f - 98b
- +#else
- + PTR_LA t9, 99f
- +#endif
- + REG_S t0, (29 * SZREG + MCONTEXT_GREGS)(a0) /* sp */
- + REG_S v1, (16 * SZREG + MCONTEXT_GREGS)(a0) /* s0 */
- +#ifdef __PIC__
- + REG_S gp, (17 * SZREG + MCONTEXT_GREGS)(a0) /* s1 */
- +#endif
- + REG_S t9, (31 * SZREG + MCONTEXT_GREGS)(a0) /* ra */
- + REG_S a1, MCONTEXT_PC(a0)
- +
- +#ifdef __PIC__
- + RESTORE_GP64
- + PTR_ADDIU sp, FRAMESZ
- +#endif
- + jr ra
- +
- +99:
- +#ifdef __PIC__
- + move gp, s1
- +#endif
- + move a0, zero
- + beqz s0, 0f
- +
- + /* setcontext (ucp) */
- + move a0, s0
- +#ifdef __PIC__
- + PTR_LA t9, JUMPTARGET (__setcontext)
- + jalr t9
- +# if _MIPS_SIM == _ABIO32
- + move gp, s1
- +# endif
- +#else
- + jal JUMPTARGET (__setcontext)
- +#endif
- + move a0, v0
- +
- +0:
- + /* exit (a0) */
- +#ifdef __PIC__
- + PTR_LA t9, HIDDEN_JUMPTARGET (exit)
- + jalr t9
- +#else
- + jal HIDDEN_JUMPTARGET (exit)
- +#endif
- +
- + /* You don't exist, you won't feel anything. */
- +1:
- + lb zero, (zero)
- + b 1b
- +PSEUDO_END (__makecontext)
- +
- +weak_alias (__makecontext, makecontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/Makefile.arch uClibc/libc/sysdeps/linux/mips/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,20 +5,18 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := \
- - __longjmp.c brk.c setjmp_aux.c mmap.c \
- - cacheflush.c pread_write.c sigaction.c sysmips.c _test_and_set.c \
- - readahead.c
- -
- -SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S
- -
- -ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
- -CSRC += posix_fadvise.c posix_fadvise64.c
- -endif
- -
- -ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- -SSRC += vfork.S clone.S
- -endif
- +CSRC-y := \
- + __longjmp.c brk.c setjmp_aux.c \
- + pread_write.c sigaction.c _test_and_set.c
- +
- +SSRC-y := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S
- +
- +CSRC-$(UCLIBC_LINUX_SPECIFIC) += cacheflush.c sysmips.c
- +CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise.c
- +CSRC-$(if $(findstring yy,$(UCLIBC_HAS_LFS)$(UCLIBC_HAS_ADVANCED_REALTIME)),y) += posix_fadvise64.c
- +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += vfork.S clone.S
- +SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.S setcontext.S getcontext.S \
- + swapcontext.S
-
- ASFLAGS-syscall_error.S += -D_LIBC_REENTRANT
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/mmap.c uClibc/libc/sysdeps/linux/mips/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/mmap.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,26 +0,0 @@
- -/* Use new style mmap for mips */
- -/*
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <unistd.h>
- -#include <errno.h>
- -#include <sys/mman.h>
- -#include <sys/syscall.h>
- -
- -
- -#if 0
- -/* For now, leave mmap using mmap1 since mmap2 seems
- - * to have issues (i.e. it doesn't work 100% properly).
- - */
- -#ifdef __NR_mmap2
- -# undef __NR_mmap
- -# define __NR_mmap __NR_mmap2
- -#endif
- -#endif
- -
- -_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
- - int, flags, int, fd, __off_t, offset)
- -libc_hidden_def(mmap)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/posix_fadvise64.c uClibc/libc/sysdeps/linux/mips/posix_fadvise64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/posix_fadvise64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/posix_fadvise64.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,36 +8,28 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <features.h>
- -#include <unistd.h>
- -#include <errno.h>
- -#include <endian.h>
- -#include <stdint.h>
- -#include <sys/types.h>
- +#include <_lfs_64.h>
- #include <sys/syscall.h>
- -#include <fcntl.h>
- +#include <bits/wordsize.h>
-
- -#ifdef __UCLIBC_HAS_LFS__
- +/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
- +#if defined __NR_fadvise64 && __WORDSIZE == 32
- +# include <fcntl.h>
- +# include <endian.h>
-
- -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
- +int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice)
- {
- -/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
- -#ifdef __NR_fadvise64
- INTERNAL_SYSCALL_DECL(err);
- -# if _MIPS_SIM == _MIPS_SIM_ABI32
- +# if _MIPS_SIM == _ABIO32
- int ret = INTERNAL_SYSCALL(fadvise64, err, 7, fd, 0,
- - __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset),
- - __LONG_LONG_PAIR ((long) (len >> 32), (long) len),
- - advice);
- + __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset),
- + __LONG_LONG_PAIR ((long) (len >> 32), (long) len),
- + advice);
- # else /* N32 || N64 */
- int ret = INTERNAL_SYSCALL(fadvise64, err, 4, fd, offset, len, advice);
- # endif
- if (INTERNAL_SYSCALL_ERROR_P (ret, err))
- return INTERNAL_SYSCALL_ERRNO (ret, err);
- return 0;
- -#else
- - return ENOSYS;
- -#endif
- }
- -
- -#endif /* __UCLIBC_HAS_LFS__ */
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/posix_fadvise.c uClibc/libc/sysdeps/linux/mips/posix_fadvise.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/posix_fadvise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/posix_fadvise.c 2014-02-03 12:32:56.000000000 +0100
- @@ -8,19 +8,16 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <features.h>
- -#include <unistd.h>
- -#include <errno.h>
- -#include <endian.h>
- -#include <stdint.h>
- -#include <sys/types.h>
- #include <sys/syscall.h>
- -#include <fcntl.h>
-
- -int posix_fadvise(int fd, off_t offset, off_t len, int advice)
- -{
- /* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
- #ifdef __NR_fadvise64
- +# include <fcntl.h>
- +# include <endian.h>
- +# include <bits/wordsize.h>
- +
- +int posix_fadvise(int fd, off_t offset, off_t len, int advice)
- +{
- INTERNAL_SYSCALL_DECL(err);
- # if _MIPS_SIM == _ABIO32
- int ret = INTERNAL_SYSCALL(fadvise64, err, 7, fd, 0,
- @@ -33,7 +30,9 @@
- if (INTERNAL_SYSCALL_ERROR_P (ret, err))
- return INTERNAL_SYSCALL_ERRNO (ret, err);
- return 0;
- -#else
- - return ENOSYS;
- -#endif
- }
- +# if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
- +strong_alias(posix_fadvise,posix_fadvise64)
- +# endif
- +
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/pread_write.c uClibc/libc/sysdeps/linux/mips/pread_write.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/pread_write.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/pread_write.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,112 +4,28 @@
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
- -/*
- - * Based in part on the files
- - * ./sysdeps/unix/sysv/linux/pwrite.c,
- - * ./sysdeps/unix/sysv/linux/pread.c,
- - * sysdeps/posix/pread.c
- - * sysdeps/posix/pwrite.c
- - * from GNU libc 2.2.5, but reworked considerably...
- - */
-
- #include <sys/syscall.h>
- #include <unistd.h>
- -#include <stdint.h>
- #include <endian.h>
- #include <sgidefs.h>
-
- -#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
- -# ifdef __NR_pread
- -# error "__NR_pread and __NR_pread64 both defined???"
- -# endif
- -# define __NR_pread __NR_pread64
- -#endif
- -
- -extern __typeof(pread) __libc_pread;
- -extern __typeof(pwrite) __libc_pwrite;
- -#ifdef __UCLIBC_HAS_LFS__
- -extern __typeof(pread64) __libc_pread64;
- -extern __typeof(pwrite64) __libc_pwrite64;
- -#endif
- -
- -#include <bits/kernel_types.h>
- -
- -
- -#ifdef __NR_pread
- -
- -# if _MIPS_SIM == _MIPS_SIM_ABI64
- -# define __NR___libc_pread __NR_pread
- -_syscall4(ssize_t, __libc_pread, int, fd, void *, buf, size_t, count, off_t, offset)
- -weak_alias (__libc_pread, pread)
- -# ifdef __UCLIBC_HAS_LFS__
- -# define __NR___libc_pread64 __NR_pread
- -_syscall4(ssize_t, __libc_pread64, int, fd, void *, buf, size_t, count, off64_t, offset)
- -weak_alias (__libc_pread64, pread64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -# else /* O32 || N32 */
- -# define __NR___syscall_pread __NR_pread
- -static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
- - size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
- -
- -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
- -{
- - return(__syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR(offset>>31,offset)));
- -}
- -weak_alias(__libc_pread,pread)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
- -{
- - uint32_t low = offset & 0xffffffff;
- - uint32_t high = offset >> 32;
- - return(__syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR (high, low)));
- -}
- -weak_alias(__libc_pread64,pread64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -# endif /* O32 || N32 */
- -
- -#endif /* __NR_pread */
- -
- -/**********************************************************************/
- -
- -#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
- -# ifdef __NR_pwrite
- -# error "__NR_pwrite and __NR_pwrite64 both defined???"
- -# endif
- -# define __NR_pwrite __NR_pwrite64
- +/* We should generalize this for 32bit userlands w/64bit regs. This applies
- + * to the x86_64 x32 and the mips n32 ABIs. */
- +#if _MIPS_SIM == _MIPS_SIM_NABI32
- +# define __NR___syscall_pread __NR_pread
- +static _syscall4(ssize_t, __syscall_pread, int, fd, void *, buf, size_t, count, off_t, offset)
- +# define MY_PREAD(fd, buf, count, offset) \
- + __syscall_pread(fd, buf, count, offset)
- +# define MY_PREAD64(fd, buf, count, offset) \
- + __syscall_pread(fd, buf, count, offset)
- +
- +# define __NR___syscall_pwrite __NR_pwrite
- +static _syscall4(ssize_t, __syscall_pwrite, int, fd, const void *, buf, size_t, count, off_t, offset)
- +# define MY_PWRITE(fd, buf, count, offset) \
- + __syscall_pwrite(fd, buf, count, offset)
- +# define MY_PWRITE64(fd, buf, count, offset) \
- + __syscall_pwrite(fd, buf, count, offset)
- #endif
-
- -#ifdef __NR_pwrite
- -
- -# if _MIPS_SIM == _MIPS_SIM_ABI64
- -# define __NR___libc_pwrite __NR_pwrite
- -_syscall4(ssize_t, __libc_pwrite, int, fd, const void *, buf, size_t, count, off_t, offset)
- -weak_alias (__libc_pwrite, pwrite)
- -# ifdef __UCLIBC_HAS_LFS__
- -# define __NR___libc_pwrite64 __NR_pwrite
- -_syscall4(ssize_t, __libc_pwrite64, int, fd, const void *, buf, size_t, count, off64_t, offset)
- -weak_alias (__libc_pwrite64, pwrite64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -# else /* O32 || N32 */
- -# define __NR___syscall_pwrite __NR_pwrite
- -static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- - size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
- -
- -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
- -{
- - return(__syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR(offset>>31,offset)));
- -}
- -weak_alias(__libc_pwrite,pwrite)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
- -{
- - uint32_t low = offset & 0xffffffff;
- - uint32_t high = offset >> 32;
- - return(__syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR (high, low)));
- -}
- -weak_alias(__libc_pwrite64,pwrite64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -# endif /* O32 || N32 */
- -#endif /* __NR_pwrite */
- +#include "../common/pread_write.c"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/readahead.c uClibc/libc/sysdeps/linux/mips/readahead.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/readahead.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/readahead.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,41 +0,0 @@
- -/* Provide kernel hint to read ahead.
- - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#include <errno.h>
- -#include <fcntl.h>
- -#include <sys/types.h>
- -#include <sys/syscall.h>
- -
- -#ifdef __UCLIBC_HAS_LFS__
- -#include <_lfs_64.h>
- -# ifdef __NR_readahead
- -
- -ssize_t readahead(int fd, off64_t offset, size_t count)
- -{
- -# if _MIPS_SIM == _ABIO32
- - return INLINE_SYSCALL (readahead, 5, fd, 0,
- - __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) offset),
- - count);
- -# else /* N32 || N64 */
- - return INLINE_SYSCALL (readahead, 3, fd, offset, count);
- -# endif
- -}
- -
- -# endif
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/setcontext.S uClibc/libc/sysdeps/linux/mips/setcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/setcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/mips/setcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,191 @@
- +/* Set current context.
- + Copyright (C) 2009 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library. If not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +#include <sys/asm.h>
- +#include <sys/fpregdef.h>
- +#include <sys/regdef.h>
- +
- +#include "ucontext_i.h"
- +
- +/* int setcontext (const ucontext_t *ucp) */
- +
- + .text
- +LOCALSZ = 0
- +ARGSZ = 0
- +MASK = 0x00000000
- +#ifdef __PIC__
- +LOCALSZ = 1 /* save gp */
- +#endif
- +#if _MIPS_SIM != _ABIO32
- +ARGSZ = 1 /* save a0 */
- +# ifdef __PIC__
- +MASK = 0x10000000
- +# endif
- +#endif
- +FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK
- +GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG)
- +#if _MIPS_SIM != _ABIO32
- +A0OFF = FRAMESZ - (1 * SZREG) /* callee-allocated */
- +#else
- +A0OFF = FRAMESZ + (0 * SZREG) /* caller-allocated */
- +#endif
- +
- +NESTED (__setcontext, FRAMESZ, ra)
- + .mask MASK, -(ARGSZ * SZREG)
- + .fmask 0x00000000, 0
- +
- +#ifdef __PIC__
- + SETUP_GP
- +#endif
- +
- + PTR_ADDIU sp, -FRAMESZ
- +
- +#ifdef __PIC__
- + SETUP_GP64 (GPOFF, __setcontext)
- + SAVE_GP (GPOFF)
- +#endif
- +
- +#ifdef PROF
- + .set noat
- + move AT, ra
- + jal _mcount
- + .set at
- +#endif
- +
- + /* Check for the magic flag. */
- + li v0, 1
- + REG_L v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
- + bne v0, v1, 98f
- +
- + REG_S a0, A0OFF(sp)
- +
- +/* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG8) */
- + li a3, _NSIG8
- + move a2, zero
- + PTR_ADDU a1, a0, UCONTEXT_SIGMASK
- + li a0, SIG_SETMASK
- +
- + li v0, SYS_ify (rt_sigprocmask)
- + syscall
- + bnez a3, 99f
- +
- + REG_L v0, A0OFF(sp)
- +
- +#ifdef __mips_hard_float
- +# if _MIPS_SIM == _ABI64
- + l.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(v0)
- +
- +# else /* _MIPS_SIM != _ABI64 */
- + l.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(v0)
- +
- +# endif /* _MIPS_SIM != _ABI64 */
- +
- + lw v1, MCONTEXT_FPC_CSR(v0)
- + ctc1 v1, fcr31
- +#endif /* __mips_hard_float */
- +
- + /* Note the contents of argument registers will be random
- + unless makecontext() has been called. */
- + REG_L a0, (4 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a1, (5 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a2, (6 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a3, (7 * SZREG + MCONTEXT_GREGS)(v0)
- +#if _MIPS_SIM != _ABIO32
- + REG_L a4, (8 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a5, (9 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a6, (10 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a7, (11 * SZREG + MCONTEXT_GREGS)(v0)
- +#endif
- +
- + REG_L s0, (16 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s1, (17 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s2, (18 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s3, (19 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s4, (20 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s5, (21 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s6, (22 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s7, (23 * SZREG + MCONTEXT_GREGS)(v0)
- +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
- + REG_L gp, (28 * SZREG + MCONTEXT_GREGS)(v0)
- +#endif
- + REG_L sp, (29 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L fp, (30 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L ra, (31 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L t9, MCONTEXT_PC(v0)
- +
- + move v0, zero
- + jr t9
- +
- +98:
- + /* This is a context obtained from a signal handler.
- + Perform a full restore by pushing the context
- + passed onto a simulated signal frame on the stack
- + and call the signal return syscall as if a signal
- + handler exited normally. */
- + PTR_ADDIU sp, -((RT_SIGFRAME_SIZE + ALSZ) & ALMASK)
- +
- + /* Only ucontext is referred to from rt_sigreturn,
- + copy it. */
- + PTR_ADDIU t1, sp, RT_SIGFRAME_UCONTEXT
- + li t3, ((UCONTEXT_SIZE + SZREG - 1) / SZREG) - 1
- +0:
- + REG_L t2, (a0)
- + PTR_ADDIU a0, SZREG
- + REG_S t2, (t1)
- + PTR_ADDIU t1, SZREG
- + .set noreorder
- + bgtz t3, 0b
- + addiu t3, -1
- + .set reorder
- +
- +/* rt_sigreturn () -- no arguments, sp points to struct rt_sigframe. */
- + li v0, SYS_ify (rt_sigreturn)
- + syscall
- +
- + /* Restore the stack and fall through to the error
- + path. Successful rt_sigreturn never returns to
- + its calling place. */
- + PTR_ADDIU sp, ((RT_SIGFRAME_SIZE + ALSZ) & ALMASK)
- +99:
- +#ifdef __PIC__
- + PTR_LA t9, JUMPTARGET (__syscall_error)
- + RESTORE_GP64
- + PTR_ADDIU sp, FRAMESZ
- + jr t9
- +
- +#else /* ! __PIC__ */
- +
- + j JUMPTARGET (__syscall_error)
- +#endif /* ! __PIC__ */
- +PSEUDO_END (__setcontext)
- +
- +weak_alias (__setcontext, setcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/setjmp_aux.c uClibc/libc/sysdeps/linux/mips/setjmp_aux.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/setjmp_aux.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/setjmp_aux.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <setjmp.h>
- @@ -27,11 +26,9 @@
- pointer. We do things this way because it's difficult to reliably
- access them in C. */
-
- -extern int __sigjmp_save (sigjmp_buf, int);
- -
- int
- #if _MIPS_SIM == _MIPS_SIM_ABI64
- -__sigsetjmp_aux (jmp_buf env, int savemask, long sp, long fp)
- +__sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, long long gp)
- #else /* O32 || N32 */
- __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
- #endif /* O32 || N32 */
- @@ -65,14 +62,14 @@
- #endif
-
- /* .. and the stack pointer; */
- - env[0].__jmpbuf[0].__sp = (void *) sp;
- + env[0].__jmpbuf[0].__sp = (ptrsize) sp;
-
- /* .. and the FP; it'll be in s8. */
- - env[0].__jmpbuf[0].__fp = (void *) fp;
- + env[0].__jmpbuf[0].__fp = (ptrsize) fp;
-
- /* .. and the GP; */
- #if _MIPS_SIM == _MIPS_SIM_ABI64
- - __asm__ __volatile__ ("sd $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
- + env[0].__jmpbuf[0].__gp = (ptrsize) gp;
- #else
- __asm__ __volatile__ ("sw $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/setjmp.S uClibc/libc/sysdeps/linux/mips/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/regdef.h>
- #include <sys/asm.h>
- @@ -53,6 +52,7 @@
- PTR_LA t9, __sigsetjmp_aux
- #if _MIPS_SIM != _MIPS_SIM_ABI32
- .cpreturn
- + move a4, gp
- #endif
- jr t9
- #else
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sgidefs.h uClibc/libc/sysdeps/linux/mips/sgidefs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sgidefs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sgidefs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SGIDEFS_H
- #define _SGIDEFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sigaction.c uClibc/libc/sysdeps/linux/mips/sigaction.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA.
- + see <http://www.gnu.org/licenses/>.
-
- Totally hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
- */
- @@ -27,9 +26,6 @@
-
- #define SA_RESTORER 0x04000000
-
- -extern __typeof(sigaction) __libc_sigaction;
- -
- -
- #ifdef __NR_rt_sigaction
-
- # if _MIPS_SIM != _ABIO32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/swapcontext.S uClibc/libc/sysdeps/linux/mips/swapcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/swapcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/mips/swapcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,211 @@
- +/* Save and set current context.
- + Copyright (C) 2009 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library. If not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +#include <sys/asm.h>
- +#include <sys/fpregdef.h>
- +#include <sys/regdef.h>
- +
- +#include "ucontext_i.h"
- +
- +/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
- +
- + .text
- +LOCALSZ = 0
- +ARGSZ = 0
- +MASK = 0x00000000
- +#ifdef __PIC__
- +LOCALSZ = 1 /* save gp */
- +#endif
- +#if _MIPS_SIM != _ABIO32
- +ARGSZ = 1 /* save a1 */
- +# ifdef __PIC__
- +MASK = 0x10000000
- +# endif
- +#endif
- +FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK
- +GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG)
- +#if _MIPS_SIM != _ABIO32
- +A1OFF = FRAMESZ - (1 * SZREG) /* callee-allocated */
- +#else
- +A1OFF = FRAMESZ + (1 * SZREG) /* caller-allocated */
- +#endif
- +
- +NESTED (__swapcontext, FRAMESZ, ra)
- + .mask MASK, -(ARGSZ * SZREG)
- + .fmask 0x00000000, 0
- +
- +#ifdef __PIC__
- + SETUP_GP
- +
- + move a2, sp
- +# define _SP a2
- +
- +# if _MIPS_SIM != _ABIO32
- + move a3, gp
- +# define _GP a3
- +# endif
- +
- + PTR_ADDIU sp, -FRAMESZ
- + SETUP_GP64 (GPOFF, __swapcontext)
- + SAVE_GP (GPOFF)
- +
- +#else /* ! __PIC__ */
- +# define _SP sp
- +# define _GP gp
- +
- +#endif /* ! __PIC__ */
- +
- +#ifdef PROF
- + .set noat
- + move AT, ra
- + jal _mcount
- + .set at
- +#endif
- +
- + /* Store a magic flag. */
- + li v1, 1
- + REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
- +
- + REG_S s0, (16 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s1, (17 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s2, (18 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s3, (19 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s4, (20 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s5, (21 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s6, (22 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S s7, (23 * SZREG + MCONTEXT_GREGS)(a0)
- +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
- + REG_S _GP, (28 * SZREG + MCONTEXT_GREGS)(a0)
- +#endif
- + REG_S _SP, (29 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S fp, (30 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S ra, (31 * SZREG + MCONTEXT_GREGS)(a0)
- + REG_S ra, MCONTEXT_PC(a0)
- +
- +#ifdef __mips_hard_float
- +# if _MIPS_SIM == _ABI64
- + s.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(a0)
- +
- +# else /* _MIPS_SIM != _ABI64 */
- + s.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
- + s.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(a0)
- +
- +# endif /* _MIPS_SIM != _ABI64 */
- +
- + cfc1 v1, fcr31
- + sw v1, MCONTEXT_FPC_CSR(a0)
- +#endif /* __mips_hard_float */
- +
- + REG_S a1, A1OFF(sp)
- +
- +/* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, &oucp->uc_sigmask, _NSIG8) */
- + li a3, _NSIG8
- + PTR_ADDU a2, a0, UCONTEXT_SIGMASK
- + PTR_ADDU a1, a1, UCONTEXT_SIGMASK
- + li a0, SIG_SETMASK
- +
- + li v0, SYS_ify (rt_sigprocmask)
- + syscall
- + bnez a3, 99f
- +
- + REG_L v0, A1OFF(sp)
- +
- +#ifdef __mips_hard_float
- +# if _MIPS_SIM == _ABI64
- + l.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(v0)
- +
- +# else /* _MIPS_SIM != _ABI64 */
- + l.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
- + l.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(v0)
- +
- +# endif /* _MIPS_SIM != _ABI64 */
- +
- + lw v1, MCONTEXT_FPC_CSR(v0)
- + ctc1 v1, fcr31
- +#endif /* __mips_hard_float */
- +
- + /* Note the contents of argument registers will be random
- + unless makecontext() has been called. */
- + REG_L a0, (4 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a1, (5 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a2, (6 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a3, (7 * SZREG + MCONTEXT_GREGS)(v0)
- +#if _MIPS_SIM != _ABIO32
- + REG_L a4, (8 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a5, (9 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a6, (10 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L a7, (11 * SZREG + MCONTEXT_GREGS)(v0)
- +#endif
- +
- + REG_L s0, (16 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s1, (17 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s2, (18 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s3, (19 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s4, (20 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s5, (21 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s6, (22 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L s7, (23 * SZREG + MCONTEXT_GREGS)(v0)
- +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
- + REG_L gp, (28 * SZREG + MCONTEXT_GREGS)(v0)
- +#endif
- + REG_L sp, (29 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L fp, (30 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L ra, (31 * SZREG + MCONTEXT_GREGS)(v0)
- + REG_L t9, MCONTEXT_PC(v0)
- +
- + move v0, zero
- + jr t9
- +
- +99:
- +#ifdef __PIC__
- + PTR_LA t9, JUMPTARGET (__syscall_error)
- + RESTORE_GP64
- + PTR_ADDIU sp, FRAMESZ
- + jr t9
- +
- +#else /* ! __PIC__ */
- +
- + j JUMPTARGET (__syscall_error)
- +#endif /* ! __PIC__ */
- +PSEUDO_END (__swapcontext)
- +
- +weak_alias (__swapcontext, swapcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/asm.h uClibc/libc/sysdeps/linux/mips/sys/asm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/asm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sys/asm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_ASM_H
- #define _SYS_ASM_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/cachectl.h uClibc/libc/sysdeps/linux/mips/sys/cachectl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/cachectl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sys/cachectl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_CACHECTL_H
- #define _SYS_CACHECTL_H 1
- @@ -29,13 +28,15 @@
- __BEGIN_DECLS
-
- #ifdef __USE_MISC
- -extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW;
- +extern int cachectl (void *addr, const int nbytes, const int op) __THROW;
- +#endif
- +#if 0
- +extern int __cachectl (void *addr, const int nbytes, const int op) __THROW;
- #endif
- -extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW;
- #ifdef __USE_MISC
- -extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW;
- +extern int cacheflush (void *addr, const int nbytes, const int op) __THROW;
- #endif
- -extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW;
- +extern int _flush_cache (char *addr, const int nbytes, const int op) __THROW;
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/fpregdef.h uClibc/libc/sysdeps/linux/mips/sys/fpregdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/fpregdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sys/fpregdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_FPREGDEF_H
- #define _SYS_FPREGDEF_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/procfs.h uClibc/libc/sysdeps/linux/mips/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/regdef.h uClibc/libc/sysdeps/linux/mips/sys/regdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/regdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sys/regdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_REGDEF_H
- #define _SYS_REGDEF_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/sysmips.h uClibc/libc/sysdeps/linux/mips/sys/sysmips.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/sysmips.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sys/sysmips.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SYSMIPS_H
- #define _SYS_SYSMIPS_H 1
- @@ -36,8 +35,8 @@
-
- __BEGIN_DECLS
-
- -extern int sysmips (__const int cmd, __const long arg1,
- - __const int arg2, __const int arg3) __THROW;
- +extern int sysmips (const int cmd, const long arg1,
- + const int arg2, const int arg3) __THROW;
-
- __END_DECLS
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/tas.h uClibc/libc/sysdeps/linux/mips/sys/tas.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/tas.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sys/tas.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_TAS_H
- #define _SYS_TAS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/ucontext.h uClibc/libc/sysdeps/linux/mips/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Don't rely on this, the interface is currently messed up and may need to
- be broken to be fixed. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/user.h uClibc/libc/sysdeps/linux/mips/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/syscall_error.S uClibc/libc/sysdeps/linux/mips/syscall_error.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/syscall_error.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/syscall_error.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/asm.h>
- #include <sysdep.h>
- @@ -43,7 +42,7 @@
- #ifdef __PIC__
- SAVE_GP(GPOFF)
- #endif
- - REG_S v0, V0OFF(sp)
- + REG_S a0, V0OFF(sp)
- REG_S ra, RAOFF(sp)
-
- /* Find our per-thread errno address */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/syscall.S uClibc/libc/sysdeps/linux/mips/syscall.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/syscall.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/syscall.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <sys/asm.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sysdep.h uClibc/libc/sysdeps/linux/mips/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/sysdep.h 2014-02-15 14:18:15.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LINUX_MIPS_SYSDEP_H
- #define _LINUX_MIPS_SYSDEP_H 1
- @@ -78,8 +77,6 @@
- #undef PSEUDO_END_ERRVAL
- #define PSEUDO_END_ERRVAL(sym) .end sym; .size sym,.-sym
-
- -#define ret_ERRVAL ret
- -
- #define r0 v0
- #define r1 v1
- /* The mips move insn is d,s. */
- @@ -133,258 +130,6 @@
-
- #else /* ! __ASSEMBLER__ */
-
- -/* Define a macro which expands into the inline wrapper code for a system
- - call. */
- -#undef INLINE_SYSCALL
- -#define INLINE_SYSCALL(name, nr, args...) \
- - ({ INTERNAL_SYSCALL_DECL(err); \
- - long result_var = INTERNAL_SYSCALL (name, err, nr, args); \
- - if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \
- - { \
- - __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \
- - result_var = -1L; \
- - } \
- - result_var; })
- -
- -#undef INTERNAL_SYSCALL_DECL
- -#define INTERNAL_SYSCALL_DECL(err) long err
- -
- -#undef INTERNAL_SYSCALL_ERROR_P
- -#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err))
- -
- -#undef INTERNAL_SYSCALL_ERRNO
- -#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
- -
- -#undef INTERNAL_SYSCALL
- -#define INTERNAL_SYSCALL(name, err, nr, args...) \
- - internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \
- - "i" (SYS_ify (name)), err, args)
- -
- -#undef INTERNAL_SYSCALL_NCS
- -#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
- - internal_syscall##nr (= number, , "r" (__v0), err, args)
- -#undef internal_syscall0
- -#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \
- -({ \
- - long _sys_result; \
- - \
- - { \
- - register long __v0 __asm__("$2") ncs_init; \
- - register long __a3 __asm__("$7"); \
- - __asm__ __volatile__ ( \
- - ".set\tnoreorder\n\t" \
- - cs_init \
- - "syscall\n\t" \
- - ".set reorder" \
- - : "=r" (__v0), "=r" (__a3) \
- - : input \
- - : __SYSCALL_CLOBBERS); \
- - err = __a3; \
- - _sys_result = __v0; \
- - } \
- - _sys_result; \
- -})
- -
- -#undef internal_syscall1
- -#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \
- -({ \
- - long _sys_result; \
- - \
- - { \
- - register long __v0 __asm__("$2") ncs_init; \
- - register long __a0 __asm__("$4") = (long) arg1; \
- - register long __a3 __asm__("$7"); \
- - __asm__ __volatile__ ( \
- - ".set\tnoreorder\n\t" \
- - cs_init \
- - "syscall\n\t" \
- - ".set reorder" \
- - : "=r" (__v0), "=r" (__a3) \
- - : input, "r" (__a0) \
- - : __SYSCALL_CLOBBERS); \
- - err = __a3; \
- - _sys_result = __v0; \
- - } \
- - _sys_result; \
- -})
- -
- -#undef internal_syscall2
- -#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \
- -({ \
- - long _sys_result; \
- - \
- - { \
- - register long __v0 __asm__("$2") ncs_init; \
- - register long __a0 __asm__("$4") = (long) arg1; \
- - register long __a1 __asm__("$5") = (long) arg2; \
- - register long __a3 __asm__("$7"); \
- - __asm__ __volatile__ ( \
- - ".set\tnoreorder\n\t" \
- - cs_init \
- - "syscall\n\t" \
- - ".set\treorder" \
- - : "=r" (__v0), "=r" (__a3) \
- - : input, "r" (__a0), "r" (__a1) \
- - : __SYSCALL_CLOBBERS); \
- - err = __a3; \
- - _sys_result = __v0; \
- - } \
- - _sys_result; \
- -})
- -
- -#undef internal_syscall3
- -#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3)\
- -({ \
- - long _sys_result; \
- - \
- - { \
- - register long __v0 __asm__("$2") ncs_init; \
- - register long __a0 __asm__("$4") = (long) arg1; \
- - register long __a1 __asm__("$5") = (long) arg2; \
- - register long __a2 __asm__("$6") = (long) arg3; \
- - register long __a3 __asm__("$7"); \
- - __asm__ __volatile__ ( \
- - ".set\tnoreorder\n\t" \
- - cs_init \
- - "syscall\n\t" \
- - ".set\treorder" \
- - : "=r" (__v0), "=r" (__a3) \
- - : input, "r" (__a0), "r" (__a1), "r" (__a2) \
- - : __SYSCALL_CLOBBERS); \
- - err = __a3; \
- - _sys_result = __v0; \
- - } \
- - _sys_result; \
- -})
- -
- -#undef internal_syscall4
- -#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4)\
- -({ \
- - long _sys_result; \
- - \
- - { \
- - register long __v0 __asm__("$2") ncs_init; \
- - register long __a0 __asm__("$4") = (long) arg1; \
- - register long __a1 __asm__("$5") = (long) arg2; \
- - register long __a2 __asm__("$6") = (long) arg3; \
- - register long __a3 __asm__("$7") = (long) arg4; \
- - __asm__ __volatile__ ( \
- - ".set\tnoreorder\n\t" \
- - cs_init \
- - "syscall\n\t" \
- - ".set\treorder" \
- - : "=r" (__v0), "+r" (__a3) \
- - : input, "r" (__a0), "r" (__a1), "r" (__a2) \
- - : __SYSCALL_CLOBBERS); \
- - err = __a3; \
- - _sys_result = __v0; \
- - } \
- - _sys_result; \
- -})
- -
- -/* We need to use a frame pointer for the functions in which we
- - adjust $sp around the syscall, or debug information and unwind
- - information will be $sp relative and thus wrong during the syscall. As
- - of GCC 3.4.3, this is sufficient. */
- -#define FORCE_FRAME_POINTER alloca (4)
- -
- -#undef internal_syscall5
- -#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5)\
- -({ \
- - long _sys_result; \
- - \
- - FORCE_FRAME_POINTER; \
- - { \
- - register long __v0 __asm__("$2") ncs_init; \
- - register long __a0 __asm__("$4") = (long) arg1; \
- - register long __a1 __asm__("$5") = (long) arg2; \
- - register long __a2 __asm__("$6") = (long) arg3; \
- - register long __a3 __asm__("$7") = (long) arg4; \
- - __asm__ __volatile__ ( \
- - ".set\tnoreorder\n\t" \
- - "subu\t$29, 32\n\t" \
- - "sw\t%6, 16($29)\n\t" \
- - cs_init \
- - "syscall\n\t" \
- - "addiu\t$29, 32\n\t" \
- - ".set\treorder" \
- - : "=r" (__v0), "+r" (__a3) \
- - : input, "r" (__a0), "r" (__a1), "r" (__a2), \
- - "r" ((long)arg5) \
- - : __SYSCALL_CLOBBERS); \
- - err = __a3; \
- - _sys_result = __v0; \
- - } \
- - _sys_result; \
- -})
- -
- -#undef internal_syscall6
- -#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6)\
- -({ \
- - long _sys_result; \
- - \
- - FORCE_FRAME_POINTER; \
- - { \
- - register long __v0 __asm__("$2") ncs_init; \
- - register long __a0 __asm__("$4") = (long) arg1; \
- - register long __a1 __asm__("$5") = (long) arg2; \
- - register long __a2 __asm__("$6") = (long) arg3; \
- - register long __a3 __asm__("$7") = (long) arg4; \
- - __asm__ __volatile__ ( \
- - ".set\tnoreorder\n\t" \
- - "subu\t$29, 32\n\t" \
- - "sw\t%6, 16($29)\n\t" \
- - "sw\t%7, 20($29)\n\t" \
- - cs_init \
- - "syscall\n\t" \
- - "addiu\t$29, 32\n\t" \
- - ".set\treorder" \
- - : "=r" (__v0), "+r" (__a3) \
- - : input, "r" (__a0), "r" (__a1), "r" (__a2), \
- - "r" ((long)arg5), "r" ((long)arg6) \
- - : __SYSCALL_CLOBBERS); \
- - err = __a3; \
- - _sys_result = __v0; \
- - } \
- - _sys_result; \
- -})
- -
- -#undef internal_syscall7
- -#define internal_syscall7(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
- -({ \
- - long _sys_result; \
- - \
- - FORCE_FRAME_POINTER; \
- - { \
- - register long __v0 __asm__("$2") ncs_init; \
- - register long __a0 __asm__("$4") = (long) arg1; \
- - register long __a1 __asm__("$5") = (long) arg2; \
- - register long __a2 __asm__("$6") = (long) arg3; \
- - register long __a3 __asm__("$7") = (long) arg4; \
- - __asm__ __volatile__ ( \
- - ".set\tnoreorder\n\t" \
- - "subu\t$29, 32\n\t" \
- - "sw\t%6, 16($29)\n\t" \
- - "sw\t%7, 20($29)\n\t" \
- - "sw\t%8, 24($29)\n\t" \
- - cs_init \
- - "syscall\n\t" \
- - "addiu\t$29, 32\n\t" \
- - ".set\treorder" \
- - : "=r" (__v0), "+r" (__a3) \
- - : input, "r" (__a0), "r" (__a1), "r" (__a2), \
- - "r" ((long)arg5), "r" ((long)arg6), "r" ((long)arg7) \
- - : __SYSCALL_CLOBBERS); \
- - err = __a3; \
- - _sys_result = __v0; \
- - } \
- - _sys_result; \
- -})
- -
- -#undef __SYSCALL_CLOBBERS
- -#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
- - "$14", "$15", "$24", "$25", "memory"
- -
- /* Pointer mangling is not yet supported for MIPS. */
- #define PTR_MANGLE(var) (void) (var)
- #define PTR_DEMANGLE(var) (void) (var)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/_test_and_set.c uClibc/libc/sysdeps/linux/mips/_test_and_set.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/_test_and_set.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/_test_and_set.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the real-function versions of all inline functions
- defined in sys/tas.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/ucontext_i.sym uClibc/libc/sysdeps/linux/mips/ucontext_i.sym
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/ucontext_i.sym 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/mips/ucontext_i.sym 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,52 @@
- +#include <inttypes.h>
- +#include <signal.h>
- +#include <stddef.h>
- +#include <sys/ucontext.h>
- +
- +#include <kernel_rt_sigframe.h>
- +
- +-- Constants used by the rt_sigprocmask call.
- +
- +SIG_BLOCK
- +SIG_SETMASK
- +
- +_NSIG8 (_NSIG / 8)
- +
- +-- Offsets of the fields in the kernel rt_sigframe_t structure.
- +#define rt_sigframe(member) offsetof (kernel_rt_sigframe_t, member)
- +
- +RT_SIGFRAME_UCONTEXT rt_sigframe (rs_uc)
- +
- +RT_SIGFRAME_SIZE sizeof (kernel_rt_sigframe_t)
- +
- +-- Offsets of the fields in the ucontext_t structure.
- +#define ucontext(member) offsetof (ucontext_t, member)
- +#define stack(member) ucontext (uc_stack.member)
- +#define mcontext(member) ucontext (uc_mcontext.member)
- +
- +UCONTEXT_FLAGS ucontext (uc_flags)
- +UCONTEXT_LINK ucontext (uc_link)
- +UCONTEXT_STACK ucontext (uc_stack)
- +UCONTEXT_MCONTEXT ucontext (uc_mcontext)
- +UCONTEXT_SIGMASK ucontext (uc_sigmask)
- +
- +STACK_SP stack (ss_sp)
- +STACK_SIZE stack (ss_size)
- +STACK_FLAGS stack (ss_flags)
- +
- +MCONTEXT_GREGS mcontext (gregs)
- +MCONTEXT_FPREGS mcontext (fpregs)
- +MCONTEXT_MDHI mcontext (mdhi)
- +MCONTEXT_HI1 mcontext (hi1)
- +MCONTEXT_HI2 mcontext (hi2)
- +MCONTEXT_HI3 mcontext (hi3)
- +MCONTEXT_MDLO mcontext (mdlo)
- +MCONTEXT_LO1 mcontext (lo1)
- +MCONTEXT_LO2 mcontext (lo2)
- +MCONTEXT_LO3 mcontext (lo3)
- +MCONTEXT_PC mcontext (pc)
- +MCONTEXT_FPC_CSR mcontext (fpc_csr)
- +MCONTEXT_USED_MATH mcontext (used_math)
- +MCONTEXT_DSP mcontext (dsp)
- +
- +UCONTEXT_SIZE sizeof (ucontext_t)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/vfork.S uClibc/libc/sysdeps/linux/mips/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/mips/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,12 +12,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* vfork() is just a special case of clone(). */
-
- +#include <sys/syscall.h>
- #include <sys/asm.h>
- #include <sysdep.h>
-
- @@ -34,6 +34,7 @@
- /* int vfork() */
-
- .text
- + .hidden __vfork
- LOCALSZ= 1
- FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
- GPOFF= FRAMESZ-(1*SZREG)
- @@ -84,6 +85,7 @@
-
- /* Something bad happened -- no child created. */
- L(error):
- + move a0, v0
- #ifdef __PIC__
- PTR_LA t9, __syscall_error
- RESTORE_GP64
- @@ -95,6 +97,6 @@
- END(__vfork)
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
-
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/fcntl.h uClibc/libc/sysdeps/linux/nios/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/mathdef.h uClibc/libc/sysdeps/linux/nios/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/setjmp.h uClibc/libc/sysdeps/linux/nios/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. Nios version. */
- #ifndef _BITS_SETJMP_H
- @@ -24,8 +23,6 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#ifndef _ASM
- -
- #include <signal.h>
-
- typedef struct
- @@ -44,33 +41,4 @@
-
- } __jmp_buf[1];
-
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)->__sp)
- -
- -#else /* _ASM */
- -
- -#define jmpbuf_l0 0x00
- -#define jmpbuf_l1 0x01
- -#define jmpbuf_l2 0x02
- -#define jmpbuf_l3 0x03
- -#define jmpbuf_l4 0x04
- -#define jmpbuf_l5 0x05
- -#define jmpbuf_l6 0x06
- -#define jmpbuf_l7 0x07
- -
- -#define jmpbuf_i0 0x08
- -#define jmpbuf_i1 0x09
- -#define jmpbuf_i2 0x0a
- -#define jmpbuf_i3 0x0b
- -#define jmpbuf_i4 0x0c
- -#define jmpbuf_i5 0x0d
- -
- -#define jmpbuf_sp 0x0e
- -#define jmpbuf_jmpret 0x0f
- -#define jmpbuf_callersret 0x10
- -
- -#endif /* _ASM */
- -
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/nios/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT struct sigcontext *
- #define SIGCONTEXT_EXTRA_ARGS
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/stackinfo.h uClibc/libc/sysdeps/linux/nios/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/stat.h uClibc/libc/sysdeps/linux/nios/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/wordsize.h uClibc/libc/sysdeps/linux/nios/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/brk.c uClibc/libc/sysdeps/linux/nios/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
- #include <sys/syscall.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/clone.S uClibc/libc/sysdeps/linux/nios/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/crt1.S uClibc/libc/sysdeps/linux/nios/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- -Cambridge, MA 02139, USA. */
- +not, see <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <asm/unistd.h>
- @@ -29,9 +28,6 @@
- .weak _fini
- .type main,@function
- .type __uClibc_main,@function
- - .type __h_errno_location, @function
- - .type _stdio_init, @function
- - .type _stdio_term, @function
-
- .text
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/fpu_control.h uClibc/libc/sysdeps/linux/nios/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/nios/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/nios/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,25 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#define jmpbuf_l0 0x00
- +#define jmpbuf_l1 0x01
- +#define jmpbuf_l2 0x02
- +#define jmpbuf_l3 0x03
- +#define jmpbuf_l4 0x04
- +#define jmpbuf_l5 0x05
- +#define jmpbuf_l6 0x06
- +#define jmpbuf_l7 0x07
- +
- +#define jmpbuf_i0 0x08
- +#define jmpbuf_i1 0x09
- +#define jmpbuf_i2 0x0a
- +#define jmpbuf_i3 0x0b
- +#define jmpbuf_i4 0x0c
- +#define jmpbuf_i5 0x0d
- +
- +#define jmpbuf_sp 0x0e
- +#define jmpbuf_jmpret 0x0f
- +#define jmpbuf_callersret 0x10
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/nios/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/nios/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)->__sp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/__longjmp.S uClibc/libc/sysdeps/linux/nios/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,9 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- -
- -#include <features.h>
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- + see <http://www.gnu.org/licenses/>. */
-
- +#include <jmpbuf-offsets.h>
-
- ;----------------------------------------
- ; Name: __longjmp
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/Makefile.arch uClibc/libc/sysdeps/linux/nios/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,8 +5,8 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c crtbegin.c crtend.c
- +CSRC-y := brk.c crtbegin.c crtend.c
-
- -SSRC := \
- +SSRC-y := \
- __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S \
- clone.S vfork.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/setjmp.S uClibc/libc/sysdeps/linux/nios/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,13 +13,9 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
- #include "NM_Macros.S"
-
- ;----------------------------------------
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/sys/procfs.h uClibc/libc/sysdeps/linux/nios/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/sys/ucontext.h uClibc/libc/sysdeps/linux/nios/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/vfork.S uClibc/libc/sysdeps/linux/nios/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -10,9 +10,6 @@
- * Written by Wentao Xu <wentao@microtronix.com>
- */
-
- -#include <features.h>
- -
- -#include <bits/errno.h>
- #include <sys/syscall.h>
- #include "NM_Macros.S"
-
- @@ -51,4 +48,4 @@
-
- .size __vfork,.-__vfork
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/fcntl.h uClibc/libc/sysdeps/linux/nios2/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/kernel_types.h uClibc/libc/sysdeps/linux/nios2/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -31,6 +31,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef unsigned short __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- typedef struct {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/mathdef.h uClibc/libc/sysdeps/linux/nios2/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/setjmp.h uClibc/libc/sysdeps/linux/nios2/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SETJMP_H
- #define _BITS_SETJMP_H 1
- @@ -24,7 +23,6 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#ifndef _ASM
- typedef struct
- {
- /* Callee-saved registers r16 through r23. */
- @@ -43,30 +41,9 @@
- unsigned long __gp;
-
- /* floating point regs, if any */
- -#if defined __HAVE_FPU__
- +#ifdef __UCLIBC_HAS_FPU__
- unsigned long __fpregs[64];
- #endif
- } __jmp_buf[1];
-
- -#endif
- -
- -#define JB_REGS 0
- -#define JB_PC 32
- -#define JB_SP 36
- -#define JB_FP 40
- -#define JB_GP 44
- -#define JB_FPREGS 48
- -
- -#if defined __HAVE_FPU__
- -# define JB_SIZE 304
- -#else
- -# define JB_SIZE 48
- -#endif
- -
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void*)(jmpbuf)->__sp)
- -
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/nios2/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT struct sigcontext *
- #define SIGCONTEXT_EXTRA_ARGS
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/stackinfo.h uClibc/libc/sysdeps/linux/nios2/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/stat.h uClibc/libc/sysdeps/linux/nios2/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/uClibc_page.h uClibc/libc/sysdeps/linux/nios2/bits/uClibc_page.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bits/uClibc_page.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,29 +0,0 @@
- -/* Copyright (C) 2004 Erik Andersen
- - *
- - * This library is free software; you can redistribute it and/or
- - * modify it under the terms of the GNU Lesser General Public
- - * License as published by the Free Software Foundation; either
- - * version 2.1 of the License, or (at your option) any later version.
- - *
- - * The GNU C Library is distributed in the hope that it will be useful,
- - * but WITHOUT ANY WARRANTY; without even the implied warranty of
- - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - * Lesser General Public License for more details.
- - *
- - * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- - */
- -
- -/* Supply an architecture specific value for PAGE_SIZE and friends. */
- -
- -#ifndef _UCLIBC_PAGE_H
- -#define _UCLIBC_PAGE_H
- -
- -/* PAGE_SHIFT determines the page size -- in this case 4096 */
- -#define PAGE_SHIFT (12)
- -#define PAGE_SIZE (1UL << PAGE_SHIFT)
- -#define PAGE_MASK (~(PAGE_SIZE-1))
- -
- -#endif /* _UCLIBC_PAGE_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/wordsize.h uClibc/libc/sysdeps/linux/nios2/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/brk.c uClibc/libc/sysdeps/linux/nios2/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
- #include <sys/syscall.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bsd-_setjmp.S uClibc/libc/sysdeps/linux/nios2/bsd-_setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bsd-_setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -11,9 +11,8 @@
- *
- */
-
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <features.h>
- +#include <jmpbuf-offsets.h>
-
- .globl _setjmp
- .type _setjmp,@function
- @@ -34,7 +33,7 @@
- stw fp, JB_FP(r4)
- stw gp, JB_GP(r4)
-
- -#if defined(__HAVE_FPU__)
- +#ifdef __UCLIBC_HAS_FPU__
- SAVE_FPU r4 JB_FPREGS
- #endif
- stw r0, JB_SIZE(r4) /* signal mask is not saved */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bsd-setjmp.S uClibc/libc/sysdeps/linux/nios2/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- */
-
-
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <features.h>
- +#include <jmpbuf-offsets.h>
-
- .globl setjmp
- .type setjmp,@function
- @@ -35,7 +34,7 @@
- stw fp, JB_FP(r4)
- stw gp, JB_GP(r4)
-
- -#if defined(__HAVE_FPU__)
- +#ifdef __UCLIBC_HAS_FPU__
- SAVE_FPU r4 JB_FPREGS
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/crt1.S uClibc/libc/sysdeps/linux/nios2/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -25,9 +25,6 @@
- #endif
- .type main,@function
- .type __uClibc_main,@function
- - .type __h_errno_location, @function
- - .type _stdio_init, @function
- - .type _stdio_term, @function
- .text
- .balign 4
- _start:
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/fpu_control.h uClibc/libc/sysdeps/linux/nios2/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/nios2/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/nios2/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,20 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <features.h>
- +
- +#define JB_REGS 0
- +#define JB_PC 32
- +#define JB_SP 36
- +#define JB_FP 40
- +#define JB_GP 44
- +#define JB_FPREGS 48
- +
- +#ifdef __UCLIBC_HAS_FPU__
- +# define JB_SIZE 304
- +#else
- +# define JB_SIZE 48
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/nios2/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/nios2/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)->__sp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/__longjmp.S uClibc/libc/sysdeps/linux/nios2/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,7 @@
- */
-
- #include <features.h>
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- .globl __longjmp
- .type __longjmp,@function
- @@ -39,7 +37,7 @@
- ldw gp, JB_GP(r4)
- ldw sp, JB_SP(r4)
-
- -#if defined(__HAVE_FPU__)
- +#ifdef __UCLIBC_HAS_FPU__
- RESTORE_FPU r4 JB_FPREGS
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/Makefile.arch uClibc/libc/sysdeps/linux/nios2/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,8 +5,8 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c syscall.c
- +CSRC-y := brk.c syscall.c
-
- -SSRC := \
- +SSRC-y := \
- __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S \
- vfork.S clone.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/setjmp.S uClibc/libc/sysdeps/linux/nios2/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,7 @@
- */
-
- #include <features.h>
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- .globl __sigsetjmp
- .type __sigsetjmp,@function
- @@ -35,7 +33,7 @@
- stw fp, JB_FP(r4)
- stw gp, JB_GP(r4)
-
- -#if defined(__HAVE_FPU__)
- +#ifdef __UCLIBC_HAS_FPU__
- SAVE_FPU r4 JB_FPREGS
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/sys/procfs.h uClibc/libc/sysdeps/linux/nios2/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/sys/ucontext.h uClibc/libc/sysdeps/linux/nios2/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/syscall.c uClibc/libc/sysdeps/linux/nios2/syscall.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/syscall.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/syscall.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,8 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- #include <features.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/vfork.S uClibc/libc/sysdeps/linux/nios2/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/nios2/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -10,11 +10,7 @@
- * Written by Wentao Xu <wentao@microtronix.com>
- */
-
- -#include <features.h>
- -
- -#define _ERRNO_H
- -#include <bits/errno.h>
- -#include <asm/unistd.h>
- +#include <sys/syscall.h>
-
- #ifndef __NR_vfork
- #define __NR_vfork __NR_fork /* uClinux-2.0 only has fork which is vfork */
- @@ -53,4 +49,4 @@
-
- .size __vfork,.-__vfork
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/atomic.h uClibc/libc/sysdeps/linux/powerpc/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <bits/wordsize.h>
-
- @@ -37,9 +36,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The 32-bit exchange_bool is different on powerpc64 because the subf
- does signed 64-bit arthmatic while the lwarx is 32-bit unsigned
- @@ -260,9 +258,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * The 32-bit exchange_bool is different on powerpc64 because the subf
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/endian.h uClibc/libc/sysdeps/linux/powerpc/bits/endian.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/endian.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/endian.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* PowerPC can be little or big endian. Hopefully gcc will know... */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fcntl.h uClibc/libc/sysdeps/linux/powerpc/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fenv.h uClibc/libc/sysdeps/linux/powerpc/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fenvinline.h uClibc/libc/sysdeps/linux/powerpc/bits/fenvinline.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fenvinline.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/fenvinline.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/ipc.h uClibc/libc/sysdeps/linux/powerpc/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/kernel_types.h uClibc/libc/sysdeps/linux/powerpc/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -36,6 +36,8 @@
- typedef unsigned int __kernel_old_uid_t;
- typedef unsigned int __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- #else
- typedef unsigned int __kernel_dev_t;
- typedef unsigned int __kernel_ino_t;
- @@ -61,6 +63,8 @@
- typedef unsigned int __kernel_old_uid_t;
- typedef unsigned int __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/local_lim.h uClibc/libc/sysdeps/linux/powerpc/bits/local_lim.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/local_lim.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/local_lim.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,101 @@
- +/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
- + Copyright (C) 1993-1998,2000,2002-2004,2006,2008
- + Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public License as
- + published by the Free Software Foundation; either version 2.1 of the
- + License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
- +
- +/* The kernel header pollutes the namespace with the NR_OPEN symbol
- + and defines LINK_MAX although filesystems have different maxima. A
- + similar thing is true for OPEN_MAX: the limit can be changed at
- + runtime and therefore the macro must not be defined. Remove this
- + after including the header if necessary. */
- +#ifndef NR_OPEN
- +# define __undef_NR_OPEN
- +#endif
- +#ifndef LINK_MAX
- +# define __undef_LINK_MAX
- +#endif
- +#ifndef OPEN_MAX
- +# define __undef_OPEN_MAX
- +#endif
- +#ifndef ARG_MAX
- +# define __undef_ARG_MAX
- +#endif
- +
- +/* The kernel sources contain a file with all the needed information. */
- +#include <linux/limits.h>
- +
- +/* Have to remove NR_OPEN? */
- +#ifdef __undef_NR_OPEN
- +# undef NR_OPEN
- +# undef __undef_NR_OPEN
- +#endif
- +/* Have to remove LINK_MAX? */
- +#ifdef __undef_LINK_MAX
- +# undef LINK_MAX
- +# undef __undef_LINK_MAX
- +#endif
- +/* Have to remove OPEN_MAX? */
- +#ifdef __undef_OPEN_MAX
- +# undef OPEN_MAX
- +# undef __undef_OPEN_MAX
- +#endif
- +/* Have to remove ARG_MAX? */
- +#ifdef __undef_ARG_MAX
- +# undef ARG_MAX
- +# undef __undef_ARG_MAX
- +#endif
- +
- +/* The number of data keys per process. */
- +#define _POSIX_THREAD_KEYS_MAX 128
- +/* This is the value this implementation supports. */
- +#define PTHREAD_KEYS_MAX 1024
- +
- +/* Controlling the iterations of destructors for thread-specific data. */
- +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
- +/* Number of iterations this implementation does. */
- +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
- +
- +/* The number of threads per process. */
- +#define _POSIX_THREAD_THREADS_MAX 64
- +/* We have no predefined limit on the number of threads. */
- +#undef PTHREAD_THREADS_MAX
- +
- +/* Maximum amount by which a process can descrease its asynchronous I/O
- + priority level. */
- +#define AIO_PRIO_DELTA_MAX 20
- +
- +/* Minimum size for a thread. At least two pages for systems with 64k
- + pages. */
- +#define PTHREAD_STACK_MIN 131072
- +
- +/* Maximum number of timer expiration overruns. */
- +#define DELAYTIMER_MAX 2147483647
- +
- +/* Maximum tty name length. */
- +#define TTY_NAME_MAX 32
- +
- +/* Maximum login name length. This is arbitrary. */
- +#define LOGIN_NAME_MAX 256
- +
- +/* Maximum host name length. */
- +#define HOST_NAME_MAX 64
- +
- +/* Maximum message queue priority level. */
- +#define MQ_PRIO_MAX 32768
- +
- +/* Maximum value the semaphore can have. */
- +#define SEM_VALUE_MAX (2147483647)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mathdef.h uClibc/libc/sysdeps/linux/powerpc/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mathinline.h uClibc/libc/sysdeps/linux/powerpc/bits/mathinline.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/mathinline.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mman.h uClibc/libc/sysdeps/linux/powerpc/bits/mman.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/mman.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MMAN_H
- # error "Never use <bits/mman.h> directly; iclude <sys/mman.h> instead."
- @@ -63,7 +62,7 @@
- # define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
- # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
- # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
- -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
- +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
- be uninitialized. */
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/msq.h uClibc/libc/sysdeps/linux/powerpc/bits/msq.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/msq.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MSG_H
- # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/sem.h uClibc/libc/sysdeps/linux/powerpc/bits/sem.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/sem.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SEM_H
- # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/setjmp.h uClibc/libc/sysdeps/linux/powerpc/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,5 @@
- -/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
- +/* Copyright (C) 1997,1998,2000,2003,2004,2005,2006
- + Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. PowerPC version. */
- #ifndef _BITS_SETJMP_H
- @@ -31,30 +31,6 @@
-
- #include <bits/wordsize.h>
-
- -#if defined __USE_MISC || defined _ASM
- -# define JB_GPR1 0 /* Also known as the stack pointer */
- -# define JB_GPR2 1
- -# define JB_LR 2 /* The address we will return to */
- -# if __WORDSIZE == 64
- -# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18*2 words total. */
- -# define JB_CR 21 /* Condition code registers with the VRSAVE at */
- - /* offset 172 (low half of the double word. */
- -# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
- -# define JB_SIZE (64 * 8) /* As per PPC64-VMX ABI. */
- -# define JB_VRSAVE 21 /* VRSAVE shares a double word with the CR at offset */
- - /* 168 (high half of the double word). */
- -# define JB_VRS 40 /* VRs 20 through 31 are saved, 12*4 words total. */
- -# else
- -# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total. */
- -# define JB_CR 21 /* Condition code registers. */
- -# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
- -# define JB_SIZE ((64 + (12 * 4)) * 4)
- -# define JB_VRSAVE 62
- -# define JB_VRS 64
- -# endif
- -#endif
- -
- -
- /* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI
- the vrsave must be at byte 248 & v20 at byte 256. So we must pad this
- correctly on 32 bit. It also insists that vecregs are only gauranteed
- @@ -62,19 +38,12 @@
- We have to version the code because members like int __mask_was_saved
- in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We
- cannot keep the altivec jmp_buf backward compatible with the jmp_buf. */
- -#ifndef _ASM
- -# if __WORDSIZE == 64
- +#if __WORDSIZE == 64
- typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16)));
- -# else
- +#else
- /* The alignment is not essential, i.e.the buffer can be copied to a 4 byte
- aligned buffer as per the ABI it is just added for performance reasons. */
- typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16)));
- -# endif
- #endif
-
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
- -
- -#endif /* bits/setjmp.h */
- +#endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/shm.h uClibc/libc/sysdeps/linux/powerpc/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/powerpc/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <signal.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/stackinfo.h uClibc/libc/sysdeps/linux/powerpc/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/stat.h uClibc/libc/sysdeps/linux/powerpc/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/syscalls.h uClibc/libc/sysdeps/linux/powerpc/bits/syscalls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/syscalls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SYSCALLS_H
- #define _BITS_SYSCALLS_H
- @@ -168,7 +167,7 @@
- }) \
- )
- # define INTERNAL_SYSCALL_ERROR_P(val, err) \
- - ((void) (val), __builtin_expect ((err) & (1 << 28), 0))
- + ((void) (val), unlikely ((err) & (1 << 28)))
-
- # define INTERNAL_SYSCALL_ERRNO(val, err) (val)
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/termios.h uClibc/libc/sysdeps/linux/powerpc/bits/termios.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/termios.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TERMIOS_H
- # error "Never include <bits/termios.h> directly; use <termios.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#define __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/brk.S uClibc/libc/sysdeps/linux/powerpc/brk.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/brk.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/brk.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include "ppc_asm.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bsd-_setjmp.S uClibc/libc/sysdeps/linux/powerpc/bsd-_setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bsd-_setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bsd-setjmp.S uClibc/libc/sysdeps/linux/powerpc/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/clone.S uClibc/libc/sysdeps/linux/powerpc/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #define _ERRNO_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/crt1.S uClibc/libc/sysdeps/linux/powerpc/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,8 @@
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- - * along with this program; if not, write to the Free Software Foundation,
- - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + * along with this program; see the file COPYING.LIB. If not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- #include <features.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/fenv.h uClibc/libc/sysdeps/linux/powerpc/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * ISO C99 7.6: Floating-point environment <fenv.h>
- @@ -73,7 +72,7 @@
-
- /* Set complete status for exceptions indicated by EXCEPTS according to
- the representation in the object pointed to by FLAGP. */
- -extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) __THROW;
- +extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
-
- /* Determine which of subset of the exceptions specified by EXCEPTS are
- currently set. */
- @@ -102,12 +101,12 @@
-
- /* Establish the floating-point environment represented by the object
- pointed to by ENVP. */
- -extern int fesetenv (__const fenv_t *__envp) __THROW;
- +extern int fesetenv (const fenv_t *__envp) __THROW;
-
- /* Save current exceptions in temporary storage, install environment
- represented by object pointed to by ENVP and raise exceptions
- according to saved exceptions. */
- -extern int feupdateenv (__const fenv_t *__envp) __THROW;
- +extern int feupdateenv (const fenv_t *__envp) __THROW;
-
-
- /* Include optimization. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/fpu_control.h uClibc/libc/sysdeps/linux/powerpc/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/ioctl.c uClibc/libc/sysdeps/linux/powerpc/ioctl.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/ioctl.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/ioctl.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdarg.h>
- #include <termios.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,40 @@
- +/* Private macros for accessing __jmp_buf contents. PowerPC version.
- + Copyright (C) 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <bits/wordsize.h>
- +
- +#define JB_GPR1 0 /* Also known as the stack pointer */
- +#define JB_GPR2 1
- +#define JB_LR 2 /* The address we will return to */
- +#if __WORDSIZE == 64
- +# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18*2 words total. */
- +# define JB_CR 21 /* Condition code registers with the VRSAVE at */
- + /* offset 172 (low half of the double word. */
- +# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
- +# define JB_SIZE (64 * 8) /* As per PPC64-VMX ABI. */
- +# define JB_VRSAVE 21 /* VRSAVE shares a double word with the CR at offset */
- + /* 168 (high half of the double word). */
- +# define JB_VRS 40 /* VRs 20 through 31 are saved, 12*4 words total. */
- +#else
- +# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total. */
- +# define JB_CR 21 /* Condition code registers. */
- +# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
- +# define JB_SIZE ((64 + (12 * 4)) * 4)
- +# define JB_VRSAVE 62
- +# define JB_VRS 64
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,23 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
- +
- +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +#include <stdint.h>
- +#include <unwind.h>
- +
- +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
- +
- +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_GPR1] - (_adj))
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/__longjmp.S uClibc/libc/sysdeps/linux/powerpc/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,15 +15,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include "ppc_asm.h"
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
-
- #if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/Makefile.arch uClibc/libc/sysdeps/linux/powerpc/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,18 +5,13 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := __syscall_error.c pread_write.c ioctl.c
- +CSRC-y := __syscall_error.c ioctl.c
-
- -ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
- -CSRC += posix_fadvise.c posix_fadvise64.c
- -endif
- -
- -SSRC := \
- +SSRC-y := \
- __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
- __uClibc_syscall.S syscall.S
- -ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- -SSRC += clone.S vfork.S
- -endif
- +
- +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += clone.S vfork.S
-
- ifeq ($(CONFIG_E500),y)
- ARCH_HEADERS := fenv.h
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/posix_fadvise64.c uClibc/libc/sysdeps/linux/powerpc/posix_fadvise64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/posix_fadvise64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,69 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * posix_fadvise64() for uClibc
- - * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
- - *
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <features.h>
- -#include <unistd.h>
- -#include <errno.h>
- -#include <endian.h>
- -#include <stdint.h>
- -#include <sys/types.h>
- -#include <sys/syscall.h>
- -#include <fcntl.h>
- -
- -#ifdef __UCLIBC_HAS_LFS__
- -#ifdef __NR_fadvise64_64
- -
- -/* 64 bit implementation is cake ... or more like pie ... */
- -#if __WORDSIZE == 64
- -
- -#define __NR_posix_fadvise64 __NR_fadvise64_64
- -
- -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
- -{
- - if (len != (off_t) len)
- - return EOVERFLOW;
- - INTERNAL_SYSCALL_DECL (err);
- - int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 6, fd, 0,
- - __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset),
- - (off_t) len, advise);
- - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
- - return 0;
- - return INTERNAL_SYSCALL_ERRNO (ret, err);
- -}
- -
- -/* 32 bit implementation is kind of a pita */
- -#elif __WORDSIZE == 32
- -
- -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
- -{
- - INTERNAL_SYSCALL_DECL (err);
- - int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advise,
- - __LONG_LONG_PAIR((long) (offset >> 32), (long) offset ),
- - __LONG_LONG_PAIR((long) (len >> 32), (long) len));
- - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
- - return 0;
- - return INTERNAL_SYSCALL_ERRNO (ret, err);
- -}
- -
- -#else
- -#error your machine is neither 32 bit or 64 bit ... it must be magical
- -#endif
- -
- -#elif !defined __NR_fadvise64
- -/* This is declared as a strong alias in posix_fadvise.c if __NR_fadvise64
- - * is defined.
- - */
- -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
- -{
- -#warning This is not correct as far as SUSv3 is concerned.
- - return ENOSYS;
- -}
- -#endif /* __NR_fadvise64_64 */
- -#endif /* __UCLIBC_HAS_LFS__ */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/posix_fadvise.c uClibc/libc/sysdeps/linux/powerpc/posix_fadvise.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/posix_fadvise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,36 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * posix_fadvise() for uClibc
- - * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
- - *
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <sys/syscall.h>
- -#include <fcntl.h>
- -
- -#ifdef __NR_fadvise64
- -#define __NR_posix_fadvise __NR_fadvise64
- -int posix_fadvise(int fd, off_t offset, off_t len, int advice)
- -{
- - INTERNAL_SYSCALL_DECL(err);
- - int ret = (int) (INTERNAL_SYSCALL(posix_fadvise, err, 6, fd, 0,
- - __LONG_LONG_PAIR (offset >> 31, offset), len, advice));
- - if (INTERNAL_SYSCALL_ERROR_P (ret, err))
- - return INTERNAL_SYSCALL_ERRNO (ret, err);
- - return 0;
- -}
- -
- -#if defined __UCLIBC_HAS_LFS__ && (!defined __NR_fadvise64_64 || !defined _syscall6)
- -strong_alias(posix_fadvise,posix_fadvise64)
- -#endif
- -
- -#else
- -int posix_fadvise(int fd attribute_unused, off_t offset attribute_unused, off_t len attribute_unused, int advice attribute_unused)
- -{
- -#warning This is not correct as far as SUSv3 is concerned.
- - return ENOSYS;
- -}
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/powerpc32/sysdep.h uClibc/libc/sysdeps/linux/powerpc/powerpc32/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/powerpc32/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/powerpc32/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
- - 02110-1301 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef __ASSEMBLER__
-
- @@ -133,6 +132,7 @@
-
- #define PSEUDO_RET_ERRVAL \
- blr
- +#undef ret_ERRVAL
- #define ret_ERRVAL PSEUDO_RET_ERRVAL
-
- #undef PSEUDO_END_ERRVAL
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/powerpc64/sysdep.h uClibc/libc/sysdeps/linux/powerpc/powerpc64/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/powerpc64/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/powerpc64/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
- - 02110-1301 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef __ELF__
-
- @@ -228,6 +227,7 @@
- #define PSEUDO_RET_ERRVAL \
- blr
-
- +#undef ret_ERRVAL
- #define ret_ERRVAL PSEUDO_RET_ERRVAL
-
- #undef PSEUDO_END_ERRVAL
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/ppc_asm.h uClibc/libc/sysdeps/linux/powerpc/ppc_asm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/ppc_asm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/ppc_asm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef __ASSEMBLER__
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/pread_write.c uClibc/libc/sysdeps/linux/powerpc/pread_write.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/pread_write.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/pread_write.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,183 +0,0 @@
- -/* vi: set sw=4 ts=4:
- - *
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -/* Based in part on the files
- - * ./sysdeps/unix/sysv/linux/pwrite.c,
- - * ./sysdeps/unix/sysv/linux/pread.c,
- - * sysdeps/posix/pread.c
- - * sysdeps/posix/pwrite.c
- - * from GNU libc 2.2.5, but reworked considerably...
- - */
- -
- -#include <sys/syscall.h>
- -#include <unistd.h>
- -#include <endian.h>
- -
- -#ifndef __UCLIBC_HAS_LFS__
- -# define off64_t off_t
- -#endif
- -
- -#ifdef __NR_pread
- -extern __typeof(pread) __libc_pread;
- -# define __NR___syscall_pread __NR_pread
- -static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd,
- - void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
- -
- -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
- -{
- - return(__syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 31, offset)));
- -}
- -weak_alias(__libc_pread,pread)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -extern __typeof(pread64) __libc_pread64;
- -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
- -{
- - return(__syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 32, offset)));
- -}
- -weak_alias(__libc_pread64,pread64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* __NR_pread */
- -
- -
- -#ifdef __NR_pwrite
- -extern __typeof(pwrite) __libc_pwrite;
- -# define __NR___syscall_pwrite __NR_pwrite
- -static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd,
- - const void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
- -
- -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
- -{
- - return(__syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 31, offset)));
- -}
- -weak_alias(__libc_pwrite,pwrite)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -extern __typeof(pwrite64) __libc_pwrite64;
- -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
- -{
- - return(__syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 32, offset)));
- -}
- -weak_alias(__libc_pwrite64,pwrite64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* __NR_pwrite */
- -
- -
- -
- -#if ! defined __NR_pread || ! defined __NR_pwrite
- -
- -static ssize_t __fake_pread_write(int fd, void *buf,
- - size_t count, off_t offset, int do_pwrite)
- -{
- - int save_errno;
- - ssize_t result;
- - off_t old_offset;
- -
- - /* Since we must not change the file pointer preserve the
- - * value so that we can restore it later. */
- - if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
- - return -1;
- -
- - /* Set to wanted position. */
- - if (lseek (fd, offset, SEEK_SET) == (off_t) -1)
- - return -1;
- -
- - if (do_pwrite == 1) {
- - /* Write the data. */
- - result = write(fd, buf, count);
- - } else {
- - /* Read the data. */
- - result = read(fd, buf, count);
- - }
- -
- - /* Now we have to restore the position. If this fails we
- - * have to return this as an error. */
- - save_errno = errno;
- - if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
- - {
- - if (result == -1)
- - __set_errno(save_errno);
- - return -1;
- - }
- - __set_errno(save_errno);
- - return(result);
- -}
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -
- -static ssize_t __fake_pread_write64(int fd, void *buf,
- - size_t count, off64_t offset, int do_pwrite)
- -{
- - int save_errno;
- - ssize_t result;
- - off64_t old_offset;
- -
- - /* Since we must not change the file pointer preserve the
- - * value so that we can restore it later. */
- - if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
- - return -1;
- -
- - /* Set to wanted position. */
- - if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
- - return -1;
- -
- - if (do_pwrite == 1) {
- - /* Write the data. */
- - result = write(fd, buf, count);
- - } else {
- - /* Read the data. */
- - result = read(fd, buf, count);
- - }
- -
- - /* Now we have to restore the position. */
- - save_errno = errno;
- - if (lseek64 (fd, old_offset, SEEK_SET) == (off64_t) -1) {
- - if (result == -1)
- - __set_errno (save_errno);
- - return -1;
- - }
- - __set_errno (save_errno);
- - return result;
- -}
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
- -
- -#ifndef __NR_pread
- -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset);
- -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
- -{
- - return(__fake_pread_write(fd, buf, count, offset, 0));
- -}
- -weak_alias(__libc_pread,pread)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset);
- -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
- -{
- - return(__fake_pread_write64(fd, buf, count, offset, 0));
- -}
- -weak_alias(__libc_pread64,pread64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* ! __NR_pread */
- -
- -
- -#ifndef __NR_pwrite
- -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset);
- -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
- -{
- - return(__fake_pread_write(fd, (void*)buf, count, offset, 1));
- -}
- -weak_alias(__libc_pwrite,pwrite)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset);
- -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
- -{
- - return(__fake_pread_write64(fd, (void*)buf, count, offset, 1));
- -}
- -weak_alias(__libc_pwrite64,pwrite64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* ! __NR_pwrite */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/setjmp.S uClibc/libc/sysdeps/linux/powerpc/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -15,15 +15,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include "ppc_asm.h"
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- #if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
- #define FP(x...) x
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/procfs.h uClibc/libc/sysdeps/linux/powerpc/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/ptrace.h uClibc/libc/sysdeps/linux/powerpc/sys/ptrace.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/sys/ptrace.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PTRACE_H
- #define _SYS_PTRACE_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/ucontext.h uClibc/libc/sysdeps/linux/powerpc/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/user.h uClibc/libc/sysdeps/linux/powerpc/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/syscall.S uClibc/libc/sysdeps/linux/powerpc/syscall.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/syscall.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/syscall.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- @@ -30,6 +29,7 @@
- mr 5,6
- mr 6,7
- mr 7,8
- + mr 8,9
- sc
- bnslr;
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sysdep.h uClibc/libc/sysdeps/linux/powerpc/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <common/sysdep.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/vfork.S uClibc/libc/sysdeps/linux/powerpc/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/powerpc/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -27,4 +27,4 @@
- .size __vfork,.-__vfork
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/README uClibc/libc/sysdeps/linux/README
- --- uClibc-0.9.33.2/libc/sysdeps/linux/README 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/README 2014-02-03 12:32:56.000000000 +0100
- @@ -4,4 +4,7 @@
- to add that support.
-
- All stuff that is not at all dependent on a particular Linux architecture
- -goes in the 'common' directory.
- +goes in the 'common' directory. However, for new architectures which are
- +using the generic syscalls in the Linux Kernel, the 'common-generic'
- +directory should be used instead as they all use identical interfaces for
- +the system calls.
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/atomic.h uClibc/libc/sysdeps/linux/sh/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdint.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/fcntl.h uClibc/libc/sysdeps/linux/sh/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/fenv.h uClibc/libc/sysdeps/linux/sh/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/huge_val.h uClibc/libc/sysdeps/linux/sh/bits/huge_val.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/huge_val.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/huge_val.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/huge_val.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/kernel_types.h uClibc/libc/sysdeps/linux/sh/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -32,6 +32,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- typedef struct {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/mathdef.h uClibc/libc/sysdeps/linux/sh/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/setjmp.h uClibc/libc/sysdeps/linux/sh/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
- +/* Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,19 +12,17 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. SH version. */
- #ifndef _BITS_SETJMP_H
- -#define _BITS_SETJMP_H 1
- +#define _BITS_SETJMP_H 1
-
- #if !defined _SETJMP_H && !defined _PTHREAD_H
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#ifndef _ASM
- typedef struct
- {
- /* Callee-saved registers r8 through r15. */
- @@ -42,15 +40,5 @@
- /* Callee-saved floating point registers fr12 through fr15. */
- int __fpregs[4];
- } __jmp_buf[1];
- -#endif
- -
- -#if defined __USE_MISC || defined _ASM
- -# define JB_SIZE (4 * 15)
- -#endif
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)[0].__regs[7])
-
- -#endif /* bits/setjmp.h */
- +#endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/shm.h uClibc/libc/sysdeps/linux/sh/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/sh/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT int _a2, int _a3, int _a4, struct sigcontext
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/stackinfo.h uClibc/libc/sysdeps/linux/sh/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/wordsize.h uClibc/libc/sysdeps/linux/sh/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/cacheflush.c uClibc/libc/sysdeps/linux/sh/cacheflush.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/cacheflush.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/cacheflush.c 2014-02-03 12:32:56.000000000 +0100
- @@ -6,10 +6,9 @@
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
- -#include <errno.h>
- -#include <unistd.h>
- #include <sys/syscall.h>
-
- #ifdef __NR_cacheflush
- -_syscall3(int, cacheflush, char *, addr, int, nbytes, int, op)
- +int cacheflush(void *addr, const int nbytes, int op);
- +_syscall3(int, cacheflush, void *, addr, const int, nbytes, const int, op)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/clone.S uClibc/libc/sysdeps/linux/sh/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/crt1.S uClibc/libc/sysdeps/linux/sh/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
- details.
-
- You should have received a copy of the GNU Library General Public License
- - along with this program; if not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/___fpscr_values.S uClibc/libc/sysdeps/linux/sh/___fpscr_values.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/___fpscr_values.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/___fpscr_values.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
- details.
-
- You should have received a copy of the GNU Library General Public License
- - along with this program; if not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
- #include <features.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/fpu_control.h uClibc/libc/sysdeps/linux/sh/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/sh/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/sh/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,19 @@
- +/* Private macros for accessing __jmp_buf contents. SH version.
- + Copyright (C) 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#define JB_SIZE (4 * 15)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/sh/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/sh/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,22 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)[0].__regs[7])
- +
- +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +#include <stdint.h>
- +#include <unwind.h>
- +
- +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
- +
- +#define _JMPBUF_UNWINDS_ADJ(jmpbuf, address, adj) \
- + ((uintptr_t) (address) - (adj) < (uintptr_t) (jmpbuf)[0].__regs[7] - (adj))
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/__longjmp.S uClibc/libc/sysdeps/linux/sh/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,12 +14,8 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
- #include <features.h>
-
- /* __longjmp(jmpbuf, val) */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/Makefile.arch uClibc/libc/sysdeps/linux/sh/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -6,7 +6,10 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := \
- - mmap.c pipe.c __init_brk.c brk.c sbrk.c pread_write.c cacheflush.c
- +CSRC-y := \
- + pipe.c __init_brk.c brk.c sbrk.c pread_write.c
-
- -SSRC := setjmp.S __longjmp.S ___fpscr_values.S vfork.S clone.S
- +SSRC-y := setjmp.S __longjmp.S ___fpscr_values.S
- +
- +CSRC-$(UCLIBC_LINUX_SPECIFIC) += cacheflush.c
- +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += clone.S vfork.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/mmap.c uClibc/libc/sysdeps/linux/sh/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/mmap.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,34 +0,0 @@
- -/* Copyright (C) 2001 Hewlett-Packard
- -
- - This program is free software; you can redistribute it and/or modify it under
- - the terms of the GNU Library General Public License as published by the Free
- - Software Foundation; either version 2 of the License, or (at your option) any
- - later version.
- -
- - This program is distributed in the hope that it will be useful, but WITHOUT
- - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- - FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
- - details.
- -
- - You should have received a copy of the GNU Library General Public License
- - along with this program; if not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- -
- - Derived in part from the Linux-8086 C library, the GNU C Library, and several
- - other sundry sources. Files within this library are copyright by their
- - respective copyright holders.
- -*/
- -
- -#include <unistd.h>
- -#include <errno.h>
- -#include <sys/mman.h>
- -
- -
- -#ifdef HIOS
- -# define __SH_SYSCALL6_TRAPA 0x2E
- -#endif
- -
- -#include <sys/syscall.h>
- -
- -_syscall6(__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset)
- -libc_hidden_def(mmap)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/pread_write.c uClibc/libc/sysdeps/linux/sh/pread_write.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/pread_write.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/pread_write.c 2014-02-03 12:32:56.000000000 +0100
- @@ -4,122 +4,8 @@
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
- -/*
- - * Based in part on the files
- - * ./sysdeps/unix/sysv/linux/pwrite.c,
- - * ./sysdeps/unix/sysv/linux/pread.c,
- - * sysdeps/posix/pread.c
- - * sysdeps/posix/pwrite.c
- - * from GNU libc 2.2.5, but reworked considerably...
- - */
- -
- -#include <sys/syscall.h>
- -#include <unistd.h>
- -#include <stdint.h>
- -#include <endian.h>
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- -#include <sysdep-cancel.h>
- -#else
- -#define SINGLE_THREAD_P 1
- -#endif
- -
- -
- -#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
- -# ifdef __NR_pread
- -# error "__NR_pread and __NR_pread64 both defined???"
- -# endif
- -# define __NR_pread __NR_pread64
- -#endif
- -
- -#ifdef __NR_pread
- -extern __typeof(pread) __libc_pread;
- -# define __NR___syscall_pread __NR_pread
- -static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
- - size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
- -
- -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
- -{
- - if (SINGLE_THREAD_P)
- - return(__syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset)));
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - ssize_t result = __syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset));
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -weak_alias(__libc_pread,pread)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -extern __typeof(pread64) __libc_pread64;
- -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
- -{
- - uint32_t low = offset & 0xffffffff;
- - uint32_t high = offset >> 32;
- -
- - if (SINGLE_THREAD_P)
- - return __syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR (high, low));
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - ssize_t result = __syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR (high, low));
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -weak_alias(__libc_pread64,pread64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* __NR_pread */
- -
- -/**********************************************************************/
- -
- -#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
- -# ifdef __NR_pwrite
- -# error "__NR_pwrite and __NR_pwrite64 both defined???"
- -# endif
- -# define __NR_pwrite __NR_pwrite64
- -#endif
- -
- -#ifdef __NR_pwrite
- -extern __typeof(pwrite) __libc_pwrite;
- -# define __NR___syscall_pwrite __NR_pwrite
- -static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- - size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
- -
- -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
- -{
- - if (SINGLE_THREAD_P)
- - return __syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset));
- -
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - ssize_t result = __syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset));
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -
- -}
- -weak_alias(__libc_pwrite,pwrite)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -extern __typeof(pwrite64) __libc_pwrite64;
- -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
- -{
- - uint32_t low = offset & 0xffffffff;
- - uint32_t high = offset >> 32;
- -
- - if (SINGLE_THREAD_P)
- - return __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR (high, low));
-
- -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - int oldtype = LIBC_CANCEL_ASYNC ();
- - ssize_t result = __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR (high, low));
- - LIBC_CANCEL_RESET (oldtype);
- - return result;
- -#endif
- -}
- -weak_alias(__libc_pwrite64,pwrite64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* __NR_pwrite */
- +/* SuperH doesn't have this alignment issue. It just decided to copy
- + * the syscall interface from another arch for no good reason. */
- +#define __UCLIBC_SYSCALL_ALIGN_64BIT__
- +#include "../common/pread_write.c"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/setjmp.S uClibc/libc/sysdeps/linux/sh/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,13 +14,10 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- .text
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/io.h uClibc/libc/sysdeps/linux/sh/sys/io.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/io.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/sys/io.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IO_H
-
- @@ -23,17 +22,18 @@
-
- __BEGIN_DECLS
-
- +#if defined __UCLIBC_LINUX_SPECIFIC__
- /* If TURN_ON is TRUE, request for permission to do direct i/o on the
- port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
- permission off for that range. This call requires root privileges. */
- extern int ioperm (unsigned long int __from, unsigned long int __num,
- int __turn_on) __THROW;
- -libc_hidden_proto(ioperm)
-
- /* Set the I/O privilege level to LEVEL. If LEVEL is nonzero,
- permission to access any I/O port is granted. This call requires
- root privileges. */
- extern int iopl (int __level) __THROW;
- +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
-
- /* The functions that actually perform reads and writes. */
- extern unsigned char inb (unsigned long int port) __THROW;
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/procfs.h uClibc/libc/sysdeps/linux/sh/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/ucontext.h uClibc/libc/sysdeps/linux/sh/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Where is System V/SH ABI? */
-
- @@ -32,10 +31,10 @@
- typedef int greg_t;
-
- /* Number of general registers. */
- -#define NFPREG 16
- +#define NGREG 16
-
- /* Container for all general registers. */
- -typedef greg_t gregset_t[NFPREG];
- +typedef greg_t gregset_t[NGREG];
-
- #ifdef __USE_GNU
- /* Number of each register is the `gregset_t' array. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/user.h uClibc/libc/sysdeps/linux/sh/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/sysdep.h uClibc/libc/sysdeps/linux/sh/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <common/sysdep.h>
-
- #include <features.h>
- -#include <libc-internal.h>
-
- #ifdef __ASSEMBLER__
-
- @@ -143,8 +141,6 @@
- #define PSEUDO_END_ERRVAL(name) \
- END (name)
-
- -#define ret_ERRVAL ret
- -
- #ifndef __PIC__
- # define SYSCALL_ERROR_HANDLER \
- mov.l 0f,r1; \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/vfork.S uClibc/libc/sysdeps/linux/sh/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,19 +12,16 @@
- details.
-
- You should have received a copy of the GNU Library General Public License
- - along with this program; if not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- + along with this program; if not, see <http://www.gnu.org/licenses/>.
-
- Derived in part from the Linux-8086 C library, the GNU C Library, and several
- other sundry sources. Files within this library are copyright by their
- respective copyright holders.
- */
-
- -#include <features.h>
- #include <sys/syscall.h>
- #define _ERRNO_H
- #include <bits/errno.h>
- -#include <bits/sysnum.h>
-
- /* Clone the calling process, but without copying the whole address space.
- The calling process is suspended until the new process exits or is
- @@ -109,6 +106,6 @@
-
- .size __vfork, .-__vfork
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
-
- #include "syscall_error.S"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/fcntl.h uClibc/libc/sysdeps/linux/sh64/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/kernel_types.h uClibc/libc/sysdeps/linux/sh64/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -43,6 +43,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- typedef struct {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/setjmp.h uClibc/libc/sysdeps/linux/sh64/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. SH-5 version. */
- #ifndef _BITS_SETJMP_H
- @@ -33,8 +32,6 @@
- #define __SETJMP_TRG(x) (__SETJMP_NUM_INT+__SETJMP_NUM_DBL+(x))
- #define __SETJMP_LR (__SETJMP_NUM_INT+__SETJMP_NUM_DBL+__SETJMP_NUM_TRG)
-
- -
- -#ifndef _ASM
- typedef struct
- {
- /* Callee-saved registers. */
- @@ -45,6 +42,5 @@
- unsigned long long __trgs[__SETJMP_NUM_TRG]; /* traget registers */
- unsigned long long __lr; /* linkage register */
- } __jmp_buf[1];
- -#endif
-
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/shm.h uClibc/libc/sysdeps/linux/sh64/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/stackinfo.h uClibc/libc/sysdeps/linux/sh64/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- /* can your target use syscall6() for mmap ? */
- #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/crt1.S uClibc/libc/sysdeps/linux/sh64/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* This is the canonical entry point, usually the first thing in the text
- segment.
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/__longjmp.S uClibc/libc/sysdeps/linux/sh64/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
-
- #define _SETJMP_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/Makefile.arch uClibc/libc/sysdeps/linux/sh64/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,6 +5,6 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := __init_brk.c brk.c sbrk.c syscall.c
- +CSRC-y := __init_brk.c brk.c sbrk.c syscall.c
-
- -SSRC := setjmp.S __longjmp.S
- +SSRC-y := setjmp.S __longjmp.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/setjmp.S uClibc/libc/sysdeps/linux/sh64/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
-
- #define _SETJMP_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/sys/procfs.h uClibc/libc/sysdeps/linux/sh64/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/sys/ucontext.h uClibc/libc/sysdeps/linux/sh64/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sh64/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* Where is System V/SH ABI? */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/atomic.h uClibc/libc/sysdeps/linux/sparc/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_ATOMIC_H
- #define _BITS_ATOMIC_H 1
- @@ -290,11 +289,11 @@
- __typeof (*(mem)) __acev_wval = (newval); \
- do \
- __acev_wret = *__acev_wmemp; \
- - while (__builtin_expect \
- + while (unlikely \
- (__v9_compare_and_exchange_val_32_acq (__acev_wmemp,\
- __acev_wval, \
- __acev_wret) \
- - != __acev_wret, 0)); \
- + != __acev_wret)); \
- } \
- else \
- __acev_wret = __v7_exchange_acq (mem, newval); \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/eventfd.h uClibc/libc/sysdeps/linux/sparc/bits/eventfd.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/eventfd.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/sparc/bits/eventfd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,31 @@
- +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SYS_EVENTFD_H
- +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
- +#endif
- +
- +/* Flags for eventfd. */
- +enum
- + {
- + EFD_SEMAPHORE = 1,
- +#define EFD_SEMAPHORE EFD_SEMAPHORE
- + EFD_CLOEXEC = 0x400000,
- +#define EFD_CLOEXEC EFD_CLOEXEC
- + EFD_NONBLOCK = 0x004000
- +#define EFD_NONBLOCK EFD_NONBLOCK
- + };
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/fcntl.h uClibc/libc/sysdeps/linux/sparc/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/fenv.h uClibc/libc/sysdeps/linux/sparc/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- @@ -68,11 +67,11 @@
- typedef unsigned long int fenv_t;
-
- /* If the default argument is used we use this value. */
- -#define FE_DFL_ENV ((__const fenv_t *) -1)
- +#define FE_DFL_ENV ((const fenv_t *) -1)
-
- #ifdef __USE_GNU
- /* Floating-point environment where none of the exception is masked. */
- -# define FE_NOMASK_ENV ((__const fenv_t *) -2)
- +# define FE_NOMASK_ENV ((const fenv_t *) -2)
- #endif
-
- /* For internal use only: access the fp state register. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/huge_vall.h uClibc/libc/sysdeps/linux/sparc/bits/huge_vall.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/huge_vall.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/sparc/bits/huge_vall.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,48 @@
- +/* `HUGE_VALL' constant for IEEE 754 machines (where it is infinity).
- + Used by <stdlib.h> and <math.h> functions for overflow.
- + Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
- + Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _MATH_H
- +# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
- +#endif
- +
- +#if __GNUC_PREREQ(3,3)
- +# define HUGE_VALL (__builtin_huge_vall())
- +#else
- +# include <bits/wordsize.h>
- +# if __WORDSIZE == 32
- +# define HUGE_VALL ((long double) HUGE_VAL)
- +# elif __GNUC_PREREQ(2,96)
- +# define HUGE_VALL (__extension__ 0x1.0p32767L)
- +# elif defined __GNUC__
- +
- +# define HUGE_VALL \
- + (__extension__ \
- + ((union { struct { unsigned long __h, __l; } __i; long double __d; }) \
- + { __i: { __h: 0x7fff000000000000UL, __l: 0 } }).__d)
- +
- +# else /* not GCC */
- +
- +typedef union { unsigned char __c[16]; long double __d; } __huge_vall_t;
- +# define __HUGE_VALL_bytes { 0x7f, 0xff, 0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
- +static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
- +# define HUGE_VALL (__huge_vall.__d)
- +
- +# endif /* GCC. */
- +#endif /* GCC 3.3. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/ioctls.h uClibc/libc/sysdeps/linux/sparc/bits/ioctls.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/ioctls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/ioctls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IOCTL_H
- # error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/ipc.h uClibc/libc/sysdeps/linux/sparc/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/kernel_types.h uClibc/libc/sysdeps/linux/sparc/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -32,6 +32,8 @@
- typedef __kernel_uid_t __kernel_old_uid_t;
- typedef __kernel_gid_t __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef __kernel_uid_t __kernel_uid32_t;
- typedef __kernel_gid_t __kernel_gid32_t;
- typedef int __kernel_suseconds_t;
- @@ -62,6 +64,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/local_lim.h uClibc/libc/sysdeps/linux/sparc/bits/local_lim.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/local_lim.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/sparc/bits/local_lim.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,99 @@
- +/* Minimum guaranteed maximum values for system limits. Linux/SPARC version.
- + Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Library General Public License as
- + published by the Free Software Foundation; either version 2 of the
- + License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Library General Public License for more details.
- +
- + You should have received a copy of the GNU Library General Public
- + License along with the GNU C Library; see the file COPYING.LIB. If not,
- + see <http://www.gnu.org/licenses/>. */
- +
- +/* The kernel header pollutes the namespace with the NR_OPEN symbol
- + and defines LINK_MAX although filesystems have different maxima. A
- + similar thing is true for OPEN_MAX: the limit can be changed at
- + runtime and therefore the macro must not be defined. Remove this
- + after including the header if necessary. */
- +#ifndef NR_OPEN
- +# define __undef_NR_OPEN
- +#endif
- +#ifndef LINK_MAX
- +# define __undef_LINK_MAX
- +#endif
- +#ifndef OPEN_MAX
- +# define __undef_OPEN_MAX
- +#endif
- +#ifndef ARG_MAX
- +# define __undef_ARG_MAX
- +#endif
- +
- +/* The kernel sources contain a file with all the needed information. */
- +#include <linux/limits.h>
- +
- +/* Have to remove NR_OPEN? */
- +#ifdef __undef_NR_OPEN
- +# undef NR_OPEN
- +# undef __undef_NR_OPEN
- +#endif
- +/* Have to remove LINK_MAX? */
- +#ifdef __undef_LINK_MAX
- +# undef LINK_MAX
- +# undef __undef_LINK_MAX
- +#endif
- +/* Have to remove OPEN_MAX? */
- +#ifdef __undef_OPEN_MAX
- +# undef OPEN_MAX
- +# undef __undef_OPEN_MAX
- +#endif
- +/* Have to remove ARG_MAX? */
- +#ifdef __undef_ARG_MAX
- +# undef ARG_MAX
- +# undef __undef_ARG_MAX
- +#endif
- +
- +/* The number of data keys per process. */
- +#define _POSIX_THREAD_KEYS_MAX 128
- +/* This is the value this implementation supports. */
- +#define PTHREAD_KEYS_MAX 1024
- +
- +/* Controlling the iterations of destructors for thread-specific data. */
- +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
- +/* Number of iterations this implementation does. */
- +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
- +
- +/* The number of threads per process. */
- +#define _POSIX_THREAD_THREADS_MAX 64
- +/* We have no predefined limit on the number of threads. */
- +#undef PTHREAD_THREADS_MAX
- +
- +/* Maximum amount by which a process can descrease its asynchronous I/O
- + priority level. */
- +#define AIO_PRIO_DELTA_MAX 20
- +
- +/* Minimum size for a thread. We are free to choose a reasonable value. */
- +#define PTHREAD_STACK_MIN 24576
- +
- +/* Maximum number of timer expiration overruns. */
- +#define DELAYTIMER_MAX 2147483647
- +
- +/* Maximum tty name length. */
- +#define TTY_NAME_MAX 32
- +
- +/* Maximum login name length. This is arbitrary. */
- +#define LOGIN_NAME_MAX 256
- +
- +/* Maximum host name length. */
- +#define HOST_NAME_MAX 64
- +
- +/* Maximum message queue priority level. */
- +#define MQ_PRIO_MAX 32768
- +
- +/* Maximum value the semaphore can have. */
- +#define SEM_VALUE_MAX (2147483647)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mathdef.h uClibc/libc/sysdeps/linux/sparc/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mathinline.h uClibc/libc/sysdeps/linux/sparc/bits/mathinline.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/mathinline.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mman.h uClibc/libc/sysdeps/linux/sparc/bits/mman.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/mman.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MMAN_H
- # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
- @@ -65,7 +64,7 @@
- # define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */
- # define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */
- # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
- -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
- +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
- be uninitialized. */
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/msq.h uClibc/libc/sysdeps/linux/sparc/bits/msq.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/msq.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MSG_H
- # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/poll.h uClibc/libc/sysdeps/linux/sparc/bits/poll.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/poll.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_POLL_H
- # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/resource.h uClibc/libc/sysdeps/linux/sparc/bits/resource.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/resource.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/resource.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_RESOURCE_H
- # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sem.h uClibc/libc/sysdeps/linux/sparc/bits/sem.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/sem.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SEM_H
- # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/setjmp.h uClibc/libc/sysdeps/linux/sparc/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,5 @@
- -/* Copyright (C) 1997,1999,2000,2003 Free Software Foundation, Inc.
- +/* Copyright (C) 1997, 1999, 2000, 2003, 2005, 2006
- + Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SETJMP_H
- #define _BITS_SETJMP_H 1
- @@ -27,7 +27,6 @@
-
- #if 0 /*__WORDSIZE == 64*/
-
- -#ifndef _ASM
- typedef struct __sparc64_jmp_buf
- {
- struct __sparc64_jmp_buf *uc_link;
- @@ -55,30 +54,8 @@
- } mc_fpregs;
- } uc_mcontext;
- } __jmp_buf[1];
- -#endif
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp)
- -
- #else
- -
- -#if defined __USE_MISC || defined _ASM
- -# define JB_SP 0
- -# define JB_FP 1
- -# define JB_PC 2
- -#endif
- -
- -#ifndef _ASM
- typedef int __jmp_buf[3];
- #endif
-
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((int) (address) < (jmpbuf)[JB_SP])
- -
- -#endif
- -
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/shm.h uClibc/libc/sysdeps/linux/sparc/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigaction.h uClibc/libc/sysdeps/linux/sparc/bits/sigaction.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/sigaction.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigcontext.h uClibc/libc/sysdeps/linux/sparc/bits/sigcontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/sigcontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
- # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/sparc/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT struct sigcontext *
- #define SIGCONTEXT_EXTRA_ARGS
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/siginfo.h uClibc/libc/sysdeps/linux/sparc/bits/siginfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/siginfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/siginfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _SIGNAL_H && !defined __need_siginfo_t \
- && !defined __need_sigevent_t
- @@ -289,6 +288,10 @@
- {
- int _pad[__SIGEV_PAD_SIZE];
-
- + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
- + thread to receive the signal. */
- + __pid_t _tid;
- +
- struct
- {
- void (*_function) (sigval_t); /* Function to start. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/signum.h uClibc/libc/sysdeps/linux/sparc/bits/signum.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/signum.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/signum.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef _SIGNAL_H
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigstack.h uClibc/libc/sysdeps/linux/sparc/bits/sigstack.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigstack.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/sigstack.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SIGNAL_H
- # error "Never include this file directly. Use <signal.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/socket.h uClibc/libc/sysdeps/linux/sparc/bits/socket.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/socket.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/socket.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,376 +0,0 @@
- -/* System-specific socket constants and types. Linux version.
- - Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#ifndef __BITS_SOCKET_H
- -#define __BITS_SOCKET_H
- -
- -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
- -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
- -#endif
- -
- -#define __need_size_t
- -#define __need_NULL
- -#include <stddef.h>
- -
- -#include <limits.h>
- -#include <sys/types.h>
- -
- -/* Type for length arguments in socket calls. */
- -#ifndef __socklen_t_defined
- -typedef __socklen_t socklen_t;
- -# define __socklen_t_defined
- -#endif
- -
- -/* Types of sockets. */
- -enum __socket_type
- -{
- - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
- - byte streams. */
- -#define SOCK_STREAM SOCK_STREAM
- - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
- - of fixed maximum length. */
- -#define SOCK_DGRAM SOCK_DGRAM
- - SOCK_RAW = 3, /* Raw protocol interface. */
- -#define SOCK_RAW SOCK_RAW
- - SOCK_RDM = 4, /* Reliably-delivered messages. */
- -#define SOCK_RDM SOCK_RDM
- - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- - datagrams of fixed maximum length. */
- -#define SOCK_SEQPACKET SOCK_SEQPACKET
- - SOCK_PACKET = 10 /* Linux specific way of getting packets
- - at the dev level. For writing rarp and
- - other similar things on the user level. */
- -#define SOCK_PACKET SOCK_PACKET
- -};
- -
- -/* Protocol families. */
- -#define PF_UNSPEC 0 /* Unspecified. */
- -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
- -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
- -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
- -#define PF_INET 2 /* IP protocol family. */
- -#define PF_AX25 3 /* Amateur Radio AX.25. */
- -#define PF_IPX 4 /* Novell Internet Protocol. */
- -#define PF_APPLETALK 5 /* Appletalk DDP. */
- -#define PF_NETROM 6 /* Amateur radio NetROM. */
- -#define PF_BRIDGE 7 /* Multiprotocol bridge. */
- -#define PF_ATMPVC 8 /* ATM PVCs. */
- -#define PF_X25 9 /* Reserved for X.25 project. */
- -#define PF_INET6 10 /* IP version 6. */
- -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
- -#define PF_DECnet 12 /* Reserved for DECnet project. */
- -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
- -#define PF_SECURITY 14 /* Security callback pseudo AF. */
- -#define PF_KEY 15 /* PF_KEY key management API. */
- -#define PF_NETLINK 16
- -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
- -#define PF_PACKET 17 /* Packet family. */
- -#define PF_ASH 18 /* Ash. */
- -#define PF_ECONET 19 /* Acorn Econet. */
- -#define PF_ATMSVC 20 /* ATM SVCs. */
- -#define PF_SNA 22 /* Linux SNA Project */
- -#define PF_IRDA 23 /* IRDA sockets. */
- -#define PF_PPPOX 24 /* PPPoX sockets. */
- -#define PF_WANPIPE 25 /* Wanpipe API sockets. */
- -#define PF_LLC 26 /* Linux LLC. */
- -#define PF_CAN 29 /* Controller Area Network. */
- -#define PF_TIPC 30 /* TIPC sockets. */
- -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
- -#define PF_IUCV 32 /* IUCV sockets. */
- -#define PF_RXRPC 33 /* RxRPC sockets. */
- -#define PF_ISDN 34 /* mISDN sockets. */
- -#define PF_PHONET 35 /* Phonet sockets. */
- -#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
- -#define PF_CAIF 37 /* CAIF sockets. */
- -#define PF_ALG 38 /* Algorithm sockets. */
- -#define PF_MAX 39 /* For now.. */
- -
- -/* Address families. */
- -#define AF_UNSPEC PF_UNSPEC
- -#define AF_LOCAL PF_LOCAL
- -#define AF_UNIX PF_UNIX
- -#define AF_FILE PF_FILE
- -#define AF_INET PF_INET
- -#define AF_AX25 PF_AX25
- -#define AF_IPX PF_IPX
- -#define AF_APPLETALK PF_APPLETALK
- -#define AF_NETROM PF_NETROM
- -#define AF_BRIDGE PF_BRIDGE
- -#define AF_ATMPVC PF_ATMPVC
- -#define AF_X25 PF_X25
- -#define AF_INET6 PF_INET6
- -#define AF_ROSE PF_ROSE
- -#define AF_DECnet PF_DECnet
- -#define AF_NETBEUI PF_NETBEUI
- -#define AF_SECURITY PF_SECURITY
- -#define AF_KEY PF_KEY
- -#define AF_NETLINK PF_NETLINK
- -#define AF_ROUTE PF_ROUTE
- -#define AF_PACKET PF_PACKET
- -#define AF_ASH PF_ASH
- -#define AF_ECONET PF_ECONET
- -#define AF_ATMSVC PF_ATMSVC
- -#define AF_SNA PF_SNA
- -#define AF_IRDA PF_IRDA
- -#define AF_PPPOX PF_PPPOX
- -#define AF_WANPIPE PF_WANPIPE
- -#define AF_LLC PF_LLC
- -#define AF_CAN PF_CAN
- -#define AF_TIPC PF_TIPC
- -#define AF_BLUETOOTH PF_BLUETOOTH
- -#define AF_IUCV PF_IUCV
- -#define AF_RXRPC PF_RXRPC
- -#define AF_ISDN PF_ISDN
- -#define AF_PHONET PF_PHONET
- -#define AF_IEEE802154 PF_IEEE802154
- -#define AF_CAIF PF_CAIF
- -#define AF_ALG PF_ALG
- -#define AF_MAX PF_MAX
- -
- -/* Socket level values. Others are defined in the appropriate headers.
- -
- - XXX These definitions also should go into the appropriate headers as
- - far as they are available. */
- -#define SOL_RAW 255
- -#define SOL_DECNET 261
- -#define SOL_X25 262
- -#define SOL_PACKET 263
- -#define SOL_ATM 264 /* ATM layer (cell level). */
- -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
- -#define SOL_IRDA 266
- -
- -/* Maximum queue length specifiable by listen. */
- -#define SOMAXCONN 128
- -
- -/* Get the definition of the macro to define the common sockaddr members. */
- -#include <bits/sockaddr.h>
- -
- -/* Structure describing a generic socket address. */
- -struct sockaddr
- - {
- - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
- - char sa_data[14]; /* Address data. */
- - };
- -
- -
- -/* Structure large enough to hold any socket address (with the historical
- - exception of AF_UNIX). We reserve 128 bytes. */
- -#if ULONG_MAX > 0xffffffff
- -# define __ss_aligntype __uint64_t
- -#else
- -# define __ss_aligntype __uint32_t
- -#endif
- -#define _SS_SIZE 128
- -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
- -
- -struct sockaddr_storage
- - {
- - __SOCKADDR_COMMON (ss_); /* Address family, etc. */
- - __ss_aligntype __ss_align; /* Force desired alignment. */
- - char __ss_padding[_SS_PADSIZE];
- - };
- -
- -
- -/* Bits in the FLAGS argument to `send', `recv', et al. */
- -enum
- - {
- - MSG_OOB = 0x01, /* Process out-of-band data. */
- -#define MSG_OOB MSG_OOB
- - MSG_PEEK = 0x02, /* Peek at incoming messages. */
- -#define MSG_PEEK MSG_PEEK
- - MSG_DONTROUTE = 0x04, /* Don't use local routing. */
- -#define MSG_DONTROUTE MSG_DONTROUTE
- -#ifdef __USE_GNU
- - /* DECnet uses a different name. */
- - MSG_TRYHARD = MSG_DONTROUTE,
- -# define MSG_TRYHARD MSG_DONTROUTE
- -#endif
- - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
- -#define MSG_CTRUNC MSG_CTRUNC
- - MSG_PROXY = 0x10, /* Supply or ask second address. */
- -#define MSG_PROXY MSG_PROXY
- - MSG_TRUNC = 0x20,
- -#define MSG_TRUNC MSG_TRUNC
- - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
- -#define MSG_DONTWAIT MSG_DONTWAIT
- - MSG_EOR = 0x80, /* End of record. */
- -#define MSG_EOR MSG_EOR
- - MSG_WAITALL = 0x100, /* Wait for a full request. */
- -#define MSG_WAITALL MSG_WAITALL
- - MSG_FIN = 0x200,
- -#define MSG_FIN MSG_FIN
- - MSG_SYN = 0x400,
- -#define MSG_SYN MSG_SYN
- - MSG_CONFIRM = 0x800, /* Confirm path validity. */
- -#define MSG_CONFIRM MSG_CONFIRM
- - MSG_RST = 0x1000,
- -#define MSG_RST MSG_RST
- - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
- -#define MSG_ERRQUEUE MSG_ERRQUEUE
- - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
- -#define MSG_NOSIGNAL MSG_NOSIGNAL
- - MSG_MORE = 0x8000 /* Sender will send more. */
- -#define MSG_MORE MSG_MORE
- - };
- -
- -
- -/* Structure describing messages sent by
- - `sendmsg' and received by `recvmsg'. */
- -/* Note: do not change these members to match glibc; these match the
- - SuSv3 spec already (e.g. msg_iovlen/msg_controllen).
- - http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html */
- -/* Note: linux kernel uses __kernel_size_t (which is 8bytes on 64bit
- - platforms, and 4bytes on 32bit platforms) for msg_iovlen/msg_controllen */
- -struct msghdr
- - {
- - void *msg_name; /* Address to send to/receive from. */
- - socklen_t msg_namelen; /* Length of address data. */
- -
- - struct iovec *msg_iov; /* Vector of data to send/receive into. */
- -#if __WORDSIZE == 32
- - int msg_iovlen; /* Number of elements in the vector. */
- -#else
- - size_t msg_iovlen; /* Number of elements in the vector. */
- -#endif
- -
- - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
- -#if __WORDSIZE == 32
- - socklen_t msg_controllen; /* Ancillary data buffer length. */
- -#else
- - size_t msg_controllen; /* Ancillary data buffer length. */
- -#endif
- -
- - int msg_flags; /* Flags on received message. */
- - };
- -
- -/* Structure used for storage of ancillary data object information. */
- -struct cmsghdr
- - {
- - size_t cmsg_len; /* Length of data in cmsg_data plus length
- - of cmsghdr structure. */
- - int cmsg_level; /* Originating protocol. */
- - int cmsg_type; /* Protocol specific type. */
- -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
- - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
- -#endif
- - };
- -
- -/* Ancillary data object manipulation macros. */
- -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
- -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
- -#else
- -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
- -#endif
- -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
- -#define CMSG_FIRSTHDR(mhdr) \
- - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
- - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
- -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
- - & (size_t) ~(sizeof (size_t) - 1))
- -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
- - + CMSG_ALIGN (sizeof (struct cmsghdr)))
- -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
- -
- -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
- - struct cmsghdr *__cmsg) __THROW;
- -libc_hidden_proto(__cmsg_nxthdr)
- -#ifdef __USE_EXTERN_INLINES
- -# ifndef _EXTERN_INLINE
- -# define _EXTERN_INLINE extern __inline
- -# endif
- -_EXTERN_INLINE struct cmsghdr *
- -__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
- -{
- - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
- - /* The kernel header does this so there may be a reason. */
- - return 0;
- -
- - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
- - + CMSG_ALIGN (__cmsg->cmsg_len));
- - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
- - + __mhdr->msg_controllen)
- - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
- - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
- - /* No more entries. */
- - return 0;
- - return __cmsg;
- -}
- -#endif /* Use `extern inline'. */
- -
- -/* Socket level message types. This must match the definitions in
- - <linux/socket.h>. */
- -enum
- - {
- - SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
- -#define SCM_RIGHTS SCM_RIGHTS
- -#ifdef __USE_BSD
- - , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
- -# define SCM_CREDENTIALS SCM_CREDENTIALS
- -#endif
- - };
- -
- -/* User visible structure for SCM_CREDENTIALS message */
- -
- -struct ucred
- -{
- - pid_t pid; /* PID of sending process. */
- - uid_t uid; /* UID of sending process. */
- - gid_t gid; /* GID of sending process. */
- -};
- -
- -/* Get socket manipulation related informations from kernel headers. */
- -#ifndef __GLIBC__
- -#define __GLIBC__ 2
- -#include <asm/socket.h>
- -#undef __GLIBC__
- -#else
- -#include <asm/socket.h>
- -#endif
- -
- -
- -/* Structure used to manipulate the SO_LINGER option. */
- -struct linger
- - {
- - int l_onoff; /* Nonzero to linger on close. */
- - int l_linger; /* Time to linger. */
- - };
- -
- -/* Prefer socketcall over all these for sparc32,
- - since it only has socketcall */
- -#ifndef __arch64__
- - #undef __NR_accept
- - #undef __NR_bind
- - #undef __NR_connect
- - #undef __NR_getpeername
- - #undef __NR_getsockname
- - #undef __NR_getsockopt
- - #undef __NR_listen
- - #undef __NR_recv
- - #undef __NR_recvfrom
- - #undef __NR_recvmsg
- - #undef __NR_send
- - #undef __NR_sendmsg
- - #undef __NR_sendto
- - #undef __NR_setsockopt
- - #undef __NR_shutdown
- - #undef __NR_socket
- - #undef __NR_socketpair
- -#endif
- -
- -#endif /* bits/socket.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/socket_type.h uClibc/libc/sysdeps/linux/sparc/bits/socket_type.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/socket_type.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/sparc/bits/socket_type.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,54 @@
- +/* System-specific socket constants and types. Linux version.
- + Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _SYS_SOCKET_H
- +# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
- +#endif
- +
- +/* Types of sockets. */
- +enum __socket_type
- +{
- + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
- + byte streams. */
- +#define SOCK_STREAM SOCK_STREAM
- + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
- + of fixed maximum length. */
- +#define SOCK_DGRAM SOCK_DGRAM
- + SOCK_RAW = 3, /* Raw protocol interface. */
- +#define SOCK_RAW SOCK_RAW
- + SOCK_RDM = 4, /* Reliably-delivered messages. */
- +#define SOCK_RDM SOCK_RDM
- + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- + datagrams of fixed maximum length. */
- +#define SOCK_SEQPACKET SOCK_SEQPACKET
- + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
- +#define SOCK_DCCP SOCK_DCCP
- + SOCK_PACKET = 10, /* Linux specific way of getting packets
- + at the dev level. For writing rarp and
- + other similar things on the user level. */
- +#define SOCK_PACKET SOCK_PACKET
- +
- + /* Flags to be ORed into the type parameter of socket and socketpair. */
- +
- + SOCK_CLOEXEC = 0x400000, /* Atomically set close-on-exec flag for the
- + new descriptor(s). */
- +#define SOCK_CLOEXEC SOCK_CLOEXEC
- + SOCK_NONBLOCK = 0x004000 /* Atomically mark descriptor(s) as
- + non-blocking. */
- +#define SOCK_NONBLOCK SOCK_NONBLOCK
- +};
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/stackinfo.h uClibc/libc/sysdeps/linux/sparc/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/stat.h uClibc/libc/sysdeps/linux/sparc/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/termios.h uClibc/libc/sysdeps/linux/sparc/bits/termios.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/termios.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TERMIOS_H
- # error "Never include <bits/termios.h> directly; use <termios.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/typesizes.h uClibc/libc/sysdeps/linux/sparc/bits/typesizes.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/typesizes.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_TYPES_H
- # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/brk.c uClibc/libc/sysdeps/linux/sparc/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/clone.S uClibc/libc/sysdeps/linux/sparc/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/crt1.S uClibc/libc/sysdeps/linux/sparc/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -31,9 +31,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Originally based on glibc's sysdeps/sparc/sparc{32,64}/elf/start.S */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/fork.S uClibc/libc/sysdeps/linux/sparc/fork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/fork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/fork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Code taken from glibc2.2.2/sysdeps/unix/sysv/linux/sparc/vfork.S */
-
- @@ -23,11 +22,14 @@
- #include <sys/syscall.h>
-
- .text
- -.global __libc_fork
- -.type __libc_fork,%function
- +.global fork
- +#ifdef __UCLIBC_HAS_THREADS__
- +.weak fork
- +#endif
- +.type fork,%function
- .align 4
-
- -__libc_fork:
- +fork:
- mov __NR_fork, %g1
- ta 0x10
- bcc,a 9000f
- @@ -44,6 +46,8 @@
- retl
- and %o0, %o1, %o0
-
- -.size __libc_fork,.-__libc_fork
- -weak_alias(__libc_fork,fork)
- -libc_hidden_weak(fork)
- +.size fork,.-fork
- +#ifdef __UCLIBC_HAS_THREADS__
- +strong_alias(fork,__libc_fork)
- +#endif
- +libc_hidden_def(fork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/fpu_control.h uClibc/libc/sysdeps/linux/sparc/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/sparc/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/sparc/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,29 @@
- +/* Private macros for accessing __jmp_buf contents. SPARC version.
- + Copyright (C) 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <bits/wordsize.h>
- +
- +#if __WORDSIZE == 64
- +#define O_mask_was_saved 512
- +#define O_gregs 32
- +#define O_g1 (O_gregs + 4*8)
- +#else
- +#define JB_SP 0
- +#define JB_FP 1
- +#define JB_PC 2
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/sparc/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/sparc/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,31 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +#if __WORDSIZE == 64
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp)
- +
- +#else
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((int) (address) < (jmpbuf)[JB_SP])
- +
- +#endif
- +
- +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +#if defined(__arch64__)
- +#include "sparc64/jmpbuf-unwind.h"
- +#else
- +#include "sparc32/jmpbuf-unwind.h"
- +#endif
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/__longjmp.S uClibc/libc/sysdeps/linux/sparc/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,16 +12,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- -#include <sys/syscall.h>
- +#include <jmpbuf-offsets.h>
-
- -#define _ASM 1
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- #define ENV(base,reg) [%base + (reg * 4)]
- #define ST_FLUSH_WINDOWS 3
- #define RW_FP [%fp + 0x48]
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/Makefile.arch uClibc/libc/sysdeps/linux/sparc/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,25 +5,23 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c __syscall_error.c sigaction.c
- +CSRC-y := brk.c __syscall_error.c sigaction.c
-
- -SSRC := \
- +SSRC-y := \
- __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
- syscall.S urem.S udiv.S umul.S sdiv.S rem.S pipe.S
-
- -ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- -SSRC += fork.S vfork.S clone.S
- -endif
- +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += fork.S vfork.S clone.S
-
- # check weather __LONG_DOUBLE_128__ is defined (long double support)
- 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)
- ifeq ($(UCLIBC_SPARC_HAS_LONG_DOUBLE),y)
- -CSRC += $(foreach f, \
- +CSRC-y += $(addprefix soft-fp/, \
- q_div.c q_fle.c q_mul.c q_qtoll.c q_stoq.c \
- mp_clz_tab.c q_dtoq.c q_flt.c q_neg.c q_qtos.c q_sub.c \
- q_add.c q_feq.c q_fne.c q_qtod.c q_qtou.c q_ulltoq.c \
- q_cmp.c q_fge.c q_itoq.c q_qtoull.c q_util.c \
- - q_cmpe.c q_fgt.c q_lltoq.c q_qtoi.c q_sqrt.c q_utoq.c, soft-fp/$(f))
- + q_cmpe.c q_fgt.c q_lltoq.c q_qtoi.c q_sqrt.c q_utoq.c)
- else
- -CSRC += qp_ops.c
- +CSRC-y += qp_ops.c
- endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/pipe.S uClibc/libc/sysdeps/linux/sparc/pipe.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/pipe.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/pipe.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,10 +13,9 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- -
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>.
- +
- Ported to uClibc by:
- Austin Foxley, Ceton Corporation <austinf@cetoncorp.com>
- */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/setjmp.S uClibc/libc/sysdeps/linux/sparc/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,15 +12,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <sys/syscall.h>
- +#include <jmpbuf-offsets.h>
-
- -#define _ASM 1
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- #define ST_FLUSH_WINDOWS 3
-
- .global _setjmp
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sigaction.c uClibc/libc/sysdeps/linux/sparc/sigaction.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>.
-
- Ported to uClibc from glibc: 090520:
- Jan Buchholz, KIP, Uni Heidelberg <jan.buchholz@kip.uni-heidelberg.de>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/double.h uClibc/libc/sysdeps/linux/sparc/soft-fp/double.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/double.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/double.h 2014-02-03 12:32:56.000000000 +0100
- @@ -27,9 +27,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
- - MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if _FP_W_TYPE_SIZE < 32
- #error "Here's a nickel kid. Go buy yourself a real computer."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/extended.h uClibc/libc/sysdeps/linux/sparc/soft-fp/extended.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/extended.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/extended.h 2014-02-03 12:32:56.000000000 +0100
- @@ -24,9 +24,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
- - MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if _FP_W_TYPE_SIZE < 32
- #error "Here's a nickel, kid. Go buy yourself a real computer."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/longlong.h uClibc/libc/sysdeps/linux/sparc/soft-fp/longlong.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/longlong.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/longlong.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* You have to define the following before including this file:
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c uClibc/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if 0
- #include <gmp.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-1.h uClibc/libc/sysdeps/linux/sparc/soft-fp/op-1.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-1.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/op-1.h 2014-02-03 12:32:56.000000000 +0100
- @@ -27,9 +27,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
- - MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define _FP_FRAC_DECL_1(X) _FP_W_TYPE X##_f
- #define _FP_FRAC_COPY_1(D,S) (D##_f = S##_f)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-2.h uClibc/libc/sysdeps/linux/sparc/soft-fp/op-2.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-2.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/op-2.h 2014-02-03 12:32:56.000000000 +0100
- @@ -27,9 +27,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
- - MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define _FP_FRAC_DECL_2(X) _FP_W_TYPE X##_f0, X##_f1
- #define _FP_FRAC_COPY_2(D,S) (D##_f0 = S##_f0, D##_f1 = S##_f1)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-4.h uClibc/libc/sysdeps/linux/sparc/soft-fp/op-4.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-4.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/op-4.h 2014-02-03 12:32:56.000000000 +0100
- @@ -27,9 +27,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
- - MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define _FP_FRAC_DECL_4(X) _FP_W_TYPE X##_f[4]
- #define _FP_FRAC_COPY_4(D,S) \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-8.h uClibc/libc/sysdeps/linux/sparc/soft-fp/op-8.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-8.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/op-8.h 2014-02-03 12:32:56.000000000 +0100
- @@ -26,9 +26,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
- - MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* We need just a few things from here for op-4, if we ever need some
- other macros, they can be added. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-common.h uClibc/libc/sysdeps/linux/sparc/soft-fp/op-common.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-common.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/op-common.h 2014-02-03 12:32:56.000000000 +0100
- @@ -26,9 +26,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
- - MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define _FP_DECL(wc, X) \
- _FP_I_TYPE X##_c __attribute__((unused)), X##_s, X##_e; \
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_add.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_add.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_add.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_add.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,9 +17,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_div.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_div.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_div.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_div.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "double.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_feq.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_feq.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_feq.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_feq.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fge.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_fge.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fge.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_fge.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fle.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_fle.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fle.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_fle.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_flt.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_flt.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_flt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_flt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fne.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_fne.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fne.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_fne.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_mul.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_mul.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_mul.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_mul.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_neg.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_neg.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_neg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_neg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "double.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FP_ROUNDMODE FP_RND_ZERO
- #include "soft-fp.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FP_ROUNDMODE FP_RND_ZERO
- #include "soft-fp.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "single.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FP_ROUNDMODE FP_RND_ZERO
- #include "soft-fp.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FP_ROUNDMODE FP_RND_ZERO
- #include "soft-fp.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "single.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_sub.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_sub.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_sub.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_sub.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/quad.h uClibc/libc/sysdeps/linux/sparc/soft-fp/quad.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/quad.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/quad.h 2014-02-03 12:32:56.000000000 +0100
- @@ -27,9 +27,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
- - MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if _FP_W_TYPE_SIZE < 32
- #error "Here's a nickel, kid. Go buy yourself a real computer."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_util.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_util.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_util.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_util.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c uClibc/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "soft-fp.h"
- #include "quad.h"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h uClibc/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -17,9 +17,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fpu_control.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/single.h uClibc/libc/sysdeps/linux/sparc/soft-fp/single.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/single.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/single.h 2014-02-03 12:32:56.000000000 +0100
- @@ -27,9 +27,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
- - MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if _FP_W_TYPE_SIZE < 32
- #error "Here's a nickel kid. Go buy yourself a real computer."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h uClibc/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -27,9 +27,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
- - MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef SOFT_FP_H
- #define SOFT_FP_H
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sparcv9/clone.S uClibc/libc/sysdeps/linux/sparc/sparcv9/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sparcv9/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/sparcv9/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/procfs.h uClibc/libc/sysdeps/linux/sparc/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/ptrace.h uClibc/libc/sysdeps/linux/sparc/sys/ptrace.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/sys/ptrace.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PTRACE_H
- #define _SYS_PTRACE_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/ucontext.h uClibc/libc/sysdeps/linux/sparc/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/user.h uClibc/libc/sysdeps/linux/sparc/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/syscall.S uClibc/libc/sysdeps/linux/sparc/syscall.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/syscall.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/syscall.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <sys/syscall.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/vfork.S uClibc/libc/sysdeps/linux/sparc/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/sparc/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Code taken from glibc2.2.2/sysdeps/unix/sysv/linux/sparc/vfork.S */
-
- @@ -52,4 +51,4 @@
- .size __vfork,.-__vfork
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/fcntl.h uClibc/libc/sysdeps/linux/v850/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/kernel_types.h uClibc/libc/sysdeps/linux/v850/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -41,6 +41,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
-
- typedef struct {
- #ifdef __USE_ALL
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/poll.h uClibc/libc/sysdeps/linux/v850/bits/poll.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/bits/poll.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_POLL_H
- # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/setjmp.h uClibc/libc/sysdeps/linux/v850/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -18,7 +18,6 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
- -#ifndef _ASM
- typedef struct
- {
- /* Stack pointer. */
- @@ -30,13 +29,5 @@
- /* Callee-saved registers r2 and r20-r29. */
- int __regs[11];
- } __jmp_buf[1];
- -#endif
- -
- -#define JB_SIZE (4 * 13)
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)[0].__sp)
-
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -10,10 +10,10 @@
- #undef __UCLIBC_ABORT_INSTRUCTION__
-
- /* can your target use syscall6() for mmap ? */
- -#undef __UCLIBC_MMAP_HAS_6_ARGS__
- +#define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/wordsize.h uClibc/libc/sysdeps/linux/v850/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/v850/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/v850/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,6 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#define JB_SIZE (4 * 13)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/v850/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/v850/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)[0].__sp)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/__longjmp.S uClibc/libc/sysdeps/linux/v850/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -11,11 +11,6 @@
- * Written by Miles Bader <miles@gnu.org>
- */
-
- -#include <features.h>
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
- -
- #include <clinkage.h>
-
- .text
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/Makefile uClibc/libc/sysdeps/linux/v850/Makefile
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/Makefile 2014-02-03 12:32:56.000000000 +0100
- @@ -20,7 +20,7 @@
- SSRC := setjmp.S __longjmp.S vfork.S
- SOBJ := $(patsubst %.S,%.o, $(SSRC))
-
- -CSRC := mmap.c syscall.c clone.c
- +CSRC := syscall.c clone.c
- COBJ := $(patsubst %.c,%.o, $(CSRC))
-
- OBJS := $(SOBJ) $(COBJ)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/mmap.c uClibc/libc/sysdeps/linux/v850/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/mmap.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,16 +0,0 @@
- -/* Use new style mmap for v850 */
- -/*
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <unistd.h>
- -#include <errno.h>
- -#include <sys/mman.h>
- -#include <sys/syscall.h>
- -
- -
- -_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
- - int, flags, int, fd, __off_t, offset)
- -libc_hidden_def(mmap)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/setjmp.S uClibc/libc/sysdeps/linux/v850/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -11,10 +11,6 @@
- * Written by Miles Bader <miles@gnu.org>
- */
-
- -#define _SETJMP_H
- -#define _ASM
- -#include <bits/setjmp.h>
- -
- #include <clinkage.h>
-
- .text
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/procfs.h uClibc/libc/sysdeps/linux/v850/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/ptrace.h uClibc/libc/sysdeps/linux/v850/sys/ptrace.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/sys/ptrace.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PTRACE_H
- #define _SYS_PTRACE_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/ucontext.h uClibc/libc/sysdeps/linux/v850/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/vfork.S uClibc/libc/sysdeps/linux/v850/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/v850/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -11,12 +11,7 @@
- * Written by Miles Bader <miles@gnu.org>
- */
-
- -#include <features.h>
- -#define _ERRNO_H 1
- -#include <bits/errno.h>
- -#define _SYSCALL_H
- -#include <bits/sysnum.h>
- -
- +#include <sys/syscall.h>
- #include <clinkage.h>
-
- /* Clone the calling process, but without copying the whole address space.
- @@ -24,8 +19,7 @@
- replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
- and the process ID of the new process to the old process. */
-
- -.global C_SYMBOL_NAME(errno)
- -
- +/* this should be made hidden */
- C_ENTRY (__vfork):
- addi SYS_vfork, r0, r12
- trap 0
- @@ -39,4 +33,4 @@
- jmp [lp] /* error return */
- C_END(__vfork)
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/fcntl.h uClibc/libc/sysdeps/linux/vax/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/huge_val.h uClibc/libc/sysdeps/linux/vax/bits/huge_val.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/huge_val.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/vax/bits/huge_val.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,25 @@
- +/* `HUGE_VAL' constant for Vaxen.
- + Used by <stdlib.h> and <math.h> functions for overflow.
- + Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _MATH_H
- +# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
- +#endif
- +
- +
- +#define HUGE_VAL 1.70141182460469227e38
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/ipc.h uClibc/libc/sysdeps/linux/vax/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/machine-gmon.h uClibc/libc/sysdeps/linux/vax/bits/machine-gmon.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/machine-gmon.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/bits/machine-gmon.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,41 +0,0 @@
- -/* i386-specific implementation of profiling support.
- - Copyright (C) 1997, 2002 Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#include <sysdep.h>
- -
- -/* We need a special version of the `mcount' function since for ix86 it
- - must not clobber any register. This has several reasons:
- - - there is a bug in gcc as of version 2.7.2.2 which prohibits the
- - use of profiling together with nested functions
- - - the ELF `fixup' function uses GCC's regparm feature
- - - some (future) systems might want to pass parameters in registers. */
- -
- -/* We must not pollute the global namespace. */
- -#define mcount_internal __mcount_internal
- -
- -extern void mcount_internal (u_long frompc, u_long selfpc);
- -
- -#define _MCOUNT_DECL(frompc, selfpc) \
- -void __attribute__ (( regparm (2) )) mcount_internal (u_long frompc, u_long selfpc)
- -
- -
- -/* Define MCOUNT as empty since we have the implementation in another
- - file. */
- -#define MCOUNT
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/sem.h uClibc/libc/sysdeps/linux/vax/bits/sem.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/bits/sem.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SEM_H
- # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/setjmp.h uClibc/libc/sysdeps/linux/vax/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -6,14 +6,8 @@
-
- /* we want to save enough that we can use this to fool RET,
- * So we basically save all of the CALLS stack frame. Plus regs. */
- -#ifndef _ASM
- typedef int __jmp_buf[16];
- -#endif
-
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf[4]))
- /*
- jmp_buf layout. jmp_buf[0]
- void *__cond; The condition handler
- @@ -34,4 +28,3 @@
- void *__rA; regs, r0->r11.
- void *__rB; regs, r0->r11.
- */
- -
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/shm.h uClibc/libc/sysdeps/linux/vax/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/sigcontext.h uClibc/libc/sysdeps/linux/vax/bits/sigcontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/bits/sigcontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,8 +13,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
- # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/statfs.h uClibc/libc/sysdeps/linux/vax/bits/statfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/statfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/bits/statfs.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,61 +0,0 @@
- -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Library General Public License as
- - published by the Free Software Foundation; either version 2 of the
- - License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Library General Public License for more details.
- -
- - You should have received a copy of the GNU Library General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- -
- -#ifndef _SYS_STATFS_H
- -# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
- -#endif
- -
- -#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/
- -
- -struct statfs
- - {
- - int f_type;
- - int f_bsize;
- -#ifndef __USE_FILE_OFFSET64
- - __fsblkcnt_t f_blocks;
- - __fsblkcnt_t f_bfree;
- - __fsblkcnt_t f_bavail;
- - __fsfilcnt_t f_files;
- - __fsfilcnt_t f_ffree;
- -#else
- - __fsblkcnt64_t f_blocks;
- - __fsblkcnt64_t f_bfree;
- - __fsblkcnt64_t f_bavail;
- - __fsfilcnt64_t f_files;
- - __fsfilcnt64_t f_ffree;
- -#endif
- - __fsid_t f_fsid;
- - int f_namelen;
- - int f_spare[6];
- - };
- -
- -#ifdef __USE_LARGEFILE64
- -struct statfs64
- - {
- - int f_type;
- - int f_bsize;
- - __fsblkcnt64_t f_blocks;
- - __fsblkcnt64_t f_bfree;
- - __fsblkcnt64_t f_bavail;
- - __fsfilcnt64_t f_files;
- - __fsfilcnt64_t f_ffree;
- - __fsid_t f_fsid;
- - int f_namelen;
- - int f_spare[6];
- - };
- -#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/wordsize.h uClibc/libc/sysdeps/linux/vax/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,7 +13,6 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/brk.c uClibc/libc/sysdeps/linux/vax/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/clone.S uClibc/libc/sysdeps/linux/vax/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/vax/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/vax/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,11 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf[4]))
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/Makefile.arch uClibc/libc/sysdeps/linux/vax/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -6,5 +6,5 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c mmap.c
- -SSRC := __longjmp.S setjmp.S _setjmp.S clone.S
- +CSRC-y := brk.c
- +SSRC-y := __longjmp.S setjmp.S _setjmp.S clone.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/mmap.c uClibc/libc/sysdeps/linux/vax/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/mmap.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,10 +0,0 @@
- -
- -#include <unistd.h>
- -#include <sys/mman.h>
- -#include <errno.h>
- -#include <sys/syscall.h>
- -
- -_syscall6 (void *, mmap, void *, start, size_t, length, int, prot, int, flags,
- - int, fd, off_t, offset)
- -libc_hidden_def(mmap)
- -
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/sys/procfs.h uClibc/libc/sysdeps/linux/vax/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/sys/ucontext.h uClibc/libc/sysdeps/linux/vax/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/vax/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Don't rely on this, the interface is currently messed up and may need to
- be broken to be fixed. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/atomic.h uClibc/libc/sysdeps/linux/x86_64/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdint.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/byteswap.h uClibc/libc/sysdeps/linux/x86_64/bits/byteswap.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/byteswap.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _ASM_BITS_BYTESWAP_H
- #define _ASM_BITS_BYTESWAP_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/environments.h uClibc/libc/sysdeps/linux/x86_64/bits/environments.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/environments.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/environments.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _UNISTD_H
- # error "Never include this file directly. Use <unistd.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/fcntl.h uClibc/libc/sysdeps/linux/x86_64/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/fenv.h uClibc/libc/sysdeps/linux/x86_64/bits/fenv.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/fenv.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_H
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- @@ -89,9 +88,9 @@
- fenv_t;
-
- /* If the default argument is used we use this value. */
- -#define FE_DFL_ENV ((__const fenv_t *) -1)
- +#define FE_DFL_ENV ((const fenv_t *) -1)
-
- #ifdef __USE_GNU
- /* Floating-point environment where none of the exception is masked. */
- -# define FE_NOMASK_ENV ((__const fenv_t *) -2)
- +# define FE_NOMASK_ENV ((const fenv_t *) -2)
- #endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/kernel_types.h uClibc/libc/sysdeps/linux/x86_64/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -40,6 +40,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef __kernel_dev_t __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- typedef struct {
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/mathdef.h uClibc/libc/sysdeps/linux/x86_64/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/mathinline.h uClibc/libc/sysdeps/linux/x86_64/bits/mathinline.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/mathinline.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MATH_H
- # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/msq.h uClibc/libc/sysdeps/linux/x86_64/bits/msq.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/msq.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MSG_H
- # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sem.h uClibc/libc/sysdeps/linux/x86_64/bits/sem.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/sem.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SEM_H
- # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/setjmp.h uClibc/libc/sysdeps/linux/x86_64/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
- +/* Copyright (C) 2001,2002,2003,2005,2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- @@ -12,13 +12,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. x86-64 version. */
- #ifndef _BITS_SETJMP_H
- -#define _BITS_SETJMP_H 1
- +#define _BITS_SETJMP_H 1
-
- #if !defined _SETJMP_H && !defined _PTHREAD_H
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- @@ -27,52 +26,9 @@
- #include <bits/wordsize.h>
-
- #if __WORDSIZE == 64
- -
- -/* We only need to save callee-saved registers plus stackpointer and
- - program counter. */
- -# if defined __USE_MISC || defined _ASM
- -# define JB_RBX 0
- -# define JB_RBP 1
- -# define JB_R12 2
- -# define JB_R13 3
- -# define JB_R14 4
- -# define JB_R15 5
- -# define JB_RSP 6
- -# define JB_PC 7
- -# define JB_SIZE (8*8)
- -# endif
- -
- -#else
- -
- -# if defined __USE_MISC || defined _ASM
- -# define JB_BX 0
- -# define JB_SI 1
- -# define JB_DI 2
- -# define JB_BP 3
- -# define JB_SP 4
- -# define JB_PC 5
- -# define JB_SIZE 24
- -# endif
- -
- -#endif
- -
- -#ifndef _ASM
- -
- -# if __WORDSIZE == 64
- typedef long int __jmp_buf[8];
- -# else
- +#else
- typedef int __jmp_buf[6];
- -# endif
- -
- -/* Test if longjmp to JMPBUF would unwind the frame
- - containing a local variable at ADDRESS. */
- -# if __WORDSIZE == 64
- -# define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)[JB_RSP])
- -# else
- -# define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)[JB_SP])
- -# endif
- #endif
-
- -#endif /* bits/setjmp.h */
- +#endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/shm.h uClibc/libc/sysdeps/linux/x86_64/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sigcontext.h uClibc/libc/sysdeps/linux/x86_64/bits/sigcontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/sigcontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_SIGCONTEXT_H
- #define _BITS_SIGCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/x86_64/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define SIGCONTEXT siginfo_t *_si, struct ucontext *
- #define SIGCONTEXT_EXTRA_ARGS _si,
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/stackinfo.h uClibc/libc/sysdeps/linux/x86_64/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/stat.h uClibc/libc/sysdeps/linux/x86_64/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/brk.c uClibc/libc/sysdeps/linux/x86_64/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bsd-_setjmp.S uClibc/libc/sysdeps/linux/x86_64/bsd-_setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bsd-_setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bsd-setjmp.S uClibc/libc/sysdeps/linux/x86_64/bsd-setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/bsd-setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- -#include <sysdep.h>
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- .global setjmp
- .type setjmp,%function
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/clone.S uClibc/libc/sysdeps/linux/x86_64/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/crt1.S uClibc/libc/sysdeps/linux/x86_64/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -31,9 +31,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Originally based on glibc's sysdeps/x86_64/elf/start.S */
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/fpu_control.h uClibc/libc/sysdeps/linux/x86_64/fpu_control.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/fpu_control.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/getcontext.S uClibc/libc/sysdeps/linux/x86_64/getcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/getcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/x86_64/getcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,88 @@
- +/* Save current context.
- + Copyright (C) 2002-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Andreas Jaeger <aj@suse.de>, 2002.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +#include "ucontext_i.h"
- +
- +/* int __getcontext (ucontext_t *ucp)
- +
- + Saves the machine context in UCP such that when it is activated,
- + it appears as if __getcontext() returned again.
- +
- + This implementation is intended to be used for *synchronous* context
- + switches only. Therefore, it does not have to save anything
- + other than the PRESERVED state. */
- +
- +
- +ENTRY(__getcontext)
- + /* Save the preserved registers, the registers used for passing
- + args, and the return address. */
- + movq %rbx, oRBX(%rdi)
- + movq %rbp, oRBP(%rdi)
- + movq %r12, oR12(%rdi)
- + movq %r13, oR13(%rdi)
- + movq %r14, oR14(%rdi)
- + movq %r15, oR15(%rdi)
- +
- + movq %rdi, oRDI(%rdi)
- + movq %rsi, oRSI(%rdi)
- + movq %rdx, oRDX(%rdi)
- + movq %rcx, oRCX(%rdi)
- + movq %r8, oR8(%rdi)
- + movq %r9, oR9(%rdi)
- +
- + movq (%rsp), %rcx
- + movq %rcx, oRIP(%rdi)
- + leaq 8(%rsp), %rcx /* Exclude the return address. */
- + movq %rcx, oRSP(%rdi)
- +
- + /* We have separate floating-point register content memory on the
- + stack. We use the __fpregs_mem block in the context. Set the
- + links up correctly. */
- +
- + leaq oFPREGSMEM(%rdi), %rcx
- + movq %rcx, oFPREGS(%rdi)
- + /* Save the floating-point environment. */
- + fnstenv (%rcx)
- + fldenv (%rcx)
- + stmxcsr oMXCSR(%rdi)
- +
- + /* Save the current signal mask with
- + rt_sigprocmask (SIG_BLOCK, NULL, set,_NSIG/8). */
- + leaq oSIGMASK(%rdi), %rdx
- + xorl %esi,%esi
- +#if SIG_BLOCK == 0
- + xorl %edi, %edi
- +#else
- + movl $SIG_BLOCK, %edi
- +#endif
- + movl $_NSIG8,%r10d
- + movl $__NR_rt_sigprocmask, %eax
- + syscall
- + cmpq $-4095, %rax /* Check %rax for error. */
- + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
- +
- + /* All done, return 0 for success. */
- + xorl %eax, %eax
- +L(pseudo_end):
- + ret
- +PSEUDO_END(__getcontext)
- +
- +weak_alias (__getcontext, getcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,45 @@
- +/* Private macros for accessing __jmp_buf contents. x86-64 version.
- + Copyright (C) 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <bits/wordsize.h>
- +
- +#if __WORDSIZE == 64
- +
- +/* We only need to save callee-saved registers plus stackpointer and
- + program counter. */
- +# define JB_RBX 0
- +# define JB_RBP 1
- +# define JB_R12 2
- +# define JB_R13 3
- +# define JB_R14 4
- +# define JB_R15 5
- +# define JB_RSP 6
- +# define JB_PC 7
- +# define JB_SIZE (8*8)
- +
- +#else
- +
- +# define JB_BX 0
- +# define JB_SI 1
- +# define JB_DI 2
- +# define JB_BP 3
- +# define JB_SP 4
- +# define JB_PC 5
- +# define JB_SIZE 24
- +
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,28 @@
- +/*
- + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#if __WORDSIZE == 64
- +# define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)[JB_RSP])
- +#else
- +# define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)[JB_SP])
- +#endif
- +
- +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +#include <stdint.h>
- +#include <unwind.h>
- +
- +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
- +
- +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_RSP] - (_adj))
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/__longjmp.S uClibc/libc/sysdeps/linux/x86_64/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,14 +12,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- +#include <jmpbuf-offsets.h>
-
- /* Jump to the position specified by ENV, causing the
- setjmp call there to return VAL, or 1 if VAL is 0.
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/makecontext.c uClibc/libc/sysdeps/linux/x86_64/makecontext.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/makecontext.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/x86_64/makecontext.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,121 @@
- +/* Create new context.
- + Copyright (C) 2002, 2004, 2005, 2008 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Andreas Jaeger <aj@suse.de>, 2002.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +#include <stdarg.h>
- +#include <stdint.h>
- +#include <ucontext.h>
- +
- +#include "ucontext_i.h"
- +
- +/* This implementation can handle any ARGC value but only
- + normal integer parameters.
- + makecontext sets up a stack and the registers for the
- + user context. The stack looks like this:
- + +-----------------------+
- + | next context |
- + +-----------------------+
- + | parameter 7-n |
- + +-----------------------+
- + | trampoline address |
- + %rsp -> +-----------------------+
- +
- + The registers are set up like this:
- + %rdi,%rsi,%rdx,%rcx,%r8,%r9: parameter 1 to 6
- + %rbx : address of next context
- + %rsp : stack pointer.
- +*/
- +
- +/* XXX: This implementation currently only handles integer arguments.
- + To handle long int and pointer arguments the va_arg arguments needs
- + to be changed to long and also the stdlib/tst-setcontext.c file needs
- + to be changed to pass long arguments to makecontext. */
- +
- +
- +void
- +__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
- +{
- + extern void __start_context (void);
- + greg_t *sp;
- + unsigned int idx_uc_link;
- + va_list ap;
- + int i;
- +
- + /* Generate room on stack for parameter if needed and uc_link. */
- + sp = (greg_t *) ((uintptr_t) ucp->uc_stack.ss_sp
- + + ucp->uc_stack.ss_size);
- + sp -= (argc > 6 ? argc - 6 : 0) + 1;
- + /* Align stack and make space for trampoline address. */
- + sp = (greg_t *) ((((uintptr_t) sp) & -16L) - 8);
- +
- + idx_uc_link = (argc > 6 ? argc - 6 : 0) + 1;
- +
- + /* Setup context ucp. */
- + /* Address to jump to. */
- + ucp->uc_mcontext.gregs[REG_RIP] = (uintptr_t) func;
- + /* Setup rbx.*/
- + ucp->uc_mcontext.gregs[REG_RBX] = (uintptr_t) &sp[idx_uc_link];
- + ucp->uc_mcontext.gregs[REG_RSP] = (uintptr_t) sp;
- +
- + /* Setup stack. */
- + sp[0] = (uintptr_t) &__start_context;
- + sp[idx_uc_link] = (uintptr_t) ucp->uc_link;
- +
- + va_start (ap, argc);
- + /* Handle arguments.
- +
- + The standard says the parameters must all be int values. This is
- + an historic accident and would be done differently today. For
- + x86-64 all integer values are passed as 64-bit values and
- + therefore extending the API to copy 64-bit values instead of
- + 32-bit ints makes sense. It does not break existing
- + functionality and it does not violate the standard which says
- + that passing non-int values means undefined behavior. */
- + for (i = 0; i < argc; ++i)
- + switch (i)
- + {
- + case 0:
- + ucp->uc_mcontext.gregs[REG_RDI] = va_arg (ap, greg_t);
- + break;
- + case 1:
- + ucp->uc_mcontext.gregs[REG_RSI] = va_arg (ap, greg_t);
- + break;
- + case 2:
- + ucp->uc_mcontext.gregs[REG_RDX] = va_arg (ap, greg_t);
- + break;
- + case 3:
- + ucp->uc_mcontext.gregs[REG_RCX] = va_arg (ap, greg_t);
- + break;
- + case 4:
- + ucp->uc_mcontext.gregs[REG_R8] = va_arg (ap, greg_t);
- + break;
- + case 5:
- + ucp->uc_mcontext.gregs[REG_R9] = va_arg (ap, greg_t);
- + break;
- + default:
- + /* Put value on stack. */
- + sp[i - 5] = va_arg (ap, greg_t);
- + break;
- + }
- + va_end (ap);
- +
- +}
- +
- +
- +weak_alias (__makecontext, makecontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/Makefile.arch uClibc/libc/sysdeps/linux/x86_64/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,18 +5,15 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c __syscall_error.c sigaction.c mmap.c
- +CSRC-y := brk.c __syscall_error.c sigaction.c
-
- -SSRC := \
- +SSRC-y := \
- __longjmp.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S
-
- -ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- -SSRC += vfork.S clone.S
- -endif
- -
- +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += vfork.S clone.S
- +ARCH_OBJ_FILTEROUT-$(UCLIBC_LINUX_SPECIFIC) := sched_getcpu.c
- ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
- -ARCH_OBJ_FILTEROUT = sched_getcpu.c
- -ifeq ($(UCLIBC_HAS_TLS),y)
- -SSRC += sched_getcpu.S
- -endif
- +SSRC-$(UCLIBC_HAS_TLS) += sched_getcpu.S
- endif
- +CSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.c
- +SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += setcontext.S getcontext.S swapcontext.S __start_context.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/mmap.c uClibc/libc/sysdeps/linux/x86_64/mmap.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/mmap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/mmap.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,19 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * mmap() for uClibc/x86_64
- - *
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - * Copyright (C) 2005 by Mike Frysinger <vapier@gentoo.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <errno.h>
- -#include <unistd.h>
- -#include <sys/mman.h>
- -#include <sys/syscall.h>
- -
- -
- -_syscall6(void *, mmap, void *, start, size_t, length, int, prot,
- - int, flags, int, fd, off_t, offset)
- -libc_hidden_def(mmap)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sched_getcpu.S uClibc/libc/sysdeps/linux/x86_64/sched_getcpu.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sched_getcpu.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/sched_getcpu.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/setcontext.S uClibc/libc/sysdeps/linux/x86_64/setcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/setcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/x86_64/setcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,103 @@
- +/* Install given context.
- + Copyright (C) 2002-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Andreas Jaeger <aj@suse.de>, 2002.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +#include "ucontext_i.h"
- +
- +
- +/* int __setcontext (const ucontext_t *ucp)
- +
- + Restores the machine context in UCP and thereby resumes execution
- + in that context.
- +
- + This implementation is intended to be used for *synchronous* context
- + switches only. Therefore, it does not have to restore anything
- + other than the PRESERVED state. */
- +
- +ENTRY(__setcontext)
- + /* Save argument since syscall will destroy it. */
- + pushq %rdi
- + cfi_adjust_cfa_offset(8)
- +
- + /* Set the signal mask with
- + rt_sigprocmask (SIG_SETMASK, mask, NULL, _NSIG/8). */
- + leaq oSIGMASK(%rdi), %rsi
- + xorl %edx, %edx
- + movl $SIG_SETMASK, %edi
- + movl $_NSIG8,%r10d
- + movl $__NR_rt_sigprocmask, %eax
- + syscall
- + popq %rdi /* Reload %rdi, adjust stack. */
- + cfi_adjust_cfa_offset(-8)
- + cmpq $-4095, %rax /* Check %rax for error. */
- + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
- +
- + /* Restore the floating-point context. Not the registers, only the
- + rest. */
- + movq oFPREGS(%rdi), %rcx
- + fldenv (%rcx)
- + ldmxcsr oMXCSR(%rdi)
- +
- +
- + /* Load the new stack pointer, the preserved registers and
- + registers used for passing args. */
- + cfi_def_cfa(%rdi, 0)
- + cfi_offset(%rbx,oRBX)
- + cfi_offset(%rbp,oRBP)
- + cfi_offset(%r12,oR12)
- + cfi_offset(%r13,oR13)
- + cfi_offset(%r14,oR14)
- + cfi_offset(%r15,oR15)
- + cfi_offset(%rsp,oRSP)
- + cfi_offset(%rip,oRIP)
- +
- + movq oRSP(%rdi), %rsp
- + movq oRBX(%rdi), %rbx
- + movq oRBP(%rdi), %rbp
- + movq oR12(%rdi), %r12
- + movq oR13(%rdi), %r13
- + movq oR14(%rdi), %r14
- + movq oR15(%rdi), %r15
- +
- + /* The following ret should return to the address set with
- + getcontext. Therefore push the address on the stack. */
- + movq oRIP(%rdi), %rcx
- + pushq %rcx
- +
- + movq oRSI(%rdi), %rsi
- + movq oRDX(%rdi), %rdx
- + movq oRCX(%rdi), %rcx
- + movq oR8(%rdi), %r8
- + movq oR9(%rdi), %r9
- +
- + /* Setup finally %rdi. */
- + movq oRDI(%rdi), %rdi
- +
- + /* End FDE here, we fall into another context. */
- + cfi_endproc
- + cfi_startproc
- +
- + /* Clear rax to indicate success. */
- + xorl %eax, %eax
- +L(pseudo_end):
- + ret
- +PSEUDO_END(__setcontext)
- +
- +weak_alias (__setcontext, setcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/setjmp.S uClibc/libc/sysdeps/linux/x86_64/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#define _ASM
- -#define _SETJMP_H
- -#include <bits/setjmp.h>
- -#include <sysdep.h>
- +#include <jmpbuf-offsets.h>
-
- .global __sigsetjmp
- .type __sigsetjmp,%function
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sigaction.c uClibc/libc/sysdeps/linux/x86_64/sigaction.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/sigaction.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- #include <errno.h>
- @@ -30,9 +29,6 @@
- /* We do not globally define the SA_RESTORER flag so do it here. */
- #define SA_RESTORER 0x04000000
-
- -extern __typeof(sigaction) __libc_sigaction;
- -
- -
- #ifdef __NR_rt_sigaction
-
- /* Using the hidden attribute here does not change the code but it
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/__start_context.S uClibc/libc/sysdeps/linux/x86_64/__start_context.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/__start_context.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/x86_64/__start_context.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,49 @@
- +/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Andreas Jaeger <aj@suse.de>, 2002.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +/* This is the helper code which gets called if a function which is
- + registered with 'makecontext' returns. In this case we have to
- + install the context listed in the uc_link element of the context
- + 'makecontext' manipulated at the time of the 'makecontext' call.
- + If the pointer is NULL the process must terminate. */
- +
- +
- +ENTRY(__start_context)
- + /* This removes the parameters passed to the function given to
- + 'makecontext' from the stack. RBX contains the address
- + on the stack pointer for the next context. */
- + movq %rbx, %rsp
- +
- + popq %rdi /* This is the next context. */
- + cfi_adjust_cfa_offset(-8)
- + testq %rdi, %rdi
- + je 2f /* If it is zero exit. */
- +
- + call JUMPTARGET(__setcontext)
- + /* If this returns (which can happen if the syscall fails) we'll
- + exit the program with the return error value (-1). */
- + movq %rax,%rdi
- +
- +2:
- + call HIDDEN_JUMPTARGET(exit)
- + /* The 'exit' call should never return. In case it does cause
- + the process to terminate. */
- + hlt
- +END(__start_context)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/swapcontext.S uClibc/libc/sysdeps/linux/x86_64/swapcontext.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/swapcontext.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/x86_64/swapcontext.S 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,121 @@
- +/* Save current context and install the given one.
- + Copyright (C) 2002-2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Andreas Jaeger <aj@suse.de>, 2002.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sysdep.h>
- +
- +#include "ucontext_i.h"
- +
- +
- +/* int __swapcontext (ucontext_t *oucp, const ucontext_t *ucp);
- +
- + Saves the machine context in oucp such that when it is activated,
- + it appears as if __swapcontextt() returned again, restores the
- + machine context in ucp and thereby resumes execution in that
- + context.
- +
- + This implementation is intended to be used for *synchronous* context
- + switches only. Therefore, it does not have to save anything
- + other than the PRESERVED state. */
- +
- +ENTRY(__swapcontext)
- + /* Save the preserved registers, the registers used for passing args,
- + and the return address. */
- + movq %rbx, oRBX(%rdi)
- + movq %rbp, oRBP(%rdi)
- + movq %r12, oR12(%rdi)
- + movq %r13, oR13(%rdi)
- + movq %r14, oR14(%rdi)
- + movq %r15, oR15(%rdi)
- +
- + movq %rdi, oRDI(%rdi)
- + movq %rsi, oRSI(%rdi)
- + movq %rdx, oRDX(%rdi)
- + movq %rcx, oRCX(%rdi)
- + movq %r8, oR8(%rdi)
- + movq %r9, oR9(%rdi)
- +
- + movq (%rsp), %rcx
- + movq %rcx, oRIP(%rdi)
- + leaq 8(%rsp), %rcx /* Exclude the return address. */
- + movq %rcx, oRSP(%rdi)
- +
- + /* We have separate floating-point register content memory on the
- + stack. We use the __fpregs_mem block in the context. Set the
- + links up correctly. */
- + leaq oFPREGSMEM(%rdi), %rcx
- + movq %rcx, oFPREGS(%rdi)
- + /* Save the floating-point environment. */
- + fnstenv (%rcx)
- + stmxcsr oMXCSR(%rdi)
- +
- +
- + /* The syscall destroys some registers, save them. */
- + movq %rsi, %r12
- +
- + /* Save the current signal mask and install the new one with
- + rt_sigprocmask (SIG_BLOCK, newset, oldset,_NSIG/8). */
- + leaq oSIGMASK(%rdi), %rdx
- + leaq oSIGMASK(%rsi), %rsi
- + movl $SIG_SETMASK, %edi
- + movl $_NSIG8,%r10d
- + movl $__NR_rt_sigprocmask, %eax
- + syscall
- + cmpq $-4095, %rax /* Check %rax for error. */
- + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
- +
- + /* Restore destroyed registers. */
- + movq %r12, %rsi
- +
- + /* Restore the floating-point context. Not the registers, only the
- + rest. */
- + movq oFPREGS(%rsi), %rcx
- + fldenv (%rcx)
- + ldmxcsr oMXCSR(%rsi)
- +
- + /* Load the new stack pointer and the preserved registers. */
- + movq oRSP(%rsi), %rsp
- + movq oRBX(%rsi), %rbx
- + movq oRBP(%rsi), %rbp
- + movq oR12(%rsi), %r12
- + movq oR13(%rsi), %r13
- + movq oR14(%rsi), %r14
- + movq oR15(%rsi), %r15
- +
- + /* The following ret should return to the address set with
- + getcontext. Therefore push the address on the stack. */
- + movq oRIP(%rsi), %rcx
- + pushq %rcx
- +
- + /* Setup registers used for passing args. */
- + movq oRDI(%rsi), %rdi
- + movq oRDX(%rsi), %rdx
- + movq oRCX(%rsi), %rcx
- + movq oR8(%rsi), %r8
- + movq oR9(%rsi), %r9
- +
- + /* Setup finally %rsi. */
- + movq oRSI(%rsi), %rsi
- +
- + /* Clear rax to indicate success. */
- + xorl %eax, %eax
- +L(pseudo_end):
- + ret
- +PSEUDO_END(__swapcontext)
- +
- +weak_alias (__swapcontext, swapcontext)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/debugreg.h uClibc/libc/sysdeps/linux/x86_64/sys/debugreg.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/debugreg.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/sys/debugreg.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_DEBUGREG_H
- #define _SYS_DEBUGREG_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/io.h uClibc/libc/sysdeps/linux/x86_64/sys/io.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/io.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/sys/io.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IO_H
- #define _SYS_IO_H 1
- @@ -23,6 +22,7 @@
-
- __BEGIN_DECLS
-
- +#if defined __UCLIBC_LINUX_SPECIFIC__
- /* If TURN_ON is TRUE, request for permission to do direct i/o on the
- port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
- permission off for that range. This call requires root privileges.
- @@ -32,12 +32,12 @@
- E.g., Linux/Alpha for Alpha PCs supports this. */
- extern int ioperm (unsigned long int __from, unsigned long int __num,
- int __turn_on) __THROW;
- -libc_hidden_proto(ioperm)
-
- /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
- access any I/O port is granted. This call requires root
- privileges. */
- extern int iopl (int __level) __THROW;
- +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
-
- #if defined __GNUC__ && __GNUC__ >= 2
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/perm.h uClibc/libc/sysdeps/linux/x86_64/sys/perm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/perm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/sys/perm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PERM_H
-
- @@ -26,7 +25,6 @@
- /* Set port input/output permissions. */
- extern int ioperm (unsigned long int __from, unsigned long int __num,
- int __turn_on) __THROW;
- -libc_hidden_proto(ioperm)
-
-
- /* Change I/O privilege level. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/procfs.h uClibc/libc/sysdeps/linux/x86_64/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/reg.h uClibc/libc/sysdeps/linux/x86_64/sys/reg.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/reg.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/sys/reg.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_REG_H
- #define _SYS_REG_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/ucontext.h uClibc/libc/sysdeps/linux/x86_64/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/user.h uClibc/libc/sysdeps/linux/x86_64/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/user.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/syscall.S uClibc/libc/sysdeps/linux/x86_64/syscall.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/syscall.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/syscall.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Please consult the file sysdeps/unix/sysv/linux/x86-64/sysdep.h for
- more information about the value -4095 used below. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sysdep.h uClibc/libc/sysdeps/linux/x86_64/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LINUX_X86_64_SYSDEP_H
- #define _LINUX_X86_64_SYSDEP_H 1
- @@ -183,8 +182,6 @@
- # define PSEUDO_END_ERRVAL(name) \
- END (name)
-
- -# define ret_ERRVAL ret
- -
- # ifndef __PIC__
- # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
- # elif defined(RTLD_PRIVATE_ERRNO)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/ucontext_i.sym uClibc/libc/sysdeps/linux/x86_64/ucontext_i.sym
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/ucontext_i.sym 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/x86_64/ucontext_i.sym 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,37 @@
- +#include <stddef.h>
- +#include <signal.h>
- +#include <sys/ucontext.h>
- +
- +--
- +
- +SIG_BLOCK
- +SIG_SETMASK
- +
- +_NSIG8 (_NSIG / 8)
- +
- +#define ucontext(member) offsetof (ucontext_t, member)
- +#define mcontext(member) ucontext (uc_mcontext.member)
- +#define mreg(reg) mcontext (gregs[REG_##reg])
- +
- +oRBP mreg (RBP)
- +oRSP mreg (RSP)
- +oRBX mreg (RBX)
- +oR8 mreg (R8)
- +oR9 mreg (R9)
- +oR10 mreg (R10)
- +oR11 mreg (R11)
- +oR12 mreg (R12)
- +oR13 mreg (R13)
- +oR14 mreg (R14)
- +oR15 mreg (R15)
- +oRDI mreg (RDI)
- +oRSI mreg (RSI)
- +oRDX mreg (RDX)
- +oRAX mreg (RAX)
- +oRCX mreg (RCX)
- +oRIP mreg (RIP)
- +oEFL mreg (EFL)
- +oFPREGS mcontext (fpregs)
- +oSIGMASK ucontext (uc_sigmask)
- +oFPREGSMEM ucontext (__fpregs_mem)
- +oMXCSR ucontext (__fpregs_mem.mxcsr)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/vfork.S uClibc/libc/sysdeps/linux/x86_64/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/x86_64/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/syscall.h>
-
- @@ -63,4 +62,4 @@
- .size __vfork,.-__vfork
-
- weak_alias(__vfork,vfork)
- -libc_hidden_weak(vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/atomic.h uClibc/libc/sysdeps/linux/xtensa/bits/atomic.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/atomic.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/atomic.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,232 @@
- +/* Copyright (C) 2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#ifndef _BITS_ATOMIC_H
- +#define _BITS_ATOMIC_H 1
- +
- +#include <inttypes.h>
- +
- +typedef int32_t atomic32_t;
- +typedef uint32_t uatomic32_t;
- +typedef int_fast32_t atomic_fast32_t;
- +typedef uint_fast32_t uatomic_fast32_t;
- +
- +typedef int64_t atomic64_t;
- +typedef uint64_t uatomic64_t;
- +typedef int_fast64_t atomic_fast64_t;
- +typedef uint_fast64_t uatomic_fast64_t;
- +
- +typedef intptr_t atomicptr_t;
- +typedef uintptr_t uatomicptr_t;
- +typedef intmax_t atomic_max_t;
- +typedef uintmax_t uatomic_max_t;
- +
- +
- +/* Xtensa has only a 32-bit form of a store-conditional instruction. */
- +
- +#define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \
- + (abort (), 0)
- +
- +#define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \
- + (abort (), 0)
- +
- +#define __arch_compare_and_exchange_bool_8_rel(mem, newval, oldval) \
- + (abort (), 0)
- +
- +#define __arch_compare_and_exchange_bool_16_rel(mem, newval, oldval) \
- + (abort (), 0)
- +
- +/* Atomically store NEWVAL in *MEM if *MEM is equal to OLDVAL.
- + Return the old *MEM value. */
- +
- +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- + ({__typeof__(*(mem)) __tmp, __value; \
- + __asm__ __volatile__( \
- + "1: l32i %1, %2, 0 \n" \
- + " bne %1, %4, 2f \n" \
- + " wsr %1, SCOMPARE1 \n" \
- + " mov %0, %1 \n" \
- + " mov %1, %3 \n" \
- + " s32c1i %1, %2, 0 \n" \
- + " bne %0, %1, 1b \n" \
- + "2: \n" \
- + : "=&a" (__value), "=&a" (__tmp) \
- + : "a" (mem), "a" (newval), "a" (oldval) \
- + : "memory" ); \
- + __tmp; \
- + })
- +
- +/* Atomically store NEWVAL in *MEM if *MEM is equal to OLDVAL.
- + Return zero if *MEM was changed or non-zero if no exchange happened. */
- +
- +#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
- + ({__typeof__(*(mem)) __tmp, __value; \
- + __asm__ __volatile__( \
- + "1: l32i %0, %2, 0 \n" \
- + " sub %1, %4, %0 \n" \
- + " bnez %1, 2f \n" \
- + " wsr %0, SCOMPARE1 \n" \
- + " mov %1, %3 \n" \
- + " s32c1i %1, %2, 0 \n" \
- + " bne %0, %1, 1b \n" \
- + " movi %1, 0 \n" \
- + "2: \n" \
- + : "=&a" (__value), "=&a" (__tmp) \
- + : "a" (mem), "a" (newval), "a" (oldval) \
- + : "memory" ); \
- + __tmp != 0; \
- + })
- +
- +/* Store NEWVALUE in *MEM and return the old value. */
- +
- +#define __arch_exchange_32_acq(mem, newval) \
- + ({__typeof__(*(mem)) __tmp, __value; \
- + __asm__ __volatile__( \
- + "1: l32i %0, %2, 0 \n" \
- + " wsr %0, SCOMPARE1 \n" \
- + " mov %1, %3 \n" \
- + " s32c1i %1, %2, 0 \n" \
- + " bne %0, %1, 1b \n" \
- + : "=&a" (__value), "=&a" (__tmp) \
- + : "a" (mem), "a" (newval) \
- + : "memory" ); \
- + __tmp; \
- + })
- +
- +/* Add VALUE to *MEM and return the old value of *MEM. */
- +
- +#define __arch_atomic_exchange_and_add_32(mem, value) \
- + ({__typeof__(*(mem)) __tmp, __value; \
- + __asm__ __volatile__( \
- + "1: l32i %0, %2, 0 \n" \
- + " wsr %0, SCOMPARE1 \n" \
- + " add %1, %0, %3 \n" \
- + " s32c1i %1, %2, 0 \n" \
- + " bne %0, %1, 1b \n" \
- + : "=&a" (__value), "=&a" (__tmp) \
- + : "a" (mem), "a" (value) \
- + : "memory" ); \
- + __tmp; \
- + })
- +
- +/* Subtract VALUE from *MEM and return the old value of *MEM. */
- +
- +#define __arch_atomic_exchange_and_sub_32(mem, value) \
- + ({__typeof__(*(mem)) __tmp, __value; \
- + __asm__ __volatile__( \
- + "1: l32i %0, %2, 0 \n" \
- + " wsr %0, SCOMPARE1 \n" \
- + " sub %1, %0, %3 \n" \
- + " s32c1i %1, %2, 0 \n" \
- + " bne %0, %1, 1b \n" \
- + : "=&a" (__value), "=&a" (__tmp) \
- + : "a" (mem), "a" (value) \
- + : "memory" ); \
- + __tmp; \
- + })
- +
- +/* Decrement *MEM if it is > 0, and return the old value. */
- +
- +#define __arch_atomic_decrement_if_positive_32(mem) \
- + ({__typeof__(*(mem)) __tmp, __value; \
- + __asm__ __volatile__( \
- + "1: l32i %0, %2, 0 \n" \
- + " blti %0, 1, 2f \n" \
- + " wsr %0, SCOMPARE1 \n" \
- + " addi %1, %0, -1 \n" \
- + " s32c1i %1, %2, 0 \n" \
- + " bne %0, %1, 1b \n" \
- + "2: \n" \
- + : "=&a" (__value), "=&a" (__tmp) \
- + : "a" (mem) \
- + : "memory" ); \
- + __value; \
- + })
- +
- +
- +/* These are the preferred public interfaces: */
- +
- +#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
- + ({ \
- + if (sizeof (*mem) != 4) \
- + abort(); \
- + __arch_compare_and_exchange_val_32_acq(mem, newval, oldval); \
- + })
- +
- +#define atomic_exchange_acq(mem, newval) \
- + ({ \
- + if (sizeof(*(mem)) != 4) \
- + abort(); \
- + __arch_exchange_32_acq(mem, newval); \
- + })
- +
- +#define atomic_exchange_and_add(mem, newval) \
- + ({ \
- + if (sizeof(*(mem)) != 4) \
- + abort(); \
- + __arch_atomic_exchange_and_add_32(mem, newval); \
- + })
- +
- +#define atomic_exchange_and_sub(mem, newval) \
- + ({ \
- + if (sizeof(*(mem)) != 4) \
- + abort(); \
- + __arch_atomic_exchange_and_sub_32(mem, newval); \
- + })
- +
- +#define atomic_decrement_if_positive(mem) \
- + ({ \
- + if (sizeof(*(mem)) != 4) \
- + abort(); \
- + __arch_atomic_decrement_if_positive_32(mem); \
- + })
- +
- +
- +# define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
- + (abort (), 0)
- +
- +# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
- + (abort (), (__typeof (*mem)) 0)
- +
- +# define __arch_compare_and_exchange_bool_64_rel(mem, newval, oldval) \
- + (abort (), 0)
- +
- +# define __arch_compare_and_exchange_val_64_rel(mem, newval, oldval) \
- + (abort (), (__typeof (*mem)) 0)
- +
- +# define __arch_atomic_exchange_64_acq(mem, value) \
- + ({ abort (); (*mem) = (value); })
- +
- +# define __arch_atomic_exchange_64_rel(mem, value) \
- + ({ abort (); (*mem) = (value); })
- +
- +# define __arch_atomic_exchange_and_add_64(mem, value) \
- + ({ abort (); (*mem) = (value); })
- +
- +# define __arch_atomic_increment_val_64(mem) \
- + ({ abort (); (*mem)++; })
- +
- +# define __arch_atomic_decrement_val_64(mem) \
- + ({ abort (); (*mem)--; })
- +
- +# define __arch_atomic_decrement_if_positive_64(mem) \
- + ({ abort (); (*mem)--; })
- +
- +
- +
- +#endif /* _BITS_ATOMIC_H */
- +
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/fcntl.h uClibc/libc/sysdeps/linux/xtensa/bits/fcntl.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/fcntl.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FCNTL_H
- # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/ipc.h uClibc/libc/sysdeps/linux/xtensa/bits/ipc.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/ipc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_IPC_H
- # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/kernel_types.h uClibc/libc/sysdeps/linux/xtensa/bits/kernel_types.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/kernel_types.h 2014-02-03 12:32:56.000000000 +0100
- @@ -33,6 +33,8 @@
- typedef unsigned short __kernel_old_uid_t;
- typedef unsigned short __kernel_old_gid_t;
- typedef unsigned short __kernel_old_dev_t;
- +typedef long __kernel_long_t;
- +typedef unsigned long __kernel_ulong_t;
- typedef long long __kernel_loff_t;
-
- /* Beginning in 2.6 kernels, which is the first version that includes the
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/mathdef.h uClibc/libc/sysdeps/linux/xtensa/bits/mathdef.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/mathdef.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if !defined _MATH_H && !defined _COMPLEX_H
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/mman.h uClibc/libc/sysdeps/linux/xtensa/bits/mman.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/mman.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MMAN_H
- # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
- @@ -64,7 +63,7 @@
- # define MAP_NORESERVE 0x0400 /* Don't check for reservations. */
- # define MAP_POPULATE 0x10000 /* Populate (prefault) pagetables. */
- # define MAP_NONBLOCK 0x20000 /* Do not block on IO. */
- -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
- +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
- be uninitialized. */
- #endif
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/msq.h uClibc/libc/sysdeps/linux/xtensa/bits/msq.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/msq.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_MSG_H
- # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/setjmp.h uClibc/libc/sysdeps/linux/xtensa/bits/setjmp.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/setjmp.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Define the machine-dependent type `jmp_buf'. Xtensa version. */
- #ifndef _BITS_SETJMP_H
- @@ -30,17 +29,6 @@
- subsequent alloca in proc moves $sp), and the return address within
- proc. Everything else is saved on the stack in the normal save areas. */
-
- -#ifndef _ASM
- typedef int __jmp_buf[17];
- -#endif
- -
- -#define JB_SP 1
- -#define JB_PC 16
- -
- -/* Test if longjmp to JMPBUF would unwind the frame containing a local
- - variable at ADDRESS. */
- -
- -#define _JMPBUF_UNWINDS(jmpbuf, address) \
- - ((void *) (address) < (void *) (jmpbuf)[JB_SP])
-
- #endif /* bits/setjmp.h */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/shm.h uClibc/libc/sysdeps/linux/xtensa/bits/shm.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/shm.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_SHM_H
- # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/sigcontext.h uClibc/libc/sysdeps/linux/xtensa/bits/sigcontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/sigcontext.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/sigcontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,40 @@
- +/* Copyright (C) 2012 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
- +# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
- +#endif
- +
- +#ifndef _BITS_SIGCONTEXT_H
- +#define _BITS_SIGCONTEXT_H 1
- +
- +struct sigcontext
- +{
- + unsigned long sc_pc;
- + unsigned long sc_ps;
- + unsigned long sc_lbeg;
- + unsigned long sc_lend;
- + unsigned long sc_lcount;
- + unsigned long sc_sar;
- + unsigned long sc_acclo;
- + unsigned long sc_acchi;
- + unsigned long sc_a[16];
- + void *sc_xtregs;
- +};
- +
- +#endif /* _BITS_SIGCONTEXT_H */
- +
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/sigcontextinfo.h uClibc/libc/sysdeps/linux/xtensa/bits/sigcontextinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/sigcontextinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Also see register-dump.h, where we spill live registers to the
- stack so that we can trace the stack backward. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/stackinfo.h uClibc/libc/sysdeps/linux/xtensa/bits/stackinfo.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/stackinfo.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file contains a bit of information about the stack allocation
- of the processor. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/stat.h uClibc/libc/sysdeps/linux/xtensa/bits/stat.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/stat.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h uClibc/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- /* can your target use syscall6() for mmap ? */
- #define __UCLIBC_MMAP_HAS_6_ARGS__
-
- -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
- -#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
- +/* does your target align 64bit values in register pairs ? (32bit arches only) */
- +#define __UCLIBC_SYSCALL_ALIGN_64BIT__
-
- /* does your target have a broken create_module() ? */
- #undef __UCLIBC_BROKEN_CREATE_MODULE__
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/uClibc_page.h uClibc/libc/sysdeps/linux/xtensa/bits/uClibc_page.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/uClibc_page.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,31 +0,0 @@
- -/* Copyright (C) 2004 Erik Andersen
- - *
- - * This library is free software; you can redistribute it and/or
- - * modify it under the terms of the GNU Lesser General Public
- - * License as published by the Free Software Foundation; either
- - * version 2.1 of the License, or (at your option) any later version.
- - *
- - * The GNU C Library is distributed in the hope that it will be useful,
- - * but WITHOUT ANY WARRANTY; without even the implied warranty of
- - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - * Lesser General Public License for more details.
- - *
- - * You should have received a copy of the GNU Lesser General Public
- - * License along with the GNU C Library; if not, write to the Free
- - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - * 02111-1307 USA.
- - */
- -
- -/* Supply an architecture specific value for PAGE_SIZE and friends. */
- -
- -#ifndef _UCLIBC_PAGE_H
- -#define _UCLIBC_PAGE_H
- -
- -#include <bits/xtensa-config.h>
- -
- -/* PAGE_SHIFT determines the page size -- in this case 4096 */
- -#define PAGE_SHIFT XCHAL_MMU_MIN_PTE_PAGE_SIZE
- -#define PAGE_SIZE (1UL << PAGE_SHIFT)
- -#define PAGE_MASK (~(PAGE_SIZE-1))
- -
- -#endif /* _UCLIBC_PAGE_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/wordsize.h uClibc/libc/sysdeps/linux/xtensa/bits/wordsize.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/wordsize.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __WORDSIZE 32
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/xtensa-config.h uClibc/libc/sysdeps/linux/xtensa/bits/xtensa-config.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/xtensa-config.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/bits/xtensa-config.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef XTENSA_CONFIG_H
- #define XTENSA_CONFIG_H
- @@ -44,10 +43,4 @@
- #undef XCHAL_NUM_AREGS
- #define XCHAL_NUM_AREGS 64
-
- -/* Set a default page size. This is currently needed when bootstrapping
- - the runtime linker. See comments in dl-machine.h where this is used. */
- -
- -#undef XCHAL_MMU_MIN_PTE_PAGE_SIZE
- -#define XCHAL_MMU_MIN_PTE_PAGE_SIZE 12
- -
- #endif /* !XTENSA_CONFIG_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/brk.c uClibc/libc/sysdeps/linux/xtensa/brk.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/brk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/brk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/clone.S uClibc/libc/sysdeps/linux/xtensa/clone.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/clone.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/clone.S 2014-02-03 12:32:56.000000000 +0100
- @@ -11,9 +11,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* clone is even more special than fork as it mucks with stacks
- and invokes a function in the right context after it's all over. */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/crt1.S uClibc/libc/sysdeps/linux/xtensa/crt1.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/crt1.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/crt1.S 2014-02-03 12:32:56.000000000 +0100
- @@ -30,9 +30,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/fork.c uClibc/libc/sysdeps/linux/xtensa/fork.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/fork.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,19 +7,19 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <unistd.h>
- -#include <sys/syscall.h>
- -#define _SIGNAL_H
- -#include <bits/signum.h>
-
- /* Xtensa doesn't provide a 'fork' system call, so we use 'clone'. */
- +#include <sys/syscall.h>
-
- -extern __typeof(fork) __libc_fork;
- +#if defined __NR_clone && defined __ARCH_USE_MMU__
- +# include <unistd.h>
- +# include <signal.h>
- +# include <cancel.h>
-
- -libc_hidden_proto(fork)
- -pid_t __libc_fork(void)
- +pid_t fork(void)
- {
- return (pid_t) INLINE_SYSCALL(clone, 2, SIGCHLD, 0);
- }
- -weak_alias(__libc_fork, fork)
- -libc_hidden_weak(fork)
- +lt_strong_alias(fork)
- +lt_libc_hidden(fork)
- +#endif
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/jmpbuf-offsets.h uClibc/libc/sysdeps/linux/xtensa/jmpbuf-offsets.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/xtensa/jmpbuf-offsets.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,20 @@
- +/* Private macros for accessing __jmp_buf contents. Xtensa version.
- + Copyright (C) 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#define JB_SP 1
- +#define JB_PC 16
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/jmpbuf-unwind.h uClibc/libc/sysdeps/linux/xtensa/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/xtensa/jmpbuf-unwind.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,25 @@
- +/* Copyright (C) 1997, 1998, 2007 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +/* Test if longjmp to JMPBUF would unwind the frame containing a local
- + variable at ADDRESS. */
- +
- +#include <setjmp.h>
- +#include <jmpbuf-offsets.h>
- +
- +#define _JMPBUF_UNWINDS(jmpbuf, address) \
- + ((void *) (address) < (void *) (jmpbuf)[JB_SP])
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/__longjmp.S uClibc/libc/sysdeps/linux/xtensa/__longjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/__longjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This implementation relies heavily on the Xtensa register window
- mechanism. Setjmp flushes all the windows except its own to the
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/Makefile.arch uClibc/libc/sysdeps/linux/xtensa/Makefile.arch
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -5,11 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- -CSRC := brk.c fork.c pread_write.c sigaction.c __syscall_error.c
- +CSRC-y := brk.c fork.c sigaction.c __syscall_error.c
-
- -ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
- - CSRC += posix_fadvise.c posix_fadvise64.c
- -endif
- -
- -SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S \
- +SSRC-y := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S \
- sigrestorer.S syscall.S mmap.S windowspill.S __longjmp.S vfork.S
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/mmap.S uClibc/libc/sysdeps/linux/xtensa/mmap.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/mmap.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/mmap.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "sysdep.h"
- #include <sys/syscall.h>
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/posix_fadvise64.c uClibc/libc/sysdeps/linux/xtensa/posix_fadvise64.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/posix_fadvise64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,39 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * posix_fadvise64() for Xtensa uClibc
- - *
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - * Copyright (C) 2007 Tensilica Inc.
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <features.h>
- -#include <unistd.h>
- -#include <errno.h>
- -#include <endian.h>
- -#include <stdint.h>
- -#include <sys/types.h>
- -#include <sys/syscall.h>
- -#include <fcntl.h>
- -
- -#ifdef __UCLIBC_HAS_LFS__
- -
- -int posix_fadvise64 (int fd, __off64_t offset, __off64_t len, int advice)
- -{
- -#ifdef __NR_fadvise64_64
- - INTERNAL_SYSCALL_DECL (err);
- - int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advice,
- - __LONG_LONG_PAIR ((long) (offset >> 32),
- - (long) offset),
- - __LONG_LONG_PAIR ((long) (len >> 32),
- - (long) len));
- - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
- - return 0;
- - return INTERNAL_SYSCALL_ERRNO (ret, err);
- -#else
- - return ENOSYS;
- -#endif
- -}
- -
- -#endif /* __UCLIBC_HAS_LFS__ */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/posix_fadvise.c uClibc/libc/sysdeps/linux/xtensa/posix_fadvise.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/posix_fadvise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,29 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * posix_fadvise() for Xtensa uClibc
- - *
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - * Copyright (C) 2007 Tensilica Inc.
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -
- -#include <sys/syscall.h>
- -#include <fcntl.h>
- -
- -int posix_fadvise (int fd, off_t offset, off_t len, int advice)
- -{
- -#ifdef __NR_fadvise64_64
- - INTERNAL_SYSCALL_DECL (err);
- - int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advice,
- - __LONG_LONG_PAIR ((long) (offset >> 31),
- - (long) offset),
- - __LONG_LONG_PAIR ((long) (len >> 31),
- - (long) len));
- - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
- - return 0;
- - return INTERNAL_SYSCALL_ERRNO (ret, err);
- -#else
- - return ENOSYS;
- -#endif
- -}
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/pread_write.c uClibc/libc/sysdeps/linux/xtensa/pread_write.c
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/pread_write.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/pread_write.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,189 +0,0 @@
- -/* vi: set sw=4 ts=4: */
- -/*
- - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- - *
- - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- - */
- -/*
- - * Based in part on the files
- - * ./sysdeps/unix/sysv/linux/pwrite.c,
- - * ./sysdeps/unix/sysv/linux/pread.c,
- - * sysdeps/posix/pread.c
- - * sysdeps/posix/pwrite.c
- - * from GNU libc 2.2.5, but reworked considerably...
- - */
- -
- -#include <sys/syscall.h>
- -#include <unistd.h>
- -#include <stdint.h>
- -#include <endian.h>
- -
- -extern __typeof(pread) __libc_pread;
- -extern __typeof(pwrite) __libc_pwrite;
- -#ifdef __UCLIBC_HAS_LFS__
- -extern __typeof(pread64) __libc_pread64;
- -extern __typeof(pwrite64) __libc_pwrite64;
- -#endif
- -
- -#include <bits/kernel_types.h>
- -
- -#ifdef __NR_pread
- -
- -# define __NR___syscall_pread __NR_pread
- -/* On Xtensa, 64-bit values are aligned in even/odd register pairs. */
- -static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
- - size_t, count, int, pad, off_t, offset_hi, off_t, offset_lo)
- -
- -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
- -{
- - return __syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 31, offset));
- -}
- -weak_alias(__libc_pread,pread)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
- -{
- - uint32_t low = offset & 0xffffffff;
- - uint32_t high = offset >> 32;
- - return __syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR(high, low));
- -}
- -weak_alias(__libc_pread64,pread64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -
- -#endif /* __NR_pread */
- -
- -#ifdef __NR_pwrite
- -
- -# define __NR___syscall_pwrite __NR_pwrite
- -/* On Xtensa, 64-bit values are aligned in even/odd register pairs. */
- -static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- - size_t, count, int, pad, off_t, offset_hi, off_t, offset_lo)
- -
- -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
- -{
- - return __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 31, offset));
- -}
- -weak_alias(__libc_pwrite,pwrite)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
- -{
- - uint32_t low = offset & 0xffffffff;
- - uint32_t high = offset >> 32;
- - return __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(high, low));
- -}
- -weak_alias(__libc_pwrite64,pwrite64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* __NR_pwrite */
- -
- -#if ! defined __NR_pread || ! defined __NR_pwrite
- -
- -static ssize_t __fake_pread_write(int fd, void *buf,
- - size_t count, off_t offset, int do_pwrite)
- -{
- - int save_errno;
- - ssize_t result;
- - off_t old_offset;
- -
- - /* Since we must not change the file pointer preserve the
- - * value so that we can restore it later. */
- - if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
- - return -1;
- -
- - /* Set to wanted position. */
- - if (lseek(fd, offset, SEEK_SET) == (off_t) -1)
- - return -1;
- -
- - if (do_pwrite == 1) {
- - /* Write the data. */
- - result = write(fd, buf, count);
- - } else {
- - /* Read the data. */
- - result = read(fd, buf, count);
- - }
- -
- - /* Now we have to restore the position. If this fails we
- - * have to return this as an error. */
- - save_errno = errno;
- - if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
- - {
- - if (result == -1)
- - __set_errno(save_errno);
- - return -1;
- - }
- - __set_errno(save_errno);
- - return(result);
- -}
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -
- -static ssize_t __fake_pread_write64(int fd, void *buf,
- - size_t count, off64_t offset, int do_pwrite)
- -{
- - int save_errno;
- - ssize_t result;
- - off64_t old_offset;
- -
- - /* Since we must not change the file pointer preserve the
- - * value so that we can restore it later. */
- - if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
- - return -1;
- -
- - /* Set to wanted position. */
- - if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
- - return -1;
- -
- - if (do_pwrite == 1) {
- - /* Write the data. */
- - result = write(fd, buf, count);
- - } else {
- - /* Read the data. */
- - result = read(fd, buf, count);
- - }
- -
- - /* Now we have to restore the position. */
- - save_errno = errno;
- - if (lseek64(fd, old_offset, SEEK_SET) == (off64_t) -1) {
- - if (result == -1)
- - __set_errno (save_errno);
- - return -1;
- - }
- - __set_errno (save_errno);
- - return result;
- -}
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
- -
- -#ifndef __NR_pread
- -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
- -{
- - return __fake_pread_write(fd, buf, count, offset, 0);
- -}
- -weak_alias(__libc_pread,pread)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
- -{
- - return __fake_pread_write64(fd, buf, count, offset, 0);
- -}
- -weak_alias(__libc_pread64,pread64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* ! __NR_pread */
- -
- -#ifndef __NR_pwrite
- -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
- -{
- - /* we won't actually be modifying the buffer,
- - *just cast it to get rid of warnings */
- - return __fake_pread_write(fd, (void*)buf, count, offset, 1);
- -}
- -weak_alias(__libc_pwrite,pwrite)
- -
- -# ifdef __UCLIBC_HAS_LFS__
- -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
- -{
- - return __fake_pread_write64(fd, (void*)buf, count, offset, 1);
- -}
- -weak_alias(__libc_pwrite64,pwrite64)
- -# endif /* __UCLIBC_HAS_LFS__ */
- -#endif /* ! __NR_pwrite */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/setjmp.S uClibc/libc/sysdeps/linux/xtensa/setjmp.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/setjmp.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/setjmp.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This implementation relies heavily on the Xtensa register window
- mechanism. Setjmp flushes all the windows except its own to the
- @@ -25,24 +24,52 @@
- then sets things up so that it will return to the right place,
- using a window underflow to automatically restore the registers.
-
- - Note that it would probably be sufficient to only copy the
- - registers from setjmp's caller into jmp_buf. However, we also copy
- - the save area located at the stack pointer of setjmp's caller.
- - This save area will typically remain intact until the longjmp call.
- - The one exception is when there is an intervening alloca in
- - setjmp's caller. This is certainly an unusual situation and is
- - likely to cause problems in any case (the storage allocated on the
- - stack cannot be safely accessed following the longjmp). As bad as
- - it is, on most systems this situation would not necessarily lead to
- - a catastrophic failure. If we did not preserve the extra save area
- - on Xtensa, however, it would. When setjmp's caller returns after a
- - longjmp, there will be a window underflow; an invalid return
- - address or stack pointer in the save area will almost certainly
- - lead to a crash. Keeping a copy of the extra save area in the
- - jmp_buf avoids this with only a small additional cost. If setjmp
- - and longjmp are ever time-critical, this could be removed. */
- + Note that we also save the area located just below the stack pointer
- + of the caller. This save area could get overwritten by alloca
- + following the call to setjmp. The alloca moves the stack pointer
- + to allocate memory on the stack. This newly allocated memory
- + includes(!) the original save area (alloca copies the save area
- + before it moves that stack pointer).
- +
- +
- + previous caller SP -> |------------------------------| <-----+
- + | caller-2 registers a0-a3 | | p
- + |------------------------------| | o
- + | caller registers a4-a8/a12 | | i
- + |------------------------------| | n
- + | caller local stack | | t
- + caller SP -> |------------------------------| <-+ | s
- + | caller-1 registers a0-a3 | -:---+
- + callee (setjmp) SP -> |==============================| |
- + | caller registers a0-a3 | --+
- + |------------------------------|
- +
- + In case of an alloca, registers a0-a3 of the previous caller (caller-1)
- + are copied (*), and the original location get likely overwritten.
- +
- + previous caller SP -> |------------------------------| <-----+
- + | caller-2 registers a0-a3 | | p
- + |------------------------------| | o
- + | caller registers a4-a8/a12 | | i
- + |------------------------------| | n
- + | caller local stack | | t
- + caller SP before alloca-> |------------------------------| | s
- + | alloca area (overwrites old | |
- + | copy of caller-1 registers) | |
- + caller SP after alloca -> |------------------------------| <-+ |
- + | caller-1 registers a0-a3 (*) | -:---+
- + callee (setjmp) SP -> |==============================| |
- + | caller registers a0-a3 | --+
- + |------------------------------|
- +
- + So, when longcall returns to the original caller SP, it also needs
- + to restore the save area below the SP.
- +
- + */
-
- #include "sysdep.h"
- +
- +/* NOTE: The ENTRY macro must allocate exactly 16 bytes (entry a1, 16) */
-
- /* int setjmp (a2 = jmp_buf env) */
-
- @@ -57,8 +84,7 @@
- j 1f
- END (setjmp)
-
- -/* int __sigsetjmp (a2 = jmp_buf env,
- - a3 = int savemask) */
- +/* int __sigsetjmp (a2 = jmp_buf env, a3 = int savemask) */
-
- ENTRY (__sigsetjmp)
- 1:
- @@ -66,61 +92,56 @@
- movi a4, __window_spill
- callx4 a4
-
- - /* Preserve the second argument (savemask) in a15. The selection
- - of a15 is arbitrary, except it's otherwise unused. There is no
- - risk of triggering a window overflow since we just returned
- - from __window_spill(). */
- - mov a15, a3
- -
- - /* Copy the register save area at (sp - 16). */
- - addi a5, a1, -16
- - l32i a3, a5, 0
- - l32i a4, a5, 4
- - s32i a3, a2, 0
- - s32i a4, a2, 4
- - l32i a3, a5, 8
- - l32i a4, a5, 12
- - s32i a3, a2, 8
- - s32i a4, a2, 12
- -
- - /* Copy 0-8 words from the register overflow area. */
- - extui a3, a0, 30, 2
- - blti a3, 2, .Lendsj
- - l32i a7, a1, 4
- - slli a4, a3, 4
- - sub a5, a7, a4
- - addi a6, a2, 16
- - addi a7, a7, -16 /* a7 = end of register overflow area */
- + /* Copy the caller register a0-a3 at (sp - 16) to jmpbuf. */
- + addi a7, a1, -16
- + l32i a4, a7, 0
- + l32i a5, a7, 4
- + s32i a4, a2, 0
- + s32i a5, a2, 4
- + l32i a4, a7, 8
- + l32i a5, a7, 12
- + s32i a4, a2, 8
- + s32i a5, a2, 12
- +
- + /* Copy the caller registers a4-a8/a12 from the overflow area. */
- + /* Note that entry moved the SP by 16B, so SP of caller-1 is at 4(sp) */
- + extui a7, a0, 30, 2
- + blti a7, 2, .Lendsj
- + l32i a8, a1, 4 /* a8: SP of 'caller-1' */
- + slli a4, a7, 4
- + sub a6, a8, a4
- + addi a5, a2, 16
- + addi a8, a8, -16 /* a8: end of register overflow area */
- .Lsjloop:
- - l32i a3, a5, 0
- - l32i a4, a5, 4
- - s32i a3, a6, 0
- - s32i a4, a6, 4
- - l32i a3, a5, 8
- - l32i a4, a5, 12
- - s32i a3, a6, 8
- - s32i a4, a6, 12
- - addi a5, a5, 16
- + l32i a7, a6, 0
- + l32i a4, a6, 4
- + s32i a7, a5, 0
- + s32i a4, a5, 4
- + l32i a7, a6, 8
- + l32i a4, a6, 12
- + s32i a7, a5, 8
- + s32i a4, a5, 12
- + addi a5, a6, 16
- addi a6, a6, 16
- - blt a5, a7, .Lsjloop
- + blt a6, a8, .Lsjloop
- .Lendsj:
-
- - /* Copy the register save area at sp. */
- - l32i a3, a1, 0
- - l32i a4, a1, 4
- - s32i a3, a2, 48
- - s32i a4, a2, 52
- - l32i a3, a1, 8
- - l32i a4, a1, 12
- - s32i a3, a2, 56
- - s32i a4, a2, 60
- + /* Copy previous caller registers (this is assuming 'entry a1,16') */
- + l32i a4, a1, 0
- + l32i a5, a1, 4
- + s32i a4, a2, 48
- + s32i a5, a2, 52
- + l32i a4, a1, 8
- + l32i a5, a1, 12
- + s32i a4, a2, 56
- + s32i a5, a2, 60
-
- /* Save the return address, including the window size bits. */
- s32i a0, a2, 64
-
- - /* a2 still addresses jmp_buf. a15 contains savemask. */
- + /* a2 still points to jmp_buf. a3 contains savemask. */
- mov a6, a2
- - mov a7, a15
- + mov a7, a3
- movi a3, __sigjmp_save
- callx4 a3
- mov a2, a6
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/procfs.h uClibc/libc/sysdeps/linux/xtensa/sys/procfs.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/sys/procfs.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_PROCFS_H
- #define _SYS_PROCFS_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/ptrace.h uClibc/libc/sysdeps/linux/xtensa/sys/ptrace.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/sys/ptrace.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,156 +0,0 @@
- -/* `ptrace' debugger support interface. Linux version.
- - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007
- - Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- -
- -#ifndef _SYS_PTRACE_H
- -#define _SYS_PTRACE_H 1
- -
- -#include <features.h>
- -
- -/* Kludge away careless namespace pollution from the kernel. */
- -
- -#undef PTRACE_GETREGS
- -#undef PTRACE_SETREGS
- -#undef PTRACE_GETFPREGS
- -#undef PTRACE_SETFPREGS
- -#undef PTRACE_GETFPREGSIZE
- -
- -
- -__BEGIN_DECLS
- -
- -/* Type of the REQUEST argument to `ptrace.' */
- -enum __ptrace_request
- -{
- - /* Indicate that the process making this request should be traced.
- - All signals received by this process can be intercepted by its
- - parent, and its parent can use the other `ptrace' requests. */
- - PTRACE_TRACEME = 0,
- -#define PT_TRACE_ME PTRACE_TRACEME
- -
- - /* Return the word in the process's text space at address ADDR. */
- - PTRACE_PEEKTEXT = 1,
- -#define PT_READ_I PTRACE_PEEKTEXT
- -
- - /* Return the word in the process's data space at address ADDR. */
- - PTRACE_PEEKDATA = 2,
- -#define PT_READ_D PTRACE_PEEKDATA
- -
- - /* Return the word in the process's user area at offset ADDR. */
- - PTRACE_PEEKUSER = 3,
- -#define PT_READ_U PTRACE_PEEKUSER
- -
- - /* Write the word DATA into the process's text space at address ADDR. */
- - PTRACE_POKETEXT = 4,
- -#define PT_WRITE_I PTRACE_POKETEXT
- -
- - /* Write the word DATA into the process's data space at address ADDR. */
- - PTRACE_POKEDATA = 5,
- -#define PT_WRITE_D PTRACE_POKEDATA
- -
- - /* Write the word DATA into the process's user area at offset ADDR. */
- - PTRACE_POKEUSER = 6,
- -#define PT_WRITE_U PTRACE_POKEUSER
- -
- - /* Continue the process. */
- - PTRACE_CONT = 7,
- -#define PT_CONTINUE PTRACE_CONT
- -
- - /* Kill the process. */
- - PTRACE_KILL = 8,
- -#define PT_KILL PTRACE_KILL
- -
- - /* Single step the process.
- - This is not supported on all machines. */
- - PTRACE_SINGLESTEP = 9,
- -#define PT_STEP PTRACE_SINGLESTEP
- -
- - /* Get all general purpose registers used by a processes.
- - This is not supported on all machines. */
- - PTRACE_GETREGS = 12,
- -#define PT_GETREGS PTRACE_GETREGS
- -
- - /* Set all general purpose registers used by a processes.
- - This is not supported on all machines. */
- - PTRACE_SETREGS = 13,
- -#define PT_SETREGS PTRACE_SETREGS
- -
- - /* Get all floating point registers used by a processes.
- - This is not supported on all machines. */
- - PTRACE_GETFPREGS = 14,
- -#define PT_GETFPREGS PTRACE_GETFPREGS
- -
- - /* Set all floating point registers used by a processes.
- - This is not supported on all machines. */
- - PTRACE_SETFPREGS = 15,
- -#define PT_SETFPREGS PTRACE_SETFPREGS
- -
- - /* Attach to a process that is already running. */
- - PTRACE_ATTACH = 16,
- -#define PT_ATTACH PTRACE_ATTACH
- -
- - /* Detach from a process attached to with PTRACE_ATTACH. */
- - PTRACE_DETACH = 17,
- -#define PT_DETACH PTRACE_DETACH
- -
- - /* Get size required for the buffer holding the floating point registers.
- - This is not supported on all machines. */
- - PTRACE_GETFPREGSIZE = 18,
- -#define PT_GETFPREGSIZE PTRACE_GETFPREGSIZE
- -
- - /* Continue and stop at the next (return from) syscall. */
- - PTRACE_SYSCALL = 24
- -#define PT_SYSCALL PTRACE_SYSCALL
- -};
- -
- -/* Options set using PTRACE_SETOPTIONS. */
- -enum __ptrace_setoptions {
- - PTRACE_O_TRACESYSGOOD = 0x00000001,
- - PTRACE_O_TRACEFORK = 0x00000002,
- - PTRACE_O_TRACEVFORK = 0x00000004,
- - PTRACE_O_TRACECLONE = 0x00000008,
- - PTRACE_O_TRACEEXEC = 0x00000010,
- - PTRACE_O_TRACEVFORKDONE = 0x00000020,
- - PTRACE_O_TRACEEXIT = 0x00000040,
- - PTRACE_O_MASK = 0x0000007f
- -};
- -
- -/* Wait extended result codes for the above trace options. */
- -enum __ptrace_eventcodes {
- - PTRACE_EVENT_FORK = 1,
- - PTRACE_EVENT_VFORK = 2,
- - PTRACE_EVENT_CLONE = 3,
- - PTRACE_EVENT_EXEC = 4,
- - PTRACE_EVENT_VFORK_DONE = 5,
- - PTRACE_EVENT_EXIT = 6
- -};
- -
- -/* Perform process tracing functions. REQUEST is one of the values
- - above, and determines the action to be taken.
- - For all requests except PTRACE_TRACEME, PID specifies the process to be
- - traced.
- -
- - PID and the other arguments described above for the various requests should
- - appear (those that are used for the particular request) as:
- - pid_t PID, void *ADDR, int DATA, void *ADDR2
- - after REQUEST. */
- -extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
- -
- -__END_DECLS
- -
- -#endif /* _SYS_PTRACE_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/ucontext.h uClibc/libc/sysdeps/linux/xtensa/sys/ucontext.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/sys/ucontext.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SYS_UCONTEXT_H
- #define _SYS_UCONTEXT_H 1
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/user.h uClibc/libc/sysdeps/linux/xtensa/sys/user.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/user.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/sysdeps/linux/xtensa/sys/user.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,20 @@
- +/*
- + * include/asm-xtensa/user.h
- + *
- + * Xtensa Processor version.
- + *
- + * This file is subject to the terms and conditions of the GNU General Public
- + * License. See the file "COPYING" in the main directory of this archive
- + * for more details.
- + *
- + * Copyright (C) 2001 - 2005 Tensilica Inc.
- + */
- +
- +#ifndef _XTENSA_USER_H
- +#define _XTENSA_USER_H
- +
- +/* This file usually defines a 'struct user' structure. However, it it only
- + * used for a.out file, which are not supported on Xtensa.
- + */
- +
- +#endif /* _XTENSA_USER_H */
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/syscall.S uClibc/libc/sysdeps/linux/xtensa/syscall.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/syscall.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/syscall.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "sysdep.h"
-
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sysdep.h uClibc/libc/sysdeps/linux/xtensa/sysdep.h
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/sysdep.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <sys/syscall.h>
-
- #ifdef __ASSEMBLER__
-
- @@ -38,6 +39,16 @@
- entry sp, FRAMESIZE; \
- CALL_MCOUNT
-
- +#define HIDDEN_ENTRY(name) \
- + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
- + .hidden C_SYMBOL_NAME(name); \
- + ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name), @function); \
- + .align ALIGNARG(2); \
- + LITERAL_POSITION; \
- + C_LABEL(name) \
- + entry sp, FRAMESIZE; \
- + CALL_MCOUNT
- +
- #undef END
- #define END(name) ASM_SIZE_DIRECTIVE(name)
-
- @@ -112,6 +123,7 @@
- #define PSEUDO_END_ERRVAL(name) \
- END (name)
-
- +#undef ret_ERRVAL
- #define ret_ERRVAL retw
-
- #if defined RTLD_PRIVATE_ERRNO
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/vfork.S uClibc/libc/sysdeps/linux/xtensa/vfork.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/vfork.S 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "sysdep.h"
- #include <sys/syscall.h>
- @@ -49,7 +48,7 @@
- /* pid_t vfork(void);
- Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */
-
- -ENTRY (__vfork)
- +HIDDEN_ENTRY (__vfork)
-
- movi a6, .Ljumptable
- extui a2, a0, 30, 2 /* call-size: call4/8/12 = 1/2/3 */
- @@ -165,6 +164,5 @@
- .Lpseudo_end:
- retw
-
- -libc_hidden_def (__vfork)
- -
- weak_alias (__vfork, vfork)
- +libc_hidden_def(vfork)
- diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/windowspill.S uClibc/libc/sysdeps/linux/xtensa/windowspill.S
- --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/windowspill.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/sysdeps/linux/xtensa/windowspill.S 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <bits/xtensa-config.h>
-
- diff -Nur uClibc-0.9.33.2/libc/termios/cfmakeraw.c uClibc/libc/termios/cfmakeraw.c
- --- uClibc-0.9.33.2/libc/termios/cfmakeraw.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/cfmakeraw.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <termios.h>
-
- diff -Nur uClibc-0.9.33.2/libc/termios/cfsetspeed.c uClibc/libc/termios/cfsetspeed.c
- --- uClibc-0.9.33.2/libc/termios/cfsetspeed.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/cfsetspeed.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <termios.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/isatty.c uClibc/libc/termios/isatty.c
- --- uClibc-0.9.33.2/libc/termios/isatty.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/isatty.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
- #include <termios.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/kernel_termios.h uClibc/libc/termios/kernel_termios.h
- --- uClibc-0.9.33.2/libc/termios/kernel_termios.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/kernel_termios.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _KERNEL_TERMIOS_H
- #define _KERNEL_TERMIOS_H 1
- diff -Nur uClibc-0.9.33.2/libc/termios/speed.c uClibc/libc/termios/speed.c
- --- uClibc-0.9.33.2/libc/termios/speed.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/speed.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/tcdrain.c uClibc/libc/termios/tcdrain.c
- --- uClibc-0.9.33.2/libc/termios/tcdrain.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/tcdrain.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <termios.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/tcflow.c uClibc/libc/termios/tcflow.c
- --- uClibc-0.9.33.2/libc/termios/tcflow.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/tcflow.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <termios.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/tcflush.c uClibc/libc/termios/tcflush.c
- --- uClibc-0.9.33.2/libc/termios/tcflush.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/tcflush.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <termios.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/tcgetattr.c uClibc/libc/termios/tcgetattr.c
- --- uClibc-0.9.33.2/libc/termios/tcgetattr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/tcgetattr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/tcgetpgrp.c uClibc/libc/termios/tcgetpgrp.c
- --- uClibc-0.9.33.2/libc/termios/tcgetpgrp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/tcgetpgrp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/ioctl.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/tcgetsid.c uClibc/libc/termios/tcgetsid.c
- --- uClibc-0.9.33.2/libc/termios/tcgetsid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/tcgetsid.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <termios.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/tcsendbrk.c uClibc/libc/termios/tcsendbrk.c
- --- uClibc-0.9.33.2/libc/termios/tcsendbrk.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/tcsendbrk.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stddef.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/tcsetattr.c uClibc/libc/termios/tcsetattr.c
- --- uClibc-0.9.33.2/libc/termios/tcsetattr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/tcsetattr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libc/termios/tcsetpgrp.c uClibc/libc/termios/tcsetpgrp.c
- --- uClibc-0.9.33.2/libc/termios/tcsetpgrp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/termios/tcsetpgrp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/types.h>
- #include <sys/ioctl.h>
- diff -Nur uClibc-0.9.33.2/libc/unistd/confstr.c uClibc/libc/unistd/confstr.c
- --- uClibc-0.9.33.2/libc/unistd/confstr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/confstr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libc/unistd/daemon.c uClibc/libc/unistd/daemon.c
- --- uClibc-0.9.33.2/libc/unistd/daemon.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/daemon.c 2014-02-03 12:32:56.000000000 +0100
- @@ -118,7 +118,7 @@
- {
- struct STAT st;
-
- - if ((fd = open_not_cancel(_PATH_DEVNULL, O_RDWR, 0)) != -1
- + if ((fd = open_not_cancel_2(_PATH_DEVNULL, O_RDWR)) != -1
- && (__builtin_expect (FSTAT (fd, &st), 0) == 0))
- {
- if (__builtin_expect (S_ISCHR (st.st_mode), 1) != 0) {
- diff -Nur uClibc-0.9.33.2/libc/unistd/exec.c uClibc/libc/unistd/exec.c
- --- uClibc-0.9.33.2/libc/unistd/exec.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/exec.c 2014-02-03 12:32:56.000000000 +0100
- @@ -32,6 +32,8 @@
- /**********************************************************************/
- #define EXEC_FUNC_COMMON 0
- #define EXEC_FUNC_EXECVP 1
- +#define EXEC_FUNC_EXECVPE 2
- +
- #if defined(__ARCH_USE_MMU__)
-
- /* We have an MMU, so use alloca() to grab space for buffers and arg lists. */
- @@ -58,6 +60,7 @@
- * execle(a) -> execve(-)
- * execv(-) -> execve(-)
- * execvp(a) -> execve(-)
- + * execvpe(a) -> execve(-)
- */
-
- # define EXEC_ALLOC_SIZE(VAR) /* nothing to do */
- @@ -68,7 +71,7 @@
-
- # ifdef L___exec_alloc
-
- -void attribute_hidden *__exec_alloc(size_t size, int func)
- +void *__exec_alloc(size_t size, int func)
- {
- static void *common_cache, *execvp_cache;
- static size_t common_size, execvp_size;
- @@ -135,7 +138,7 @@
- /**********************************************************************/
- #ifdef L_execv
-
- -int execv(__const char *path, char *__const argv[])
- +int execv(const char *path, char *const argv[])
- {
- return execve(path, argv, __environ);
- }
- @@ -219,15 +222,18 @@
-
- #endif
- /**********************************************************************/
- -#ifdef L_execvp
- +#if defined (L_execvp) || defined(L_execvpe)
-
-
- /* Use a default path that matches glibc behavior, since SUSv3 says
- * this is implementation-defined. The default is current working dir,
- * /bin, and then /usr/bin. */
- static const char default_path[] = ":/bin:/usr/bin";
- -
- +#if defined (L_execvp)
- int execvp(const char *path, char *const argv[])
- +#elif defined (L_execvpe)
- +int execvpe(const char *path, char *const argv[], char *const envp[])
- +#endif
- {
- char *buf = NULL;
- char *p;
- @@ -245,7 +251,11 @@
- }
-
- if (strchr(path, '/')) {
- +#if defined (L_execvp)
- execve(path, argv, __environ);
- +#elif defined (L_execvpe)
- + execve(path, argv, envp);
- +#endif
- if (errno == ENOEXEC) {
- char **nargv;
- EXEC_ALLOC_SIZE(size2) /* Do NOT add a semicolon! */
- @@ -254,11 +264,19 @@
- /* Need the dimension - 1. We omit counting the trailing
- * NULL but we actually omit the first entry. */
- for (n=0 ; argv[n] ; n++) {}
- +#if defined (L_execvp)
- nargv = (char **) EXEC_ALLOC((n+2) * sizeof(char *), size2, EXEC_FUNC_EXECVP);
- +#elif defined (L_execvpe)
- + nargv = (char **) EXEC_ALLOC((n+2) * sizeof(char *), size2, EXEC_FUNC_EXECVPE);
- +#endif
- nargv[0] = argv[0];
- nargv[1] = (char *)path;
- memcpy(nargv+2, argv+1, n*sizeof(char *));
- +#if defined (L_execvp)
- execve("/bin/sh", nargv, __environ);
- +#elif defined (L_execvpe)
- + execve("/bin/sh", nargv, envp);
- +#endif
- EXEC_FREE(nargv, size2);
- }
- } else {
- @@ -277,8 +295,11 @@
- return -1;
- }
- len = (FILENAME_MAX - 1) - plen;
- -
- +#if defined (L_execvp)
- buf = EXEC_ALLOC(FILENAME_MAX, size, EXEC_FUNC_EXECVP);
- +#elif defined (L_execvpe)
- + buf = EXEC_ALLOC(FILENAME_MAX, size, EXEC_FUNC_EXECVPE);
- +#endif
- {
- int seen_small = 0;
- s0 = buf + len;
- @@ -300,8 +321,11 @@
- s[plen-1] = '/';
- }
-
- +#if defined (L_execvp)
- execve(s, argv, __environ);
- -
- +#elif defined (L_execvpe)
- + execve(s, argv, envp);
- +#endif
- seen_small = 1;
-
- if (errno == ENOEXEC) {
- @@ -325,7 +349,11 @@
-
- return -1;
- }
- +#if defined (L_execvp)
- libc_hidden_def(execvp)
- -
- +#elif defined (L_execvpe)
- +libc_hidden_def(execvpe)
- #endif
- +
- +#endif /* #if defined (L_execvp) || defined(L_execvpe) */
- /**********************************************************************/
- diff -Nur uClibc-0.9.33.2/libc/unistd/execvpe.c uClibc/libc/unistd/execvpe.c
- --- uClibc-0.9.33.2/libc/unistd/execvpe.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libc/unistd/execvpe.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,7 @@
- +/* Copyright (C) 2011-2013 Hennning Heinold <heinold@inf.fu-berlin.de>
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#define L_execvpe
- +#include "exec.c"
- diff -Nur uClibc-0.9.33.2/libc/unistd/fpathconf.c uClibc/libc/unistd/fpathconf.c
- --- uClibc-0.9.33.2/libc/unistd/fpathconf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/fpathconf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libc/unistd/getopt.c uClibc/libc/unistd/getopt.c
- --- uClibc-0.9.33.2/libc/unistd/getopt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/getopt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -17,9 +17,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /*
- * Modified for uClibc by Manuel Novoa III on 1/5/01.
- @@ -36,9 +35,6 @@
- # include <config.h>
- #endif
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- -
- #include <stdio.h>
-
- /* Comment out all this code if we are using the GNU C Library, and are not
- @@ -62,7 +58,7 @@
-
- /* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
- -#ifdef __GNU_LIBRARY__
- +#if defined __GNU_LIBRARY__ || defined __UCLIBC__
- /* Don't include stdlib.h for non-GNU C libraries because some of them
- contain conflicting prototypes for getopt. */
- # include <stdlib.h>
- @@ -75,22 +71,12 @@
- # include <unixlib.h>
- #endif
-
- -#if !defined __UCLIBC__ && !defined __UCLIBC_HAS_GETTEXT_AWARENESS__
- #ifdef _LIBC
- # include <libintl.h>
- #else
- # include "gettext.h"
- # define _(msgid) gettext (msgid)
- #endif
- -#else
- -#ifdef __UCLIBC_MJN3_ONLY__
- -#warning TODO: Enable gettext awareness.
- -#endif /* __UCLIBC_MJN3_ONLY__ */
- -
- -#undef _
- -#define _(X) X
- -
- -#endif
-
- /* Treat '-W foo' the same as the long option '--foo',
- * disabled for the moment since it costs about 2k... */
- @@ -161,7 +147,7 @@
- static struct _getopt_data getopt_data;
-
-
- -#ifndef __GNU_LIBRARY__
- +#if !defined __GNU_LIBRARY__ && !defined __UCLIBC__
-
- /* Avoid depending on library functions or files
- whose names are inconsistent. */
- @@ -235,7 +221,7 @@
- d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
- else
- {
- - memset (__mempcpy (new_str, __getopt_nonoption_flags,
- + memset (mempcpy (new_str, __getopt_nonoption_flags,
- d->__nonoption_flags_max_len),
- '\0', top + 1 - d->__nonoption_flags_max_len);
- d->__nonoption_flags_max_len = top + 1;
- @@ -341,7 +327,7 @@
- if (__getopt_nonoption_flags == NULL)
- d->__nonoption_flags_max_len = -1;
- else
- - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
- + memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
- '\0', d->__nonoption_flags_max_len - len);
- }
- }
- diff -Nur uClibc-0.9.33.2/libc/unistd/getopt_int.h uClibc/libc/unistd/getopt_int.h
- --- uClibc-0.9.33.2/libc/unistd/getopt_int.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/getopt_int.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _GETOPT_INT_H
- #define _GETOPT_INT_H 1
- diff -Nur uClibc-0.9.33.2/libc/unistd/getopt-susv3.c uClibc/libc/unistd/getopt-susv3.c
- --- uClibc-0.9.33.2/libc/unistd/getopt-susv3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/getopt-susv3.c 2014-02-03 12:32:56.000000000 +0100
- @@ -22,14 +22,7 @@
- #include <string.h>
- #include <stdio.h>
- #include <getopt.h>
- -
- -
- -#ifdef __UCLIBC_MJN3_ONLY__
- -#warning TODO: Enable gettext awareness.
- -#endif /* __UCLIBC_MJN3_ONLY__ */
- -
- -#undef _
- -#define _(X) X
- +#include <libintl.h>
-
- #ifdef __BCC__
- static const char missing[] = "option requires an argument";
- diff -Nur uClibc-0.9.33.2/libc/unistd/getpass.c uClibc/libc/unistd/getpass.c
- --- uClibc-0.9.33.2/libc/unistd/getpass.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/getpass.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libc/unistd/getsubopt.c uClibc/libc/unistd/getsubopt.c
- --- uClibc-0.9.33.2/libc/unistd/getsubopt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/getsubopt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libc/unistd/Makefile.in uClibc/libc/unistd/Makefile.in
- --- uClibc-0.9.33.2/libc/unistd/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -10,39 +10,21 @@
- UNISTD_DIR := $(top_srcdir)libc/unistd
- UNISTD_OUT := $(top_builddir)libc/unistd
-
- -CSRC := $(notdir $(wildcard $(UNISTD_DIR)/*.c))
- -# multi source
- -CSRC := $(filter-out exec.c,$(CSRC))
- -
- -ifeq ($(ARCH_USE_MMU),y)
- -CSRC := $(filter-out __exec_alloc.c,$(CSRC))
- -endif
- -
- -ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
- -CSRC := $(filter-out getopt-susv3.c getopt_long-simple.c,$(CSRC))
- -else
- -CSRC := $(filter-out getopt.c,$(CSRC))
- -ifneq ($(UCLIBC_HAS_GETOPT_LONG),y)
- -CSRC := $(filter-out getopt_long-simple.c,$(CSRC))
- -endif
- -endif
- -
- -ifeq ($(UCLIBC_HAS_GNU_GETSUBOPT),y)
- -CSRC := $(filter-out getsubopt-susv3.c,$(CSRC))
- -else
- -CSRC := $(filter-out getsubopt.c,$(CSRC))
- -endif
- -
- -ifneq ($(UCLIBC_SUSV3_LEGACY),y)
- -CSRC := $(filter-out ualarm.c usleep.c,$(CSRC))
- -endif
- -
- -ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- -CSRC := $(filter-out sleep.c,$(CSRC))
- -endif
- +CSRC-y := $(notdir $(wildcard $(UNISTD_DIR)/*.c))
- +OMIT-y := exec.c # multi source
- +OMIT-$(ARCH_USE_MMU) += __exec_alloc.c
- +OMIT-$(if $(UCLIBC_SUSV3_LEGACY),,y) += ualarm.c usleep.c
- +#OMIT-$(UCLIBC_HAS_THREADS_NATIVE) += sleep.c
- +
- +# XXX: GNU_GETOPT comes with getopt_long unconditionally, which is wrong
- +GO_LONG := $(if $(UCLIBC_HAS_GNU_GETOPT),getopt_long-simple.c)
- +OMIT-y += $(if $(UCLIBC_HAS_GNU_GETOPT),getopt-susv3.c $(GO_LONG),getopt.c)
- +OMIT-y += $(if $(UCLIBC_HAS_GNU_GETSUBOPT),getsubopt-susv3.c,getsubopt.c)
-
- -UNISTD_SRC := $(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC))
- -UNISTD_OBJ := $(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC))
- +CSRC-y := $(filter-out $(OMIT-y),$(CSRC-y))
- +
- +UNISTD_SRC := $(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC-y))
- +UNISTD_OBJ := $(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC-y))
-
- libc-y += $(UNISTD_OBJ)
-
- diff -Nur uClibc-0.9.33.2/libc/unistd/pathconf.c uClibc/libc/unistd/pathconf.c
- --- uClibc-0.9.33.2/libc/unistd/pathconf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/pathconf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* pathconf -- adjusted for busybox */
-
- diff -Nur uClibc-0.9.33.2/libc/unistd/sleep.c uClibc/libc/unistd/sleep.c
- --- uClibc-0.9.33.2/libc/unistd/sleep.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/sleep.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <time.h>
- @@ -99,6 +98,7 @@
- /* This is not necessary but some buggy programs depend on this. */
- if (seconds == 0) {
- # ifdef CANCELLATION_P
- + int cancelhandling;
- CANCELLATION_P (THREAD_SELF);
- # endif
- return 0;
- diff -Nur uClibc-0.9.33.2/libc/unistd/sysconf.c uClibc/libc/unistd/sysconf.c
- --- uClibc-0.9.33.2/libc/unistd/sysconf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libc/unistd/sysconf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,11 +14,11 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #define _XOPEN_SOURCE 500
- #include <features.h>
- +#include <ctype.h>
- #include <errno.h>
- #include <limits.h>
- #include <grp.h>
- @@ -981,20 +981,9 @@
- #endif
-
- case _SC_MONOTONIC_CLOCK:
- -#ifdef __NR_clock_getres
- - /* Check using the clock_getres system call. */
- -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
- - {
- - struct timespec ts;
- - INTERNAL_SYSCALL_DECL (err);
- - int r;
- - r = INTERNAL_SYSCALL (clock_getres, err, 2, CLOCK_MONOTONIC, &ts);
- - return INTERNAL_SYSCALL_ERROR_P (r, err) ? -1 : _POSIX_VERSION;
- - }
- -# elif defined __UCLIBC_HAS_REALTIME__
- +#if defined __UCLIBC_HAS_REALTIME__ && defined __NR_clock_getres
- if (clock_getres(CLOCK_MONOTONIC, NULL) >= 0)
- return _POSIX_VERSION;
- -# endif
- #endif
- RETURN_NEG_1;
-
- diff -Nur uClibc-0.9.33.2/libcrypt/crypt.c uClibc/libcrypt/crypt.c
- --- uClibc-0.9.33.2/libcrypt/crypt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libcrypt/crypt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,7 +5,6 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define __FORCE_GLIBC
- #include <unistd.h>
- #include <crypt.h>
- #include "libcrypt.h"
- diff -Nur uClibc-0.9.33.2/libcrypt/crypt_stub.c uClibc/libcrypt/crypt_stub.c
- --- uClibc-0.9.33.2/libcrypt/crypt_stub.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libcrypt/crypt_stub.c 2014-02-03 12:32:56.000000000 +0100
- @@ -5,7 +5,6 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#define __FORCE_GLIBC
- #include <crypt.h>
- #include <unistd.h>
- #include "libcrypt.h"
- diff -Nur uClibc-0.9.33.2/libcrypt/des.c uClibc/libcrypt/des.c
- --- uClibc-0.9.33.2/libcrypt/des.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libcrypt/des.c 2014-02-03 12:32:56.000000000 +0100
- @@ -56,7 +56,6 @@
- * alignment).
- */
-
- -#define __FORCE_GLIBC
- #include <sys/cdefs.h>
- #include <sys/types.h>
- #include <sys/param.h>
- diff -Nur uClibc-0.9.33.2/libcrypt/sha256.c uClibc/libcrypt/sha256.c
- --- uClibc-0.9.33.2/libcrypt/sha256.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libcrypt/sha256.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Written by Ulrich Drepper <drepper@redhat.com>, 2007. */
-
- diff -Nur uClibc-0.9.33.2/libcrypt/sha256-crypt.c uClibc/libcrypt/sha256-crypt.c
- --- uClibc-0.9.33.2/libcrypt/sha256-crypt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libcrypt/sha256-crypt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libcrypt/sha256.h uClibc/libcrypt/sha256.h
- --- uClibc-0.9.33.2/libcrypt/sha256.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libcrypt/sha256.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SHA256_H
- #define _SHA256_H 1
- diff -Nur uClibc-0.9.33.2/libcrypt/sha512.c uClibc/libcrypt/sha512.c
- --- uClibc-0.9.33.2/libcrypt/sha512.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libcrypt/sha512.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Written by Ulrich Drepper <drepper@redhat.com>, 2007. */
-
- diff -Nur uClibc-0.9.33.2/libcrypt/sha512-crypt.c uClibc/libcrypt/sha512-crypt.c
- --- uClibc-0.9.33.2/libcrypt/sha512-crypt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libcrypt/sha512-crypt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libcrypt/sha512.h uClibc/libcrypt/sha512.h
- --- uClibc-0.9.33.2/libcrypt/sha512.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libcrypt/sha512.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SHA512_H
- #define _SHA512_H 1
- diff -Nur uClibc-0.9.33.2/libm/carg.c uClibc/libm/carg.c
- --- uClibc-0.9.33.2/libm/carg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/carg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <complex.h>
- #include <math.h>
- diff -Nur uClibc-0.9.33.2/libm/e_acos.c uClibc/libm/e_acos.c
- --- uClibc-0.9.33.2/libm/e_acos.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_acos.c 2014-02-03 12:32:56.000000000 +0100
- @@ -52,7 +52,7 @@
- qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
- qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
-
- -double attribute_hidden __ieee754_acos(double x)
- +double __ieee754_acos(double x)
- {
- double z,p,q,r,w,s,c,df;
- int32_t hx,ix;
- diff -Nur uClibc-0.9.33.2/libm/e_acosh.c uClibc/libm/e_acosh.c
- --- uClibc-0.9.33.2/libm/e_acosh.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_acosh.c 2014-02-03 12:32:56.000000000 +0100
- @@ -30,7 +30,7 @@
- one = 1.0,
- ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
-
- -double attribute_hidden __ieee754_acosh(double x)
- +double __ieee754_acosh(double x)
- {
- double t;
- int32_t hx;
- diff -Nur uClibc-0.9.33.2/libm/e_asin.c uClibc/libm/e_asin.c
- --- uClibc-0.9.33.2/libm/e_asin.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_asin.c 2014-02-03 12:32:56.000000000 +0100
- @@ -60,7 +60,7 @@
- qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
- qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
-
- -double attribute_hidden __ieee754_asin(double x)
- +double __ieee754_asin(double x)
- {
- double t=0.0,w,p,q,c,r,s;
- int32_t hx,ix;
- diff -Nur uClibc-0.9.33.2/libm/e_atan2.c uClibc/libm/e_atan2.c
- --- uClibc-0.9.33.2/libm/e_atan2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_atan2.c 2014-02-03 12:32:56.000000000 +0100
- @@ -47,7 +47,7 @@
- pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */
- pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
-
- -double attribute_hidden __ieee754_atan2(double y, double x)
- +double __ieee754_atan2(double y, double x)
- {
- double z;
- int32_t k,m,hx,hy,ix,iy;
- diff -Nur uClibc-0.9.33.2/libm/e_atanh.c uClibc/libm/e_atanh.c
- --- uClibc-0.9.33.2/libm/e_atanh.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_atanh.c 2014-02-03 12:32:56.000000000 +0100
- @@ -34,7 +34,7 @@
-
- static const double zero = 0.0;
-
- -double attribute_hidden __ieee754_atanh(double x)
- +double __ieee754_atanh(double x)
- {
- double t;
- int32_t hx,ix;
- diff -Nur uClibc-0.9.33.2/libm/e_cosh.c uClibc/libm/e_cosh.c
- --- uClibc-0.9.33.2/libm/e_cosh.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_cosh.c 2014-02-03 12:32:56.000000000 +0100
- @@ -35,7 +35,7 @@
-
- static const double one = 1.0, half=0.5, huge = 1.0e300;
-
- -double attribute_hidden __ieee754_cosh(double x)
- +double __ieee754_cosh(double x)
- {
- double t,w;
- int32_t ix;
- diff -Nur uClibc-0.9.33.2/libm/e_exp.c uClibc/libm/e_exp.c
- --- uClibc-0.9.33.2/libm/e_exp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_exp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -93,7 +93,7 @@
- P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
- P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
-
- -double attribute_hidden __ieee754_exp(double x) /* default IEEE double exp */
- +double __ieee754_exp(double x) /* default IEEE double exp */
- {
- double y;
- double hi = 0.0;
- diff -Nur uClibc-0.9.33.2/libm/e_fmod.c uClibc/libm/e_fmod.c
- --- uClibc-0.9.33.2/libm/e_fmod.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_fmod.c 2014-02-03 12:32:56.000000000 +0100
- @@ -20,7 +20,7 @@
-
- static const double one = 1.0, Zero[] = {0.0, -0.0,};
-
- -double attribute_hidden __ieee754_fmod(double x, double y)
- +double __ieee754_fmod(double x, double y)
- {
- int32_t n,hx,hy,hz,ix,iy,sx,i;
- u_int32_t lx,ly,lz;
- diff -Nur uClibc-0.9.33.2/libm/e_hypot.c uClibc/libm/e_hypot.c
- --- uClibc-0.9.33.2/libm/e_hypot.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_hypot.c 2014-02-03 12:32:56.000000000 +0100
- @@ -44,9 +44,9 @@
- #include "math.h"
- #include "math_private.h"
-
- -double attribute_hidden __ieee754_hypot(double x, double y)
- +double __ieee754_hypot(double x, double y)
- {
- - double a=x,b=y,t1,t2,y1,y2,w;
- + double a=x,b=y,t1,t2,_y1,y2,w;
- int32_t j,k,ha,hb;
-
- GET_HIGH_WORD(ha,x);
- @@ -100,13 +100,13 @@
- w = __ieee754_sqrt(t1*t1-(b*(-b)-t2*(a+t1)));
- } else {
- a = a+a;
- - y1 = 0;
- - SET_HIGH_WORD(y1,hb);
- - y2 = b - y1;
- + _y1 = 0;
- + SET_HIGH_WORD(_y1,hb);
- + y2 = b - _y1;
- t1 = 0;
- SET_HIGH_WORD(t1,ha+0x00100000);
- t2 = a - t1;
- - w = __ieee754_sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b)));
- + w = __ieee754_sqrt(t1*_y1-(w*(-w)-(t1*y2+t2*b)));
- }
- if(k!=0) {
- u_int32_t high;
- diff -Nur uClibc-0.9.33.2/libm/e_j0.c uClibc/libm/e_j0.c
- --- uClibc-0.9.33.2/libm/e_j0.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_j0.c 2014-02-03 12:32:56.000000000 +0100
- @@ -76,7 +76,7 @@
-
- static const double zero = 0.0;
-
- -double attribute_hidden __ieee754_j0(double x)
- +double __ieee754_j0(double x)
- {
- double z, s,c,ss,cc,r,u,v;
- int32_t hx,ix;
- @@ -153,7 +153,7 @@
- v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
- v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
-
- -double attribute_hidden __ieee754_y0(double x)
- +double __ieee754_y0(double x)
- {
- double z, s,c,ss,cc,u,v;
- int32_t hx,ix,lx;
- diff -Nur uClibc-0.9.33.2/libm/e_j1.c uClibc/libm/e_j1.c
- --- uClibc-0.9.33.2/libm/e_j1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_j1.c 2014-02-03 12:32:56.000000000 +0100
- @@ -77,7 +77,7 @@
-
- static const double zero = 0.0;
-
- -double attribute_hidden __ieee754_j1(double x)
- +double __ieee754_j1(double x)
- {
- double z, s,c,ss,cc,r,u,v,y;
- int32_t hx,ix;
- @@ -150,7 +150,7 @@
- 1.66559246207992079114e-11, /* 0x3DB25039, 0xDACA772A */
- };
-
- -double attribute_hidden __ieee754_y1(double x)
- +double __ieee754_y1(double x)
- {
- double z, s,c,ss,cc,u,v;
- int32_t hx,ix,lx;
- diff -Nur uClibc-0.9.33.2/libm/e_jn.c uClibc/libm/e_jn.c
- --- uClibc-0.9.33.2/libm/e_jn.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_jn.c 2014-02-03 12:32:56.000000000 +0100
- @@ -45,7 +45,7 @@
-
- static const double zero = 0.00000000000000000000e+00;
-
- -double attribute_hidden __ieee754_jn(int n, double x)
- +double __ieee754_jn(int n, double x)
- {
- int32_t i,hx,ix,lx, sgn;
- double a, b, temp=0, di;
- @@ -217,7 +217,7 @@
- strong_alias(__ieee754_jn, jn)
- #endif
-
- -double attribute_hidden __ieee754_yn(int n, double x)
- +double __ieee754_yn(int n, double x)
- {
- int32_t i,hx,ix,lx;
- int32_t sign;
- diff -Nur uClibc-0.9.33.2/libm/e_lgamma_r.c uClibc/libm/e_lgamma_r.c
- --- uClibc-0.9.33.2/libm/e_lgamma_r.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_lgamma_r.c 2014-02-03 12:32:56.000000000 +0100
- @@ -197,7 +197,7 @@
- return -y;
- }
-
- -double attribute_hidden __ieee754_lgamma_r(double x, int *signgamp)
- +double __ieee754_lgamma_r(double x, int *signgamp)
- {
- double t,y,z,nadj=0,p,p1,p2,p3,q,r,w;
- int i,hx,lx,ix;
- @@ -314,11 +314,12 @@
- #else
- strong_alias(__ieee754_lgamma_r, lgamma_r)
- #endif
- +libm_hidden_def(lgamma_r)
-
- /* __ieee754_lgamma(x)
- * Return the logarithm of the Gamma function of x.
- */
- -double attribute_hidden __ieee754_lgamma(double x)
- +double __ieee754_lgamma(double x)
- {
- return __ieee754_lgamma_r(x, &signgam);
- }
- @@ -358,6 +359,7 @@
- strong_alias(__ieee754_lgamma_r, gamma_r)
- strong_alias(__ieee754_lgamma, gamma)
- #endif
- +libm_hidden_def(gamma)
-
-
- /* double tgamma(double x)
- diff -Nur uClibc-0.9.33.2/libm/e_log10.c uClibc/libm/e_log10.c
- --- uClibc-0.9.33.2/libm/e_log10.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_log10.c 2014-02-03 12:32:56.000000000 +0100
- @@ -53,7 +53,7 @@
-
- static const double zero = 0.0;
-
- -double attribute_hidden __ieee754_log10(double x)
- +double __ieee754_log10(double x)
- {
- double y,z;
- int32_t i,k,hx;
- diff -Nur uClibc-0.9.33.2/libm/e_log2.c uClibc/libm/e_log2.c
- --- uClibc-0.9.33.2/libm/e_log2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_log2.c 2014-02-03 12:32:56.000000000 +0100
- @@ -116,3 +116,4 @@
- }
- }
- strong_alias(__ieee754_log2,log2)
- +libm_hidden_def(log2)
- diff -Nur uClibc-0.9.33.2/libm/e_log.c uClibc/libm/e_log.c
- --- uClibc-0.9.33.2/libm/e_log.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_log.c 2014-02-03 12:32:56.000000000 +0100
- @@ -77,7 +77,7 @@
-
- static const double zero = 0.0;
-
- -double attribute_hidden __ieee754_log(double x)
- +double __ieee754_log(double x)
- {
- double hfsq,f,s,z,R,w,t1,t2,dk;
- int32_t k,hx,i,j;
- diff -Nur uClibc-0.9.33.2/libm/e_pow.c uClibc/libm/e_pow.c
- --- uClibc-0.9.33.2/libm/e_pow.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_pow.c 2014-02-03 12:32:56.000000000 +0100
- @@ -91,10 +91,10 @@
- ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
- ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
-
- -double attribute_hidden __ieee754_pow(double x, double y)
- +double __ieee754_pow(double x, double y)
- {
- double z,ax,z_h,z_l,p_h,p_l;
- - double y1,t1,t2,r,s,t,u,v,w;
- + double _y1,t1,t2,r,s,t,u,v,w;
- int32_t i,j,k,yisint,n;
- int32_t hx,hy,ix,iy;
- u_int32_t lx,ly;
- @@ -249,10 +249,10 @@
- s = -one;/* (-ve)**(odd int) */
-
- /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */
- - y1 = y;
- - SET_LOW_WORD(y1,0);
- - p_l = (y-y1)*t1+y*t2;
- - p_h = y1*t1;
- + _y1 = y;
- + SET_LOW_WORD(_y1,0);
- + p_l = (y-_y1)*t1+y*t2;
- + p_h = _y1*t1;
- z = p_l+p_h;
- EXTRACT_WORDS(j,i,z);
- if (j>=0x40900000) { /* z >= 1024 */
- diff -Nur uClibc-0.9.33.2/libm/e_remainder.c uClibc/libm/e_remainder.c
- --- uClibc-0.9.33.2/libm/e_remainder.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_remainder.c 2014-02-03 12:32:56.000000000 +0100
- @@ -23,7 +23,7 @@
-
- static const double zero = 0.0;
-
- -double attribute_hidden __ieee754_remainder(double x, double p)
- +double __ieee754_remainder(double x, double p)
- {
- int32_t hx,hp;
- u_int32_t sx,lx,lp;
- diff -Nur uClibc-0.9.33.2/libm/e_rem_pio2.c uClibc/libm/e_rem_pio2.c
- --- uClibc-0.9.33.2/libm/e_rem_pio2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_rem_pio2.c 2014-02-03 12:32:56.000000000 +0100
- @@ -66,7 +66,7 @@
- pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
- pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
-
- -int32_t attribute_hidden __ieee754_rem_pio2(double x, double *y)
- +int32_t __ieee754_rem_pio2(double x, double *y)
- {
- double z=0.0,w,t,r,fn;
- double tx[3];
- diff -Nur uClibc-0.9.33.2/libm/e_scalb.c uClibc/libm/e_scalb.c
- --- uClibc-0.9.33.2/libm/e_scalb.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_scalb.c 2014-02-03 12:32:56.000000000 +0100
- @@ -19,7 +19,7 @@
- #include "math_private.h"
- #include <errno.h>
-
- -double attribute_hidden __ieee754_scalb(double x, double fn)
- +double __ieee754_scalb(double x, double fn)
- {
- if (isnan(x)||isnan(fn)) return x*fn;
- if (!isfinite(fn)) {
- @@ -55,5 +55,6 @@
- #else
- strong_alias(__ieee754_scalb, scalb)
- #endif
- +libm_hidden_def(scalb)
-
- #endif /* UCLIBC_SUSV3_LEGACY */
- diff -Nur uClibc-0.9.33.2/libm/e_sinh.c uClibc/libm/e_sinh.c
- --- uClibc-0.9.33.2/libm/e_sinh.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_sinh.c 2014-02-03 12:32:56.000000000 +0100
- @@ -32,7 +32,7 @@
-
- static const double one = 1.0, shuge = 1.0e307;
-
- -double attribute_hidden __ieee754_sinh(double x)
- +double __ieee754_sinh(double x)
- {
- double t,w,h;
- int32_t ix,jx;
- diff -Nur uClibc-0.9.33.2/libm/e_sqrt.c uClibc/libm/e_sqrt.c
- --- uClibc-0.9.33.2/libm/e_sqrt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/e_sqrt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -84,7 +84,7 @@
-
- static const double one = 1.0, tiny = 1.0e-300;
-
- -double attribute_hidden __ieee754_sqrt(double x)
- +double __ieee754_sqrt(double x)
- {
- double z;
- int32_t sign = (int)0x80000000;
- diff -Nur uClibc-0.9.33.2/libm/i386/fclrexcpt.c uClibc/libm/i386/fclrexcpt.c
- --- uClibc-0.9.33.2/libm/i386/fclrexcpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/fclrexcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libm/i386/fedisblxcpt.c uClibc/libm/i386/fedisblxcpt.c
- --- uClibc-0.9.33.2/libm/i386/fedisblxcpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/fedisblxcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libm/i386/feenablxcpt.c uClibc/libm/i386/feenablxcpt.c
- --- uClibc-0.9.33.2/libm/i386/feenablxcpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/feenablxcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libm/i386/fegetenv.c uClibc/libm/i386/fegetenv.c
- --- uClibc-0.9.33.2/libm/i386/fegetenv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/fegetenv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
-
- diff -Nur uClibc-0.9.33.2/libm/i386/fegetexcept.c uClibc/libm/i386/fegetexcept.c
- --- uClibc-0.9.33.2/libm/i386/fegetexcept.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/fegetexcept.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
-
- diff -Nur uClibc-0.9.33.2/libm/i386/fegetround.c uClibc/libm/i386/fegetround.c
- --- uClibc-0.9.33.2/libm/i386/fegetround.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/fegetround.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
-
- diff -Nur uClibc-0.9.33.2/libm/i386/feholdexcpt.c uClibc/libm/i386/feholdexcpt.c
- --- uClibc-0.9.33.2/libm/i386/feholdexcpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/feholdexcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libm/i386/fesetenv.c uClibc/libm/i386/fesetenv.c
- --- uClibc-0.9.33.2/libm/i386/fesetenv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/fesetenv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <assert.h>
- diff -Nur uClibc-0.9.33.2/libm/i386/fesetround.c uClibc/libm/i386/fesetround.c
- --- uClibc-0.9.33.2/libm/i386/fesetround.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/fesetround.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libm/i386/feupdateenv.c uClibc/libm/i386/feupdateenv.c
- --- uClibc-0.9.33.2/libm/i386/feupdateenv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/feupdateenv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libm/i386/fgetexcptflg.c uClibc/libm/i386/fgetexcptflg.c
- --- uClibc-0.9.33.2/libm/i386/fgetexcptflg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/fgetexcptflg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
-
- diff -Nur uClibc-0.9.33.2/libm/i386/fraiseexcpt.c uClibc/libm/i386/fraiseexcpt.c
- --- uClibc-0.9.33.2/libm/i386/fraiseexcpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/fraiseexcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <math.h>
- diff -Nur uClibc-0.9.33.2/libm/i386/fsetexcptflg.c uClibc/libm/i386/fsetexcptflg.c
- --- uClibc-0.9.33.2/libm/i386/fsetexcptflg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/fsetexcptflg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <math.h>
- diff -Nur uClibc-0.9.33.2/libm/i386/ftestexcept.c uClibc/libm/i386/ftestexcept.c
- --- uClibc-0.9.33.2/libm/i386/ftestexcept.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/i386/ftestexcept.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libm/k_cos.c uClibc/libm/k_cos.c
- --- uClibc-0.9.33.2/libm/k_cos.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/k_cos.c 2014-02-03 12:32:56.000000000 +0100
- @@ -56,7 +56,7 @@
- C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
- C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
-
- -double attribute_hidden __kernel_cos(double x, double y)
- +double __kernel_cos(double x, double y)
- {
- double a,hz,z,r,qx;
- int32_t ix;
- diff -Nur uClibc-0.9.33.2/libm/k_rem_pio2.c uClibc/libm/k_rem_pio2.c
- --- uClibc-0.9.33.2/libm/k_rem_pio2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/k_rem_pio2.c 2014-02-03 12:32:56.000000000 +0100
- @@ -147,7 +147,7 @@
- two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
- twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
-
- -int attribute_hidden __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
- +int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
- {
- int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
- double z,fw,f[20],fq[20],q[20];
- diff -Nur uClibc-0.9.33.2/libm/k_sin.c uClibc/libm/k_sin.c
- --- uClibc-0.9.33.2/libm/k_sin.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/k_sin.c 2014-02-03 12:32:56.000000000 +0100
- @@ -49,7 +49,7 @@
- S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
- S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
-
- -double attribute_hidden __kernel_sin(double x, double y, int iy)
- +double __kernel_sin(double x, double y, int iy)
- {
- double z,r,v;
- int32_t ix;
- diff -Nur uClibc-0.9.33.2/libm/k_standard.c uClibc/libm/k_standard.c
- --- uClibc-0.9.33.2/libm/k_standard.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/k_standard.c 2014-02-03 12:32:56.000000000 +0100
- @@ -598,6 +598,7 @@
- errno = EDOM;
- }
- break;
- +# ifdef __UCLIBC_SUSV3_LEGACY__
- case 32:
- case 132:
- /* scalb overflow; SVID also returns +-HUGE_VAL */
- @@ -622,6 +623,7 @@
- errno = ERANGE;
- }
- break;
- +# endif
- case 34:
- case 134:
- /* j0(|x|>X_TLOSS) */
- diff -Nur uClibc-0.9.33.2/libm/k_tan.c uClibc/libm/k_tan.c
- --- uClibc-0.9.33.2/libm/k_tan.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/k_tan.c 2014-02-03 12:32:56.000000000 +0100
- @@ -66,7 +66,7 @@
- 2.59073051863633712884e-05, /* 0x3EFB2A70, 0x74BF7AD4 */
- };
-
- -double attribute_hidden __kernel_tan(double x, double y, int iy)
- +double __kernel_tan(double x, double y, int iy)
- {
- double z,r,v,w,s;
- int32_t ix,hx;
- diff -Nur uClibc-0.9.33.2/libm/metag/fclrexcpt.c uClibc/libm/metag/fclrexcpt.c
- --- uClibc-0.9.33.2/libm/metag/fclrexcpt.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/fclrexcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,44 @@
- +/* Clear given exceptions in current floating-point environment.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +#include <unistd.h>
- +
- +#include "internal.h"
- +
- +int
- +feclearexcept (int excepts)
- +{
- + unsigned int temp;
- +
- + /* Get the current exceptions. */
- + __asm__ ("MOV %0,TXDEFR" : "=r" (temp));
- +
- + /* Mask out unsupported bits/exceptions. */
- + excepts &= FE_ALL_EXCEPT;
- +
- + excepts <<= 16;
- +
- + temp &= ~excepts;
- +
- + metag_set_fpu_flags(temp);
- +
- + /* Success. */
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/fedisblxcpt.c uClibc/libm/metag/fedisblxcpt.c
- --- uClibc-0.9.33.2/libm/metag/fedisblxcpt.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/fedisblxcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,40 @@
- +/* Disable floating-point exceptions.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +#include <unistd.h>
- +
- +#include "internal.h"
- +
- +int
- +fedisableexcept (int excepts)
- +{
- + unsigned int old_exc;
- +
- + /* Get the current control word. */
- + __asm__ ("MOV %0,TXDEFR" : "=r" (old_exc));
- +
- + old_exc &= FE_ALL_EXCEPT;
- +
- + excepts = old_exc & ~excepts;
- +
- + metag_set_fpu_flags(excepts);
- +
- + return old_exc;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/feenablxcpt.c uClibc/libm/metag/feenablxcpt.c
- --- uClibc-0.9.33.2/libm/metag/feenablxcpt.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/feenablxcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,40 @@
- +/* Enable floating-point exceptions.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +#include <unistd.h>
- +
- +#include "internal.h"
- +
- +int
- +feenableexcept (int excepts)
- +{
- + unsigned int old_exc;
- +
- + /* Get the current control word. */
- + __asm__ ("MOV %0,TXDEFR" : "=r" (old_exc));
- +
- + old_exc &= FE_ALL_EXCEPT;
- +
- + excepts |= old_exc;
- +
- + metag_set_fpu_flags(excepts);
- +
- + return old_exc;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/fegetenv.c uClibc/libm/metag/fegetenv.c
- --- uClibc-0.9.33.2/libm/metag/fegetenv.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/fegetenv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,36 @@
- +/* Store current floating-point environment.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +
- +int
- +fegetenv (fenv_t *envp)
- +{
- + unsigned int txdefr;
- + unsigned int txmode;
- +
- + __asm__ ("MOV %0,TXDEFR" : "=r" (txdefr));
- + __asm__ ("MOV %0,TXMODE" : "=r" (txmode));
- +
- + envp->txdefr = txdefr;
- + envp->txmode = txmode;
- +
- + /* Success. */
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/fegetexcept.c uClibc/libm/metag/fegetexcept.c
- --- uClibc-0.9.33.2/libm/metag/fegetexcept.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/fegetexcept.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,31 @@
- +/* Get enabled floating-point exceptions.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +
- +int
- +fegetexcept (void)
- +{
- + unsigned int exc;
- +
- + /* Get the current control word. */
- + __asm__ ("MOV %0,TXDEFR" : "=r" (exc));
- +
- + return exc & FE_ALL_EXCEPT;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/fegetround.c uClibc/libm/metag/fegetround.c
- --- uClibc-0.9.33.2/libm/metag/fegetround.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/fegetround.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,30 @@
- +/* Return current rounding direction.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +
- +int
- +fegetround (void)
- +{
- + unsigned int txmode;
- +
- + __asm__ ("MOV %0,TXMODE" : "=r" (txmode));
- +
- + return (txmode >> 16) & 0x3;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/feholdexcpt.c uClibc/libm/metag/feholdexcpt.c
- --- uClibc-0.9.33.2/libm/metag/feholdexcpt.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/feholdexcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,41 @@
- +/* Store current floating-point environment and clear exceptions.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +#include <unistd.h>
- +
- +#include "internal.h"
- +
- +int
- +feholdexcept (fenv_t *envp)
- +{
- + unsigned int txdefr;
- + unsigned int txmode;
- +
- + __asm__ ("MOV %0,TXDEFR" : "=r" (txdefr));
- + __asm__ ("MOV %0,TXMODE" : "=r" (txmode));
- +
- + envp->txdefr = txdefr;
- + envp->txmode = txmode;
- +
- + metag_set_fpu_flags(0);
- +
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/fesetenv.c uClibc/libm/metag/fesetenv.c
- --- uClibc-0.9.33.2/libm/metag/fesetenv.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/fesetenv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,60 @@
- +/* Install given floating-point environment.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +#include <assert.h>
- +
- +#include "internal.h"
- +
- +libm_hidden_proto(fesetenv)
- +
- +int
- +fesetenv (const fenv_t *envp)
- +{
- + unsigned int exc;
- + unsigned int txmode;
- +
- + __asm__ ("MOV %0,TXMODE" : "=r" (txmode));
- +
- + /* Clear rounding mode bits (round to nearest). */
- + txmode &= ~(0x3 << 16);
- +
- + if (envp == FE_DFL_ENV)
- + {
- + exc = 0;
- + }
- + else if (envp == FE_NOMASK_ENV)
- + {
- + exc = 0x1f;
- + }
- + else
- + {
- + exc = envp->txdefr & (FE_ALL_EXCEPT | (FE_ALL_EXCEPT << 16));
- + /* Write rounding mode and guard bit. */
- + txmode |= (0x1 << 18 ) | (envp->txmode & (0x3 << 16));
- + }
- +
- + __asm__ ("MOV TXMODE,%0" : : "r" (txmode));
- +
- + metag_set_fpu_flags(exc);
- +
- + /* Success. */
- + return 0;
- +}
- +libm_hidden_def(fesetenv)
- diff -Nur uClibc-0.9.33.2/libm/metag/fesetround.c uClibc/libm/metag/fesetround.c
- --- uClibc-0.9.33.2/libm/metag/fesetround.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/fesetround.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,41 @@
- +/* Set current rounding direction.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +#include <unistd.h>
- +
- +int
- +fesetround (int round)
- +{
- + unsigned int txmode;
- +
- + if ((round & ~0x3) != 0)
- + /* ROUND is no valid rounding mode. */
- + return 1;
- +
- + __asm__ ("MOV %0,TXMODE" : "=r" (txmode));
- +
- + txmode &= ~(0x3 << 16);
- + /* Write rounding mode and guard bit. */
- + txmode |= (0x1 << 18 ) | (round << 16);
- +
- + __asm__ ("MOV TXMODE,%0" : : "r" (txmode));
- +
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/feupdateenv.c uClibc/libm/metag/feupdateenv.c
- --- uClibc-0.9.33.2/libm/metag/feupdateenv.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/feupdateenv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,45 @@
- +/* Install given floating-point environment and raise exceptions.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +#include <unistd.h>
- +
- +libm_hidden_proto(fesetenv)
- +libm_hidden_proto(feraiseexcept)
- +
- +int
- +feupdateenv (const fenv_t *envp)
- +{
- + unsigned int temp;
- +
- + /* Save current exceptions. */
- + __asm__ ("MOV %0,TXDEFR" : "=r" (temp));
- +
- + temp >>= 16;
- + temp &= FE_ALL_EXCEPT;
- +
- + /* Install new environment. */
- + fesetenv (envp);
- +
- + /* Raise the saved exception. */
- + feraiseexcept ((int) temp);
- +
- + /* Success. */
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/fgetexcptflg.c uClibc/libm/metag/fgetexcptflg.c
- --- uClibc-0.9.33.2/libm/metag/fgetexcptflg.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/fgetexcptflg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,34 @@
- +/* Store current representation for exceptions.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +
- +int
- +fegetexceptflag (fexcept_t *flagp, int excepts)
- +{
- + unsigned int temp;
- +
- + /* Get the current exceptions. */
- + __asm__ ("MOV %0,TXDEFR" : "=r" (temp));
- +
- + *flagp = temp & excepts & FE_ALL_EXCEPT;
- +
- + /* Success. */
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/fraiseexcpt.c uClibc/libm/metag/fraiseexcpt.c
- --- uClibc-0.9.33.2/libm/metag/fraiseexcpt.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/fraiseexcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,92 @@
- +/* Raise given exceptions.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +#include <math.h>
- +
- +libm_hidden_proto(feraiseexcept)
- +
- +int
- +feraiseexcept (int excepts)
- +{
- + /* Raise exceptions represented by EXPECTS. But we must raise only
- + one signal at a time. It is important that if the overflow/underflow
- + exception and the inexact exception are given at the same time,
- + the overflow/underflow exception follows the inexact exception. */
- +
- + /* First: invalid exception. */
- + if ((FE_INVALID & excepts) != 0)
- + {
- + /* Reciprocal square root of a negative number is invalid. */
- + __asm__ volatile(
- + "F MOV FX.0,#0xc000 ! -2\n"
- + "F RSQ FX.1,FX.0\n"
- + );
- + }
- +
- + /* Next: division by zero. */
- + if ((FE_DIVBYZERO & excepts) != 0)
- + {
- + __asm__ volatile(
- + "F MOV FX.0,#0\n"
- + "F RCP FX.1,FX.0\n"
- + );
- + }
- +
- + /* Next: overflow. */
- + if ((FE_OVERFLOW & excepts) != 0)
- + {
- + /* Adding a large number in single precision can cause overflow. */
- + __asm__ volatile(
- + " MOVT D0.0,#0x7f7f\n"
- + " ADD D0.0,D0.0,#0xffff\n"
- + "F MOV FX.0,D0.0\n"
- + "F ADD FX.1,FX.0,FX.0\n"
- + );
- + }
- +
- + /* Next: underflow. */
- + if ((FE_UNDERFLOW & excepts) != 0)
- + {
- + /* Multiplying a small value by 0.5 will cause an underflow. */
- + __asm__ volatile(
- + " MOV D0.0,#1\n"
- + "F MOV FX.0,D0.0\n"
- + " MOVT D0.0,#0x3f00\n"
- + "F MOV FX.1,D0.0\n"
- + "F MUL FX.2,FX.1,FX.0\n"
- + );
- + }
- +
- + /* Last: inexact. */
- + if ((FE_INEXACT & excepts) != 0)
- + {
- + /* Converting a small single precision value to half precision
- + can cause an inexact exception. */
- + __asm__ volatile(
- + " MOV D0.0,#0x0001\n"
- + "F MOV FX.0,D0.0\n"
- + "F FTOH FX.1,FX.0\n"
- + );
- + }
- +
- + /* Success. */
- + return 0;
- +}
- +libm_hidden_def(feraiseexcept)
- diff -Nur uClibc-0.9.33.2/libm/metag/fsetexcptflg.c uClibc/libm/metag/fsetexcptflg.c
- --- uClibc-0.9.33.2/libm/metag/fsetexcptflg.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/fsetexcptflg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,44 @@
- +/* Set floating-point environment exception handling.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +#include <math.h>
- +#include <unistd.h>
- +
- +#include "internal.h"
- +
- +int
- +fesetexceptflag (const fexcept_t *flagp, int excepts)
- +{
- + unsigned int temp;
- +
- + /* Get the current exceptions. */
- + __asm__ ("MOV %0,TXDEFR" : "=r" (temp));
- +
- + excepts &= FE_ALL_EXCEPT;
- + excepts <<= 16;
- +
- + temp &= ~excepts;
- + temp |= *flagp & excepts;
- +
- + metag_set_fpu_flags(temp);
- +
- + /* Success. */
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/ftestexcept.c uClibc/libm/metag/ftestexcept.c
- --- uClibc-0.9.33.2/libm/metag/ftestexcept.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/ftestexcept.c 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,32 @@
- +/* Test exception in current environment.
- + Copyright (C) 2013 Imagination Technologies Ltd.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <fenv.h>
- +#include <unistd.h>
- +
- +int
- +fetestexcept (int excepts)
- +{
- + unsigned int temp;
- +
- + /* Get the current exceptions. */
- + __asm__ ("MOV %0,TXDEFR" : "=r" (temp));
- +
- + return (temp >> 16) & excepts & FE_ALL_EXCEPT;
- +}
- diff -Nur uClibc-0.9.33.2/libm/metag/internal.h uClibc/libm/metag/internal.h
- --- uClibc-0.9.33.2/libm/metag/internal.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/internal.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,7 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +void metag_set_fpu_flags(unsigned int flags);
- diff -Nur uClibc-0.9.33.2/libm/metag/Makefile.arch uClibc/libm/metag/Makefile.arch
- --- uClibc-0.9.33.2/libm/metag/Makefile.arch 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libm/metag/Makefile.arch 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,23 @@
- +# Makefile for uClibc
- +#
- +# Copyright (c) 2013 Imagination Technologies Ltd.
- +#
- +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +ifeq ($(UCLIBC_HAS_FENV),y)
- +ifeq ($(CONFIG_META_2_1),y)
- +libm_ARCH_SRC:=$(wildcard $(libm_ARCH_DIR)/*.c)
- +libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_DIR)/%.c,$(libm_ARCH_OUT)/%.o,$(libm_ARCH_SRC))
- +CFLAGS-libm += -Wa,-mfpu=metac21
- +endif
- +endif
- +
- +libm_ARCH_OBJS:=$(libm_ARCH_OBJ)
- +
- +ifeq ($(DOPIC),y)
- +libm-a-y+=$(libm_ARCH_OBJS:.o=.os)
- +else
- +libm-a-y+=$(libm_ARCH_OBJS)
- +endif
- +libm-so-y+=$(libm_ARCH_OBJS:.o=.os)
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fclrexcpt.c uClibc/libm/powerpc/e500/fpu/fclrexcpt.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fclrexcpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fclrexcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
- #undef feclearexcept
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fedisblxcpt.c uClibc/libm/powerpc/e500/fpu/fedisblxcpt.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fedisblxcpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fedisblxcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
- #include <syscall.h>
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/feenablxcpt.c uClibc/libm/powerpc/e500/fpu/feenablxcpt.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/feenablxcpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/feenablxcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
- #include <syscall.h>
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetenv.c uClibc/libm/powerpc/e500/fpu/fegetenv.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetenv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fegetenv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
- #include <syscall.h>
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetexcept.c uClibc/libm/powerpc/e500/fpu/fegetexcept.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetexcept.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fegetexcept.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
-
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetround.c uClibc/libm/powerpc/e500/fpu/fegetround.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetround.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fegetround.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
-
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/feholdexcpt.c uClibc/libm/powerpc/e500/fpu/feholdexcpt.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/feholdexcpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/feholdexcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
- #include <syscall.h>
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fe_nomask.c uClibc/libm/powerpc/e500/fpu/fe_nomask.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fe_nomask.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fe_nomask.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fenv.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fenv_const.c uClibc/libm/powerpc/e500/fpu/fenv_const.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fenv_const.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fenv_const.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* If the default argument is used we use this value. */
- const unsigned long long __fe_dfl_env __attribute__ ((aligned (8))) =
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fenv_libc.h uClibc/libm/powerpc/e500/fpu/fenv_libc.h
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fenv_libc.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fenv_libc.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _FENV_LIBC_H
- #define _FENV_LIBC_H 1
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fesetenv.c uClibc/libm/powerpc/e500/fpu/fesetenv.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fesetenv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fesetenv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
- #include <syscall.h>
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fesetround.c uClibc/libm/powerpc/e500/fpu/fesetround.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fesetround.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fesetround.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
-
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/feupdateenv.c uClibc/libm/powerpc/e500/fpu/feupdateenv.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/feupdateenv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/feupdateenv.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
- #include <syscall.h>
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fgetexcptflg.c uClibc/libm/powerpc/e500/fpu/fgetexcptflg.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fgetexcptflg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fgetexcptflg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
-
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fraiseexcpt.c uClibc/libm/powerpc/e500/fpu/fraiseexcpt.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fraiseexcpt.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fraiseexcpt.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
-
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fsetexcptflg.c uClibc/libm/powerpc/e500/fpu/fsetexcptflg.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fsetexcptflg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/fsetexcptflg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
-
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/ftestexcept.c uClibc/libm/powerpc/e500/fpu/ftestexcept.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/ftestexcept.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/fpu/ftestexcept.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fenv_libc.h"
-
- diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/spe-raise.c uClibc/libm/powerpc/e500/spe-raise.c
- --- uClibc-0.9.33.2/libm/powerpc/e500/spe-raise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/powerpc/e500/spe-raise.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "fpu/fenv_libc.h"
-
- diff -Nur uClibc-0.9.33.2/libm/s_ceil.c uClibc/libm/s_ceil.c
- --- uClibc-0.9.33.2/libm/s_ceil.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_ceil.c 2014-02-03 12:32:56.000000000 +0100
- @@ -28,35 +28,35 @@
-
- double ceil(double x)
- {
- - int32_t i0,i1,j0;
- + int32_t i0,i1,_j0;
- u_int32_t i,j;
- EXTRACT_WORDS(i0,i1,x);
- - j0 = ((i0>>20)&0x7ff)-0x3ff;
- - if(j0<20) {
- - if(j0<0) { /* raise inexact if x != 0 */
- + _j0 = ((i0>>20)&0x7ff)-0x3ff;
- + if(_j0<20) {
- + if(_j0<0) { /* raise inexact if x != 0 */
- if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0<0) {i0=0x80000000;i1=0;}
- else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;}
- }
- } else {
- - i = (0x000fffff)>>j0;
- + i = (0x000fffff)>>_j0;
- if(((i0&i)|i1)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- - if(i0>0) i0 += (0x00100000)>>j0;
- + if(i0>0) i0 += (0x00100000)>>_j0;
- i0 &= (~i); i1=0;
- }
- }
- - } else if (j0>51) {
- - if(j0==0x400) return x+x; /* inf or NaN */
- + } else if (_j0>51) {
- + if(_j0==0x400) return x+x; /* inf or NaN */
- else return x; /* x is integral */
- } else {
- - i = ((u_int32_t)(0xffffffff))>>(j0-20);
- + i = ((u_int32_t)(0xffffffff))>>(_j0-20);
- if((i1&i)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0>0) {
- - if(j0==20) i0+=1;
- + if(_j0==20) i0+=1;
- else {
- - j = i1 + (1<<(52-j0));
- + j = i1 + (1<<(52-_j0));
- if(j<i1) i0+=1; /* got a carry */
- i1 = j;
- }
- diff -Nur uClibc-0.9.33.2/libm/s_floor.c uClibc/libm/s_floor.c
- --- uClibc-0.9.33.2/libm/s_floor.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_floor.c 2014-02-03 12:32:56.000000000 +0100
- @@ -28,36 +28,36 @@
-
- double floor(double x)
- {
- - int32_t i0,i1,j0;
- + int32_t i0,i1,_j0;
- u_int32_t i,j;
- EXTRACT_WORDS(i0,i1,x);
- - j0 = ((i0>>20)&0x7ff)-0x3ff;
- - if(j0<20) {
- - if(j0<0) { /* raise inexact if x != 0 */
- + _j0 = ((i0>>20)&0x7ff)-0x3ff;
- + if(_j0<20) {
- + if(_j0<0) { /* raise inexact if x != 0 */
- if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0>=0) {i0=i1=0;}
- else if(((i0&0x7fffffff)|i1)!=0)
- { i0=0xbff00000;i1=0;}
- }
- } else {
- - i = (0x000fffff)>>j0;
- + i = (0x000fffff)>>_j0;
- if(((i0&i)|i1)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- - if(i0<0) i0 += (0x00100000)>>j0;
- + if(i0<0) i0 += (0x00100000)>>_j0;
- i0 &= (~i); i1=0;
- }
- }
- - } else if (j0>51) {
- - if(j0==0x400) return x+x; /* inf or NaN */
- + } else if (_j0>51) {
- + if(_j0==0x400) return x+x; /* inf or NaN */
- else return x; /* x is integral */
- } else {
- - i = ((u_int32_t)(0xffffffff))>>(j0-20);
- + i = ((u_int32_t)(0xffffffff))>>(_j0-20);
- if((i1&i)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0<0) {
- - if(j0==20) i0+=1;
- + if(_j0==20) i0+=1;
- else {
- - j = i1+(1<<(52-j0));
- + j = i1+(1<<(52-_j0));
- if(j<i1) i0 +=1 ; /* got a carry */
- i1=j;
- }
- diff -Nur uClibc-0.9.33.2/libm/s_fma.c uClibc/libm/s_fma.c
- --- uClibc-0.9.33.2/libm/s_fma.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_fma.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <math.h>
-
- diff -Nur uClibc-0.9.33.2/libm/s_fpclassify.c uClibc/libm/s_fpclassify.c
- --- uClibc-0.9.33.2/libm/s_fpclassify.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_fpclassify.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <math.h>
-
- diff -Nur uClibc-0.9.33.2/libm/s_fpclassifyf.c uClibc/libm/s_fpclassifyf.c
- --- uClibc-0.9.33.2/libm/s_fpclassifyf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_fpclassifyf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <math.h>
- #include "math_private.h"
- diff -Nur uClibc-0.9.33.2/libm/s_llrint.c uClibc/libm/s_llrint.c
- --- uClibc-0.9.33.2/libm/s_llrint.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_llrint.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- /* Prevent math.h from defining a colliding inline */
- @@ -34,7 +33,7 @@
- long long int
- llrint (double x)
- {
- - int32_t j0;
- + int32_t _j0;
- u_int32_t i1, i0;
- long long int result;
- volatile double w;
- @@ -42,39 +41,39 @@
- int sx;
-
- EXTRACT_WORDS (i0, i1, x);
- - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- sx = i0 >> 31;
- i0 &= 0xfffff;
- i0 |= 0x100000;
-
- - if (j0 < 20)
- + if (_j0 < 20)
- {
- w = two52[sx] + x;
- t = w - two52[sx];
- EXTRACT_WORDS (i0, i1, t);
- - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- i0 &= 0xfffff;
- i0 |= 0x100000;
-
- - result = (j0 < 0 ? 0 : i0 >> (20 - j0));
- + result = (_j0 < 0 ? 0 : i0 >> (20 - _j0));
- }
- - else if (j0 < (int32_t) (8 * sizeof (long long int)) - 1)
- + else if (_j0 < (int32_t) (8 * sizeof (long long int)) - 1)
- {
- - if (j0 >= 52)
- - result = (((long long int) i0 << 32) | i1) << (j0 - 52);
- + if (_j0 >= 52)
- + result = (((long long int) i0 << 32) | i1) << (_j0 - 52);
- else
- {
- w = two52[sx] + x;
- t = w - two52[sx];
- EXTRACT_WORDS (i0, i1, t);
- - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- i0 &= 0xfffff;
- i0 |= 0x100000;
-
- - if (j0 == 20)
- + if (_j0 == 20)
- result = (long long int) i0;
- else
- - result = ((long long int) i0 << (j0 - 20)) | (i1 >> (52 - j0));
- + result = ((long long int) i0 << (_j0 - 20)) | (i1 >> (52 - _j0));
- }
- }
- else
- diff -Nur uClibc-0.9.33.2/libm/s_llround.c uClibc/libm/s_llround.c
- --- uClibc-0.9.33.2/libm/s_llround.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_llround.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <math.h>
- #include "math_private.h"
- @@ -24,42 +23,42 @@
- long long int
- llround (double x)
- {
- - int32_t j0;
- + int32_t _j0;
- u_int32_t i1, i0;
- long long int result;
- int sign;
-
- EXTRACT_WORDS (i0, i1, x);
- - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- sign = (i0 & 0x80000000) != 0 ? -1 : 1;
- i0 &= 0xfffff;
- i0 |= 0x100000;
-
- - if (j0 < 20)
- + if (_j0 < 20)
- {
- - if (j0 < 0)
- - return j0 < -1 ? 0 : sign;
- + if (_j0 < 0)
- + return _j0 < -1 ? 0 : sign;
- else
- {
- - i0 += 0x80000 >> j0;
- + i0 += 0x80000 >> _j0;
-
- - result = i0 >> (20 - j0);
- + result = i0 >> (20 - _j0);
- }
- }
- - else if (j0 < (int32_t) (8 * sizeof (long long int)) - 1)
- + else if (_j0 < (int32_t) (8 * sizeof (long long int)) - 1)
- {
- - if (j0 >= 52)
- - result = (((long long int) i0 << 32) | i1) << (j0 - 52);
- + if (_j0 >= 52)
- + result = (((long long int) i0 << 32) | i1) << (_j0 - 52);
- else
- {
- - u_int32_t j = i1 + (0x80000000 >> (j0 - 20));
- + u_int32_t j = i1 + (0x80000000 >> (_j0 - 20));
- if (j < i1)
- ++i0;
-
- - if (j0 == 20)
- + if (_j0 == 20)
- result = (long long int) i0;
- else
- - result = ((long long int) i0 << (j0 - 20)) | (j >> (52 - j0));
- + result = ((long long int) i0 << (_j0 - 20)) | (j >> (52 - _j0));
- }
- }
- else
- diff -Nur uClibc-0.9.33.2/libm/s_lrint.c uClibc/libm/s_lrint.c
- --- uClibc-0.9.33.2/libm/s_lrint.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_lrint.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- /* Prevent math.h from defining a colliding inline */
- @@ -35,7 +34,7 @@
- long int
- lrint (double x)
- {
- - int32_t j0;
- + int32_t _j0;
- u_int32_t i0,i1;
- volatile double w;
- double t;
- @@ -43,44 +42,44 @@
- int sx;
-
- EXTRACT_WORDS (i0, i1, x);
- - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- sx = i0 >> 31;
- i0 &= 0xfffff;
- i0 |= 0x100000;
-
- - if (j0 < 20)
- + if (_j0 < 20)
- {
- - if (j0 < -1)
- + if (_j0 < -1)
- return 0;
- else
- {
- w = two52[sx] + x;
- t = w - two52[sx];
- EXTRACT_WORDS (i0, i1, t);
- - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- i0 &= 0xfffff;
- i0 |= 0x100000;
-
- - result = i0 >> (20 - j0);
- + result = i0 >> (20 - _j0);
- }
- }
- - else if (j0 < (int32_t) (8 * sizeof (long int)) - 1)
- + else if (_j0 < (int32_t) (8 * sizeof (long int)) - 1)
- {
- - if (j0 >= 52)
- - result = ((long int) i0 << (j0 - 20)) | (i1 << (j0 - 52));
- + if (_j0 >= 52)
- + result = ((long int) i0 << (_j0 - 20)) | (i1 << (_j0 - 52));
- else
- {
- w = two52[sx] + x;
- t = w - two52[sx];
- EXTRACT_WORDS (i0, i1, t);
- - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- i0 &= 0xfffff;
- i0 |= 0x100000;
-
- - if (j0 == 20)
- + if (_j0 == 20)
- result = (long int) i0;
- else
- - result = ((long int) i0 << (j0 - 20)) | (i1 >> (52 - j0));
- + result = ((long int) i0 << (_j0 - 20)) | (i1 >> (52 - _j0));
- }
- }
- else
- diff -Nur uClibc-0.9.33.2/libm/s_lround.c uClibc/libm/s_lround.c
- --- uClibc-0.9.33.2/libm/s_lround.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_lround.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <math.h>
- #include "math_private.h"
- @@ -24,42 +23,42 @@
- long int
- lround (double x)
- {
- - int32_t j0;
- + int32_t _j0;
- u_int32_t i1, i0;
- long int result;
- int sign;
-
- EXTRACT_WORDS (i0, i1, x);
- - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- sign = (i0 & 0x80000000) != 0 ? -1 : 1;
- i0 &= 0xfffff;
- i0 |= 0x100000;
-
- - if (j0 < 20)
- + if (_j0 < 20)
- {
- - if (j0 < 0)
- - return j0 < -1 ? 0 : sign;
- + if (_j0 < 0)
- + return _j0 < -1 ? 0 : sign;
- else
- {
- - i0 += 0x80000 >> j0;
- + i0 += 0x80000 >> _j0;
-
- - result = i0 >> (20 - j0);
- + result = i0 >> (20 - _j0);
- }
- }
- - else if (j0 < (int32_t) (8 * sizeof (long int)) - 1)
- + else if (_j0 < (int32_t) (8 * sizeof (long int)) - 1)
- {
- - if (j0 >= 52)
- - result = ((long int) i0 << (j0 - 20)) | (i1 << (j0 - 52));
- + if (_j0 >= 52)
- + result = ((long int) i0 << (_j0 - 20)) | (i1 << (_j0 - 52));
- else
- {
- - u_int32_t j = i1 + (0x80000000 >> (j0 - 20));
- + u_int32_t j = i1 + (0x80000000 >> (_j0 - 20));
- if (j < i1)
- ++i0;
-
- - if (j0 == 20)
- + if (_j0 == 20)
- result = (long int) i0;
- else
- - result = ((long int) i0 << (j0 - 20)) | (j >> (52 - j0));
- + result = ((long int) i0 << (_j0 - 20)) | (j >> (52 - _j0));
- }
- }
- else
- diff -Nur uClibc-0.9.33.2/libm/s_modf.c uClibc/libm/s_modf.c
- --- uClibc-0.9.33.2/libm/s_modf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_modf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -26,16 +26,16 @@
-
- double modf(double x, double *iptr)
- {
- - int32_t i0,i1,j0;
- + int32_t i0,i1,_j0;
- u_int32_t i;
- EXTRACT_WORDS(i0,i1,x);
- - j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent of x */
- - if(j0<20) { /* integer part in high x */
- - if(j0<0) { /* |x|<1 */
- + _j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent of x */
- + if(_j0<20) { /* integer part in high x */
- + if(_j0<0) { /* |x|<1 */
- INSERT_WORDS(*iptr,i0&0x80000000,0); /* *iptr = +-0 */
- return x;
- } else {
- - i = (0x000fffff)>>j0;
- + i = (0x000fffff)>>_j0;
- if(((i0&i)|i1)==0) { /* x is integral */
- *iptr = x;
- INSERT_WORDS(x,i0&0x80000000,0); /* return +-0 */
- @@ -45,15 +45,15 @@
- return x - *iptr;
- }
- }
- - } else if (j0>51) { /* no fraction part */
- + } else if (_j0>51) { /* no fraction part */
- *iptr = x*one;
- /* We must handle NaNs separately. */
- - if (j0 == 0x400 && ((i0 & 0xfffff) | i1))
- + if (_j0 == 0x400 && ((i0 & 0xfffff) | i1))
- return x*one;
- INSERT_WORDS(x,i0&0x80000000,0); /* return +-0 */
- return x;
- } else { /* fraction part in low x */
- - i = ((u_int32_t)(0xffffffff))>>(j0-20);
- + i = ((u_int32_t)(0xffffffff))>>(_j0-20);
- if((i1&i)==0) { /* x is integral */
- *iptr = x;
- INSERT_WORDS(x,i0&0x80000000,0); /* return +-0 */
- diff -Nur uClibc-0.9.33.2/libm/s_rint.c uClibc/libm/s_rint.c
- --- uClibc-0.9.33.2/libm/s_rint.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_rint.c 2014-02-03 12:32:56.000000000 +0100
- @@ -30,7 +30,7 @@
-
- double rint(double x)
- {
- - int32_t i0, j0, sx;
- + int32_t i0, _j0, sx;
- u_int32_t i,i1;
- double t;
- /* We use w = x + 2^52; t = w - 2^52; trick to round x to integer.
- @@ -43,11 +43,11 @@
-
- EXTRACT_WORDS(i0,i1,x);
- /* Unbiased exponent */
- - j0 = ((((u_int32_t)i0) >> 20)&0x7ff)-0x3ff;
- + _j0 = ((((u_int32_t)i0) >> 20)&0x7ff)-0x3ff;
-
- - if (j0 > 51) {
- + if (_j0 > 51) {
- //Why bother? Just returning x works too
- - //if (j0 == 0x400) /* inf or NaN */
- + //if (_j0 == 0x400) /* inf or NaN */
- // return x+x;
- return x; /* x is integral */
- }
- @@ -55,8 +55,8 @@
- /* Sign */
- sx = ((u_int32_t)i0) >> 31;
-
- - if (j0<20) {
- - if (j0<0) { /* |x| < 1 */
- + if (_j0<20) {
- + if (_j0<0) { /* |x| < 1 */
- if (((i0&0x7fffffff)|i1)==0) return x;
- i1 |= (i0&0x0fffff);
- i0 &= 0xfffe0000;
- @@ -68,19 +68,19 @@
- SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31));
- return t;
- } else {
- - i = (0x000fffff)>>j0;
- + i = (0x000fffff)>>_j0;
- if (((i0&i)|i1)==0) return x; /* x is integral */
- i>>=1;
- if (((i0&i)|i1)!=0) {
- - if (j0==19) i1 = 0x40000000;
- - else i0 = (i0&(~i))|((0x20000)>>j0);
- + if (_j0==19) i1 = 0x40000000;
- + else i0 = (i0&(~i))|((0x20000)>>_j0);
- }
- }
- } else {
- - i = ((u_int32_t)(0xffffffff))>>(j0-20);
- + i = ((u_int32_t)(0xffffffff))>>(_j0-20);
- if ((i1&i)==0) return x; /* x is integral */
- i>>=1;
- - if ((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20));
- + if ((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(_j0-20));
- }
- INSERT_WORDS(x,i0,i1);
- w = TWO52[sx]+x;
- diff -Nur uClibc-0.9.33.2/libm/s_round.c uClibc/libm/s_round.c
- --- uClibc-0.9.33.2/libm/s_round.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_round.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <math.h>
- #include "math_private.h"
- @@ -26,41 +25,41 @@
- double
- round (double x)
- {
- - int32_t i0, j0;
- + int32_t i0, _j0;
- u_int32_t i1;
-
- EXTRACT_WORDS (i0, i1, x);
- - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- - if (j0 < 20)
- + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- + if (_j0 < 20)
- {
- - if (j0 < 0)
- + if (_j0 < 0)
- {
- if (huge + x > 0.0)
- {
- i0 &= 0x80000000;
- - if (j0 == -1)
- + if (_j0 == -1)
- i0 |= 0x3ff00000;
- i1 = 0;
- }
- }
- else
- {
- - u_int32_t i = 0x000fffff >> j0;
- + u_int32_t i = 0x000fffff >> _j0;
- if (((i0 & i) | i1) == 0)
- /* X is integral. */
- return x;
- if (huge + x > 0.0)
- {
- /* Raise inexact if x != 0. */
- - i0 += 0x00080000 >> j0;
- + i0 += 0x00080000 >> _j0;
- i0 &= ~i;
- i1 = 0;
- }
- }
- }
- - else if (j0 > 51)
- + else if (_j0 > 51)
- {
- - if (j0 == 0x400)
- + if (_j0 == 0x400)
- /* Inf or NaN. */
- return x + x;
- else
- @@ -68,7 +67,7 @@
- }
- else
- {
- - u_int32_t i = 0xffffffff >> (j0 - 20);
- + u_int32_t i = 0xffffffff >> (_j0 - 20);
- if ((i1 & i) == 0)
- /* X is integral. */
- return x;
- @@ -76,7 +75,7 @@
- if (huge + x > 0.0)
- {
- /* Raise inexact if x != 0. */
- - u_int32_t j = i1 + (1 << (51 - j0));
- + u_int32_t j = i1 + (1 << (51 - _j0));
- if (j < i1)
- i0 += 1;
- i1 = j;
- diff -Nur uClibc-0.9.33.2/libm/s_scalbn.c uClibc/libm/s_scalbn.c
- --- uClibc-0.9.33.2/libm/s_scalbn.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_scalbn.c 2014-02-03 12:32:56.000000000 +0100
- @@ -62,12 +62,7 @@
- libm_hidden_def(scalbln)
-
- #if LONG_MAX == INT_MAX
- -/* strong_alias(scalbln, scalbn) - "error: conflicting types for 'scalbn'"
- - * because it tries to declare "typeof(scalbln) scalbn;"
- - * which tries to give "long" parameter to scalbn.
- - * Doing it by hand:
- - */
- -__typeof(scalbn) scalbn __attribute__((alias("scalbln")));
- +strong_alias_untyped(scalbln,scalbn)
- #else
- double scalbn(double x, int n)
- {
- diff -Nur uClibc-0.9.33.2/libm/s_signbit.c uClibc/libm/s_signbit.c
- --- uClibc-0.9.33.2/libm/s_signbit.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_signbit.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- /* Prevent math.h from defining a colliding inline */
- diff -Nur uClibc-0.9.33.2/libm/s_signbitf.c uClibc/libm/s_signbitf.c
- --- uClibc-0.9.33.2/libm/s_signbitf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_signbitf.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- /* Prevent math.h from defining a colliding inline */
- diff -Nur uClibc-0.9.33.2/libm/s_significand.c uClibc/libm/s_significand.c
- --- uClibc-0.9.33.2/libm/s_significand.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_significand.c 2014-02-03 12:32:56.000000000 +0100
- @@ -22,3 +22,4 @@
- {
- return __ieee754_scalb(x,(double) -ilogb(x));
- }
- +libm_hidden_def(significand)
- diff -Nur uClibc-0.9.33.2/libm/s_trunc.c uClibc/libm/s_trunc.c
- --- uClibc-0.9.33.2/libm/s_trunc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libm/s_trunc.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <math.h>
- #include "math_private.h"
- @@ -24,30 +23,30 @@
- double
- trunc (double x)
- {
- - int32_t i0, j0;
- + int32_t i0, _j0;
- u_int32_t i1;
- int sx;
-
- EXTRACT_WORDS (i0, i1, x);
- sx = i0 & 0x80000000;
- - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- - if (j0 < 20)
- + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
- + if (_j0 < 20)
- {
- - if (j0 < 0)
- + if (_j0 < 0)
- /* The magnitude of the number is < 1 so the result is +-0. */
- INSERT_WORDS (x, sx, 0);
- else
- - INSERT_WORDS (x, sx | (i0 & ~(0x000fffff >> j0)), 0);
- + INSERT_WORDS (x, sx | (i0 & ~(0x000fffff >> _j0)), 0);
- }
- - else if (j0 > 51)
- + else if (_j0 > 51)
- {
- - if (j0 == 0x400)
- + if (_j0 == 0x400)
- /* x is inf or NaN. */
- return x + x;
- }
- else
- {
- - INSERT_WORDS (x, i0, i1 & ~(0xffffffffu >> (j0 - 20)));
- + INSERT_WORDS (x, i0, i1 & ~(0xffffffffu >> (_j0 - 20)));
- }
-
- return x;
- diff -Nur uClibc-0.9.33.2/libnsl/nsl.c uClibc/libnsl/nsl.c
- --- uClibc-0.9.33.2/libnsl/nsl.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libnsl/nsl.c 2014-02-03 12:32:56.000000000 +0100
- @@ -7,8 +7,6 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <features.h>
- -
- void __stub2(void);
- void __stub2(void)
- {
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/alloca_cutoff.c uClibc/libpthread/linuxthreads/alloca_cutoff.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/alloca_cutoff.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/alloca_cutoff.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <alloca.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/attr.c uClibc/libpthread/linuxthreads/attr.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/attr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/attr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -361,7 +361,7 @@
- attr->__scope = PTHREAD_SCOPE_SYSTEM;
-
- #ifdef _STACK_GROWS_DOWN
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- attr->__stacksize = descr->p_stackaddr - (char *)descr->p_guardaddr
- - descr->p_guardsize;
- # else
- @@ -369,7 +369,7 @@
- - descr->p_guardsize;
- # endif
- #else
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- attr->__stacksize = (char *)descr->p_guardaddr - descr->p_stackaddr;
- # else
- attr->__stacksize = (char *)descr->p_guardaddr - (char *)descr;
- @@ -385,7 +385,7 @@
- otherwise the range of the stack area cannot be computed. */
- attr->__stacksize += attr->__guardsize;
- #endif
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- attr->__stackaddr = descr->p_stackaddr;
- #else
- # ifndef _STACK_GROWS_UP
- @@ -395,7 +395,7 @@
- # endif
- #endif
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- if (attr->__stackaddr == NULL)
- #else
- if (descr == &__pthread_initial_thread)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/barrier.c uClibc/libpthread/linuxthreads/barrier.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/barrier.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/barrier.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthread.h"
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/cancel.c uClibc/libpthread/linuxthreads/cancel.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/cancel.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/cancel.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,7 +15,6 @@
- /* Thread cancellation */
-
- #include <errno.h>
- -#include <libc-internal.h>
- #include "pthread.h"
- #include "internals.h"
- #include "spinlock.h"
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/.cvsignore uClibc/libpthread/linuxthreads/.cvsignore
- --- uClibc-0.9.33.2/libpthread/linuxthreads/.cvsignore 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/.cvsignore 1970-01-01 01:00:00.000000000 +0100
- @@ -1,3 +0,0 @@
- -.cvsignore
- -*.os
- -Makefile.in
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/descr.h uClibc/libpthread/linuxthreads/descr.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/descr.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/descr.h 2014-02-03 12:32:56.000000000 +0100
- @@ -23,7 +23,7 @@
- #include <stdint.h>
- #include <sys/types.h>
- #include <hp-timing.h>
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- #include <tls.h>
- #endif
- #include "uClibc-glue.h"
- @@ -112,7 +112,7 @@
-
- struct _pthread_descr_struct
- {
- -#if !defined USE_TLS || !TLS_DTV_AT_TP || INCLUDE_TLS_PADDING
- +#if !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP || INCLUDE_TLS_PADDING
- /* This overlaps tcbhead_t (see tls.h), as used for TLS without threads. */
- union
- {
- @@ -157,7 +157,7 @@
- char p_sigwaiting; /* true if a sigwait() is in progress */
- struct pthread_start_args p_start_args; /* arguments for thread creation */
- void ** p_specific[PTHREAD_KEY_1STLEVEL_SIZE]; /* thread-specific data */
- -#if !(USE_TLS && HAVE___THREAD)
- +#ifndef __UCLIBC_HAS_TLS__
- void * p_libc_specific[_LIBC_TSD_KEY_N]; /* thread-specific data for libc */
- int * p_errnop; /* pointer to used errno variable */
- int p_errno; /* error returned by last system call */
- @@ -185,7 +185,7 @@
- #if HP_TIMING_AVAIL
- hp_timing_t p_cpuclock_offset; /* Initial CPU clock for thread. */
- #endif
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- char *p_stackaddr; /* Stack address. */
- #endif
- size_t p_alloca_cutoff; /* Maximum size which should be allocated
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/errno.c uClibc/libpthread/linuxthreads/errno.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/errno.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/errno.c 2014-02-03 12:32:56.000000000 +0100
- @@ -20,7 +20,7 @@
- #include "pthread.h"
- #include "internals.h"
-
- -#if !USE_TLS || !HAVE___THREAD
- +#ifndef __UCLIBC_HAS_TLS__
- /* The definition in libc is sufficient if we use TLS. */
- int *
- __errno_location (void)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/events.c uClibc/libpthread/linuxthreads/events.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/events.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/events.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* The functions contained here do nothing, they just return. */
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/forward.c uClibc/libpthread/linuxthreads/forward.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/forward.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/forward.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <stdlib.h>
- @@ -26,7 +25,7 @@
- #include "internals.h"
-
- /* Pointers to the libc functions. */
- -struct pthread_functions __libc_pthread_functions attribute_hidden;
- +struct pthread_functions __libc_pthread_functions;
-
-
- # define FORWARD2(name, rettype, decl, params, defaction) \
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/internals.h uClibc/libpthread/linuxthreads/internals.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/internals.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/internals.h 2014-02-03 12:32:56.000000000 +0100
- @@ -30,7 +30,7 @@
- #include <bits/sigcontextinfo.h>
- #include <bits/pthreadtypes.h>
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- #include <tls.h>
- #endif
- #include "descr.h"
- @@ -200,19 +200,17 @@
-
- /* The page size we can get from the system. This should likely not be
- changed by the machine file but, you never know. */
- -#ifndef PAGE_SIZE
- -#define PAGE_SIZE (sysconf (_SC_PAGE_SIZE))
- -#endif
- +#define __PAGE_SIZE (sysconf (_SC_PAGESIZE))
-
- -/* The initial size of the thread stack. Must be a multiple of PAGE_SIZE. */
- +/* The initial size of the thread stack. Must be a multiple of __PAGE_SIZE. */
- #ifndef INITIAL_STACK_SIZE
- -#define INITIAL_STACK_SIZE (4 * PAGE_SIZE)
- +#define INITIAL_STACK_SIZE (4 * __PAGE_SIZE)
- #endif
-
- /* Size of the thread manager stack. The "- 32" avoids wasting space
- with some malloc() implementations. */
- #ifndef THREAD_MANAGER_STACK_SIZE
- -#define THREAD_MANAGER_STACK_SIZE (2 * PAGE_SIZE - 32)
- +#define THREAD_MANAGER_STACK_SIZE (2 * __PAGE_SIZE - 32)
- #endif
-
- /* The base of the "array" of thread stacks. The array will grow down from
- @@ -285,7 +283,7 @@
- extern void __pthread_perform_cleanup (char *currentframe);
- extern void __pthread_init_max_stacksize (void);
- extern int __pthread_initialize_manager (void);
- -extern void __pthread_message (const char * fmt, ...);
- +extern void __pthread_message (const char * fmt, ...) attribute_hidden;
- extern int __pthread_manager (void *reqfd);
- extern int __pthread_manager_event (void *reqfd);
- extern void __pthread_manager_sighandler (int sig);
- @@ -347,7 +345,7 @@
- int *__kind);
- extern void __pthread_kill_other_threads_np (void);
- extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
- - __const pthread_mutexattr_t *__mutex_attr);
- + const pthread_mutexattr_t *__mutex_attr);
- extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
- extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
- extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
- @@ -393,14 +391,14 @@
- extern void __pthread_sigsuspend (const sigset_t *mask) attribute_hidden;
-
- extern int __pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime);
- extern int __pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime);
- extern int __pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr);
-
- -extern int __pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
- +extern int __pthread_barrierattr_getpshared (const pthread_barrierattr_t *
- __restrict __attr,
- int *__restrict __pshared);
-
- @@ -440,10 +438,12 @@
- extern void __pthread_initialize (void);
-
- /* TSD. */
- +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
- extern int __pthread_internal_tsd_set (int key, const void * pointer);
- extern void * __pthread_internal_tsd_get (int key);
- extern void ** __attribute__ ((__const__))
- __pthread_internal_tsd_address (int key);
- +#endif
-
- /* Sighandler wrappers. */
- extern void __pthread_sighandler(int signo, SIGCONTEXT ctx);
- @@ -508,8 +508,6 @@
- # define LIBC_CANCEL_HANDLED() /* Nothing. */
- #endif
-
- -extern int * __libc_pthread_init (const struct pthread_functions *functions);
- -
- #if !defined NOT_IN_libc && !defined FLOATING_STACKS
- # ifdef SHARED
- # define thread_self() \
- @@ -520,7 +518,7 @@
- # endif
- #endif
-
- -#ifndef USE_TLS
- +#ifndef __UCLIBC_HAS_TLS__
- # define __manager_thread (&__pthread_manager_thread)
- #else
- # define __manager_thread __pthread_manager_threadp
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/libc-cancellation.c uClibc/libpthread/linuxthreads/libc-cancellation.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/libc-cancellation.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/libc-cancellation.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <rpc/rpc.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/libc_pthread_init.c uClibc/libpthread/linuxthreads/libc_pthread_init.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/libc_pthread_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/libc_pthread_init.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,14 +13,13 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <locale.h>
- #include <stdlib.h>
- #include <string.h>
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- #include <tls.h>
- #endif
- #include "internals.h"
- @@ -31,8 +30,7 @@
-
-
- int *
- -__libc_pthread_init (functions)
- - const struct pthread_functions *functions;
- +__libc_pthread_init(const struct pthread_functions *functions)
- {
- #ifdef SHARED
- /* We copy the content of the variable pointed to by the FUNCTIONS
- @@ -42,7 +40,7 @@
- sizeof (__libc_pthread_functions));
- #endif
-
- -#if !(USE_TLS && HAVE___THREAD)
- +#ifndef __UCLIBC_HAS_TLS__
- /* Initialize thread-locale current locale to point to the global one.
- With __thread support, the variable's initializer takes care of this. */
- __uselocale (LC_GLOBAL_LOCALE);
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/lockfile.c uClibc/libpthread/linuxthreads/lockfile.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/lockfile.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/lockfile.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <bits/libc-lock.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/manager.c uClibc/libpthread/linuxthreads/manager.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/manager.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/manager.c 2014-02-03 12:32:56.000000000 +0100
- @@ -126,7 +126,7 @@
- #ifdef INIT_THREAD_SELF
- INIT_THREAD_SELF(self, 1);
- #endif
- -#if !(USE_TLS && HAVE___THREAD)
- +#ifndef __UCLIBC_HAS_TLS__
- /* Set the error variable. */
- self->p_errnop = &self->p_errno;
- self->p_h_errnop = &self->p_h_errno;
- @@ -289,7 +289,7 @@
- __sched_setscheduler(THREAD_GETMEM(self, p_pid),
- SCHED_OTHER, &default_params);
- }
- -#if !(USE_TLS && HAVE___THREAD)
- +#ifndef __UCLIBC_HAS_TLS__
- /* Initialize thread-locale current locale to point to the global one.
- With __thread support, the variable's initializer takes care of this. */
- __uselocale (LC_GLOBAL_LOCALE);
- @@ -333,7 +333,7 @@
- pthread_start_thread (arg);
- }
-
- -#if defined USE_TLS && !FLOATING_STACKS
- +#if defined __UCLIBC_HAS_TLS__ && !FLOATING_STACKS
- # error "TLS can only work with floating stacks"
- #endif
-
- @@ -351,7 +351,7 @@
- char * guardaddr;
- size_t stacksize, guardsize;
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- /* TLS cannot work with fixed thread descriptor addresses. */
- assert (default_new_thread == NULL);
- #endif
- @@ -360,7 +360,7 @@
- {
- #ifdef _STACK_GROWS_UP
- /* The user provided a stack. */
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- /* This value is not needed. */
- new_thread = (pthread_descr) attr->__stackaddr;
- new_thread_bottom = (char *) new_thread;
- @@ -381,7 +381,7 @@
- addresses, stackaddr would be the lowest address in the stack
- segment, so that it is consistently close to the initial sp
- value. */
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- new_thread = (pthread_descr) attr->__stackaddr;
- # else
- new_thread =
- @@ -394,7 +394,7 @@
- #ifndef THREAD_SELF
- __pthread_nonstandard_stacks = 1;
- #endif
- -#ifndef USE_TLS
- +#ifndef __UCLIBC_HAS_TLS__
- /* Clear the thread data structure. */
- memset (new_thread, '\0', sizeof (*new_thread));
- #endif
- @@ -438,7 +438,7 @@
- mprotect (guardaddr, guardsize, PROT_NONE);
-
- new_thread_bottom = (char *) map_addr;
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- new_thread = ((pthread_descr) (new_thread_bottom + stacksize
- + guardsize));
- # else
- @@ -451,7 +451,7 @@
- mprotect (guardaddr, guardsize, PROT_NONE);
-
- new_thread_bottom = (char *) map_addr + guardsize;
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- new_thread = ((pthread_descr) (new_thread_bottom + stacksize));
- # else
- new_thread = ((pthread_descr) (new_thread_bottom + stacksize)) - 1;
- @@ -462,7 +462,7 @@
- mprotect (guardaddr, guardsize, PROT_NONE);
-
- new_thread = (pthread_descr) map_addr;
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- new_thread_bottom = (char *) new_thread;
- # else
- new_thread_bottom = (char *) (new_thread + 1);
- @@ -597,7 +597,7 @@
- int pagesize = __getpagesize();
- int saved_errno = 0;
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- new_thread = _dl_allocate_tls (NULL);
- if (new_thread == NULL)
- return EAGAIN;
- @@ -621,7 +621,7 @@
- {
- if (sseg >= PTHREAD_THREADS_MAX)
- {
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- # if defined(TLS_DTV_AT_TP)
- new_thread = (pthread_descr) ((char *) new_thread + TLS_PRE_TCB_SIZE);
- # endif
- @@ -635,7 +635,7 @@
- pagesize, &stack_addr, &new_thread_bottom,
- &guardaddr, &guardsize, &stksize) == 0)
- {
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- new_thread->p_stackaddr = stack_addr;
- #else
- new_thread = (pthread_descr) stack_addr;
- @@ -657,18 +657,18 @@
- new_thread_id = sseg + pthread_threads_counter;
- /* Initialize the thread descriptor. Elements which have to be
- initialized to zero already have this value. */
- -#if !defined USE_TLS || !TLS_DTV_AT_TP
- +#if !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP
- new_thread->p_header.data.tcb = new_thread;
- new_thread->p_header.data.self = new_thread;
- #endif
- -#if TLS_MULTIPLE_THREADS_IN_TCB || !defined USE_TLS || !TLS_DTV_AT_TP
- +#if TLS_MULTIPLE_THREADS_IN_TCB || !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP
- new_thread->p_multiple_threads = 1;
- #endif
- new_thread->p_tid = new_thread_id;
- new_thread->p_lock = &(__pthread_handles[sseg].h_lock);
- new_thread->p_cancelstate = PTHREAD_CANCEL_ENABLE;
- new_thread->p_canceltype = PTHREAD_CANCEL_DEFERRED;
- -#if !(USE_TLS && HAVE___THREAD)
- +#ifndef __UCLIBC_HAS_TLS__
- new_thread->p_errnop = &new_thread->p_errno;
- new_thread->p_h_errnop = &new_thread->p_h_errno;
- new_thread->p_resp = &new_thread->p_res;
- @@ -807,7 +807,7 @@
- munmap((caddr_t)new_thread_bottom,
- 2 * stacksize + new_thread->p_guardsize);
- #elif defined _STACK_GROWS_UP
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- size_t stacksize = guardaddr - stack_addr;
- munmap(stack_addr, stacksize + guardsize);
- # else
- @@ -815,7 +815,7 @@
- munmap(new_thread, stacksize + guardsize);
- # endif
- #else
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- size_t stacksize = stack_addr - new_thread_bottom;
- # else
- size_t stacksize = (char *)(new_thread+1) - new_thread_bottom;
- @@ -823,7 +823,7 @@
- munmap(new_thread_bottom - guardsize, guardsize + stacksize);
- #endif
- }
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- # if defined(TLS_DTV_AT_TP)
- new_thread = (pthread_descr) ((char *) new_thread + TLS_PRE_TCB_SIZE);
- # endif
- @@ -890,7 +890,7 @@
- /* Free the stack and thread descriptor area */
- char *guardaddr = th->p_guardaddr;
- #ifdef _STACK_GROWS_UP
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- size_t stacksize = guardaddr - th->p_stackaddr;
- guardaddr = th->p_stackaddr;
- # else
- @@ -900,7 +900,7 @@
- #else
- /* Guardaddr is always set, even if guardsize is 0. This allows
- us to compute everything else. */
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- size_t stacksize = th->p_stackaddr - guardaddr - guardsize;
- # else
- size_t stacksize = (char *)(th+1) - guardaddr - guardsize;
- @@ -916,7 +916,7 @@
-
- }
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- # if defined(TLS_DTV_AT_TP)
- th = (pthread_descr) ((char *) th + TLS_PRE_TCB_SIZE);
- # endif
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/ptcleanup.c uClibc/libpthread/linuxthreads/ptcleanup.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/ptcleanup.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/ptcleanup.c 2014-02-03 12:32:56.000000000 +0100
- @@ -20,8 +20,8 @@
- #include <setjmp.h>
- #include "pthread.h"
- #include "internals.h"
- -#ifndef NO_PTR_DEMANGLE
- #include <jmpbuf-unwind.h>
- +#ifndef NO_PTR_DEMANGLE
- #define __JMPBUF_UNWINDS(a,b,c) _JMPBUF_UNWINDS(a,b,c)
- #else
- #define __JMPBUF_UNWINDS(a,b,c) _JMPBUF_UNWINDS(a,b)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/ptclock_gettime.c uClibc/libpthread/linuxthreads/ptclock_gettime.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/ptclock_gettime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/ptclock_gettime.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,13 +12,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <time.h>
- -#include <libc-internal.h>
- #include "internals.h"
- #include "spinlock.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/ptclock_settime.c uClibc/libpthread/linuxthreads/ptclock_settime.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/ptclock_settime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/ptclock_settime.c 2014-02-03 12:32:56.000000000 +0100
- @@ -12,13 +12,11 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <time.h>
- -#include <libc-internal.h>
- #include "internals.h"
- #include "spinlock.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/ptfork.c uClibc/libpthread/linuxthreads/ptfork.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/ptfork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/ptfork.c 2014-02-03 12:32:56.000000000 +0100
- @@ -23,8 +23,6 @@
- #include <bits/libc-lock.h>
- #include "fork.h"
-
- -extern int __libc_fork (void);
- -
- pid_t __pthread_fork (struct fork_block *b)
- {
- pid_t pid;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_atfork.c uClibc/libpthread/linuxthreads/pthread_atfork.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_atfork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pthread_atfork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -30,9 +30,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "internals.h"
- #include <fork.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread.c uClibc/libpthread/linuxthreads/pthread.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pthread.c 2014-02-03 12:32:56.000000000 +0100
- @@ -37,10 +37,7 @@
- # error "This must not happen"
- #endif
-
- -/* mods for uClibc: __libc_sigaction is not in any standard headers */
- -extern __typeof(sigaction) __libc_sigaction;
- -
- -#if !(USE_TLS && HAVE___THREAD)
- +#ifndef __UCLIBC_HAS_TLS__
- /* These variables are used by the setup code. */
- extern int _errno;
- extern int _h_errno;
- @@ -53,7 +50,7 @@
- # endif
- #endif
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
-
- /* We need only a few variables. */
- #define manager_thread __pthread_manager_threadp
- @@ -70,7 +67,7 @@
- .p_tid = PTHREAD_THREADS_MAX,
- .p_lock = &__pthread_handles[0].h_lock,
- .p_start_args = PTHREAD_START_ARGS_INITIALIZER(NULL),
- -#if !(USE_TLS && HAVE___THREAD)
- +#ifndef __UCLIBC_HAS_TLS__
- .p_errnop = &_errno,
- .p_h_errnop = &_h_errno,
- #endif
- @@ -89,7 +86,7 @@
- .p_header.data.multiple_threads = 1,
- .p_lock = &__pthread_handles[1].h_lock,
- .p_start_args = PTHREAD_START_ARGS_INITIALIZER(__pthread_manager),
- -#if !(USE_TLS && HAVE___THREAD)
- +#ifndef __UCLIBC_HAS_TLS__
- .p_errnop = &__pthread_manager_thread.p_errno,
- #endif
- .p_nr = 1,
- @@ -101,7 +98,7 @@
- /* Pointer to the main thread (the father of the thread manager thread) */
- /* Originally, this is the initial thread, but this changes after fork() */
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- pthread_descr __pthread_main_thread;
- #else
- pthread_descr __pthread_main_thread = &__pthread_initial_thread;
- @@ -227,13 +224,13 @@
- #endif
-
-
- -#if defined USE_TLS && !defined SHARED
- +#if defined __UCLIBC_HAS_TLS__ && !defined SHARED
- extern void __libc_setup_tls (size_t tcbsize, size_t tcbalign);
- #endif
-
- struct pthread_functions __pthread_functions =
- {
- -#if !(USE_TLS && HAVE___THREAD)
- +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
- .ptr_pthread_internal_tsd_set = __pthread_internal_tsd_set,
- .ptr_pthread_internal_tsd_get = __pthread_internal_tsd_get,
- .ptr_pthread_internal_tsd_address = __pthread_internal_tsd_address,
- @@ -295,7 +292,7 @@
- void
- __pthread_initialize_minimal(void)
- {
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- pthread_descr self;
-
- /* First of all init __pthread_handles[0] and [1] if needed. */
- @@ -307,7 +304,7 @@
- /* Unlike in the dynamically linked case the dynamic linker has not
- taken care of initializing the TLS data structures. */
- __libc_setup_tls (TLS_TCB_SIZE, TLS_TCB_ALIGN);
- -# elif !USE___THREAD
- +# elif !defined __UCLIBC_HAS_TLS__
- if (__builtin_expect (GL(dl_tls_dtv_slotinfo_list) == NULL, 0))
- {
- tcbhead_t *tcbp;
- @@ -363,7 +360,7 @@
- self->p_nextlive = self->p_prevlive = self;
- self->p_tid = PTHREAD_THREADS_MAX;
- self->p_lock = &__pthread_handles[0].h_lock;
- -# ifndef HAVE___THREAD
- +# ifndef __UCLIBC_HAS_TLS__
- self->p_errnop = &_errno;
- self->p_h_errnop = &_h_errno;
- # endif
- @@ -380,7 +377,7 @@
- /* And fill in the pointer the the thread __pthread_handles array. */
- __pthread_handles[0].h_descr = self;
-
- -#else /* USE_TLS */
- +#else /* __UCLIBC_HAS_TLS__ */
-
- /* First of all init __pthread_handles[0] and [1]. */
- # if __LT_SPINLOCK_INIT != 0
- @@ -398,7 +395,7 @@
- #endif
-
- #if HP_TIMING_AVAIL
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- self->p_cpuclock_offset = GL(dl_cpuclock_offset);
- # else
- __pthread_initial_thread.p_cpuclock_offset = GL(dl_cpuclock_offset);
- @@ -442,7 +439,7 @@
- __pthread_max_stacksize = max_stack;
- if (max_stack / 4 < __MAX_ALLOCA_CUTOFF)
- {
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- pthread_descr self = THREAD_SELF;
- self->p_alloca_cutoff = max_stack / 4;
- #else
- @@ -451,10 +448,8 @@
- }
- }
-
- -/* psm: we do not have any ld.so support yet
- - * remove the USE_TLS guard if nptl is added */
- -#if defined SHARED && defined USE_TLS
- -# if USE___THREAD
- +#if defined SHARED && defined __UCLIBC_HAS_TLS__
- +# ifdef __UCLIBC_HAS_TLS__
- /* When using __thread for this, we do it in libc so as not
- to give libpthread its own TLS segment just for this. */
- extern void **__libc_dl_error_tsd (void) __attribute__ ((const));
- @@ -467,7 +462,7 @@
- # endif
- #endif
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- static __inline__ void __attribute__((always_inline))
- init_one_static_tls (pthread_descr descr, struct link_map *map)
- {
- @@ -486,7 +481,7 @@
- dtv[map->l_tls_modid].pointer.is_static = true;
-
- /* Initialize the memory. */
- - memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),
- + memset (mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),
- '\0', map->l_tls_blocksize - map->l_tls_initimage_size);
- }
-
- @@ -536,10 +531,10 @@
- (char *)(((long)CURRENT_STACK_FRAME - 2 * STACK_SIZE) & ~(STACK_SIZE - 1));
- # endif
- #endif
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- /* Update the descriptor for the initial thread. */
- THREAD_SETMEM (((pthread_descr) NULL), p_pid, __getpid());
- -# if !defined HAVE___THREAD && defined __UCLIBC_HAS_RESOLVER_SUPPORT__
- +# if defined __UCLIBC_HAS_RESOLVER_SUPPORT__
- /* Likewise for the resolver state _res. */
- THREAD_SETMEM (((pthread_descr) NULL), p_resp, __resp);
- # endif
- @@ -590,9 +585,7 @@
- /* How many processors. */
- __pthread_smp_kernel = is_smp_system ();
-
- -/* psm: we do not have any ld.so support yet
- - * remove the USE_TLS guard if nptl is added */
- -#if defined SHARED && defined USE_TLS
- +#if defined SHARED && defined __UCLIBC_HAS_TLS__
- /* Transfer the old value from the dynamic linker's internal location. */
- *__libc_dl_error_tsd () = *(*GL(dl_error_catch_tsd)) ();
- GL(dl_error_catch_tsd) = &__libc_dl_error_tsd;
- @@ -607,7 +600,7 @@
- __pthread_mutex_lock (&GL(dl_load_lock).mutex);
- #endif
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- GL(dl_init_static_tls) = &__pthread_init_static_tls;
- #endif
-
- @@ -635,12 +628,12 @@
- struct pthread_request request;
- int report_events;
- pthread_descr mgr;
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- tcbhead_t *tcbp;
- #endif
-
- __pthread_multiple_threads = 1;
- -#if TLS_MULTIPLE_THREADS_IN_TCB || !defined USE_TLS || !TLS_DTV_AT_TP
- +#if TLS_MULTIPLE_THREADS_IN_TCB || !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP
- __pthread_main_thread->p_multiple_threads = 1;
- #endif
- *__libc_multiple_threads_ptr = 1;
- @@ -667,7 +660,7 @@
- return -1;
- }
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- /* Allocate memory for the thread descriptor and the dtv. */
- tcbp = _dl_allocate_tls (NULL);
- if (tcbp == NULL) {
- @@ -687,7 +680,7 @@
- __pthread_handles[1].h_descr = manager_thread = mgr;
-
- /* Initialize the descriptor. */
- -#if !defined USE_TLS || !TLS_DTV_AT_TP
- +#if !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP
- mgr->p_header.data.tcb = tcbp;
- mgr->p_header.data.self = mgr;
- mgr->p_header.data.multiple_threads = 1;
- @@ -695,7 +688,7 @@
- mgr->p_multiple_threads = 1;
- #endif
- mgr->p_lock = &__pthread_handles[1].h_lock;
- -# ifndef HAVE___THREAD
- +# ifndef __UCLIBC_HAS_TLS__
- mgr->p_errnop = &mgr->p_errno;
- # endif
- mgr->p_start_args = (struct pthread_start_args) PTHREAD_START_ARGS_INITIALIZER(__pthread_manager);
- @@ -713,7 +706,7 @@
-
- /* Start the thread manager */
- pid = 0;
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- if (__linuxthreads_initial_report_events != 0)
- THREAD_SETMEM (((pthread_descr) NULL), p_report_events,
- __linuxthreads_initial_report_events);
- @@ -732,7 +725,7 @@
- uint32_t mask = __td_eventmask (TD_CREATE);
- uint32_t event_bits;
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- event_bits = THREAD_GETMEM_NC (((pthread_descr) NULL),
- p_eventbuf.eventmask.event_bits[idx]);
- #else
- @@ -798,7 +791,7 @@
- #endif
- }
- if (__builtin_expect (pid, 0) == -1) {
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- _dl_deallocate_tls (tcbp, true);
- #endif
- free(__pthread_manager_thread_bos);
- @@ -900,7 +893,7 @@
- if (sp >= __pthread_manager_thread_bos && sp < __pthread_manager_thread_tos)
- return manager_thread;
- h = __pthread_handles + 2;
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
- # ifdef _STACK_GROWS_UP
- while (h->h_descr == NULL
- || ! (sp >= h->h_descr->p_stackaddr && sp < h->h_descr->p_guardaddr))
- @@ -994,7 +987,7 @@
- children, so that timings for main thread account for all threads. */
- if (self == __pthread_main_thread)
- {
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- waitpid(manager_thread->p_pid, NULL, __WCLONE);
- #else
- waitpid(__pthread_manager_thread.p_pid, NULL, __WCLONE);
- @@ -1002,7 +995,7 @@
- /* Since all threads have been asynchronously terminated
- (possibly holding locks), free cannot be used any more.
- For mtrace, we'd like to print something though. */
- - /* #ifdef USE_TLS
- + /* #ifdef __UCLIBC_HAS_TLS__
- tcbhead_t *tcbp = (tcbhead_t *) manager_thread;
- # if defined(TLS_DTV_AT_TP)
- tcbp = (tcbhead_t) ((char *) tcbp + TLS_PRE_TCB_SIZE);
- @@ -1060,7 +1053,7 @@
- /* Main thread should accumulate times for thread manager and its
- children, so that timings for main thread account for all threads. */
- if (self == __pthread_main_thread) {
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- waitpid(manager_thread->p_pid, NULL, __WCLONE);
- #else
- waitpid(__pthread_manager_thread.p_pid, NULL, __WCLONE);
- @@ -1121,7 +1114,7 @@
- __pthread_main_thread = self;
- THREAD_SETMEM(self, p_nextlive, self);
- THREAD_SETMEM(self, p_prevlive, self);
- -#if !(USE_TLS && HAVE___THREAD)
- +#ifndef __UCLIBC_HAS_TLS__
- /* Now this thread modifies the global variables. */
- THREAD_SETMEM(self, p_errnop, &_errno);
- THREAD_SETMEM(self, p_h_errnop, &_h_errno);
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setegid.c uClibc/libpthread/linuxthreads/pthread_setegid.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setegid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pthread_setegid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_seteuid.c uClibc/libpthread/linuxthreads/pthread_seteuid.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_seteuid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pthread_seteuid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setgid.c uClibc/libpthread/linuxthreads/pthread_setgid.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setgid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pthread_setgid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setregid.c uClibc/libpthread/linuxthreads/pthread_setregid.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setregid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pthread_setregid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setresgid.c uClibc/libpthread/linuxthreads/pthread_setresgid.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setresgid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pthread_setresgid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setresuid.c uClibc/libpthread/linuxthreads/pthread_setresuid.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setresuid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pthread_setresuid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setreuid.c uClibc/libpthread/linuxthreads/pthread_setreuid.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setreuid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pthread_setreuid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setuid.c uClibc/libpthread/linuxthreads/pthread_setuid.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setuid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pthread_setuid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pt-machine.c uClibc/libpthread/linuxthreads/pt-machine.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/pt-machine.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/pt-machine.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #define PT_EI
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/rwlock.c uClibc/libpthread/linuxthreads/rwlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/rwlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/rwlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <bits/libc-lock.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/semaphore.c uClibc/libpthread/linuxthreads/semaphore.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/semaphore.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/semaphore.c 2014-02-03 12:32:57.000000000 +0100
- @@ -15,6 +15,7 @@
- /* Semaphores a la POSIX 1003.1b */
-
- #include <errno.h>
- +#include <limits.h>
- #include "pthread.h"
- #include "semaphore.h"
- #include "internals.h"
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/semaphore.h uClibc/libpthread/linuxthreads/semaphore.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -17,6 +17,7 @@
-
- #include <features.h>
- #include <sys/types.h>
- +#include <limits.h>
- #ifdef __USE_XOPEN2K
- # define __need_timespec
- # include <time.h>
- @@ -42,7 +43,9 @@
- #define SEM_FAILED ((sem_t *) 0)
-
- /* Maximum value the semaphore can have. */
- +#ifndef SEM_VALUE_MAX
- #define SEM_VALUE_MAX (2147483647)
- +#endif
-
-
- __BEGIN_DECLS
- @@ -55,13 +58,13 @@
- extern int sem_destroy (sem_t *__sem) __THROW;
-
- /* Open a named semaphore NAME with open flags OFLAG. */
- -extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
- +extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW;
-
- /* Close descriptor for named semaphore SEM. */
- extern int sem_close (sem_t *__sem) __THROW;
-
- /* Remove named semaphore NAME. */
- -extern int sem_unlink (__const char *__name) __THROW;
- +extern int sem_unlink (const char *__name) __THROW;
-
- /* Wait for SEM being posted.
-
- @@ -75,7 +78,7 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- extern int sem_timedwait (sem_t *__restrict __sem,
- - __const struct timespec *__restrict __abstime);
- + const struct timespec *__restrict __abstime);
- #endif
-
- /* Test whether SEM is posted. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/signals.c uClibc/libpthread/linuxthreads/signals.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/signals.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/signals.c 2014-02-03 12:32:57.000000000 +0100
- @@ -20,9 +20,6 @@
- #include "internals.h"
- #include "spinlock.h"
-
- -/* mods for uClibc: __libc_sigaction is not in any standard headers */
- -extern __typeof(sigaction) __libc_sigaction;
- -
- int pthread_sigmask(int how, const sigset_t * newmask, sigset_t * oldmask)
- {
- sigset_t mask;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/specific.c uClibc/libpthread/linuxthreads/specific.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/specific.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/specific.c 2014-02-03 12:32:57.000000000 +0100
- @@ -212,7 +212,7 @@
- __pthread_unlock(THREAD_GETMEM(self, p_lock));
- }
-
- -#if !(USE_TLS && HAVE___THREAD)
- +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
-
- /* Thread-specific data for libc. */
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/elf/pt-initfini.c uClibc/libpthread/linuxthreads/sysdeps/alpha/elf/pt-initfini.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/elf/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/alpha/elf/pt-initfini.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/alpha/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/alpha/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -17,8 +17,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/tls.h uClibc/libpthread/linuxthreads/sysdeps/alpha/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/alpha/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/arm/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/arm/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/arm/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/arm/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/sysdep.h uClibc/libpthread/linuxthreads/sysdeps/arm/sysdep.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/sysdep.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/arm/sysdep.h 1970-01-01 01:00:00.000000000 +0100
- @@ -1,137 +0,0 @@
- -/* Generic asm macros used on many machines.
- - Copyright (C) 1991,92,93,96,98,2002,2003 Free Software Foundation, Inc.
- - This file is part of the GNU C Library.
- -
- - The GNU C Library is free software; you can redistribute it and/or
- - modify it under the terms of the GNU Lesser General Public
- - License as published by the Free Software Foundation; either
- - version 2.1 of the License, or (at your option) any later version.
- -
- - The GNU C Library is distributed in the hope that it will be useful,
- - but WITHOUT ANY WARRANTY; without even the implied warranty of
- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - Lesser General Public License for more details.
- -
- - You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- -
- -#ifndef C_LABEL
- -
- -/* Define a macro we can use to construct the asm name for a C symbol. */
- -#ifdef NO_UNDERSCORES
- -#ifdef __STDC__
- -#define C_LABEL(name) name##:
- -#else
- -#define C_LABEL(name) name/**/:
- -#endif
- -#else
- -#ifdef __STDC__
- -#define C_LABEL(name) _##name##:
- -#else
- -#define C_LABEL(name) _/**/name/**/:
- -#endif
- -#endif
- -
- -#endif
- -
- -#ifdef __ASSEMBLER__
- -/* Mark the end of function named SYM. This is used on some platforms
- - to generate correct debugging information. */
- -#ifndef END
- -#define END(sym)
- -#endif
- -
- -#ifndef JUMPTARGET
- -#define JUMPTARGET(sym) sym
- -#endif
- -
- -/* Makros to generate eh_frame unwind information. */
- -# ifdef HAVE_ASM_CFI_DIRECTIVES
- -# define cfi_startproc .cfi_startproc
- -# define cfi_endproc .cfi_endproc
- -# define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
- -# define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg
- -# define cfi_def_cfa_offset(off) .cfi_def_cfa_offset off
- -# define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
- -# define cfi_offset(reg, off) .cfi_offset reg, off
- -# define cfi_rel_offset(reg, off) .cfi_rel_offset reg, off
- -# define cfi_register(r1, r2) .cfi_register r1, r2
- -# define cfi_return_column(reg) .cfi_return_column reg
- -# define cfi_restore(reg) .cfi_restore reg
- -# define cfi_same_value(reg) .cfi_same_value reg
- -# define cfi_undefined(reg) .cfi_undefined reg
- -# define cfi_remember_state .cfi_remember_state
- -# define cfi_restore_state .cfi_restore_state
- -# define cfi_window_save .cfi_window_save
- -# else
- -# define cfi_startproc
- -# define cfi_endproc
- -# define cfi_def_cfa(reg, off)
- -# define cfi_def_cfa_register(reg)
- -# define cfi_def_cfa_offset(off)
- -# define cfi_adjust_cfa_offset(off)
- -# define cfi_offset(reg, off)
- -# define cfi_rel_offset(reg, off)
- -# define cfi_register(r1, r2)
- -# define cfi_return_column(reg)
- -# define cfi_restore(reg)
- -# define cfi_same_value(reg)
- -# define cfi_undefined(reg)
- -# define cfi_remember_state
- -# define cfi_restore_state
- -# define cfi_window_save
- -# endif
- -
- -#else /* ! ASSEMBLER */
- -# ifdef HAVE_ASM_CFI_DIRECTIVES
- -# define CFI_STRINGIFY(Name) CFI_STRINGIFY2 (Name)
- -# define CFI_STRINGIFY2(Name) #Name
- -# define CFI_STARTPROC ".cfi_startproc"
- -# define CFI_ENDPROC ".cfi_endproc"
- -# define CFI_DEF_CFA(reg, off) \
- - ".cfi_def_cfa " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
- -# define CFI_DEF_CFA_REGISTER(reg) \
- - ".cfi_def_cfa_register " CFI_STRINGIFY(reg)
- -# define CFI_DEF_CFA_OFFSET(off) \
- - ".cfi_def_cfa_offset " CFI_STRINGIFY(off)
- -# define CFI_ADJUST_CFA_OFFSET(off) \
- - ".cfi_adjust_cfa_offset " CFI_STRINGIFY(off)
- -# define CFI_OFFSET(reg, off) \
- - ".cfi_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
- -# define CFI_REL_OFFSET(reg, off) \
- - ".cfi_rel_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
- -# define CFI_REGISTER(r1, r2) \
- - ".cfi_register " CFI_STRINGIFY(r1) "," CFI_STRINGIFY(r2)
- -# define CFI_RETURN_COLUMN(reg) \
- - ".cfi_return_column " CFI_STRINGIFY(reg)
- -# define CFI_RESTORE(reg) \
- - ".cfi_restore " CFI_STRINGIFY(reg)
- -# define CFI_UNDEFINED(reg) \
- - ".cfi_undefined " CFI_STRINGIFY(reg)
- -# define CFI_REMEMBER_STATE \
- - ".cfi_remember_state"
- -# define CFI_RESTORE_STATE \
- - ".cfi_restore_state"
- -# define CFI_WINDOW_SAVE \
- - ".cfi_window_save"
- -# else
- -# define CFI_STARTPROC
- -# define CFI_ENDPROC
- -# define CFI_DEF_CFA(reg, off)
- -# define CFI_DEF_CFA_REGISTER(reg)
- -# define CFI_DEF_CFA_OFFSET(off)
- -# define CFI_ADJUST_CFA_OFFSET(off)
- -# define CFI_OFFSET(reg, off)
- -# define CFI_REL_OFFSET(reg, off)
- -# define CFI_REGISTER(r1, r2)
- -# define CFI_RETURN_COLUMN(reg)
- -# define CFI_RESTORE(reg)
- -# define CFI_UNDEFINED(reg)
- -# define CFI_REMEMBER_STATE
- -# define CFI_RESTORE_STATE
- -# define CFI_WINDOW_SAVE
- -# endif
- -
- -#endif /* __ASSEMBLER__ */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/tls.h uClibc/libpthread/linuxthreads/sysdeps/arm/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/arm/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/cris/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/cris/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/cris/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/cris/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/cris/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/cris/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/cris/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/cris/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/hppa/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/hppa/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/hppa/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/hppa/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/i386/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/i386/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/i386/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/i386/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #if defined __pentiumpro__ || defined __pentium4__ || defined __athlon__ || \
- defined __k8__
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/tls.h uClibc/libpthread/linuxthreads/sysdeps/i386/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/i386/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/useldt.h uClibc/libpthread/linuxthreads/sysdeps/i386/useldt.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/useldt.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/i386/useldt.h 2014-02-03 12:32:57.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef __ASSEMBLER__
- #include <stddef.h> /* For offsetof. */
- @@ -87,7 +86,7 @@
- because we inherited the value set up in the main thread by TLS setup.
- We need to extract that value and set up the same segment in this
- thread. */
- -#if defined (USE_TLS) && USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- # define DO_SET_THREAD_AREA_REUSE(nr) 1
- #else
- /* Without TLS, we do the initialization of the main thread, where NR == 0. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/ia64/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/ia64/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym uClibc/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym 2014-02-03 12:32:57.000000000 +0100
- @@ -2,7 +2,7 @@
- #include <tls.h>
-
- --
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- MULTIPLE_THREADS_OFFSET offsetof (struct _pthread_descr_struct, p_multiple_threads) - sizeof (struct _pthread_descr_struct)
- #else
- MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/tls.h uClibc/libpthread/linuxthreads/sysdeps/ia64/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/ia64/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/m68k/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/m68k/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/m68k/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/m68k/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/mips/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/mips/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/mips/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/mips/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -18,8 +18,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/tls.h uClibc/libpthread/linuxthreads/sysdeps/mips/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/mips/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* These routines are from Appendix G of the 'PowerPC 601 RISC Microprocessor
- User's Manual', by IBM and Motorola. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,8 +15,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* These routines are from Appendix G of the 'PowerPC 601 RISC Microprocessor
- User's Manual', by IBM and Motorola. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym uClibc/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym 2014-02-03 12:32:57.000000000 +0100
- @@ -3,7 +3,7 @@
-
- -- This line separates the #include lines from conditionals.
-
- -# ifdef USE_TLS
- +# ifdef __UCLIBC_HAS_TLS__
-
- -- Abuse tls.h macros to derive offsets relative to the thread register.
- # undef __thread_register
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/tls.h uClibc/libpthread/linuxthreads/sysdeps/powerpc/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/powerpc/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/initspin.h uClibc/libpthread/linuxthreads/sysdeps/pthread/bits/initspin.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/initspin.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/bits/initspin.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* Initial value of a spinlock. Most platforms should use zero,
- unless they only implement a "test and clear" operation instead of
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h uClibc/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_LIBC_LOCK_H
- #define _BITS_LIBC_LOCK_H 1
- @@ -293,7 +292,7 @@
- library. */
-
- extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
- - __const pthread_mutexattr_t *__mutex_attr);
- + const pthread_mutexattr_t *__mutex_attr);
-
- extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
-
- @@ -312,7 +311,7 @@
-
- #ifdef __USE_UNIX98
- extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
- - __const pthread_rwlockattr_t *__attr);
- + const pthread_rwlockattr_t *__attr);
-
- extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
-
- @@ -331,7 +330,7 @@
- void (*__destr_function) (void *));
-
- extern int __pthread_setspecific (pthread_key_t __key,
- - __const void *__pointer);
- + const void *__pointer);
-
- extern void *__pthread_getspecific (pthread_key_t __key);
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h uClibc/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,18 +13,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_LIBC_TSD_H
- #define _BITS_LIBC_TSD_H 1
-
- #include <linuxthreads/descr.h>
- +#ifdef __UCLIBC_HAS_TLS__
- #include <tls.h>
-
- -#if USE_TLS && HAVE___THREAD
- -
- /* When __thread works, the generic definition is what we want. */
- # include <sysdeps/generic/bits/libc-tsd.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h uClibc/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -19,6 +19,9 @@
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
-
- +#define __need_size_t
- +#include <stddef.h>
- +
- #define __need_schedparam
- #include <bits/sched.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/typesizes.h uClibc/libpthread/linuxthreads/sysdeps/pthread/bits/typesizes.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/bits/typesizes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_TYPES_H
- # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/.cvsignore uClibc/libpthread/linuxthreads/sysdeps/pthread/.cvsignore
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/.cvsignore 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/.cvsignore 1970-01-01 01:00:00.000000000 +0100
- @@ -1,2 +0,0 @@
- -.cvsignore
- -*.os
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c uClibc/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,26 +14,25 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <linuxthreads/internals.h>
- #include <sysdep-cancel.h>
-
- -#if ! USE___THREAD && !RTLD_PRIVATE_ERRNO
- +#if !defined __UCLIBC_HAS_TLS__ && !RTLD_PRIVATE_ERRNO
- #undef errno
- extern int errno;
- #endif
-
- int *
- -#if ! USE___THREAD
- +#ifndef __UCLIBC_HAS_TLS__
- weak_const_function
- #endif
- __errno_location (void)
- {
- -#if ! USE___THREAD && !defined NOT_IN_libc
- +#if !defined __UCLIBC_HAS_TLS__ && !defined NOT_IN_libc
- if (! SINGLE_THREAD_P)
- {
- pthread_descr self = thread_self();
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/flockfile.c uClibc/libpthread/linuxthreads/sysdeps/pthread/flockfile.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/flockfile.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/flockfile.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/ftrylockfile.c uClibc/libpthread/linuxthreads/sysdeps/pthread/ftrylockfile.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/ftrylockfile.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/ftrylockfile.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/funlockfile.c uClibc/libpthread/linuxthreads/sysdeps/pthread/funlockfile.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/funlockfile.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/funlockfile.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/getcpuclockid.c uClibc/libpthread/linuxthreads/sysdeps/pthread/getcpuclockid.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/getcpuclockid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/getcpuclockid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c uClibc/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,16 +12,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <netdb.h>
- #include <tls.h>
- #include <linuxthreads/internals.h>
- #include <sysdep-cancel.h>
-
- -#if ! USE___THREAD
- +#ifndef __UCLIBC_HAS_TLS__
- # undef h_errno
- extern int h_errno;
- #endif
- @@ -31,7 +30,7 @@
- weak_const_function
- __h_errno_location (void)
- {
- -#if ! USE___THREAD
- +#ifndef __UCLIBC_HAS_TLS__
- if (! SINGLE_THREAD_P)
- {
- pthread_descr self = thread_self();
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/list.h uClibc/libpthread/linuxthreads/sysdeps/pthread/list.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/list.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/list.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LIST_H
- #define _LIST_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/malloc-machine.h uClibc/libpthread/linuxthreads/sysdeps/pthread/malloc-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/malloc-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/malloc-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MALLOC_MACHINE_H
- #define _MALLOC_MACHINE_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h uClibc/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,18 +14,26 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/types.h>
- #include <sysdep.h>
-
- /* Uncancelable open. */
- +#if defined __NR_openat && !defined __NR_open
- +#define open_not_cancel(name, flags, mode) \
- + INLINE_SYSCALL (openat, 4, (int) (AT_FDCWD), (const char *) (name), \
- + (flags), (mode))
- +#define open_not_cancel_2(name, flags) \
- + INLINE_SYSCALL (openat, 3, (int) (AT_FDCWD), (const char *) (name), \
- + (flags))
- +#else
- #define open_not_cancel(name, flags, mode) \
- INLINE_SYSCALL (open, 3, (const char *) (name), (flags), (mode))
- #define open_not_cancel_2(name, flags) \
- INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
- +#endif
-
- /* Uncancelable openat. */
- #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/posix-timer.h uClibc/libpthread/linuxthreads/sysdeps/pthread/posix-timer.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/posix-timer.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/posix-timer.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h uClibc/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _PTHREAD_FUNCTIONS_H
- #define _PTHREAD_FUNCTIONS_H 1
- @@ -72,10 +71,12 @@
- void (*ptr_pthread_cleanup_upto) (__jmp_buf target,
- char *targetframe);
- pthread_descr (*ptr_pthread_thread_self) (void);
- +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
- int (*ptr_pthread_internal_tsd_set) (int key, const void *pointer);
- void * (*ptr_pthread_internal_tsd_get) (int key);
- void ** __attribute__ ((__const__))
- (*ptr_pthread_internal_tsd_address) (int key);
- +#endif
- int (*ptr_pthread_sigaction) (int sig, const struct sigaction * act,
- struct sigaction *oact);
- int (*ptr_pthread_sigwait) (const sigset_t *set, int *sig);
- @@ -95,4 +96,6 @@
- /* Variable in libc.so. */
- extern struct pthread_functions __libc_pthread_functions attribute_hidden;
-
- +extern int * __libc_pthread_init (const struct pthread_functions *functions);
- +
- #endif /* pthread-functions.h */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pthread.h uClibc/libpthread/linuxthreads/sysdeps/pthread/pthread.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pthread.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/pthread.h 2014-02-03 12:32:57.000000000 +0100
- @@ -161,7 +161,7 @@
- if ATTR is NULL), and call function START_ROUTINE with given
- arguments ARG. */
- extern int pthread_create (pthread_t *__restrict __threadp,
- - __const pthread_attr_t *__restrict __attr,
- + const pthread_attr_t *__restrict __attr,
- void *(*__start_routine) (void *),
- void *__restrict __arg) __THROW;
-
- @@ -201,16 +201,16 @@
- int __detachstate) __THROW;
-
- /* Return in *DETACHSTATE the `detachstate' attribute in *ATTR. */
- -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
- +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
- int *__detachstate) __THROW;
-
- /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
- extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
- - __const struct sched_param *__restrict
- + const struct sched_param *__restrict
- __param) __THROW;
-
- /* Return in *PARAM the scheduling parameters of *ATTR. */
- -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict
- __attr,
- struct sched_param *__restrict __param)
- __THROW;
- @@ -220,7 +220,7 @@
- __THROW;
-
- /* Return in *POLICY the scheduling policy of *ATTR. */
- -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
- __attr, int *__restrict __policy)
- __THROW;
-
- @@ -229,7 +229,7 @@
- int __inherit) __THROW;
-
- /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
- -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
- __attr, int *__restrict __inherit)
- __THROW;
-
- @@ -238,7 +238,7 @@
- __THROW;
-
- /* Return in *SCOPE the scheduling contention scope of *ATTR. */
- -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
- +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
- int *__restrict __scope) __THROW;
-
- #ifdef __USE_UNIX98
- @@ -247,7 +247,7 @@
- size_t __guardsize) __THROW;
-
- /* Get the size of the guard area at the bottom of the thread. */
- -extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getguardsize (const pthread_attr_t *__restrict
- __attr, size_t *__restrict __guardsize)
- __THROW;
- #endif
- @@ -261,7 +261,7 @@
- void *__stackaddr) __THROW;
-
- /* Return the previously set address for the stack. */
- -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
- __attr, void **__restrict __stackaddr)
- __THROW;
- #endif
- @@ -274,7 +274,7 @@
- size_t __stacksize) __THROW;
-
- /* Return the previously set address for the stack. */
- -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
- +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
- void **__restrict __stackaddr,
- size_t *__restrict __stacksize) __THROW;
- #endif
- @@ -286,7 +286,7 @@
- size_t __stacksize) __THROW;
-
- /* Return the currently used minimal stack size. */
- -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
- __attr, size_t *__restrict __stacksize)
- __THROW;
-
- @@ -302,7 +302,7 @@
- /* Set the scheduling parameters for TARGET_THREAD according to POLICY
- and *PARAM. */
- extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
- - __const struct sched_param *__param)
- + const struct sched_param *__param)
- __THROW;
-
- /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
- @@ -324,7 +324,7 @@
- /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the
- default values if later is NULL. */
- extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
- - __const pthread_mutexattr_t *__restrict
- + const pthread_mutexattr_t *__restrict
- __mutex_attr) __THROW;
-
- /* Destroy MUTEX. */
- @@ -339,7 +339,7 @@
- #ifdef __USE_XOPEN2K
- /* Wait until lock becomes available, or specified time passes. */
- extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime) __THROW;
- #endif
-
- @@ -357,7 +357,7 @@
- extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW;
-
- /* Get the process-shared flag of the mutex attribute ATTR. */
- -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
- +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
- @@ -373,7 +373,7 @@
- __THROW;
-
- /* Return in *KIND the mutex kind attribute in *ATTR. */
- -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
- +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
- __attr, int *__restrict __kind) __THROW;
- #endif
-
- @@ -383,7 +383,7 @@
- /* Initialize condition variable COND using attributes ATTR, or use
- the default values if later is NULL. */
- extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
- - __const pthread_condattr_t *__restrict
- + const pthread_condattr_t *__restrict
- __cond_attr) __THROW;
-
- /* Destroy condition variable COND. */
- @@ -406,7 +406,7 @@
- (00:00:00 GMT, January 1, 1970). */
- extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
- pthread_mutex_t *__restrict __mutex,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime);
-
- /* Functions for handling condition variable attributes. */
- @@ -418,7 +418,7 @@
- extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW;
-
- /* Get the process-shared flag of the condition variable attribute ATTR. */
- -extern int pthread_condattr_getpshared (__const pthread_condattr_t *
- +extern int pthread_condattr_getpshared (const pthread_condattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
- @@ -433,7 +433,7 @@
- /* Initialize read-write lock RWLOCK using attributes ATTR, or use
- the default values if later is NULL. */
- extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
- - __const pthread_rwlockattr_t *__restrict
- + const pthread_rwlockattr_t *__restrict
- __attr) __THROW;
-
- /* Destroy read-write lock RWLOCK. */
- @@ -448,7 +448,7 @@
- # ifdef __USE_XOPEN2K
- /* Try to acquire read lock for RWLOCK or return after specfied time. */
- extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime) __THROW;
- # endif
-
- @@ -461,7 +461,7 @@
- # ifdef __USE_XOPEN2K
- /* Try to acquire write lock for RWLOCK or return after specfied time. */
- extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime) __THROW;
- # endif
-
- @@ -478,7 +478,7 @@
- extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW;
-
- /* Return current setting of process-shared attribute of ATTR in PSHARED. */
- -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
- +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
- @@ -487,7 +487,7 @@
- int __pshared) __THROW;
-
- /* Return current setting of reader/writer preference. */
- -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr,
- +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *__attr,
- int *__pref) __THROW;
-
- /* Set reader/write preference. */
- @@ -520,7 +520,7 @@
- /* Barriers are a also a new feature in 1003.1j-2000. */
-
- extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
- - __const pthread_barrierattr_t *__restrict
- + const pthread_barrierattr_t *__restrict
- __attr, unsigned int __count) __THROW;
-
- extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW;
- @@ -529,7 +529,7 @@
-
- extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW;
-
- -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
- +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
- @@ -556,7 +556,7 @@
-
- /* Store POINTER in the thread-specific data slot identified by KEY. */
- extern int pthread_setspecific (pthread_key_t __key,
- - __const void *__pointer) __THROW;
- + const void *__pointer) __THROW;
-
- /* Return current value of the thread-specific data slot identified by KEY. */
- extern void *pthread_getspecific (pthread_key_t __key) __THROW;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c uClibc/libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c 2014-02-03 12:32:57.000000000 +0100
- @@ -23,8 +23,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/ptlongjmp.c uClibc/libpthread/linuxthreads/sysdeps/pthread/ptlongjmp.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/ptlongjmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/ptlongjmp.c 2014-02-03 12:32:57.000000000 +0100
- @@ -19,13 +19,6 @@
- #include "pthread.h"
- #include "internals.h"
-
- -/* These functions are not declared anywhere since they shouldn't be
- - used at another place but here. */
- -extern void __libc_siglongjmp (sigjmp_buf env, int val)
- - __attribute__ ((noreturn));
- -extern void __libc_longjmp (sigjmp_buf env, int val)
- - __attribute__ ((noreturn));
- -
- #ifdef SHARED
- void siglongjmp (sigjmp_buf env, int val)
- {
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/res-state.c uClibc/libpthread/linuxthreads/sysdeps/pthread/res-state.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/res-state.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/res-state.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,28 +12,27 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <resolv.h>
- #include <tls.h>
- #include <linuxthreads/internals.h>
- #include <sysdep-cancel.h>
-
- -#if ! USE___THREAD
- +#ifndef __UCLIBC_HAS_TLS__
- # undef _res
- extern struct __res_state _res;
- #endif
-
- /* When threaded, _res may be a per-thread variable. */
- struct __res_state *
- -#if ! USE___THREAD
- +#ifndef __UCLIBC_HAS_TLS__
- weak_const_function
- #endif
- __res_state (void)
- {
- -#if ! USE___THREAD
- +#ifndef __UCLIBC_HAS_TLS__
- if (! SINGLE_THREAD_P)
- {
- pthread_descr self = thread_self();
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/sigaction.c uClibc/libpthread/linuxthreads/sysdeps/pthread/sigaction.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/sigaction.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Somebody please explain what's going on here. --vda */
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_create.c uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_create.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_create.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_create.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_delete.c uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_delete.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_delete.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_delete.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_getoverr.c uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_getoverr.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_getoverr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_getoverr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_gettime.c uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_gettime.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_gettime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_gettime.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_routines.c uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_routines.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_routines.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_routines.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_settime.c uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_settime.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_settime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/timer_settime.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/tst-timer.c uClibc/libpthread/linuxthreads/sysdeps/pthread/tst-timer.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/tst-timer.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/pthread/tst-timer.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/s390/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/s390/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- @@ -58,7 +57,7 @@
- #define CURRENT_STACK_FRAME stack_pointer
- register char * stack_pointer __asm__ ("15");
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- /* Return the thread descriptor for the current thread. */
- # define THREAD_SELF ((pthread_descr) __builtin_thread_pointer ())
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- @@ -58,7 +57,7 @@
- #define CURRENT_STACK_FRAME stack_pointer
- register char * stack_pointer __asm__ ("15");
-
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- /* Return the thread descriptor for the current thread. */
- # define THREAD_SELF ((pthread_descr) __builtin_thread_pointer ())
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/tls.h uClibc/libpthread/linuxthreads/sysdeps/s390/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/s390/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/sh/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/sh/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/sh/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/sh/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym uClibc/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym 2014-02-03 12:32:57.000000000 +0100
- @@ -2,7 +2,7 @@
- #include <tls.h>
-
- --
- -#ifdef USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- MULTIPLE_THREADS_OFFSET offsetof (struct _pthread_descr_struct, p_multiple_threads)
- TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct)
- #else
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/tls.h uClibc/libpthread/linuxthreads/sysdeps/sh/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/sh/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/tls.h uClibc/libpthread/linuxthreads/sysdeps/sparc/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/sparc/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <signal.h>
-
- @@ -70,6 +69,7 @@
- strong_alias (__libc_current_sigrtmax, __libc_current_sigrtmax_private)
- libc_hidden_def (__libc_current_sigrtmax)
-
- +#if 0
- /* Allocate real-time signal with highest/lowest available
- priority. Please note that we don't use a lock since we assume
- this function to be called at program start. */
- @@ -85,3 +85,4 @@
- return high ? current_rtmin++ : current_rtmax--;
- }
- strong_alias (__libc_allocate_rtsig, __libc_allocate_rtsig_private)
- +#endif
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_TYPES_H
- # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #ifndef __ASSEMBLER__
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- #include <sysdep-cancel.h>
- @@ -30,7 +29,7 @@
-
- #ifdef SHARED
- ldq t0, __libc_pthread_functions(gp) !gprel
- - bne t0, HIDDEN_JUMPTARGET (__fork) !samegp
- + bne t0, HIDDEN_JUMPTARGET (fork) !samegp
- #else
- .weak pthread_create
- ldq t0, pthread_create(gp) !literal
- @@ -50,7 +49,7 @@
- cfi_adjust_cfa_offset(16)
- stq ra, 0(sp)
- cfi_offset(ra, -16)
- - jsr ra, HIDDEN_JUMPTARGET (__fork)
- + jsr ra, HIDDEN_JUMPTARGET (fork)
- ldgp gp, 0(ra)
- ldq ra, 0(sp)
- addq sp, 16, sp
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <tls.h>
- #include <pt-machine.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
- #define _ERRNO_H 1
- @@ -40,7 +39,7 @@
- ldr r0, 1f
- #endif
- movs r0, r0
- - bne HIDDEN_JUMPTARGET (__fork)
- + bne HIDDEN_JUMPTARGET (fork)
-
- DO_CALL (vfork, 0)
- cmn a1, #4096
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/.cvsignore uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/.cvsignore
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/.cvsignore 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/.cvsignore 1970-01-01 01:00:00.000000000 +0100
- @@ -1,2 +0,0 @@
- -.cvsignore
- -*.os
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <unistd.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fork.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <list.h>
- #include <bits/libc-lock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* Initial value of a spinlock. PA-RISC only implements atomic load
- and clear so this must be non-zero. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MALLOC_MACHINE_H
- #define _MALLOC_MACHINE_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/pt-initfini.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/pt-initfini.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/pt-initfini.c 2014-02-03 12:32:57.000000000 +0100
- @@ -23,8 +23,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #ifndef __ASSEMBLER__
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <tls.h>
- #include <pt-machine.h>
- @@ -139,7 +138,7 @@
- #endif
-
- # ifndef __ASSEMBLER__
- -# if defined FLOATING_STACKS && USE___THREAD && defined __PIC__
- +# if defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__ && defined __PIC__
- # define SINGLE_THREAD_P \
- __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
- p_header.data.multiple_threads) == 0, 1)
- @@ -155,7 +154,7 @@
- # else
- # if !defined __PIC__
- # define SINGLE_THREAD_P cmpl $0, __local_multiple_threads
- -# elif defined FLOATING_STACKS && USE___THREAD
- +# elif defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__
- # define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
- # else
- # if !defined NOT_IN_libc || defined IS_IN_libpthread
- @@ -165,7 +164,7 @@
- movl __local_multiple_threads@GOT(%ecx), %ecx;\
- cmpl $0, (%ecx)
- # endif
- -# if !defined HAVE_HIDDEN || !USE___THREAD
- +# if !defined HAVE_HIDDEN || !defined __UCLIBC_HAS_TLS__
- # define SINGLE_THREAD_P \
- SETUP_PIC_REG (cx); \
- addl $_GLOBAL_OFFSET_TABLE_, %ecx; \
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
- #define _ERRNO_H 1
- @@ -32,7 +31,7 @@
- #ifdef __NR_vfork
-
- # ifdef SHARED
- -# if !defined HAVE_HIDDEN || !USE___THREAD
- +# if !defined HAVE_HIDDEN || !defined __UCLIBC_HAS_TLS__
- SETUP_PIC_REG (cx)
- # else
- call __i686.get_pc_thunk.cx
- @@ -44,7 +43,7 @@
- movl $pthread_create, %eax
- testl %eax, %eax
- # endif
- - jne HIDDEN_JUMPTARGET (__fork)
- + jne HIDDEN_JUMPTARGET (fork)
-
- /* Pop the return PC value into ECX. */
- popl %ecx
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <signal.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c 2014-02-03 12:32:57.000000000 +0100
- @@ -23,8 +23,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- #include <sysdep-cancel.h>
- @@ -38,7 +37,7 @@
- #endif
- ld8 r14 = [r14];;
- cmp.ne p6, p7 = 0, r14
- -(p6) br.cond.spnt.few HIDDEN_JUMPTARGET (__fork);;
- +(p6) br.cond.spnt.few HIDDEN_JUMPTARGET (fork);;
- alloc r2=ar.pfs,0,0,2,0
- mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD
- mov out1=0 /* Standard sp value. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stddef.h>
- @@ -32,3 +31,4 @@
- (env->__jmpbuf, __builtin_frame_address (0)),
- (void) 0);
- }
- +libc_hidden_def(_longjmp_unwind)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #ifndef __ASSEMBLER__
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
- #define _ERRNO_H 1
- @@ -35,7 +34,7 @@
- .weak pthread_create
- movel #pthread_create, %d0
- #endif
- - jbne HIDDEN_JUMPTARGET (__fork)
- + jbne HIDDEN_JUMPTARGET (fork)
-
- #ifdef __NR_vfork
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #ifndef __ASSEMBLER__
- @@ -31,7 +30,7 @@
- # undef PSEUDO
- # define PSEUDO(name, syscall_name, args) \
- .align 2; \
- - 99: \
- + 99: move a0, v0; \
- PTR_LA t9,__syscall_error; \
- /* manual cpreturn. */ \
- REG_L gp, STKOFF_GP(sp); \
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #ifndef __ASSEMBLER__
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* vfork() is just a special case of clone(). */
-
- @@ -80,6 +79,7 @@
-
- /* Something bad happened -- no child created. */
- L(error):
- + move a0, v0
- #ifdef __PIC__
- PTR_LA t9, __syscall_error
- RESTORE_GP64
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
- #define _ERRNO_H 1
- @@ -66,7 +65,7 @@
- # endif
-
- .Lhidden_fork:
- - b HIDDEN_JUMPTARGET(__fork)
- + b HIDDEN_JUMPTARGET(fork)
-
- #endif
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
- #define _ERRNO_H 1
- @@ -42,7 +41,7 @@
- ld 10,.LC0@toc(2)
- ld 10,0(10)
- cmpwi 10,0
- - bne- HIDDEN_JUMPTARGET(__fork)
- + bne- HIDDEN_JUMPTARGET(fork)
- # else
- .weak pthread_create
- lis 10,pthread_create@highest
- @@ -80,7 +79,7 @@
-
- # ifndef SHARED
- .Lhidden_fork:
- - b HIDDEN_JUMPTARGET(__fork)
- + b HIDDEN_JUMPTARGET(fork)
- .Lsyscall_error:
- b JUMPTARGET(__syscall_error)
- # endif
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/raise.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/raise.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/raise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/raise.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <signal.h>
- #include <unistd.h>
- @@ -40,4 +39,3 @@
- #endif
- }
- libc_hidden_def (raise)
- -weak_alias (raise, gsignal)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_TYPES_H
- # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c
- --- 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
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c 2014-02-03 12:32:57.000000000 +0100
- @@ -23,8 +23,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
- --- 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
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
- #define _ERRNO_H 1
- @@ -54,7 +53,7 @@
- al %r1,3f-2b(%r1)
- br %r1
- 3:
- - .long HIDDEN_JUMPTARGET(__fork)-2b
- + .long HIDDEN_JUMPTARGET(fork)-2b
- 4:
- #ifdef SHARED
- .long __libc_pthread_functions-0b
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c
- --- 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
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c 2014-02-03 12:32:57.000000000 +0100
- @@ -24,8 +24,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
- --- 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
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
- #define _ERRNO_H 1
- @@ -35,7 +34,7 @@
- larl %r1,pthread_create
- #endif
- ltgr %r1,%r1
- - jgne HIDDEN_JUMPTARGET(__fork)
- + jgne HIDDEN_JUMPTARGET(fork)
-
- /* Do vfork system call. */
- svc SYS_ify (vfork)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c 2014-02-03 12:32:57.000000000 +0100
- @@ -23,8 +23,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- static __inline__ int
- is_smp_system (void)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- @@ -155,7 +154,7 @@
- # endif
-
- # ifndef __ASSEMBLER__
- -# if defined FLOATING_STACKS && USE___THREAD && defined __PIC__
- +# if defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__ && defined __PIC__
- # define SINGLE_THREAD_P \
- __builtin_expect (THREAD_GETMEM (THREAD_SELF, p_multiple_threads) == 0, 1)
- # else
- @@ -172,7 +171,7 @@
- .align 2; \
- 1: .long __local_multiple_threads; \
- 2:
- -# elif defined FLOATING_STACKS && USE___THREAD
- +# elif defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__
- # define SINGLE_THREAD_P \
- stc gbr,r0; \
- mov.w 0f,r1; \
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
- #define _ERRNO_H 1
- @@ -70,7 +69,7 @@
- nop
- 1:
- .align 2
- -.L2: .long HIDDEN_JUMPTARGET(__fork)-1b
- +.L2: .long HIDDEN_JUMPTARGET(fork)-1b
-
- PSEUDO_END (__vfork)
- libc_hidden_def (__vfork)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/smp.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/smp.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/smp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/smp.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <sys/sysctl.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_TYPES_H
- # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include_next <fork.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <tls.h>
- #ifndef __ASSEMBLER__
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
-
- @@ -43,7 +42,7 @@
- orcc %o0, %lo(pthread_create), %o0
- #endif
- #if defined SHARED && !defined BROKEN_SPARC_WDISP22
- - bne HIDDEN_JUMPTARGET(__fork)
- + bne HIDDEN_JUMPTARGET(fork)
- #else
- bne 1f
- #endif
- @@ -56,7 +55,7 @@
- and %o0, %o1, %o0
- #if !defined SHARED || defined BROKEN_SPARC_WDISP22
- 1: mov %o7, %g1
- - call HIDDEN_JUMPTARGET(__fork)
- + call HIDDEN_JUMPTARGET(fork)
- mov %g1, %o7
- #endif
- SYSCALL_ERROR_HANDLER
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <tls.h>
- #ifndef __ASSEMBLER__
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
-
- @@ -42,7 +41,7 @@
- #endif
- #if defined SHARED && !defined BROKEN_SPARC_WDISP22
- cmp %o0, 0
- - bne HIDDEN_JUMPTARGET(__fork)
- + bne HIDDEN_JUMPTARGET(fork)
- #else
- brnz,pn %o0, 1f
- #endif
- @@ -55,7 +54,7 @@
- and %o0, %o1, %o0
- #if !defined SHARED || defined BROKEN_SPARC_WDISP22
- 1: mov %o7, %g1
- - call HIDDEN_JUMPTARGET(__fork)
- + call HIDDEN_JUMPTARGET(fork)
- mov %g1, %o7
- #endif
- SYSCALL_ERROR_HANDLER
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep-cancel.h>
- #define _ERRNO_H 1
- @@ -34,7 +33,7 @@
- movq $pthread_create, %rax
- testq %rax, %rax
- #endif
- - jne HIDDEN_JUMPTARGET (__fork)
- + jne HIDDEN_JUMPTARGET (fork)
-
- /* Pop the return PC value into RDI. We need a register that
- is preserved by the syscall and that we're allowed to destroy. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c uClibc/libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h uClibc/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/tls.h uClibc/libpthread/linuxthreads/sysdeps/x86_64/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads/sysdeps/x86_64/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/.cvsignore uClibc/libpthread/linuxthreads_db/.cvsignore
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/.cvsignore 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/.cvsignore 1970-01-01 01:00:00.000000000 +0100
- @@ -1,5 +0,0 @@
- -.cvsignore
- -.svn
- -*.os
- -Makefile
- -Makefile.in
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/Makefile.old uClibc/libpthread/linuxthreads_db/Makefile.old
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/Makefile.old 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/Makefile.old 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- # Lesser General Public License for more details.
-
- # You should have received a copy of the GNU Lesser General Public
- -# License along with the GNU C Library; if not, write to the Free
- -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- -# 02111-1307 USA.
- +# License along with the GNU C Library; see the file COPYING.LIB. If
- +# not, see <http://www.gnu.org/licenses/>.
-
- # Makefile for linuxthreads debug library subdirectory of GNU C Library.
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/proc_service.h uClibc/libpthread/linuxthreads_db/proc_service.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/proc_service.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/proc_service.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The definitions in this file must correspond to those in the debugger. */
- #include <sys/procfs.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_init.c uClibc/libpthread/linuxthreads_db/td_init.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_log.c uClibc/libpthread/linuxthreads_db/td_log.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_log.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_log.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_symbol_list.c uClibc/libpthread/linuxthreads_db/td_symbol_list.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_symbol_list.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_symbol_list.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include "thread_dbP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_clear_event.c uClibc/libpthread/linuxthreads_db/td_ta_clear_event.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_clear_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_clear_event.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,17 +14,14 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
-
- td_err_e
- -td_ta_clear_event (ta, event)
- - const td_thragent_t *ta;
- - td_thr_events_t *event;
- +td_ta_clear_event(const td_thragent_t *ta, td_thr_events_t *event)
- {
- td_thr_events_t old_event;
- int i;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_delete.c uClibc/libpthread/linuxthreads_db/td_ta_delete.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_delete.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_delete.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_enable_stats.c uClibc/libpthread/linuxthreads_db/td_ta_enable_stats.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_enable_stats.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_enable_stats.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_event_addr.c uClibc/libpthread/linuxthreads_db/td_ta_event_addr.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_event_addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_event_addr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_event_getmsg.c uClibc/libpthread/linuxthreads_db/td_ta_event_getmsg.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_event_getmsg.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_nthreads.c uClibc/libpthread/linuxthreads_db/td_ta_get_nthreads.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_nthreads.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_get_nthreads.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_ph.c uClibc/libpthread/linuxthreads_db/td_ta_get_ph.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_ph.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_get_ph.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_stats.c uClibc/libpthread/linuxthreads_db/td_ta_get_stats.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_stats.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_get_stats.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_map_id2thr.c uClibc/libpthread/linuxthreads_db/td_ta_map_id2thr.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_map_id2thr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_map_id2thr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <linuxthreads/internals.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_map_lwp2thr.c uClibc/libpthread/linuxthreads_db/td_ta_map_lwp2thr.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_map_lwp2thr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_map_lwp2thr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <linuxthreads/internals.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_new.c uClibc/libpthread/linuxthreads_db/td_ta_new.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_new.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_new.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_reset_stats.c uClibc/libpthread/linuxthreads_db/td_ta_reset_stats.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_reset_stats.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_reset_stats.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_setconcurrency.c uClibc/libpthread/linuxthreads_db/td_ta_setconcurrency.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_setconcurrency.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_setconcurrency.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_set_event.c uClibc/libpthread/linuxthreads_db/td_ta_set_event.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_set_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_set_event.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,17 +14,14 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
-
- td_err_e
- -td_ta_set_event (ta, event)
- - const td_thragent_t *ta;
- - td_thr_events_t *event;
- +td_ta_set_event(const td_thragent_t *ta, td_thr_events_t *event)
- {
- td_thr_events_t old_event;
- int i;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_thr_iter.c uClibc/libpthread/linuxthreads_db/td_ta_thr_iter.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_thr_iter.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_thr_iter.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <linuxthreads/internals.h>
- @@ -40,7 +39,7 @@
- memset (&pds, '\0', sizeof (pds));
-
- /* Empty thread descriptor the thread library would create. */
- -#if !defined USE_TLS || !TLS_DTV_AT_TP
- +#if !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP
- pds.p_header.data.self = &pds;
- #endif
- pds.p_nextlive = pds.p_prevlive = &pds;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_tsd_iter.c uClibc/libpthread/linuxthreads_db/td_ta_tsd_iter.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_tsd_iter.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_ta_tsd_iter.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <linuxthreads/internals.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_clear_event.c uClibc/libpthread/linuxthreads_db/td_thr_clear_event.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_clear_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_clear_event.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
-
- @@ -24,9 +23,7 @@
-
-
- td_err_e
- -td_thr_clear_event (th, event)
- - const td_thrhandle_t *th;
- - td_thr_events_t *event;
- +td_thr_clear_event(const td_thrhandle_t *th, td_thr_events_t *event)
- {
- td_thr_events_t old_event;
- int i;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_dbresume.c uClibc/libpthread/linuxthreads_db/td_thr_dbresume.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_dbresume.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_dbresume.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_dbsuspend.c uClibc/libpthread/linuxthreads_db/td_thr_dbsuspend.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_dbsuspend.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_dbsuspend.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_event_enable.c uClibc/libpthread/linuxthreads_db/td_thr_event_enable.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_event_enable.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_event_enable.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
-
- @@ -24,9 +23,7 @@
-
-
- td_err_e
- -td_thr_event_enable (th, onoff)
- - const td_thrhandle_t *th;
- - int onoff;
- +td_thr_event_enable(const td_thrhandle_t *th, int onoff)
- {
- LOG ("td_thr_event_enable");
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_event_getmsg.c uClibc/libpthread/linuxthreads_db/td_thr_event_getmsg.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_event_getmsg.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getfpregs.c uClibc/libpthread/linuxthreads_db/td_thr_getfpregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getfpregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_getfpregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getgregs.c uClibc/libpthread/linuxthreads_db/td_thr_getgregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getgregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_getgregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_get_info.c uClibc/libpthread/linuxthreads_db/td_thr_get_info.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_get_info.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_get_info.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getxregs.c uClibc/libpthread/linuxthreads_db/td_thr_getxregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getxregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_getxregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getxregsize.c uClibc/libpthread/linuxthreads_db/td_thr_getxregsize.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getxregsize.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_getxregsize.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_set_event.c uClibc/libpthread/linuxthreads_db/td_thr_set_event.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_set_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_set_event.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
-
- @@ -24,9 +23,7 @@
-
-
- td_err_e
- -td_thr_set_event (th, event)
- - const td_thrhandle_t *th;
- - td_thr_events_t *event;
- +td_thr_set_event(const td_thrhandle_t *th, td_thr_events_t *event)
- {
- td_thr_events_t old_event;
- int i;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setfpregs.c uClibc/libpthread/linuxthreads_db/td_thr_setfpregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setfpregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_setfpregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setgregs.c uClibc/libpthread/linuxthreads_db/td_thr_setgregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setgregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_setgregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setprio.c uClibc/libpthread/linuxthreads_db/td_thr_setprio.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setprio.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_setprio.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setsigpending.c uClibc/libpthread/linuxthreads_db/td_thr_setsigpending.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setsigpending.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_setsigpending.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setxregs.c uClibc/libpthread/linuxthreads_db/td_thr_setxregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setxregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_setxregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_sigsetmask.c uClibc/libpthread/linuxthreads_db/td_thr_sigsetmask.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_sigsetmask.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_sigsetmask.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tlsbase.c uClibc/libpthread/linuxthreads_db/td_thr_tlsbase.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tlsbase.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_tlsbase.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- @@ -30,7 +29,7 @@
- if (modid < 1)
- return TD_NOTLS;
-
- -#if USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- union dtv pdtv, *dtvp;
-
- LOG ("td_thr_tlsbase");
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tls_get_addr.c uClibc/libpthread/linuxthreads_db/td_thr_tls_get_addr.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tls_get_addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_tls_get_addr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <link.h>
- #include "thread_dbP.h"
- @@ -27,7 +26,7 @@
- size_t offset __attribute__ ((unused)),
- void **address __attribute__ ((unused)))
- {
- -#if USE_TLS
- +#ifdef __UCLIBC_HAS_TLS__
- /* Read the module ID from the link_map. */
- size_t modid;
- if (ps_pdread (th->th_ta_p->ph,
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tsd.c uClibc/libpthread/linuxthreads_db/td_thr_tsd.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tsd.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_tsd.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <linuxthreads/internals.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_validate.c uClibc/libpthread/linuxthreads_db/td_thr_validate.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_validate.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/td_thr_validate.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <linuxthreads/internals.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/thread_db.h uClibc/libpthread/linuxthreads_db/thread_db.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads_db/thread_db.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads_db/thread_db.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _THREAD_DB_H
- #define _THREAD_DB_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/cancel.c uClibc/libpthread/linuxthreads.old/cancel.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/cancel.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/cancel.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,6 @@
-
- /* Thread cancellation */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <errno.h>
- #include "pthread.h"
- #include "internals.h"
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/condvar.c uClibc/libpthread/linuxthreads.old/condvar.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/condvar.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/condvar.c 2014-02-03 12:32:56.000000000 +0100
- @@ -25,16 +25,6 @@
- #include "queue.h"
- #include "restart.h"
-
- -libpthread_hidden_proto(pthread_cond_broadcast)
- -libpthread_hidden_proto(pthread_cond_destroy)
- -libpthread_hidden_proto(pthread_cond_init)
- -libpthread_hidden_proto(pthread_cond_signal)
- -libpthread_hidden_proto(pthread_cond_wait)
- -libpthread_hidden_proto(pthread_cond_timedwait)
- -
- -libpthread_hidden_proto(pthread_condattr_destroy)
- -libpthread_hidden_proto(pthread_condattr_init)
- -
- int pthread_cond_init(pthread_cond_t *cond,
- const pthread_condattr_t *cond_attr attribute_unused)
- {
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/errno.c uClibc/libpthread/linuxthreads.old/errno.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/errno.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/errno.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,6 @@
-
- /* Define the location of errno for the remainder of the C library */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <errno.h>
- #include <netdb.h>
- #include "pthread.h"
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/events.c uClibc/libpthread/linuxthreads.old/events.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/events.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/events.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* The functions contained here do nothing, they just return. */
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/forward.c uClibc/libpthread/linuxthreads.old/forward.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/forward.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/forward.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <stdlib.h>
- @@ -163,8 +162,12 @@
-
- FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
-
- +#if 0
- FORWARD2 (_pthread_cleanup_push, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return)
- +#endif
- FORWARD2 (_pthread_cleanup_push_defer, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return)
-
- +#if 0
- FORWARD2 (_pthread_cleanup_pop, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return)
- +#endif
- FORWARD2 (_pthread_cleanup_pop_restore, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/internals.h uClibc/libpthread/linuxthreads.old/internals.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/internals.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/internals.h 2014-02-03 12:32:56.000000000 +0100
- @@ -327,32 +327,28 @@
-
- /* The page size we can get from the system. This should likely not be
- changed by the machine file but, you never know. */
- -extern size_t __pagesize;
- -#include <bits/uClibc_page.h>
- -#ifndef PAGE_SIZE
- -#define PAGE_SIZE (sysconf (_SC_PAGESIZE))
- -#endif
- +#define __PAGE_SIZE (sysconf (_SC_PAGESIZE))
-
- /* The max size of the thread stack segments. If the default
- THREAD_SELF implementation is used, this must be a power of two and
- - a multiple of PAGE_SIZE. */
- + a multiple of __PAGE_SIZE. */
- #ifndef STACK_SIZE
- #ifdef __ARCH_USE_MMU__
- #define STACK_SIZE (2 * 1024 * 1024)
- #else
- -#define STACK_SIZE (4 * __pagesize)
- +#define STACK_SIZE (4 * __PAGE_SIZE)
- #endif
- #endif
-
- -/* The initial size of the thread stack. Must be a multiple of PAGE_SIZE. */
- +/* The initial size of the thread stack. Must be a multiple of __PAGE_SIZE. */
- #ifndef INITIAL_STACK_SIZE
- -#define INITIAL_STACK_SIZE (4 * __pagesize)
- +#define INITIAL_STACK_SIZE (4 * __PAGE_SIZE)
- #endif
-
- /* Size of the thread manager stack. The "- 32" avoids wasting space
- with some malloc() implementations. */
- #ifndef THREAD_MANAGER_STACK_SIZE
- -#define THREAD_MANAGER_STACK_SIZE (2 * __pagesize - 32)
- +#define THREAD_MANAGER_STACK_SIZE (2 * __PAGE_SIZE - 32)
- #endif
-
- /* The base of the "array" of thread stacks. The array will grow down from
- @@ -385,7 +381,7 @@
-
- /* Recover thread descriptor for the current thread */
-
- -extern pthread_descr __pthread_find_self (void) __attribute__ ((const));
- +extern pthread_descr __pthread_find_self (void) __attribute__ ((const)) attribute_hidden;
-
- static __inline__ pthread_descr thread_self (void) __attribute__ ((const));
- static __inline__ pthread_descr thread_self (void)
- @@ -455,18 +451,18 @@
- /* Internal global functions */
-
- void __pthread_do_exit (void *retval, char *currentframe)
- - __attribute__ ((__noreturn__));
- -void __pthread_destroy_specifics(void);
- -void __pthread_perform_cleanup(char *currentframe);
- -int __pthread_initialize_manager(void);
- + __attribute__ ((__noreturn__)) attribute_hidden;
- +void __pthread_destroy_specifics(void) attribute_hidden;
- +void __pthread_perform_cleanup(char *currentframe) attribute_hidden;
- +int __pthread_initialize_manager(void) attribute_hidden;
- void __pthread_message(char * fmt, ...)
- - __attribute__ ((__format__ (printf, 1, 2)));
- -int __pthread_manager(void *reqfd);
- -int __pthread_manager_event(void *reqfd);
- -void __pthread_manager_sighandler(int sig);
- -void __pthread_reset_main_thread(void);
- -void __fresetlockfiles(void);
- -void __pthread_manager_adjust_prio(int thread_prio);
- + __attribute__ ((__format__ (printf, 1, 2))) attribute_hidden;
- +int __pthread_manager(void *reqfd) attribute_hidden;
- +int __pthread_manager_event(void *reqfd) attribute_hidden;
- +void __pthread_manager_sighandler(int sig) attribute_hidden;
- +void __pthread_reset_main_thread(void) attribute_hidden;
- +void __fresetlockfiles(void) attribute_hidden;
- +void __pthread_manager_adjust_prio(int thread_prio) attribute_hidden;
- void __pthread_initialize_minimal (void);
-
- extern void __pthread_exit (void *retval)
- @@ -475,36 +471,36 @@
- #endif
- ;
-
- -extern int __pthread_attr_setguardsize __P ((pthread_attr_t *__attr,
- - size_t __guardsize));
- -extern int __pthread_attr_getguardsize __P ((__const pthread_attr_t *__attr,
- - size_t *__guardsize));
- -extern int __pthread_attr_setstackaddr __P ((pthread_attr_t *__attr,
- - void *__stackaddr));
- -extern int __pthread_attr_getstackaddr __P ((__const pthread_attr_t *__attr,
- - void **__stackaddr));
- -extern int __pthread_attr_setstacksize __P ((pthread_attr_t *__attr,
- - size_t __stacksize));
- -extern int __pthread_attr_getstacksize __P ((__const pthread_attr_t *__attr,
- - size_t *__stacksize));
- -extern int __pthread_getconcurrency __P ((void));
- -extern int __pthread_setconcurrency __P ((int __level));
- -extern void __pthread_kill_other_threads_np __P ((void));
- -
- -extern void __pthread_restart_old(pthread_descr th);
- -extern void __pthread_suspend_old(pthread_descr self);
- -extern int __pthread_timedsuspend_old(pthread_descr self, const struct timespec *abstime);
- -
- -extern void __pthread_restart_new(pthread_descr th);
- -extern void __pthread_suspend_new(pthread_descr self);
- -extern int __pthread_timedsuspend_new(pthread_descr self, const struct timespec *abstime);
- +extern int __pthread_attr_setguardsize(pthread_attr_t *__attr,
- + size_t __guardsize) attribute_hidden;
- +extern int __pthread_attr_getguardsize(const pthread_attr_t *__attr,
- + size_t *__guardsize) attribute_hidden;
- +extern int __pthread_attr_setstackaddr(pthread_attr_t *__attr,
- + void *__stackaddr) attribute_hidden;
- +extern int __pthread_attr_getstackaddr(const pthread_attr_t *__attr,
- + void **__stackaddr) attribute_hidden;
- +extern int __pthread_attr_setstacksize(pthread_attr_t *__attr,
- + size_t __stacksize) attribute_hidden;
- +extern int __pthread_attr_getstacksize(const pthread_attr_t *__attr,
- + size_t *__stacksize) attribute_hidden;
- +extern int __pthread_getconcurrency(void) attribute_hidden;
- +extern int __pthread_setconcurrency(int __level) attribute_hidden;
- +extern void __pthread_kill_other_threads_np(void) attribute_hidden;
- +
- +extern void __pthread_restart_old(pthread_descr th) attribute_hidden;
- +extern void __pthread_suspend_old(pthread_descr self) attribute_hidden;
- +extern int __pthread_timedsuspend_old(pthread_descr self, const struct timespec *abstime) attribute_hidden;
- +
- +extern void __pthread_restart_new(pthread_descr th) attribute_hidden;
- +extern void __pthread_suspend_new(pthread_descr self) attribute_hidden;
- +extern int __pthread_timedsuspend_new(pthread_descr self, const struct timespec *abstime) attribute_hidden;
-
- -extern void __pthread_wait_for_restart_signal(pthread_descr self);
- +extern void __pthread_wait_for_restart_signal(pthread_descr self) attribute_hidden;
-
- /* Global pointers to old or new suspend functions */
-
- -extern void (*__pthread_restart)(pthread_descr);
- -extern void (*__pthread_suspend)(pthread_descr);
- +extern void (*__pthread_restart)(pthread_descr) attribute_hidden;
- +extern void (*__pthread_suspend)(pthread_descr) attribute_hidden;
-
- #if defined NOT_IN_libc && defined IS_IN_libpthread
- extern __typeof(pthread_mutex_init) __pthread_mutex_init attribute_hidden;
- @@ -515,7 +511,7 @@
- #endif
-
- /* Prototypes for some of the new semaphore functions. */
- -extern int __new_sem_post (sem_t * sem);
- +/*extern int __new_sem_post (sem_t * sem);*/
-
- /* TSD. */
- extern int __pthread_internal_tsd_set (int key, const void * pointer);
- @@ -524,12 +520,10 @@
- __pthread_internal_tsd_address (int key);
-
- /* The functions called the signal events. */
- -extern void __linuxthreads_create_event (void);
- -extern void __linuxthreads_death_event (void);
- -extern void __linuxthreads_reap_event (void);
- +extern void __linuxthreads_create_event (void) attribute_hidden;
- +extern void __linuxthreads_death_event (void) attribute_hidden;
- +extern void __linuxthreads_reap_event (void) attribute_hidden;
-
- #include <pthread-functions.h>
-
- -extern int * __libc_pthread_init (const struct pthread_functions *functions);
- -
- #endif /* internals.h */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/libc_pthread_init.c uClibc/libpthread/linuxthreads.old/libc_pthread_init.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/libc_pthread_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/libc_pthread_init.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,27 +13,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#include <features.h>
- #include <locale.h>
- -#include <stdlib.h>
- #include <string.h>
- -
- -/* see comment in forward.c */
- -#define GCC_RENAME_BUG 1
- -#ifdef GCC_RENAME_BUG
- -# include <ctype.h>
- -# include <signal.h>
- -# include <unistd.h>
- -# include <sys/time.h>
- -# include <sys/wait.h>
- -#endif
- -
- -#include "internals.h"
- -#include "sysdeps/pthread/pthread-functions.h"
- +#include <linuxthreads.old/sysdeps/pthread/pthread-functions.h>
-
-
- int __libc_multiple_threads attribute_hidden __attribute__((nocommon));
- @@ -48,7 +33,7 @@
- sizeof (__libc_pthread_functions));
- #endif
-
- -#if ! defined USE___THREAD && defined __UCLIBC_HAS_XLOCALE__
- +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_XLOCALE__
- /* Initialize thread-locale current locale to point to the global one.
- With __thread support, the variable's initializer takes care of this. */
- uselocale (LC_GLOBAL_LOCALE);
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/locale.c uClibc/libpthread/linuxthreads.old/locale.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/locale.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/locale.c 2014-02-03 12:32:56.000000000 +0100
- @@ -11,8 +11,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- #include <features.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/lockfile.c uClibc/libpthread/linuxthreads.old/lockfile.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/lockfile.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/lockfile.c 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/Makefile.in uClibc/libpthread/linuxthreads.old/Makefile.in
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -34,15 +34,12 @@
-
- libpthread_SRC := \
- attr.c cancel.c condvar.c errno.c events.c join.c lockfile.c manager.c \
- - mutex.c oldsemaphore.c pt-machine.c ptfork.c ptlongjmp.c \
- + mutex.c pt-machine.c ptfork.c pthread.c ptlongjmp.c \
- rwlock.c semaphore.c signals.c specific.c spinlock.c wrapsyscall.c
- ifeq ($(UCLIBC_HAS_XLOCALE),y)
- libpthread_SRC += locale.c
- endif
-
- -libpthread_SPEC_SRC := pthread.c
- -libpthread_SPEC_SRC := $(patsubst %.c,$(libpthread_DIR)/%.c,$(libpthread_SPEC_SRC))
- -
- # remove generic sources, if arch specific version is present
- ifneq ($(strip $(libpthread_ARCH_SRC)),)
- libpthread_SRC := $(filter-out $(patsubst %.c,$(libpthread_DIR)/%.c,$(notdir $(libpthread_ARCH_SRC))),$(libpthread_SRC))
- @@ -62,15 +59,12 @@
- libc-static-y += $(libpthread_OUT)/libc_pthread_init.o
- libc-shared-y += $(libpthread_libc_OBJ:.o=.oS)
-
- -libpthread-static-y += $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SPEC_SRC))
- -libpthread-shared-y += $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.oS,$(libpthread_SPEC_SRC))
- -
- ifeq ($(DOPIC),y)
- -libpthread-a-y += $(libpthread_OBJ:.o=.os) $(libpthread-static-y:.o=.os)
- +libpthread-a-y += $(libpthread_OBJ:.o=.os)
- else
- -libpthread-a-y += $(libpthread_OBJ) $(libpthread-static-y)
- +libpthread-a-y += $(libpthread_OBJ)
- endif
- -libpthread-so-y += $(libpthread_OBJ:.o=.os) $(libpthread-shared-y)
- +libpthread-so-y += $(libpthread_OBJ:.o=.oS)
-
- lib-a-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.a
- lib-so-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.so
- @@ -93,7 +87,7 @@
- ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
- $(libpthread_OUT)/libpthread.oS: STRIP_FLAGS:=$(STRIP_FLAGS:-x=-X --strip-debug)
- endif
- -$(libpthread_OUT)/libpthread.oS: $(libpthread_SRC) $(libpthread_SPEC_SRC)
- +$(libpthread_OUT)/libpthread.oS: $(libpthread_SRC)
- $(Q)$(RM) $@
- $(compile-m)
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/manager.c uClibc/libpthread/linuxthreads.old/manager.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/manager.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/manager.c 2014-02-03 12:32:56.000000000 +0100
- @@ -232,7 +232,7 @@
- break;
- case REQ_POST:
- PDEBUG("got REQ_POST\n");
- - __new_sem_post(request.req_args.post);
- + sem_post(request.req_args.post);
- break;
- case REQ_DEBUG:
- PDEBUG("got REQ_DEBUG\n");
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/oldsemaphore.c uClibc/libpthread/linuxthreads.old/oldsemaphore.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/oldsemaphore.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/oldsemaphore.c 1970-01-01 01:00:00.000000000 +0100
- @@ -1,241 +0,0 @@
- -/*
- - * This file contains the old semaphore code that we need to
- - * preserve for glibc-2.0 backwards compatibility. Port to glibc 2.1
- - * done by Cristian Gafton.
- - */
- -
- -/* Linuxthreads - a simple clone()-based implementation of Posix */
- -/* threads for Linux. */
- -/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
- -/* */
- -/* This program is free software; you can redistribute it and/or */
- -/* modify it under the terms of the GNU Library General Public License */
- -/* as published by the Free Software Foundation; either version 2 */
- -/* of the License, or (at your option) any later version. */
- -/* */
- -/* This program is distributed in the hope that it will be useful, */
- -/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
- -/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
- -/* GNU Library General Public License for more details. */
- -
- -/* Semaphores a la POSIX 1003.1b */
- -
- -#include <errno.h>
- -#include "pthread.h"
- -#include "internals.h"
- -#include "spinlock.h"
- -#include "restart.h"
- -#include "queue.h"
- -
- -typedef struct {
- - long int sem_status;
- - int sem_spinlock;
- -} old_sem_t;
- -
- -/* Maximum value the semaphore can have. */
- -#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
- -
- -static __inline__ int sem_compare_and_swap(old_sem_t *sem, long oldval, long newval)
- -{
- - return compare_and_swap(&sem->sem_status, oldval, newval, &sem->sem_spinlock);
- -}
- -
- -/* The state of a semaphore is represented by a long int encoding
- - either the semaphore count if >= 0 and no thread is waiting on it,
- - or the head of the list of threads waiting for the semaphore.
- - To distinguish the two cases, we encode the semaphore count N
- - as 2N+1, so that it has the lowest bit set.
- -
- - A sequence of sem_wait operations on a semaphore initialized to N
- - result in the following successive states:
- - 2N+1, 2N-1, ..., 3, 1, &first_waiting_thread, &second_waiting_thread, ...
- -*/
- -
- -static void sem_restart_list(pthread_descr waiting);
- -
- -int __old_sem_init(old_sem_t *sem, int pshared, unsigned int value);
- -int __old_sem_init(old_sem_t *sem, int pshared, unsigned int value)
- -{
- - if (value > SEM_VALUE_MAX) {
- - errno = EINVAL;
- - return -1;
- - }
- - if (pshared) {
- - errno = ENOSYS;
- - return -1;
- - }
- - sem->sem_spinlock = 0;
- - sem->sem_status = ((long)value << 1) + 1;
- - return 0;
- -}
- -
- -/* Function called by pthread_cancel to remove the thread from
- - waiting inside __old_sem_wait. Here we simply unconditionally
- - indicate that the thread is to be woken, by returning 1. */
- -
- -static int old_sem_extricate_func(void *obj attribute_unused, pthread_descr th attribute_unused)
- -{
- - return 1;
- -}
- -
- -int __old_sem_wait(old_sem_t * sem);
- -int __old_sem_wait(old_sem_t * sem)
- -{
- - long oldstatus, newstatus;
- - volatile pthread_descr self = thread_self();
- - pthread_descr * th;
- - pthread_extricate_if extr;
- -
- - /* Set up extrication interface */
- - extr.pu_object = 0;
- - extr.pu_extricate_func = old_sem_extricate_func;
- -
- - while (1) {
- - /* Register extrication interface */
- - __pthread_set_own_extricate_if(self, &extr);
- - do {
- - oldstatus = sem->sem_status;
- - if ((oldstatus & 1) && (oldstatus != 1))
- - newstatus = oldstatus - 2;
- - else {
- - newstatus = (long) self;
- - self->p_nextwaiting = (pthread_descr) oldstatus;
- - }
- - }
- - while (! sem_compare_and_swap(sem, oldstatus, newstatus));
- - if (newstatus & 1) {
- - /* We got the semaphore. */
- - __pthread_set_own_extricate_if(self, 0);
- - return 0;
- - }
- - /* Wait for sem_post or cancellation */
- - suspend(self);
- - __pthread_set_own_extricate_if(self, 0);
- -
- - /* This is a cancellation point */
- - if (self->p_canceled && self->p_cancelstate == PTHREAD_CANCEL_ENABLE) {
- - /* Remove ourselves from the waiting list if we're still on it */
- - /* First check if we're at the head of the list. */
- - do {
- - oldstatus = sem->sem_status;
- - if (oldstatus != (long) self) break;
- - newstatus = (long) self->p_nextwaiting;
- - }
- - while (! sem_compare_and_swap(sem, oldstatus, newstatus));
- - /* Now, check if we're somewhere in the list.
- - There's a race condition with sem_post here, but it does not matter:
- - the net result is that at the time pthread_exit is called,
- - self is no longer reachable from sem->sem_status. */
- - if (oldstatus != (long) self && (oldstatus & 1) == 0) {
- - for (th = &(((pthread_descr) oldstatus)->p_nextwaiting);
- - *th != NULL && *th != (pthread_descr) 1;
- - th = &((*th)->p_nextwaiting)) {
- - if (*th == self) {
- - *th = self->p_nextwaiting;
- - break;
- - }
- - }
- - }
- - __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- - }
- - }
- -}
- -
- -int __old_sem_trywait(old_sem_t * sem);
- -int __old_sem_trywait(old_sem_t * sem)
- -{
- - long oldstatus, newstatus;
- -
- - do {
- - oldstatus = sem->sem_status;
- - if ((oldstatus & 1) == 0 || (oldstatus == 1)) {
- - errno = EAGAIN;
- - return -1;
- - }
- - newstatus = oldstatus - 2;
- - }
- - while (! sem_compare_and_swap(sem, oldstatus, newstatus));
- - return 0;
- -}
- -
- -int __old_sem_post(old_sem_t * sem);
- -int __old_sem_post(old_sem_t * sem)
- -{
- - long oldstatus, newstatus;
- -
- - do {
- - oldstatus = sem->sem_status;
- - if ((oldstatus & 1) == 0)
- - newstatus = 3;
- - else {
- - if (oldstatus >= SEM_VALUE_MAX) {
- - /* Overflow */
- - errno = ERANGE;
- - return -1;
- - }
- - newstatus = oldstatus + 2;
- - }
- - }
- - while (! sem_compare_and_swap(sem, oldstatus, newstatus));
- - if ((oldstatus & 1) == 0)
- - sem_restart_list((pthread_descr) oldstatus);
- - return 0;
- -}
- -
- -int __old_sem_getvalue(old_sem_t * sem, int * sval);
- -int __old_sem_getvalue(old_sem_t * sem, int * sval)
- -{
- - long status = sem->sem_status;
- - if (status & 1)
- - *sval = (int)((unsigned long) status >> 1);
- - else
- - *sval = 0;
- - return 0;
- -}
- -
- -int __old_sem_destroy(old_sem_t * sem);
- -int __old_sem_destroy(old_sem_t * sem)
- -{
- - if ((sem->sem_status & 1) == 0) {
- - errno = EBUSY;
- - return -1;
- - }
- - return 0;
- -}
- -
- -/* Auxiliary function for restarting all threads on a waiting list,
- - in priority order. */
- -
- -static void sem_restart_list(pthread_descr waiting)
- -{
- - pthread_descr th, towake, *p;
- -
- - /* Sort list of waiting threads by decreasing priority (insertion sort) */
- - towake = NULL;
- - while (waiting != (pthread_descr) 1) {
- - th = waiting;
- - waiting = waiting->p_nextwaiting;
- - p = &towake;
- - while (*p != NULL && th->p_priority < (*p)->p_priority)
- - p = &((*p)->p_nextwaiting);
- - th->p_nextwaiting = *p;
- - *p = th;
- - }
- - /* Wake up threads in priority order */
- - while (towake != NULL) {
- - th = towake;
- - towake = towake->p_nextwaiting;
- - th->p_nextwaiting = NULL;
- - restart(th);
- - }
- -}
- -
- -#if defined __PIC__ && defined DO_VERSIONING
- -symbol_version (__old_sem_init, sem_init, GLIBC_2.0);
- -symbol_version (__old_sem_wait, sem_wait, GLIBC_2.0);
- -symbol_version (__old_sem_trywait, sem_trywait, GLIBC_2.0);
- -symbol_version (__old_sem_post, sem_post, GLIBC_2.0);
- -symbol_version (__old_sem_getvalue, sem_getvalue, GLIBC_2.0);
- -symbol_version (__old_sem_destroy, sem_destroy, GLIBC_2.0);
- -#endif
- -
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/ptfork.c uClibc/libpthread/linuxthreads.old/ptfork.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/ptfork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/ptfork.c 2014-02-03 12:32:56.000000000 +0100
- @@ -93,10 +93,7 @@
- void __pthread_once_fork_child(void);
- void __pthread_once_fork_parent(void);
-
- -extern __typeof(fork) __libc_fork;
- -
- -pid_t __fork(void) attribute_hidden;
- -pid_t __fork(void)
- +static pid_t __fork(void)
- {
- pid_t pid;
- struct handler_list * prepare, * child, * parent;
- @@ -151,11 +148,7 @@
- return pid;
- }
- strong_alias(__fork,fork)
- -
- -pid_t vfork(void)
- -{
- - return __fork();
- -}
- +strong_alias(__fork,vfork)
-
- #else
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/pthread.c uClibc/libpthread/linuxthreads.old/pthread.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/pthread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/pthread.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,6 @@
-
- /* Thread creation, initialization, and basic low-level routines */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <errno.h>
- #include <netdb.h> /* for h_errno */
- #include <stddef.h>
- @@ -38,8 +36,6 @@
- #include <sys/types.h>
- #include <sys/syscall.h>
-
- -/* mods for uClibc: __libc_sigaction is not in any standard headers */
- -extern __typeof(sigaction) __libc_sigaction;
- libpthread_hidden_proto(waitpid)
- libpthread_hidden_proto(raise)
-
- @@ -260,6 +256,7 @@
- return current_rtmax;
- }
-
- +#if 0
- /* Allocate real-time signal with highest/lowest available
- priority. Please note that we don't use a lock since we assume
- this function to be called at program start. */
- @@ -272,6 +269,7 @@
- return high ? current_rtmin++ : current_rtmax--;
- }
- #endif
- +#endif
-
- /* Initialize the pthread library.
- Initialization is split in two functions:
- @@ -319,7 +317,7 @@
-
- struct pthread_functions __pthread_functions =
- {
- -#ifndef USE___THREAD
- +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
- .ptr_pthread_internal_tsd_set = __pthread_internal_tsd_set,
- .ptr_pthread_internal_tsd_get = __pthread_internal_tsd_get,
- .ptr_pthread_internal_tsd_address = __pthread_internal_tsd_address,
- @@ -367,10 +365,10 @@
- .ptr_pthread_sigwait = pthread_sigwait,
- .ptr_pthread_raise = pthread_raise,
- .ptr__pthread_cleanup_push = _pthread_cleanup_push,
- - .ptr__pthread_cleanup_pop = _pthread_cleanup_pop
- + .ptr__pthread_cleanup_pop = _pthread_cleanup_pop,
- */
- .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer,
- - .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore,
- + .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore
- };
- #ifdef SHARED
- # define ptr_pthread_functions &__pthread_functions
- @@ -528,7 +526,7 @@
- /* On non-MMU systems we make sure that the initial thread bounds don't overlap
- * with the manager stack frame */
- NOMMU_INITIAL_THREAD_BOUNDS(__pthread_manager_thread_tos,__pthread_manager_thread_bos);
- - PDEBUG("manager stack: size=%d, bos=%p, tos=%p\n", THREAD_MANAGER_STACK_SIZE,
- + PDEBUG("manager stack: size=%ld, bos=%p, tos=%p\n", THREAD_MANAGER_STACK_SIZE,
- __pthread_manager_thread_bos, __pthread_manager_thread_tos);
- #if 0
- PDEBUG("initial stack: estimate bos=%p, tos=%p\n",
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/ptlongjmp.c uClibc/libpthread/linuxthreads.old/ptlongjmp.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/ptlongjmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/ptlongjmp.c 2014-02-03 12:32:56.000000000 +0100
- @@ -19,11 +19,7 @@
- #include "pthread.h"
- #include "internals.h"
- #include <bits/stackinfo.h>
- -
- -/* These functions are not declared anywhere since they shouldn't be
- - used at another place but here. */
- -extern __typeof(siglongjmp) __libc_siglongjmp attribute_noreturn;
- -extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
- +#include <jmpbuf-unwind.h>
-
- static void pthread_cleanup_upto(__jmp_buf target)
- {
- @@ -58,13 +54,13 @@
- THREAD_SETMEM(self, p_in_sighandler, NULL);
- }
-
- -void attribute_noreturn siglongjmp(sigjmp_buf env, int val)
- +void siglongjmp(sigjmp_buf env, int val)
- {
- pthread_cleanup_upto(env->__jmpbuf);
- __libc_siglongjmp(env, val);
- }
-
- -void attribute_noreturn longjmp(jmp_buf env, int val)
- +void longjmp(jmp_buf env, int val)
- {
- pthread_cleanup_upto(env->__jmpbuf);
- __libc_longjmp(env, val);
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/pt-machine.c uClibc/libpthread/linuxthreads.old/pt-machine.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/pt-machine.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/pt-machine.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #define PT_EI
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/rwlock.c uClibc/libpthread/linuxthreads.old/rwlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/rwlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/rwlock.c 2014-02-03 12:32:56.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/semaphore.c uClibc/libpthread/linuxthreads.old/semaphore.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/semaphore.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/semaphore.c 2014-02-03 12:32:56.000000000 +0100
- @@ -15,6 +15,7 @@
- /* Semaphores a la POSIX 1003.1b */
-
- #include <features.h>
- +#include <limits.h>
- #include <errno.h>
- #include "pthread.h"
- #include "semaphore.h"
- @@ -23,8 +24,7 @@
- #include "restart.h"
- #include "queue.h"
-
- -int __new_sem_init(sem_t *sem, int pshared, unsigned int value);
- -int __new_sem_init(sem_t *sem, int pshared, unsigned int value)
- +int sem_init(sem_t *sem, int pshared, unsigned int value)
- {
- if (value > SEM_VALUE_MAX) {
- errno = EINVAL;
- @@ -41,7 +41,7 @@
- }
-
- /* Function called by pthread_cancel to remove the thread from
- - waiting inside __new_sem_wait. */
- + waiting inside sem_wait. */
-
- static int new_sem_extricate_func(void *obj, pthread_descr th)
- {
- @@ -56,8 +56,7 @@
- return did_remove;
- }
-
- -int __new_sem_wait(sem_t * sem);
- -int __new_sem_wait(sem_t * sem)
- +int sem_wait(sem_t * sem)
- {
- volatile pthread_descr self = thread_self();
- pthread_extricate_if extr;
- @@ -119,8 +118,7 @@
- return 0;
- }
-
- -int __new_sem_trywait(sem_t * sem);
- -int __new_sem_trywait(sem_t * sem)
- +int sem_trywait(sem_t * sem)
- {
- int retval;
-
- @@ -136,8 +134,7 @@
- return retval;
- }
-
- -int __new_sem_post(sem_t * sem);
- -int __new_sem_post(sem_t * sem)
- +int sem_post(sem_t * sem)
- {
- pthread_descr self = thread_self();
- pthread_descr th;
- @@ -178,15 +175,13 @@
- return 0;
- }
-
- -int __new_sem_getvalue(sem_t * sem, int * sval);
- -int __new_sem_getvalue(sem_t * sem, int * sval)
- +int sem_getvalue(sem_t * sem, int * sval)
- {
- *sval = sem->__sem_value;
- return 0;
- }
-
- -int __new_sem_destroy(sem_t * sem);
- -int __new_sem_destroy(sem_t * sem)
- +int sem_destroy(sem_t * sem)
- {
- if (sem->__sem_waiting != NULL) {
- __set_errno (EBUSY);
- @@ -302,12 +297,3 @@
- /* We got the semaphore */
- return 0;
- }
- -
- -
- -weak_alias (__new_sem_init, sem_init)
- -weak_alias (__new_sem_wait, sem_wait)
- -weak_alias (__new_sem_trywait, sem_trywait)
- -weak_alias (__new_sem_post, sem_post)
- -weak_alias (__new_sem_getvalue, sem_getvalue)
- -weak_alias (__new_sem_destroy, sem_destroy)
- -
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/semaphore.h uClibc/libpthread/linuxthreads.old/semaphore.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/semaphore.h 2014-02-03 12:32:56.000000000 +0100
- @@ -17,6 +17,7 @@
-
- #include <features.h>
- #include <sys/types.h>
- +#include <limits.h>
- #ifdef __USE_XOPEN2K
- # define __need_timespec
- # include <time.h>
- @@ -42,7 +43,9 @@
- #define SEM_FAILED ((sem_t *) 0)
-
- /* Maximum value the semaphore can have. */
- +#ifndef SEM_VALUE_MAX
- #define SEM_VALUE_MAX ((int) ((~0u) >> 1))
- +#endif
-
-
- __BEGIN_DECLS
- @@ -55,13 +58,13 @@
- extern int sem_destroy (sem_t *__sem) __THROW;
-
- /* Open a named semaphore NAME with open flags OFLAG. */
- -extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
- +extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW;
-
- /* Close descriptor for named semaphore SEM. */
- extern int sem_close (sem_t *__sem) __THROW;
-
- /* Remove named semaphore NAME. */
- -extern int sem_unlink (__const char *__name) __THROW;
- +extern int sem_unlink (const char *__name) __THROW;
-
- /* Wait for SEM being posted.
-
- @@ -75,7 +78,7 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- extern int sem_timedwait (sem_t *__restrict __sem,
- - __const struct timespec *__restrict __abstime);
- + const struct timespec *__restrict __abstime);
- #endif
-
- /* Test whether SEM is posted. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/signals.c uClibc/libpthread/linuxthreads.old/signals.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/signals.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/signals.c 2014-02-03 12:32:56.000000000 +0100
- @@ -22,9 +22,6 @@
- #include "spinlock.h"
- #include <bits/sigcontextinfo.h>
-
- -/* mods for uClibc: __libc_sigaction is not in any standard headers */
- -extern __typeof(sigaction) __libc_sigaction;
- -
- int pthread_sigmask(int how, const sigset_t * newmask, sigset_t * oldmask)
- {
- sigset_t mask;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/specific.c uClibc/libpthread/linuxthreads.old/specific.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/specific.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/specific.c 2014-02-03 12:32:56.000000000 +0100
- @@ -167,7 +167,7 @@
- __pthread_unlock(THREAD_GETMEM(self, p_lock));
- }
-
- -#ifndef USE___THREAD
- +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
-
- /* Thread-specific data for libc. */
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/spinlock.c uClibc/libpthread/linuxthreads.old/spinlock.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/spinlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/spinlock.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,8 +14,6 @@
-
- /* Internal locks */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <errno.h>
- #include <sched.h>
- #include <time.h>
- @@ -67,7 +65,6 @@
- #if defined HAS_COMPARE_AND_SWAP
- long oldstatus, newstatus;
- int successful_seizure, spurious_wakeup_count;
- - int spin_count;
- #endif
-
- #if defined TEST_FOR_COMPARE_AND_SWAP
- @@ -87,11 +84,11 @@
- return;
-
- spurious_wakeup_count = 0;
- - spin_count = 0;
-
- /* On SMP, try spinning to get the lock. */
- #if 0
- if (__pthread_smp_kernel) {
- + int spin_count;
- int max_count = lock->__spinlock * 2 + 10;
-
- if (max_count > MAX_ADAPTIVE_SPIN_COUNT)
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -17,8 +17,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/arc/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/arc/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/arc/pt-machine.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/arc/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -0,0 +1,42 @@
- +/*
- + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#ifndef _PT_MACHINE_H
- +#define _PT_MACHINE_H 1
- +#include <features.h>
- +
- +#ifndef PT_EI
- +# define PT_EI __extern_always_inline
- +#endif
- +
- +extern long int testandset (int *spinlock);
- +extern int __compare_and_swap (long int *p, long int oldval, long int newval);
- +
- +PT_EI long int
- +testandset (int *spinlock)
- +{
- + unsigned int old = 1;
- +
- + /* Atomically exchange @spinlock with 1 */
- + __asm__ __volatile__(
- + "ex %0, [%1]"
- + : "+r" (old)
- + : "r" (spinlock)
- + : "memory");
- +
- + return old;
- +
- +}
- +
- +/* Get some notion of the current stack. Need not be exactly the top
- + of the stack, just something somewhere in the current frame.
- + I don't trust register variables, so let's do this the safe way. */
- +#define CURRENT_STACK_FRAME \
- +__extension__ ({ char *__sp; __asm__ ("mov %0,sp" : "=r" (__sp)); __sp; })
- +
- +#else
- +#error PT_MACHINE already defined
- +#endif /* pt-machine.h */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/c6x/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/c6x/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/c6x/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/c6x/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/tls.h uClibc/libpthread/linuxthreads.old/sysdeps/i386/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/i386/tls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/useldt.h uClibc/libpthread/linuxthreads.old/sysdeps/i386/useldt.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/useldt.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/i386/useldt.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef __ASSEMBLER__
- #include <stddef.h> /* For offsetof. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/ia64/tls.h uClibc/libpthread/linuxthreads.old/sysdeps/ia64/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/ia64/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/ia64/tls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -18,8 +18,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,8 +15,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* These routines are from Appendix G of the 'PowerPC 601 RISC Microprocessor
- User's Manual', by IBM and Motorola. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h uClibc/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_LIBC_LOCK_H
- #define _BITS_LIBC_LOCK_H 1
- @@ -271,6 +270,7 @@
- _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \
- }
-
- +#if 0
- #define __libc_cleanup_push(fct, arg) \
- { struct _pthread_cleanup_buffer _buffer; \
- __libc_maybe_call (_pthread_cleanup_push, (&_buffer, (fct), (arg)), 0)
- @@ -278,6 +278,7 @@
- #define __libc_cleanup_pop(execute) \
- __libc_maybe_call (_pthread_cleanup_pop, (&_buffer, execute), 0); \
- }
- +#endif
-
- /* Create thread-specific key. */
- #define __libc_key_create(KEY, DESTRUCTOR) \
- @@ -300,7 +301,7 @@
- library. */
-
- extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
- - __const pthread_mutexattr_t *__mutex_attr);
- + const pthread_mutexattr_t *__mutex_attr);
-
- extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
-
- @@ -319,7 +320,7 @@
-
- #ifdef __USE_UNIX98
- extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
- - __const pthread_rwlockattr_t *__attr);
- + const pthread_rwlockattr_t *__attr);
-
- extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
-
- @@ -338,7 +339,7 @@
- void (*__destr_function) (void *));
-
- extern int __pthread_setspecific (pthread_key_t __key,
- - __const void *__pointer);
- + const void *__pointer);
-
- extern void *__pthread_getspecific (pthread_key_t __key);
-
- @@ -375,7 +376,6 @@
- weak_extern (BP_SYM (__pthread_setspecific))
- weak_extern (BP_SYM (__pthread_getspecific))
- weak_extern (BP_SYM (__pthread_once))
- -weak_extern (__pthread_initialize)
- weak_extern (__pthread_atfork)
- weak_extern (BP_SYM (_pthread_cleanup_push))
- weak_extern (BP_SYM (_pthread_cleanup_pop))
- @@ -400,7 +400,6 @@
- # pragma weak __pthread_setspecific
- # pragma weak __pthread_getspecific
- # pragma weak __pthread_once
- -# pragma weak __pthread_initialize
- # pragma weak __pthread_atfork
- # pragma weak _pthread_cleanup_push_defer
- # pragma weak _pthread_cleanup_pop_restore
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h uClibc/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,15 +13,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_LIBC_TSD_H
- #define _BITS_LIBC_TSD_H 1
-
- -#include <libc-internal.h>
- -
- /* Fast thread-specific data internal to libc. */
- enum __libc_tsd_key_t { _LIBC_TSD_KEY_MALLOC = 0,
- _LIBC_TSD_KEY_DL_ERROR,
- @@ -32,12 +29,11 @@
- _LIBC_TSD_KEY_CTYPE_TOUPPER,
- _LIBC_TSD_KEY_N };
-
- -#include <sys/cdefs.h>
- -#include <tls.h>
- -
- +#include <features.h>
- #include <linuxthreads.old/internals.h>
-
- -#if defined(USE_TLS) && USE_TLS && HAVE___THREAD
- +#ifdef __UCLIBC_HAS_TLS__
- +#include <tls.h>
-
- /* When __thread works, the generic definition is what we want. */
- # include <sysdeps/generic/bits/libc-tsd.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h uClibc/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h 2014-02-03 12:32:56.000000000 +0100
- @@ -19,6 +19,9 @@
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
-
- +#define __need_size_t
- +#include <stddef.h>
- +
- #define __need_schedparam
- #include <bits/sched.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/not-cancel.h uClibc/libpthread/linuxthreads.old/sysdeps/pthread/not-cancel.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/not-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/pthread/not-cancel.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,18 +14,26 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/types.h>
- #include <sysdep.h>
-
- /* Uncancelable open. */
- +#if defined __NR_openat && !defined __NR_open
- +#define open_not_cancel(name, flags, mode) \
- + INLINE_SYSCALL (openat, 4, AT_FDCWD, (const char *) (name), \
- + (flags), (mode))
- +#define open_not_cancel_2(name, flags) \
- + INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), \
- + (flags))
- +#else
- #define open_not_cancel(name, flags, mode) \
- INLINE_SYSCALL (open, 3, (const char *) (name), (flags), (mode))
- #define open_not_cancel_2(name, flags) \
- INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
- +#endif
-
- /* Uncancelable openat. */
- #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h uClibc/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,25 +13,28 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _PTHREAD_FUNCTIONS_H
- #define _PTHREAD_FUNCTIONS_H 1
-
- #include <pthread.h>
- +#if 0
- #include <setjmp.h>
- #include <linuxthreads.old/internals.h>
-
- struct fork_block;
- +#endif
-
- /* Data type shared with libc. The libc uses it to pass on calls to
- the thread functions. Wine pokes directly into this structure,
- so if possible avoid breaking it and append new hooks to the end. */
- struct pthread_functions
- {
- +#if 0
- pid_t (*ptr_pthread_fork) (struct fork_block *);
- +#endif
- int (*ptr_pthread_attr_destroy) (pthread_attr_t *);
- int (*ptr_pthread_attr_init) (pthread_attr_t *);
- int (*ptr_pthread_attr_getdetachstate) (const pthread_attr_t *, int *);
- @@ -68,26 +71,36 @@
- pthread_t (*ptr_pthread_self) (void);
- int (*ptr_pthread_setcancelstate) (int, int *);
- int (*ptr_pthread_setcanceltype) (int, int *);
- +#if 0
- void (*ptr_pthread_do_exit) (void *retval, char *currentframe);
- void (*ptr_pthread_cleanup_upto) (__jmp_buf target,
- char *targetframe);
- pthread_descr (*ptr_pthread_thread_self) (void);
- +#endif
- +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
- int (*ptr_pthread_internal_tsd_set) (int key, const void *pointer);
- void * (*ptr_pthread_internal_tsd_get) (int key);
- void ** __attribute__ ((__const__))
- (*ptr_pthread_internal_tsd_address) (int key);
- +#endif
- +#if 0
- int (*ptr_pthread_sigaction) (int sig, const struct sigaction * act,
- struct sigaction *oact);
- int (*ptr_pthread_sigwait) (const sigset_t *set, int *sig);
- int (*ptr_pthread_raise) (int sig);
- +#endif
- int (*ptr_pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
- const struct timespec *);
- +#if 0
- void (*ptr__pthread_cleanup_push) (struct _pthread_cleanup_buffer * buffer,
- void (*routine)(void *), void * arg);
- +#endif
- void (*ptr__pthread_cleanup_push_defer) (struct _pthread_cleanup_buffer * buffer,
- void (*routine)(void *), void * arg);
- +#if 0
- void (*ptr__pthread_cleanup_pop) (struct _pthread_cleanup_buffer * buffer,
- int execute);
- +#endif
- void (*ptr__pthread_cleanup_pop_restore) (struct _pthread_cleanup_buffer * buffer,
- int execute);
- };
- @@ -95,4 +108,6 @@
- /* Variable in libc.so. */
- extern struct pthread_functions __libc_pthread_functions attribute_hidden;
-
- +extern int * __libc_pthread_init (const struct pthread_functions *functions);
- +
- #endif /* pthread-functions.h */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h uClibc/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h 2014-02-03 12:32:56.000000000 +0100
- @@ -161,7 +161,7 @@
- if ATTR is NULL), and call function START_ROUTINE with given
- arguments ARG. */
- extern int pthread_create (pthread_t *__restrict __threadp,
- - __const pthread_attr_t *__restrict __attr,
- + const pthread_attr_t *__restrict __attr,
- void *(*__start_routine) (void *),
- void *__restrict __arg) __THROW;
-
- @@ -201,16 +201,16 @@
- int __detachstate) __THROW;
-
- /* Return in *DETACHSTATE the `detachstate' attribute in *ATTR. */
- -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
- +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
- int *__detachstate) __THROW;
-
- /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
- extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
- - __const struct sched_param *__restrict
- + const struct sched_param *__restrict
- __param) __THROW;
-
- /* Return in *PARAM the scheduling parameters of *ATTR. */
- -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict
- __attr,
- struct sched_param *__restrict __param)
- __THROW;
- @@ -220,7 +220,7 @@
- __THROW;
-
- /* Return in *POLICY the scheduling policy of *ATTR. */
- -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
- __attr, int *__restrict __policy)
- __THROW;
-
- @@ -229,7 +229,7 @@
- int __inherit) __THROW;
-
- /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
- -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
- __attr, int *__restrict __inherit)
- __THROW;
-
- @@ -238,7 +238,7 @@
- __THROW;
-
- /* Return in *SCOPE the scheduling contention scope of *ATTR. */
- -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
- +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
- int *__restrict __scope) __THROW;
-
- #ifdef __USE_UNIX98
- @@ -247,7 +247,7 @@
- size_t __guardsize) __THROW;
-
- /* Get the size of the guard area at the bottom of the thread. */
- -extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getguardsize (const pthread_attr_t *__restrict
- __attr, size_t *__restrict __guardsize)
- __THROW;
- #endif
- @@ -261,7 +261,7 @@
- void *__stackaddr) __THROW;
-
- /* Return the previously set address for the stack. */
- -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
- __attr, void **__restrict __stackaddr)
- __THROW;
- #endif
- @@ -274,7 +274,7 @@
- size_t __stacksize) __THROW;
-
- /* Return the previously set address for the stack. */
- -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
- +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
- void **__restrict __stackaddr,
- size_t *__restrict __stacksize) __THROW;
- #endif
- @@ -286,7 +286,7 @@
- size_t __stacksize) __THROW;
-
- /* Return the currently used minimal stack size. */
- -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
- __attr, size_t *__restrict __stacksize)
- __THROW;
-
- @@ -306,7 +306,7 @@
- /* Set the scheduling parameters for TARGET_THREAD according to POLICY
- and *PARAM. */
- extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
- - __const struct sched_param *__param)
- + const struct sched_param *__param)
- __THROW;
-
- /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
- @@ -333,7 +333,7 @@
- /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the
- default values if later is NULL. */
- extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
- - __const pthread_mutexattr_t *__restrict
- + const pthread_mutexattr_t *__restrict
- __mutex_attr) __THROW;
-
- /* Destroy MUTEX. */
- @@ -348,7 +348,7 @@
- #ifdef __USE_XOPEN2K
- /* Wait until lock becomes available, or specified time passes. */
- extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime) __THROW;
- #endif
-
- @@ -366,7 +366,7 @@
- extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW;
-
- /* Get the process-shared flag of the mutex attribute ATTR. */
- -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
- +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
- @@ -382,7 +382,7 @@
- __THROW;
-
- /* Return in *KIND the mutex kind attribute in *ATTR. */
- -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
- +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
- __attr, int *__restrict __kind) __THROW;
- #endif
-
- @@ -392,22 +392,27 @@
- /* Initialize condition variable COND using attributes ATTR, or use
- the default values if later is NULL. */
- extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
- - __const pthread_condattr_t *__restrict
- + const pthread_condattr_t *__restrict
- __cond_attr) __THROW;
- +libpthread_hidden_proto(pthread_cond_init)
-
- /* Destroy condition variable COND. */
- extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW;
- +libpthread_hidden_proto(pthread_cond_destroy)
-
- /* Wake up one thread waiting for condition variable COND. */
- extern int pthread_cond_signal (pthread_cond_t *__cond) __THROW;
- +libpthread_hidden_proto(pthread_cond_signal)
-
- /* Wake up all threads waiting for condition variables COND. */
- extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW;
- +libpthread_hidden_proto(pthread_cond_broadcast)
-
- /* Wait for condition variable COND to be signaled or broadcast.
- MUTEX is assumed to be locked before. */
- extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
- pthread_mutex_t *__restrict __mutex);
- +libpthread_hidden_proto(pthread_cond_wait)
-
- /* Wait for condition variable COND to be signaled or broadcast until
- ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an
- @@ -415,19 +420,22 @@
- (00:00:00 GMT, January 1, 1970). */
- extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
- pthread_mutex_t *__restrict __mutex,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime);
- +libpthread_hidden_proto(pthread_cond_timedwait)
-
- /* Functions for handling condition variable attributes. */
-
- /* Initialize condition variable attribute ATTR. */
- extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW;
- +libpthread_hidden_proto(pthread_condattr_init)
-
- /* Destroy condition variable attribute ATTR. */
- extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW;
- +libpthread_hidden_proto(pthread_condattr_destroy)
-
- /* Get the process-shared flag of the condition variable attribute ATTR. */
- -extern int pthread_condattr_getpshared (__const pthread_condattr_t *
- +extern int pthread_condattr_getpshared (const pthread_condattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
- @@ -442,7 +450,7 @@
- /* Initialize read-write lock RWLOCK using attributes ATTR, or use
- the default values if later is NULL. */
- extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
- - __const pthread_rwlockattr_t *__restrict
- + const pthread_rwlockattr_t *__restrict
- __attr) __THROW;
-
- /* Destroy read-write lock RWLOCK. */
- @@ -457,7 +465,7 @@
- # ifdef __USE_XOPEN2K
- /* Try to acquire read lock for RWLOCK or return after specfied time. */
- extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime) __THROW;
- # endif
-
- @@ -470,7 +478,7 @@
- # ifdef __USE_XOPEN2K
- /* Try to acquire write lock for RWLOCK or return after specfied time. */
- extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime) __THROW;
- # endif
-
- @@ -487,7 +495,7 @@
- extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW;
-
- /* Return current setting of process-shared attribute of ATTR in PSHARED. */
- -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
- +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
- @@ -496,7 +504,7 @@
- int __pshared) __THROW;
-
- /* Return current setting of reader/writer preference. */
- -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr,
- +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *__attr,
- int *__pref) __THROW;
-
- /* Set reader/write preference. */
- @@ -532,7 +540,7 @@
- /* Barriers are a also a new feature in 1003.1j-2000. */
-
- extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
- - __const pthread_barrierattr_t *__restrict
- + const pthread_barrierattr_t *__restrict
- __attr, unsigned int __count) __THROW;
-
- extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW;
- @@ -541,7 +549,7 @@
-
- extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW;
-
- -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
- +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
- @@ -569,7 +577,7 @@
-
- /* Store POINTER in the thread-specific data slot identified by KEY. */
- extern int pthread_setspecific (pthread_key_t __key,
- - __const void *__pointer) __THROW;
- + const void *__pointer) __THROW;
-
- /* Return current value of the thread-specific data slot identified by KEY. */
- extern void *pthread_getspecific (pthread_key_t __key) __THROW;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/tls.h uClibc/libpthread/linuxthreads.old/sysdeps/pthread/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/pthread/tls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* By default no TLS support is available. This is signaled by the
- absence of the symbol USE_TLS. */
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh/tls.h uClibc/libpthread/linuxthreads.old/sysdeps/sh/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/sh/tls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c uClibc/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c 2014-02-03 12:32:56.000000000 +0100
- @@ -19,8 +19,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include "pt-machine.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -19,8 +19,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -16,8 +16,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- - not, write to the Free Software Foundation, Inc.,
- - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- @@ -33,6 +32,9 @@
- # define PT_EI __extern_always_inline
- # endif
-
- +extern long int testandset (int *);
- +extern int __compare_and_swap (long int *, long int, long int);
- +
- /* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame. */
- # define CURRENT_STACK_FRAME stack_pointer
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h uClibc/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h uClibc/libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h 2014-02-03 12:32:56.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- - Boston, MA 02110-1301, USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
- @@ -26,19 +25,51 @@
- #include <asm/unistd.h>
-
- #ifndef PT_EI
- -# define PT_EI __extern_always_inline
- +# define PT_EI extern inline __attribute__ ((gnu_inline))
- #endif
-
- -/* Memory barrier. */
- #define MEMORY_BARRIER() __asm__ ("memw" : : : "memory")
- +#define HAS_COMPARE_AND_SWAP
- +
- +extern long int testandset (int *spinlock);
- +extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
- /* Spinlock implementation; required. */
- PT_EI long int
- testandset (int *spinlock)
- {
- - int unused = 0;
- - return INTERNAL_SYSCALL (xtensa, , 4, SYS_XTENSA_ATOMIC_SET,
- - spinlock, 1, unused);
- + unsigned long tmp;
- + __asm__ volatile (
- +" movi %0, 0 \n"
- +" wsr %0, SCOMPARE1 \n"
- +" movi %0, 1 \n"
- +" s32c1i %0, %1, 0 \n"
- + : "=&a" (tmp)
- + : "a" (spinlock)
- + : "memory"
- + );
- + return tmp;
- +}
- +
- +PT_EI int
- +__compare_and_swap (long int *p, long int oldval, long int newval)
- +{
- + unsigned long tmp;
- + unsigned long value;
- + __asm__ volatile (
- +"1: l32i %0, %2, 0 \n"
- +" bne %0, %4, 2f \n"
- +" wsr %0, SCOMPARE1 \n"
- +" mov %1, %0 \n"
- +" mov %0, %3 \n"
- +" s32c1i %0, %2, 0 \n"
- +" bne %1, %0, 1b \n"
- +"2: \n"
- + : "=&a" (tmp), "=&a" (value)
- + : "a" (p), "a" (newval), "a" (oldval)
- + : "memory" );
- +
- + return tmp == oldval;
- }
-
- /* Get some notion of the current stack. Need not be exactly the top
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/wrapsyscall.c uClibc/libpthread/linuxthreads.old/wrapsyscall.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old/wrapsyscall.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old/wrapsyscall.c 2014-02-03 12:32:56.000000000 +0100
- @@ -1,4 +1,4 @@
- -/* Wrapper arpund system calls to provide cancellation points.
- +/* Wrapper around system calls to provide cancellation points.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
- @@ -15,11 +15,8 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <fcntl.h>
- #include <sys/mman.h>
- #include <pthread.h>
- @@ -83,6 +80,12 @@
- CANCELABLE_SYSCALL_VA (int, fcntl, (int fd, int cmd, ...),
- (fd, cmd, va_arg (ap, long int)), cmd)
-
- +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 32
- +/* fcntl64(2). */
- +CANCELABLE_SYSCALL_VA (int, fcntl64, (int fd, int cmd, ...),
- + (fd, cmd, va_arg (ap, long int)), cmd)
- +#endif
- +
-
- /* fsync(2). */
- CANCELABLE_SYSCALL (int, fsync, (int fd), (fd))
- @@ -230,12 +233,12 @@
- #endif /* __UCLIBC_HAS_SOCKET__ */
-
- #ifdef __UCLIBC_HAS_EPOLL__
- +# include <sys/epoll.h>
- # ifdef __NR_epoll_wait
- CANCELABLE_SYSCALL (int, epoll_wait, (int epfd, struct epoll_event *events, int maxevents, int timeout),
- (epfd, events, maxevents, timeout))
- # endif
- # ifdef __NR_epoll_pwait
- -# include <signal.h>
- CANCELABLE_SYSCALL (int, epoll_pwait, (int epfd, struct epoll_event *events, int maxevents, int timeout,
- const sigset_t *set),
- (epfd, events, maxevents, timeout, set))
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/proc_service.h uClibc/libpthread/linuxthreads.old_db/proc_service.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/proc_service.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/proc_service.h 2014-02-03 12:32:56.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The definitions in this file must correspond to those in the debugger. */
- #include <sys/procfs.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_init.c uClibc/libpthread/linuxthreads.old_db/td_init.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_init.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_log.c uClibc/libpthread/linuxthreads.old_db/td_log.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_log.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_log.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_symbol_list.c uClibc/libpthread/linuxthreads.old_db/td_symbol_list.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_symbol_list.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_symbol_list.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include "thread_dbP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_clear_event.c uClibc/libpthread/linuxthreads.old_db/td_ta_clear_event.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_clear_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_clear_event.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,17 +14,14 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
-
- td_err_e
- -td_ta_clear_event (ta, event)
- - const td_thragent_t *ta;
- - td_thr_events_t *event;
- +td_ta_clear_event(const td_thragent_t *ta,td_thr_events_t *event)
- {
- td_thr_events_t old_event;
- int i;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_delete.c uClibc/libpthread/linuxthreads.old_db/td_ta_delete.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_delete.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_delete.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_enable_stats.c uClibc/libpthread/linuxthreads.old_db/td_ta_enable_stats.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_enable_stats.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_enable_stats.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_event_addr.c uClibc/libpthread/linuxthreads.old_db/td_ta_event_addr.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_event_addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_event_addr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c uClibc/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_nthreads.c uClibc/libpthread/linuxthreads.old_db/td_ta_get_nthreads.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_nthreads.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_get_nthreads.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_ph.c uClibc/libpthread/linuxthreads.old_db/td_ta_get_ph.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_ph.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_get_ph.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_stats.c uClibc/libpthread/linuxthreads.old_db/td_ta_get_stats.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_stats.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_get_stats.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c uClibc/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c uClibc/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_new.c uClibc/libpthread/linuxthreads.old_db/td_ta_new.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_new.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_new.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_reset_stats.c uClibc/libpthread/linuxthreads.old_db/td_ta_reset_stats.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_reset_stats.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_reset_stats.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_setconcurrency.c uClibc/libpthread/linuxthreads.old_db/td_ta_setconcurrency.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_setconcurrency.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_setconcurrency.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_set_event.c uClibc/libpthread/linuxthreads.old_db/td_ta_set_event.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_set_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_set_event.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,17 +14,14 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
-
- td_err_e
- -td_ta_set_event (ta, event)
- - const td_thragent_t *ta;
- - td_thr_events_t *event;
- +td_ta_set_event(const td_thragent_t *ta,td_thr_events_t *event)
- {
- td_thr_events_t old_event;
- int i;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_thr_iter.c uClibc/libpthread/linuxthreads.old_db/td_ta_thr_iter.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_thr_iter.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_thr_iter.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <alloca.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c uClibc/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <alloca.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_clear_event.c uClibc/libpthread/linuxthreads.old_db/td_thr_clear_event.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_clear_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_clear_event.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
-
- @@ -24,9 +23,7 @@
-
-
- td_err_e
- -td_thr_clear_event (th, event)
- - const td_thrhandle_t *th;
- - td_thr_events_t *event;
- +td_thr_clear_event(const td_thrhandle_t *th,td_thr_events_t *event)
- {
- td_thr_events_t old_event;
- int i;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_dbresume.c uClibc/libpthread/linuxthreads.old_db/td_thr_dbresume.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_dbresume.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_dbresume.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_dbsuspend.c uClibc/libpthread/linuxthreads.old_db/td_thr_dbsuspend.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_dbsuspend.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_dbsuspend.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_event_enable.c uClibc/libpthread/linuxthreads.old_db/td_thr_event_enable.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_event_enable.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_event_enable.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
-
- @@ -24,9 +23,7 @@
-
-
- td_err_e
- -td_thr_event_enable (th, onoff)
- - const td_thrhandle_t *th;
- - int onoff;
- +td_thr_event_enable(const td_thrhandle_t *th, int onoff)
- {
- LOG ("td_thr_event_enable");
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_event_getmsg.c uClibc/libpthread/linuxthreads.old_db/td_thr_event_getmsg.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_event_getmsg.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getfpregs.c uClibc/libpthread/linuxthreads.old_db/td_thr_getfpregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getfpregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_getfpregs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getgregs.c uClibc/libpthread/linuxthreads.old_db/td_thr_getgregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getgregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_getgregs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_get_info.c uClibc/libpthread/linuxthreads.old_db/td_thr_get_info.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_get_info.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_get_info.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getxregs.c uClibc/libpthread/linuxthreads.old_db/td_thr_getxregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getxregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_getxregs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getxregsize.c uClibc/libpthread/linuxthreads.old_db/td_thr_getxregsize.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getxregsize.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_getxregsize.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_set_event.c uClibc/libpthread/linuxthreads.old_db/td_thr_set_event.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_set_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_set_event.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
-
- @@ -24,9 +23,7 @@
-
-
- td_err_e
- -td_thr_set_event (th, event)
- - const td_thrhandle_t *th;
- - td_thr_events_t *event;
- +td_thr_set_event(const td_thrhandle_t *th, td_thr_events_t *event)
- {
- td_thr_events_t old_event;
- int i;
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setfpregs.c uClibc/libpthread/linuxthreads.old_db/td_thr_setfpregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setfpregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_setfpregs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setgregs.c uClibc/libpthread/linuxthreads.old_db/td_thr_setgregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setgregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_setgregs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setprio.c uClibc/libpthread/linuxthreads.old_db/td_thr_setprio.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setprio.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_setprio.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setsigpending.c uClibc/libpthread/linuxthreads.old_db/td_thr_setsigpending.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setsigpending.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_setsigpending.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setxregs.c uClibc/libpthread/linuxthreads.old_db/td_thr_setxregs.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setxregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_setxregs.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_sigsetmask.c uClibc/libpthread/linuxthreads.old_db/td_thr_sigsetmask.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_sigsetmask.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_sigsetmask.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c uClibc/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <link.h>
- #include "thread_dbP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_tsd.c uClibc/libpthread/linuxthreads.old_db/td_thr_tsd.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_tsd.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_tsd.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_validate.c uClibc/libpthread/linuxthreads.old_db/td_thr_validate.c
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_validate.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/td_thr_validate.c 2014-02-03 12:32:56.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/thread_db.h uClibc/libpthread/linuxthreads.old_db/thread_db.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/thread_db.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/thread_db.h 2014-02-03 12:32:56.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _THREAD_DB_H
- #define _THREAD_DB_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/thread_dbP.h uClibc/libpthread/linuxthreads.old_db/thread_dbP.h
- --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/thread_dbP.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/linuxthreads.old_db/thread_dbP.h 2014-02-03 12:32:56.000000000 +0100
- @@ -2,8 +2,6 @@
- #ifndef _THREAD_DBP_H
- #define _THREAD_DBP_H 1
-
- -#define __FORCE_GLIBC
- -#include <features.h>
- #include <string.h>
- #include <unistd.h>
- #include "proc_service.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/alloca_cutoff.c uClibc/libpthread/nptl/alloca_cutoff.c
- --- uClibc-0.9.33.2/libpthread/nptl/alloca_cutoff.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/alloca_cutoff.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <alloca.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/allocatestack.c uClibc/libpthread/nptl/allocatestack.c
- --- uClibc-0.9.33.2/libpthread/nptl/allocatestack.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/allocatestack.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- @@ -646,7 +645,7 @@
- prot) != 0)
- goto mprot_error;
- #elif defined _STACK_GROWS_UP
- - if (mprotect ((char *) pd - pd->guardsize,
- + if (mprotect ((char *) (((uintptr_t) pd - pd->guardsize) & ~pagesize_m1),
- pd->guardsize - guardsize, prot) != 0)
- goto mprot_error;
- #endif
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/cancellation.c uClibc/libpthread/nptl/cancellation.c
- --- uClibc-0.9.33.2/libpthread/nptl/cancellation.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/cancellation.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/cleanup.c uClibc/libpthread/nptl/cleanup.c
- --- uClibc-0.9.33.2/libpthread/nptl/cleanup.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/cleanup.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/cleanup_compat.c uClibc/libpthread/nptl/cleanup_compat.c
- --- uClibc-0.9.33.2/libpthread/nptl/cleanup_compat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/cleanup_compat.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/cleanup_defer.c uClibc/libpthread/nptl/cleanup_defer.c
- --- uClibc-0.9.33.2/libpthread/nptl/cleanup_defer.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/cleanup_defer.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/cleanup_defer_compat.c uClibc/libpthread/nptl/cleanup_defer_compat.c
- --- uClibc-0.9.33.2/libpthread/nptl/cleanup_defer_compat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/cleanup_defer_compat.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/cleanup_routine.c uClibc/libpthread/nptl/cleanup_routine.c
- --- uClibc-0.9.33.2/libpthread/nptl/cleanup_routine.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/cleanup_routine.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,13 +13,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
-
- -
- +void __pthread_cleanup_routine (struct __pthread_cleanup_frame *f);
- void
- __pthread_cleanup_routine (struct __pthread_cleanup_frame *f)
- {
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/descr.h uClibc/libpthread/nptl/descr.h
- --- uClibc-0.9.33.2/libpthread/nptl/descr.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/descr.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _DESCR_H
- #define _DESCR_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/events.c uClibc/libpthread/nptl/events.c
- --- uClibc-0.9.33.2/libpthread/nptl/events.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/events.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* The functions contained here do nothing, they just return. */
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/forward.c uClibc/libpthread/nptl/forward.c
- --- uClibc-0.9.33.2/libpthread/nptl/forward.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/forward.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <dlfcn.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/.gitignore uClibc/libpthread/nptl/.gitignore
- --- uClibc-0.9.33.2/libpthread/nptl/.gitignore 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/.gitignore 2014-02-03 12:32:57.000000000 +0100
- @@ -26,3 +26,5 @@
- #
- # symlinks
- #
- +sysdeps/pthread/pt-sigfillset.c
- +sysdeps/pthread/pt-sigprocmask.c
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/herrno.c uClibc/libpthread/nptl/herrno.c
- --- uClibc-0.9.33.2/libpthread/nptl/herrno.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/herrno.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <netdb.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/init.c uClibc/libpthread/nptl/init.c
- --- uClibc-0.9.33.2/libpthread/nptl/init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- @@ -35,7 +34,6 @@
- #include <lowlevellock.h>
- #include <bits/kernel-features.h>
- #include <stdio.h>
- -extern __typeof(sigaction) __libc_sigaction;
-
- /* Size and alignment of static TLS block. */
- size_t __static_tls_size;
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/libc-cancellation.c uClibc/libpthread/nptl/libc-cancellation.c
- --- uClibc-0.9.33.2/libpthread/nptl/libc-cancellation.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/libc-cancellation.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/linux_fsinfo.h uClibc/libpthread/nptl/linux_fsinfo.h
- --- uClibc-0.9.33.2/libpthread/nptl/linux_fsinfo.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/linux_fsinfo.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LINUX_FSINFO_H
- #define _LINUX_FSINFO_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/Makefile.in uClibc/libpthread/nptl/Makefile.in
- --- uClibc-0.9.33.2/libpthread/nptl/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -145,7 +145,7 @@
- endif
-
- LDFLAGS-libpthread.so += $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so $(top_builddir)lib/libdl-$(VERSION).so \
- - -Wl,-z,nodelete,-z,initfirst,-init=__pthread_initialize_minimal_internal
- + -Wl,-z,nodelete,-z,initfirst,-init=$(SYMBOL_PREFIX)__pthread_initialize_minimal_internal
-
- LIBS-libpthread.so := $(LIBS)
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pt-cleanup.c uClibc/libpthread/nptl/pt-cleanup.c
- --- uClibc-0.9.33.2/libpthread/nptl/pt-cleanup.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pt-cleanup.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdlib.h>
- @@ -23,7 +22,7 @@
- #include <jmpbuf-unwind.h>
-
- void
- -attribute_protected
- +/*does not apply due to hidden_proto(): attribute_protected*/
- __pthread_cleanup_upto (__jmp_buf target, char *targetframe)
- {
- struct pthread *self = THREAD_SELF;
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_atfork.c uClibc/libpthread/nptl/pthread_atfork.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_atfork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_atfork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -30,9 +30,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <fork.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_destroy.c uClibc/libpthread/nptl/pthread_attr_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getdetachstate.c uClibc/libpthread/nptl/pthread_attr_getdetachstate.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getdetachstate.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_getdetachstate.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getguardsize.c uClibc/libpthread/nptl/pthread_attr_getguardsize.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getguardsize.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_getguardsize.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getinheritsched.c uClibc/libpthread/nptl/pthread_attr_getinheritsched.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getinheritsched.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_getinheritsched.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getschedparam.c uClibc/libpthread/nptl/pthread_attr_getschedparam.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getschedparam.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_getschedparam.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getschedpolicy.c uClibc/libpthread/nptl/pthread_attr_getschedpolicy.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getschedpolicy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_getschedpolicy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getscope.c uClibc/libpthread/nptl/pthread_attr_getscope.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getscope.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_getscope.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstackaddr.c uClibc/libpthread/nptl/pthread_attr_getstackaddr.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstackaddr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_getstackaddr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstack.c uClibc/libpthread/nptl/pthread_attr_getstack.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstack.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_getstack.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstacksize.c uClibc/libpthread/nptl/pthread_attr_getstacksize.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstacksize.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_getstacksize.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_init.c uClibc/libpthread/nptl/pthread_attr_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setdetachstate.c uClibc/libpthread/nptl/pthread_attr_setdetachstate.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setdetachstate.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_setdetachstate.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setguardsize.c uClibc/libpthread/nptl/pthread_attr_setguardsize.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setguardsize.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_setguardsize.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setinheritsched.c uClibc/libpthread/nptl/pthread_attr_setinheritsched.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setinheritsched.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_setinheritsched.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setschedparam.c uClibc/libpthread/nptl/pthread_attr_setschedparam.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setschedparam.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_setschedparam.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setschedpolicy.c uClibc/libpthread/nptl/pthread_attr_setschedpolicy.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setschedpolicy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_setschedpolicy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setscope.c uClibc/libpthread/nptl/pthread_attr_setscope.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setscope.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_setscope.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstackaddr.c uClibc/libpthread/nptl/pthread_attr_setstackaddr.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstackaddr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_setstackaddr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstack.c uClibc/libpthread/nptl/pthread_attr_setstack.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstack.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_setstack.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstacksize.c uClibc/libpthread/nptl/pthread_attr_setstacksize.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstacksize.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_attr_setstacksize.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_destroy.c uClibc/libpthread/nptl/pthread_barrierattr_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_barrierattr_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_getpshared.c uClibc/libpthread/nptl/pthread_barrierattr_getpshared.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_getpshared.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_barrierattr_getpshared.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_init.c uClibc/libpthread/nptl/pthread_barrierattr_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_barrierattr_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_setpshared.c uClibc/libpthread/nptl/pthread_barrierattr_setpshared.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_setpshared.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_barrierattr_setpshared.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_cancel.c uClibc/libpthread/nptl/pthread_cancel.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_cancel.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_cancel.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_clock_gettime.c uClibc/libpthread/nptl/pthread_clock_gettime.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_clock_gettime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_clock_gettime.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,14 +12,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- #include <time.h>
- -#include <libc-internal.h>
- #include "pthreadP.h"
-
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_clock_settime.c uClibc/libpthread/nptl/pthread_clock_settime.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_clock_settime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_clock_settime.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,14 +12,12 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- #include <time.h>
- -#include <libc-internal.h>
- #include "pthreadP.h"
-
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_destroy.c uClibc/libpthread/nptl/pthread_condattr_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_condattr_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_getclock.c uClibc/libpthread/nptl/pthread_condattr_getclock.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_getclock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_condattr_getclock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_getpshared.c uClibc/libpthread/nptl/pthread_condattr_getpshared.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_getpshared.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_condattr_getpshared.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_init.c uClibc/libpthread/nptl/pthread_condattr_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_condattr_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_setclock.c uClibc/libpthread/nptl/pthread_condattr_setclock.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_setclock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_condattr_setclock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_setpshared.c uClibc/libpthread/nptl/pthread_condattr_setpshared.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_setpshared.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_condattr_setpshared.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_cond_destroy.c uClibc/libpthread/nptl/pthread_cond_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_cond_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_cond_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_cond_init.c uClibc/libpthread/nptl/pthread_cond_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_cond_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_cond_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_create.c uClibc/libpthread/nptl/pthread_create.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_create.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_create.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdbool.h>
- @@ -25,7 +24,6 @@
- #include <hp-timing.h>
- #include <ldsodefs.h>
- #include <atomic.h>
- -#include <libc-internal.h>
- #include <resolv.h>
- #include <bits/kernel-features.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_detach.c uClibc/libpthread/nptl/pthread_detach.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_detach.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_detach.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_equal.c uClibc/libpthread/nptl/pthread_equal.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_equal.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_equal.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_exit.c uClibc/libpthread/nptl/pthread_exit.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_exit.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_exit.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,16 +13,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include "pthreadP.h"
-
-
- void
- -attribute_protected
- +attribute_protected attribute_noreturn
- __pthread_exit (void* value)
- {
- THREAD_SETMEM (THREAD_SELF, result, value);
- @@ -30,3 +29,9 @@
- __do_cancel ();
- }
- strong_alias (__pthread_exit, pthread_exit)
- +
- +/*
- + * After a thread terminates, __uClibc_main decrements __nptl_nthreads
- + * defined in pthread_create.c.
- + */
- +PTHREAD_STATIC_FN_REQUIRE (pthread_create)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_getattr_np.c uClibc/libpthread/nptl/pthread_getattr_np.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_getattr_np.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_getattr_np.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_getconcurrency.c uClibc/libpthread/nptl/pthread_getconcurrency.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_getconcurrency.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_getconcurrency.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_getschedparam.c uClibc/libpthread/nptl/pthread_getschedparam.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_getschedparam.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_getschedparam.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_getspecific.c uClibc/libpthread/nptl/pthread_getspecific.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_getspecific.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_getspecific.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,16 +13,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include "pthreadP.h"
-
-
- -void *
- attribute_protected
- +void *
- __pthread_getspecific (pthread_key_t key)
- {
- struct pthread_key_data *data;
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_join.c uClibc/libpthread/nptl/pthread_join.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_join.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_join.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_key_create.c uClibc/libpthread/nptl/pthread_key_create.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_key_create.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_key_create.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_key_delete.c uClibc/libpthread/nptl/pthread_key_delete.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_key_delete.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_key_delete.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_kill_other_threads.c uClibc/libpthread/nptl/pthread_kill_other_threads.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_kill_other_threads.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_kill_other_threads.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,11 +13,10 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- -#ifdef SHARED
- +#if 0 /*def SHARED*/
- /* This function does not serve a useful purpose in the thread library
- implementation anymore. It used to be necessary when then kernel
- could not shut down "processes" but this is not the case anymore.
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_destroy.c uClibc/libpthread/nptl/pthread_mutexattr_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getprioceiling.c uClibc/libpthread/nptl/pthread_mutexattr_getprioceiling.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getprioceiling.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_getprioceiling.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getprotocol.c uClibc/libpthread/nptl/pthread_mutexattr_getprotocol.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getprotocol.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_getprotocol.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getpshared.c uClibc/libpthread/nptl/pthread_mutexattr_getpshared.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getpshared.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_getpshared.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getrobust.c uClibc/libpthread/nptl/pthread_mutexattr_getrobust.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getrobust.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_getrobust.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_gettype.c uClibc/libpthread/nptl/pthread_mutexattr_gettype.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_gettype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_gettype.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_init.c uClibc/libpthread/nptl/pthread_mutexattr_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <string.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setprioceiling.c uClibc/libpthread/nptl/pthread_mutexattr_setprioceiling.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setprioceiling.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_setprioceiling.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setprotocol.c uClibc/libpthread/nptl/pthread_mutexattr_setprotocol.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setprotocol.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_setprotocol.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setpshared.c uClibc/libpthread/nptl/pthread_mutexattr_setpshared.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setpshared.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_setpshared.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setrobust.c uClibc/libpthread/nptl/pthread_mutexattr_setrobust.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setrobust.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_setrobust.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_settype.c uClibc/libpthread/nptl/pthread_mutexattr_settype.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_settype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutexattr_settype.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_consistent.c uClibc/libpthread/nptl/pthread_mutex_consistent.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_consistent.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutex_consistent.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_destroy.c uClibc/libpthread/nptl/pthread_mutex_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutex_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_getprioceiling.c uClibc/libpthread/nptl/pthread_mutex_getprioceiling.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_getprioceiling.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutex_getprioceiling.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_init.c uClibc/libpthread/nptl/pthread_mutex_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutex_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_lock.c uClibc/libpthread/nptl/pthread_mutex_lock.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_lock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutex_lock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_setprioceiling.c uClibc/libpthread/nptl/pthread_mutex_setprioceiling.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_setprioceiling.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutex_setprioceiling.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdbool.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_timedlock.c uClibc/libpthread/nptl/pthread_mutex_timedlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_timedlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutex_timedlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_trylock.c uClibc/libpthread/nptl/pthread_mutex_trylock.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_trylock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutex_trylock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_unlock.c uClibc/libpthread/nptl/pthread_mutex_unlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_unlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_mutex_unlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthreadP.h uClibc/libpthread/nptl/pthreadP.h
- --- uClibc-0.9.33.2/libpthread/nptl/pthreadP.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthreadP.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _PTHREADP_H
- #define _PTHREADP_H 1
- @@ -221,7 +220,7 @@
- /* Cancellation test. */
- #define CANCELLATION_P(self) \
- do { \
- - int cancelhandling = THREAD_GETMEM (self, cancelhandling); \
- + cancelhandling = THREAD_GETMEM (self, cancelhandling); \
- if (CANCEL_ENABLED_AND_CANCELED (cancelhandling)) \
- { \
- THREAD_SETMEM (self, result, PTHREAD_CANCELED); \
- @@ -411,9 +410,9 @@
- const struct sched_param *param);
- extern int __pthread_setcancelstate (int state, int *oldstate);
- extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
- - __const pthread_mutexattr_t *__mutexattr);
- + const pthread_mutexattr_t *__mutexattr);
- extern int __pthread_mutex_init_internal (pthread_mutex_t *__mutex,
- - __const pthread_mutexattr_t *__mutexattr)
- + const pthread_mutexattr_t *__mutexattr)
- attribute_hidden;
- extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
- extern int __pthread_mutex_destroy_internal (pthread_mutex_t *__mutex)
- @@ -452,22 +451,22 @@
- extern int __pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy);
- extern int __pthread_attr_getscope (const pthread_attr_t *attr, int *scope);
- extern int __pthread_attr_setscope (pthread_attr_t *attr, int scope);
- -extern int __pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
- +extern int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict
- __attr, void **__restrict __stackaddr);
- extern int __pthread_attr_setstackaddr (pthread_attr_t *__attr,
- void *__stackaddr);
- -extern int __pthread_attr_getstacksize (__const pthread_attr_t *__restrict
- +extern int __pthread_attr_getstacksize (const pthread_attr_t *__restrict
- __attr,
- size_t *__restrict __stacksize);
- extern int __pthread_attr_setstacksize (pthread_attr_t *__attr,
- size_t __stacksize);
- -extern int __pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
- +extern int __pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
- void **__restrict __stackaddr,
- size_t *__restrict __stacksize);
- extern int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
- size_t __stacksize);
- extern int __pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
- - __const pthread_rwlockattr_t *__restrict
- + const pthread_rwlockattr_t *__restrict
- __attr);
- extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
- extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_destroy.c uClibc/libpthread/nptl/pthread_rwlockattr_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_rwlockattr_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_getkind_np.c uClibc/libpthread/nptl/pthread_rwlockattr_getkind_np.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_getkind_np.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_rwlockattr_getkind_np.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_getpshared.c uClibc/libpthread/nptl/pthread_rwlockattr_getpshared.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_getpshared.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_rwlockattr_getpshared.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_init.c uClibc/libpthread/nptl/pthread_rwlockattr_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_rwlockattr_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_setkind_np.c uClibc/libpthread/nptl/pthread_rwlockattr_setkind_np.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_setkind_np.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_rwlockattr_setkind_np.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_setpshared.c uClibc/libpthread/nptl/pthread_rwlockattr_setpshared.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_setpshared.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_rwlockattr_setpshared.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_destroy.c uClibc/libpthread/nptl/pthread_rwlock_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_rwlock_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_init.c uClibc/libpthread/nptl/pthread_rwlock_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_rwlock_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <bits/kernel-features.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_tryrdlock.c uClibc/libpthread/nptl/pthread_rwlock_tryrdlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_tryrdlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_rwlock_tryrdlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_trywrlock.c uClibc/libpthread/nptl/pthread_rwlock_trywrlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_trywrlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_rwlock_trywrlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_self.c uClibc/libpthread/nptl/pthread_self.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_self.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_self.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setcancelstate.c uClibc/libpthread/nptl/pthread_setcancelstate.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_setcancelstate.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_setcancelstate.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setcanceltype.c uClibc/libpthread/nptl/pthread_setcanceltype.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_setcanceltype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_setcanceltype.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setconcurrency.c uClibc/libpthread/nptl/pthread_setconcurrency.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_setconcurrency.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_setconcurrency.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setschedparam.c uClibc/libpthread/nptl/pthread_setschedparam.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_setschedparam.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_setschedparam.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sched.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setschedprio.c uClibc/libpthread/nptl/pthread_setschedprio.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_setschedprio.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_setschedprio.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sched.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setspecific.c uClibc/libpthread/nptl/pthread_setspecific.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_setspecific.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_setspecific.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_testcancel.c uClibc/libpthread/nptl/pthread_testcancel.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_testcancel.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_testcancel.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include "pthreadP.h"
- @@ -24,5 +23,6 @@
- void
- pthread_testcancel (void)
- {
- + int cancelhandling;
- CANCELLATION_P (THREAD_SELF);
- }
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_timedjoin.c uClibc/libpthread/nptl/pthread_timedjoin.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_timedjoin.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_timedjoin.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_tryjoin.c uClibc/libpthread/nptl/pthread_tryjoin.c
- --- uClibc-0.9.33.2/libpthread/nptl/pthread_tryjoin.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pthread_tryjoin.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/pt-system.c uClibc/libpthread/nptl/pt-system.c
- --- uClibc-0.9.33.2/libpthread/nptl/pt-system.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/pt-system.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/res.c uClibc/libpthread/nptl/res.c
- --- uClibc-0.9.33.2/libpthread/nptl/res.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/res.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/semaphore.h uClibc/libpthread/nptl/semaphore.h
- --- uClibc-0.9.33.2/libpthread/nptl/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SEMAPHORE_H
- #define _SEMAPHORE_H 1
- @@ -40,13 +39,13 @@
- extern int sem_destroy (sem_t *__sem) __THROW;
-
- /* Open a named semaphore NAME with open flags OFLAG. */
- -extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
- +extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW;
-
- /* Close descriptor for named semaphore SEM. */
- extern int sem_close (sem_t *__sem) __THROW;
-
- /* Remove named semaphore NAME. */
- -extern int sem_unlink (__const char *__name) __THROW;
- +extern int sem_unlink (const char *__name) __THROW;
-
- /* Wait for SEM being posted.
-
- @@ -60,7 +59,7 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- extern int sem_timedwait (sem_t *__restrict __sem,
- - __const struct timespec *__restrict __abstime);
- + const struct timespec *__restrict __abstime);
- #endif
-
- /* Test whether SEM is posted. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/semaphoreP.h uClibc/libpthread/nptl/semaphoreP.h
- --- uClibc-0.9.33.2/libpthread/nptl/semaphoreP.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/semaphoreP.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <semaphore.h>
- #include "pthreadP.h"
- @@ -56,14 +55,3 @@
-
- /* Comparison function for search in tree with existing mappings. */
- extern int __sem_search (const void *a, const void *b) attribute_hidden;
- -
- -
- -/* Prototypes of functions with multiple interfaces. */
- -extern int __new_sem_init (sem_t *sem, int pshared, unsigned int value);
- -extern int __old_sem_init (sem_t *sem, int pshared, unsigned int value);
- -extern int __new_sem_destroy (sem_t *sem);
- -extern int __new_sem_post (sem_t *sem);
- -extern int __new_sem_wait (sem_t *sem);
- -extern int __old_sem_wait (sem_t *sem);
- -extern int __new_sem_trywait (sem_t *sem);
- -extern int __new_sem_getvalue (sem_t *sem, int *sval);
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_close.c uClibc/libpthread/nptl/sem_close.c
- --- uClibc-0.9.33.2/libpthread/nptl/sem_close.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sem_close.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <search.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_destroy.c uClibc/libpthread/nptl/sem_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/sem_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sem_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,16 +13,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <semaphore.h>
- #include "semaphoreP.h"
-
-
- int
- -__new_sem_destroy (
- +sem_destroy (
- sem_t *sem)
- {
- /* XXX Check for valid parameter. */
- @@ -30,4 +29,3 @@
- /* Nothing to do. */
- return 0;
- }
- -weak_alias(__new_sem_destroy, sem_destroy)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_getvalue.c uClibc/libpthread/nptl/sem_getvalue.c
- --- uClibc-0.9.33.2/libpthread/nptl/sem_getvalue.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sem_getvalue.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,16 +13,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <semaphore.h>
- #include "semaphoreP.h"
-
-
- int
- -__new_sem_getvalue (
- +sem_getvalue (
- sem_t *sem,
- int *sval)
- {
- @@ -34,4 +33,3 @@
-
- return 0;
- }
- -weak_alias(__new_sem_getvalue, sem_getvalue)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_init.c uClibc/libpthread/nptl/sem_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/sem_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sem_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <semaphore.h>
- @@ -25,7 +24,7 @@
-
-
- int
- -__new_sem_init (
- +sem_init (
- sem_t *sem,
- int pshared,
- unsigned int value)
- @@ -53,4 +52,3 @@
-
- return 0;
- }
- -weak_alias(__new_sem_init, sem_init)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_open.c uClibc/libpthread/nptl/sem_open.c
- --- uClibc-0.9.33.2/libpthread/nptl/sem_open.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sem_open.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_unlink.c uClibc/libpthread/nptl/sem_unlink.c
- --- uClibc-0.9.33.2/libpthread/nptl/sem_unlink.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sem_unlink.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <semaphore.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/dl-tls.h uClibc/libpthread/nptl/sysdeps/alpha/dl-tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/alpha/dl-tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- /* Type used for the representation of TLS information in the GOT. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/elf/pt-initfini.c uClibc/libpthread/nptl/sysdeps/alpha/elf/pt-initfini.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/elf/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/alpha/elf/pt-initfini.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/jmpbuf-unwind.h uClibc/libpthread/nptl/sysdeps/alpha/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/alpha/jmpbuf-unwind.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdint.h>
- @@ -26,6 +25,3 @@
-
- #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
- -
- -/* We use the normal lobngjmp for unwinding. */
- -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/libc-tls.c uClibc/libpthread/nptl/sysdeps/alpha/libc-tls.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/libc-tls.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/alpha/libc-tls.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdeps/generic/libc-tls.c>
- #include <dl-tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/Makefile uClibc/libpthread/nptl/sysdeps/alpha/Makefile
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/alpha/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- # Lesser General Public License for more details.
- #
- # You should have received a copy of the GNU Lesser General Public
- -# License along with the GNU C Library; if not, write to the Free
- -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- -# 02111-1307 USA.
- +# License along with the GNU C Library; see the file COPYING.LIB. If
- +# not, see <http://www.gnu.org/licenses/>.
-
- ifeq ($(subdir),csu)
- gen-as-const-headers += tcb-offsets.sym
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthreaddef.h uClibc/libpthread/nptl/sysdeps/alpha/pthreaddef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/alpha/pthreaddef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Default stack size. */
- #define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthread_spin_lock.S uClibc/libpthread/nptl/sysdeps/alpha/pthread_spin_lock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthread_spin_lock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/alpha/pthread_spin_lock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- .text
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthread_spin_trylock.S uClibc/libpthread/nptl/sysdeps/alpha/pthread_spin_trylock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/alpha/pthread_spin_trylock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- #define _ERRNO_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/tls.h uClibc/libpthread/nptl/sysdeps/alpha/tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/alpha/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/dl-tls.h uClibc/libpthread/nptl/sysdeps/arm/dl-tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/arm/dl-tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- /* Type used for the representation of TLS information in the GOT. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/jmpbuf-unwind.h uClibc/libpthread/nptl/sysdeps/arm/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/arm/jmpbuf-unwind.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdint.h>
- @@ -31,6 +30,3 @@
-
- #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj))
- -
- -/* We use the normal longjmp for unwinding. */
- -#define __libc_unwind_longjmp(buf, val) longjmp (buf, val)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/libc-tls.c uClibc/libpthread/nptl/sysdeps/arm/libc-tls.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/libc-tls.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/arm/libc-tls.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdeps/generic/libc-tls.c>
- #include <dl-tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthreaddef.h uClibc/libpthread/nptl/sysdeps/arm/pthreaddef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/arm/pthreaddef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Default stack size. */
- #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthread_spin_lock.S uClibc/libpthread/nptl/sysdeps/arm/pthread_spin_lock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthread_spin_lock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/arm/pthread_spin_lock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthread_spin_trylock.S uClibc/libpthread/nptl/sysdeps/arm/pthread_spin_trylock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/arm/pthread_spin_trylock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define _ERRNO_H 1
- #include <bits/errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/tls.h uClibc/libpthread/nptl/sysdeps/arm/tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/arm/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/dl-tls.c uClibc/libpthread/nptl/sysdeps/generic/dl-tls.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/dl-tls.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/generic/dl-tls.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #if defined SHARED || defined NOT_IN_libc
- # error in buildsystem: This file is for libc.a
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/libc-tls.c uClibc/libpthread/nptl/sysdeps/generic/libc-tls.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/libc-tls.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/generic/libc-tls.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <ldsodefs.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/lowlevellock.h uClibc/libpthread/nptl/sysdeps/generic/lowlevellock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/generic/lowlevellock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <atomic.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/dl-tls.h uClibc/libpthread/nptl/sysdeps/i386/dl-tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/dl-tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- /* Type used for the representation of TLS information in the GOT. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i486/pthread_spin_trylock.S uClibc/libpthread/nptl/sysdeps/i386/i486/pthread_spin_trylock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i486/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/i486/pthread_spin_trylock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread-errnos.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i586/pthread_spin_trylock.S uClibc/libpthread/nptl/sysdeps/i386/i586/pthread_spin_trylock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i586/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/i586/pthread_spin_trylock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_spin_trylock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/Makefile uClibc/libpthread/nptl/sysdeps/i386/i686/Makefile
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/i686/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- # Lesser General Public License for more details.
-
- # You should have received a copy of the GNU Lesser General Public
- -# License along with the GNU C Library; if not, write to the Free
- -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- -# 02111-1307 USA.
- +# License along with the GNU C Library; see the file COPYING.LIB. If
- +# not, see <http://www.gnu.org/licenses/>.
-
- ifeq ($(subdir),nptl)
- # It turns out that stack coloring is in general not good on P4s. Some
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/pthread_spin_trylock.S uClibc/libpthread/nptl/sysdeps/i386/i686/pthread_spin_trylock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/i686/pthread_spin_trylock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define HAVE_CMOV 1
- #include "../i486/pthread_spin_trylock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/tls.h uClibc/libpthread/nptl/sysdeps/i386/i686/tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/i686/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/jmpbuf-unwind.h uClibc/libpthread/nptl/sysdeps/i386/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/jmpbuf-unwind.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdint.h>
- @@ -26,7 +25,3 @@
-
- #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
- -
- -/* We use the normal lobngjmp for unwinding. */
- -extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
- -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/Makefile uClibc/libpthread/nptl/sysdeps/i386/Makefile
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- # Lesser General Public License for more details.
-
- # You should have received a copy of the GNU Lesser General Public
- -# License along with the GNU C Library; if not, write to the Free
- -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- -# 02111-1307 USA.
- +# License along with the GNU C Library; see the file COPYING.LIB. If
- +# not, see <http://www.gnu.org/licenses/>.
-
- ifeq ($(subdir),csu)
- gen-as-const-headers += tcb-offsets.sym
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthreaddef.h uClibc/libpthread/nptl/sysdeps/i386/pthreaddef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/pthreaddef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Default stack size. */
- #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_init.c uClibc/libpthread/nptl/sysdeps/i386/pthread_spin_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/pthread_spin_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Not needed. pthread_spin_init is an alias for pthread_spin_unlock. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_lock.c uClibc/libpthread/nptl/sysdeps/i386/pthread_spin_lock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/pthread_spin_lock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_unlock.S uClibc/libpthread/nptl/sysdeps/i386/pthread_spin_unlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_unlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/pthread_spin_unlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- .globl pthread_spin_unlock
- .type pthread_spin_unlock,@function
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/tls.h uClibc/libpthread/nptl/sysdeps/i386/tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/i386/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/Makefile.commonarch uClibc/libpthread/nptl/sysdeps/Makefile.commonarch
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/Makefile.commonarch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/Makefile.commonarch 2014-02-03 12:32:57.000000000 +0100
- @@ -47,9 +47,8 @@
- $(libpthread_arch_OUT)/gen_tcb-offsets.s: $(libpthread_arch_OUT)/gen_tcb-offsets.c | headers
- $(compile.c)
- libpthread-generated-y += $(libpthread_arch_OUT)/gen_tcb-offsets.s
- -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"
- $(libpthread_arch_OUT)/tcb-offsets.h: $(libpthread_arch_OUT)/gen_tcb-offsets.s
- - $(do_sed) $(PTHREAD_TCB_OFFSET_MANGLE) $< > $@
- + $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@
- @if test ! -s $@ ; then rm -f $@ ; false ; fi
-
- pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(libpthread_arch_OUT)/tcb-offsets.h
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/dl-tls.h uClibc/libpthread/nptl/sysdeps/metag/dl-tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/dl-tls.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/dl-tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,29 @@
- +/* Thread-local storage handling in the ELF dynamic linker. Meta version.
- + Copyright (C) 2002 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +
- +/* Type used for the representation of TLS information in the GOT. */
- +typedef struct
- +{
- + unsigned long int ti_module;
- + unsigned long int ti_offset;
- +} tls_index;
- +
- +
- +extern void *__tls_get_addr (tls_index *ti);
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/jmpbuf-unwind.h uClibc/libpthread/nptl/sysdeps/metag/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/jmpbuf-unwind.h 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,36 @@
- +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <setjmp.h>
- +#include <stdint.h>
- +#include <unwind.h>
- +
- +/* Test if longjmp to JMPBUF would unwind the frame
- + containing a local variable at ADDRESS. */
- +#undef _JMPBUF_UNWINDS
- +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- + ((void *) (address) > (void *) demangle (jmpbuf[JB_SP]))
- +
- +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
- +
- +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- + ((uintptr_t) (_address) - (_adj) > (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
- +
- +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/libc-tls.c uClibc/libpthread/nptl/sysdeps/metag/libc-tls.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/libc-tls.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/libc-tls.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,33 @@
- +/*
- + * Thread-local storage handling in statically linked binaries. Meta version.
- + * Copyright (C) 2009 Free Software Foundation, Inc.
- + *
- + * Based on GNU C Library (file: libc/sysdeps/sh/libc-tls.c)
- + *
- + * Copyright (C) 2010 STMicroelectronics Ltd.
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Author: Filippo Arcidiacono <filippo.arcidiacono@st.com>
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + *
- + */
- +
- +#include <sysdeps/generic/libc-tls.c>
- +#include <dl-tls.h>
- +
- +#if defined (USE_TLS) && (USE_TLS)
- +
- +/* On Meta, linker optimizations are not required, so __tls_get_addr
- + can be called even in statically linked binaries. In this case module
- + must be always 1 and PT_TLS segment exist in the binary, otherwise it
- + would not link. */
- +
- +void *
- +__tls_get_addr (tls_index *ti)
- +{
- + dtv_t *dtv = THREAD_DTV ();
- + return (char *) dtv[1].pointer.val + ti->ti_offset;
- +}
- +
- +#endif
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/Makefile.arch uClibc/libpthread/nptl/sysdeps/metag/Makefile.arch
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/Makefile.arch 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/Makefile.arch 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,17 @@
- +# Makefile for uClibc NPTL
- +#
- +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org>
- +#
- +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +CFLAGS-pthread_spin_init.c = -DNOT_IN_libc -DIS_IN_libpthread
- +ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread
- +ASFLAGS-pthread_spin_unlock.S = -DNOT_IN_libc -DIS_IN_libpthread
- +ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread
- +
- +ASFLAGS-pthread_spin_lock.c += -D_GNU_SOURCE
- +
- +CFLAGS-metag = $(SSP_ALL_CFLAGS)
- +
- +libc_arch_a_CSRC := libc-tls.c
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/metag_load_tp.S uClibc/libpthread/nptl/sysdeps/metag/metag_load_tp.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/metag_load_tp.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/metag_load_tp.S 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,7 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <../../../../ldso/ldso/metag/metag_load_tp.S>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthreaddef.h uClibc/libpthread/nptl/sysdeps/metag/pthreaddef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthreaddef.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/pthreaddef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,40 @@
- +/* Copyright (C) 2003 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <sysdep.h>
- +
- +/* Default stack size. */
- +#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
- +
- +/* Required stack pointer alignment at beginning. */
- +#define STACK_ALIGN 8
- +
- +/* Minimal stack size after allocating thread descriptor and guard size. */
- +#define MINIMAL_REST_STACK 2048
- +
- +/* Alignment requirement for TCB. */
- +#define TCB_ALIGNMENT 8
- +
- +
- +/* Location of current stack frame. */
- +#define CURRENT_STACK_FRAME __builtin_frame_address (0)
- +
- +
- +/* XXX Until we have a better place keep the definitions here. */
- +#define __exit_thread_inline(val) \
- + INLINE_SYSCALL (exit, 1, (val))
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_init.c uClibc/libpthread/nptl/sysdeps/metag/pthread_spin_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_init.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/pthread_spin_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,20 @@
- +/* Copyright (C) 2002 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +/* Not needed. pthread_spin_init is an alias for pthread_spin_unlock. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_lock.S uClibc/libpthread/nptl/sysdeps/metag/pthread_spin_lock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_lock.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/pthread_spin_lock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,20 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- + .text
- + .global _pthread_spin_lock
- + .type _pthread_spin_lock,function
- +_pthread_spin_lock:
- +1: LNKGETD D0Ar2, [D1Ar1]
- + CMP D0Ar2, #0
- + ADD D0Ar2, D0Ar2, #1
- + LNKSETDEQ [D1Ar1], D0Ar2
- + BNE 1b
- + DEFR D0Ar2, TXSTAT
- + ANDT D0Ar2, D0Ar2, #HI(0x3f000000)
- + CMPT D0Ar2, #HI(0x02000000)
- + BNZ 1b
- + MOV D0Re0, #0
- + MOV PC, D1RtP
- + .size _pthread_spin_lock,.-_pthread_spin_lock
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_trylock.S uClibc/libpthread/nptl/sysdeps/metag/pthread_spin_trylock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_trylock.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/pthread_spin_trylock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,24 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- +#include <pthread-errnos.h>
- +
- + .text
- + .global _pthread_spin_trylock
- + .type _pthread_spin_trylock,function
- +_pthread_spin_trylock:
- +1: MOVT D0Re0, #HI(#EBUSY)
- + ADD D0Re0, D0Re0, #LO(#EBUSY)
- + LNKGETD D0Ar2, [D1Ar1]
- + CMP D0Ar2, #0
- + ADD D0Ar2, D0Ar2, #1
- + LNKSETDEQ [D1Ar1], D0Ar2
- + BNE 2f
- + DEFR D0Ar2, TXSTAT
- + ANDT D0Ar2, D0Ar2, #HI(0x3f000000)
- + CMPT D0Ar2, #HI(0x02000000)
- + BNZ 1b
- + MOV D0Re0, #0
- +2: MOV PC, D1RtP
- + .size _pthread_spin_trylock,.-_pthread_spin_trylock
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_unlock.S uClibc/libpthread/nptl/sysdeps/metag/pthread_spin_unlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_unlock.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/pthread_spin_unlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,16 @@
- +! Copyright (C) 2013 Imagination Technologies Ltd.
- +
- +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +
- + .text
- + .global _pthread_spin_unlock
- + .type _pthread_spin_unlock,function
- +_pthread_spin_unlock:
- + MOV D0Re0, #0
- + SETD [D1Ar1], D0Re0
- + MOV PC, D1RtP
- + .size _pthread_spin_unlock,.-_pthread_spin_unlock
- +
- + /* The implementation of pthread_spin_init is identical. */
- + .global _pthread_spin_init
- +_pthread_spin_init = _pthread_spin_unlock
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/tcb-offsets.sym uClibc/libpthread/nptl/sysdeps/metag/tcb-offsets.sym
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/tcb-offsets.sym 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/tcb-offsets.sym 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,15 @@
- +#include <sysdep.h>
- +#include <tls.h>
- +
- +RESULT offsetof (struct pthread, result)
- +TID offsetof (struct pthread, tid)
- +PID offsetof (struct pthread, pid)
- +CANCELHANDLING offsetof (struct pthread, cancelhandling)
- +CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf)
- +MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads)
- +TLS_PRE_TCB_SIZE sizeof (struct pthread)
- +MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock)
- +POINTER_GUARD offsetof (tcbhead_t, pointer_guard)
- +#ifndef __ASSUME_PRIVATE_FUTEX
- +PRIVATE_FUTEX offsetof (struct pthread, header.private_futex)
- +#endif
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/tls.h uClibc/libpthread/nptl/sysdeps/metag/tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/tls.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/metag/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,163 @@
- +/* Definition for thread-local data handling. NPTL/Meta version.
- + Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#ifndef _TLS_H
- +#define _TLS_H
- +
- +#ifndef __ASSEMBLER__
- +# include <stdbool.h>
- +# include <stddef.h>
- +# include <stdint.h>
- +# include <stdlib.h>
- +# include <list.h>
- +# include <sysdep.h>
- +# include <bits/kernel-features.h>
- +
- +/* Type for the dtv. */
- +typedef union dtv
- +{
- + size_t counter;
- + struct
- + {
- + void *val;
- + bool is_static;
- + } pointer;
- +} dtv_t;
- +
- +typedef struct
- +{
- + dtv_t *dtv;
- + uintptr_t pointer_guard;
- +} tcbhead_t;
- +
- +# define TLS_MULTIPLE_THREADS_IN_TCB 1
- +
- +#else /* __ASSEMBLER__ */
- +# include <tcb-offsets.h>
- +#endif /* __ASSEMBLER__ */
- +
- +
- +/* We require TLS support in the tools. */
- +#define HAVE_TLS_SUPPORT
- +#define HAVE___THREAD 1
- +#define HAVE_TLS_MODEL_ATTRIBUTE 1
- +/* Signal that TLS support is available. */
- +# define USE_TLS 1
- +
- +#ifndef __ASSEMBLER__
- +
- +/* Get system call information. */
- +# include <sysdep.h>
- +
- +/* This is the size of the initial TCB. */
- +# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
- +
- +/* Alignment requirements for the initial TCB. */
- +# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
- +
- +/* This is the size of the TCB. */
- +# define TLS_TCB_SIZE sizeof (tcbhead_t)
- +
- +/* This is the size we need before TCB. */
- +# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
- +
- +/* Alignment requirements for the TCB. */
- +# define TLS_TCB_ALIGN __alignof__ (struct pthread)
- +
- +/* The TLS blocks start right after the TCB. */
- +# define TLS_DTV_AT_TP 1
- +
- +/* Get the thread descriptor definition. */
- +# include <descr.h>
- +
- +/* Install the dtv pointer. The pointer passed is to the element with
- + index -1 which contain the length. */
- +# define INSTALL_DTV(tcbp, dtvp) \
- + ((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1
- +
- +/* Install new dtv for current thread. */
- +# define INSTALL_NEW_DTV(dtv) \
- + (((tcbhead_t *)__builtin_thread_pointer ())->dtv = (dtv))
- +
- +/* Return dtv of given thread descriptor. */
- +# define GET_DTV(tcbp) \
- + (((tcbhead_t *) (tcbp))->dtv)
- +
- +/* Code to initially initialize the thread pointer. This might need
- + special attention since 'errno' is not yet available and if the
- + operation can cause a failure 'errno' must not be touched. */
- +# define TLS_INIT_TP(tcbp, secondcall) \
- + ({ INTERNAL_SYSCALL_DECL (err); \
- + long result_var; \
- + result_var = INTERNAL_SYSCALL (metag_set_tls, err, 1, (tcbp)); \
- + INTERNAL_SYSCALL_ERROR_P (result_var, err) \
- + ? "unknown error" : NULL; })
- +
- +/* Return the address of the dtv for the current thread. */
- +# define THREAD_DTV() \
- + (((tcbhead_t *)__builtin_thread_pointer ())->dtv)
- +
- +/* Return the thread descriptor for the current thread.
- + The contained asm must *not* be marked volatile since otherwise
- + assignments like
- + struct pthread *self = thread_self();
- + do not get optimized away. */
- +# define THREAD_SELF \
- + ((struct pthread *)__builtin_thread_pointer () - 1)
- +
- +/* Magic for libthread_db to know how to do THREAD_SELF. */
- +# define DB_THREAD_SELF \
- + CONST_THREAD_AREA (32, sizeof (struct pthread))
- +
- +/* Access to data in the thread descriptor is easy. */
- +#define THREAD_GETMEM(descr, member) \
- + descr->member
- +#define THREAD_GETMEM_NC(descr, member, idx) \
- + descr->member[idx]
- +#define THREAD_SETMEM(descr, member, value) \
- + descr->member = (value)
- +#define THREAD_SETMEM_NC(descr, member, idx, value) \
- + descr->member[idx] = (value)
- +
- +/* Get and set the global scope generation counter in struct pthread. */
- +#define THREAD_GSCOPE_FLAG_UNUSED 0
- +#define THREAD_GSCOPE_FLAG_USED 1
- +#define THREAD_GSCOPE_FLAG_WAIT 2
- +#define THREAD_GSCOPE_RESET_FLAG() \
- + do \
- + { int __res \
- + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
- + THREAD_GSCOPE_FLAG_UNUSED); \
- + if (__res == THREAD_GSCOPE_FLAG_WAIT) \
- + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \
- + } \
- + while (0)
- +#define THREAD_GSCOPE_SET_FLAG() \
- + do \
- + { \
- + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
- + atomic_write_barrier (); \
- + } \
- + while (0)
- +#define THREAD_GSCOPE_WAIT() \
- + GL(dl_wait_lookup_done) ()
- +
- +#endif /* __ASSEMBLER__ */
- +
- +#endif /* tls.h */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/dl-tls.h uClibc/libpthread/nptl/sysdeps/mips/dl-tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/mips/dl-tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- /* Type used for the representation of TLS information in the GOT. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/jmpbuf-unwind.h uClibc/libpthread/nptl/sysdeps/mips/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/mips/jmpbuf-unwind.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdint.h>
- @@ -25,6 +24,3 @@
-
- #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].__sp - (_adj))
- -
- -/* We use the normal longjmp for unwinding. */
- -#define __libc_unwind_longjmp(buf, val) longjmp (buf, val)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/libc-tls.c uClibc/libpthread/nptl/sysdeps/mips/libc-tls.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/libc-tls.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/mips/libc-tls.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdeps/generic/libc-tls.c>
- #include <dl-tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthreaddef.h uClibc/libpthread/nptl/sysdeps/mips/pthreaddef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/mips/pthreaddef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Default stack size. */
- #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthread_spin_lock.S uClibc/libpthread/nptl/sysdeps/mips/pthread_spin_lock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthread_spin_lock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/mips/pthread_spin_lock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/asm.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthread_spin_trylock.S uClibc/libpthread/nptl/sysdeps/mips/pthread_spin_trylock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/mips/pthread_spin_trylock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/asm.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/regdef.h uClibc/libpthread/nptl/sysdeps/mips/regdef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/regdef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/mips/regdef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _REGDEF_H
- #define _REGDEF_H
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/tls.h uClibc/libpthread/nptl/sysdeps/mips/tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/mips/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H 1
- @@ -121,7 +120,7 @@
- operation can cause a failure 'errno' must not be touched. */
- # define TLS_INIT_TP(tcbp, secondcall) \
- ({ INTERNAL_SYSCALL_DECL (err); \
- - long result_var; \
- + long result_var attribute_unused; \
- result_var = INTERNAL_SYSCALL (set_thread_area, err, 1, \
- (char *) (tcbp) + TLS_TCB_OFFSET); \
- INTERNAL_SYSCALL_ERROR_P (result_var, err) \
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/dl-tls.h uClibc/libpthread/nptl/sysdeps/powerpc/dl-tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/powerpc/dl-tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- /* Type used for the representation of TLS information in the TOC. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/jmpbuf-unwind.h uClibc/libpthread/nptl/sysdeps/powerpc/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/powerpc/jmpbuf-unwind.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdint.h>
- @@ -26,6 +25,3 @@
-
- #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_GPR1] - (_adj))
- -
- -/* We use the normal lobngjmp for unwinding. */
- -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthreaddef.h uClibc/libpthread/nptl/sysdeps/powerpc/pthreaddef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/powerpc/pthreaddef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Default stack size. */
- #define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthread_spin_lock.c uClibc/libpthread/nptl/sysdeps/powerpc/pthread_spin_lock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/powerpc/pthread_spin_lock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthread_spin_trylock.c uClibc/libpthread/nptl/sysdeps/powerpc/pthread_spin_trylock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthread_spin_trylock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/powerpc/pthread_spin_trylock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/tls.h uClibc/libpthread/nptl/sysdeps/powerpc/tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/powerpc/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/allocalim.h uClibc/libpthread/nptl/sysdeps/pthread/allocalim.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/allocalim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/allocalim.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <alloca.h>
- #include <limits.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h uClibc/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_LIBC_LOCK_H
- #define _BITS_LIBC_LOCK_H 1
- @@ -475,7 +474,7 @@
- library. */
-
- extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
- - __const pthread_mutexattr_t *__mutex_attr);
- + const pthread_mutexattr_t *__mutex_attr);
-
- extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
-
- @@ -494,7 +493,7 @@
-
- #ifdef __USE_UNIX98
- extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
- - __const pthread_rwlockattr_t *__attr);
- + const pthread_rwlockattr_t *__attr);
-
- extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
-
- @@ -513,7 +512,7 @@
- void (*__destr_function) (void *));
-
- extern int __pthread_setspecific (pthread_key_t __key,
- - __const void *__pointer);
- + const void *__pointer);
-
- extern void *__pthread_getspecific (pthread_key_t __key);
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/libc-tsd.h uClibc/libpthread/nptl/sysdeps/pthread/bits/libc-tsd.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/libc-tsd.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/bits/libc-tsd.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _GENERIC_BITS_LIBC_TSD_H
- #define _GENERIC_BITS_LIBC_TSD_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h uClibc/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_STDIO_LOCK_H
- #define _BITS_STDIO_LOCK_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/createthread.c uClibc/libpthread/nptl/sysdeps/pthread/createthread.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/createthread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/createthread.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sched.h>
- #include <setjmp.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/librt-cancellation.c uClibc/libpthread/nptl/sysdeps/pthread/librt-cancellation.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/librt-cancellation.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/librt-cancellation.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/list.h uClibc/libpthread/nptl/sysdeps/pthread/list.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/list.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/list.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LIST_H
- #define _LIST_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/Makefile.in uClibc/libpthread/nptl/sysdeps/pthread/Makefile.in
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -33,7 +33,6 @@
- pthread_spin_init.c \
- pthread_spin_unlock.c \
- pt-longjmp.c \
- - pt-sigaction.c \
- tpp.c
- CFLAGS-pthread = $(SSP_ALL_CFLAGS) -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE
- @@ -49,8 +48,7 @@
- CFLAGS-rt-unwind-resume.c = -DIS_IN_librt \
- -fexceptions -fasynchronous-unwind-tables
-
- -libpthread-so-y += $(patsubst %,$(libpthread_pthread_OUT)/%.oS, \
- - unwind-forcedunwind)
- +libpthread-so-y += $(patsubst %,$(libpthread_pthread_OUT)/%.oS, unwind-forcedunwind)
-
- librt-pt-routines-y = librt-cancellation.c
- librt-pt-shared-only-routines-y = rt-unwind-resume.c
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/malloc-machine.h uClibc/libpthread/nptl/sysdeps/pthread/malloc-machine.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/malloc-machine.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/malloc-machine.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _MALLOC_MACHINE_H
- #define _MALLOC_MACHINE_H
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/posix-timer.h uClibc/libpthread/nptl/sysdeps/pthread/posix-timer.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/posix-timer.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/posix-timer.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_destroy.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_barrier_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_barrier_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_init.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_barrier_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_barrier_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_wait.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_barrier_wait.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_wait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_barrier_wait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <endian.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <endian.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <endian.h>
- #include <errno.h>
- @@ -100,8 +99,10 @@
- {
- #ifdef __NR_clock_gettime
- INTERNAL_SYSCALL_DECL (err);
- - int ret;
- - ret = INTERNAL_SYSCALL (clock_gettime, err, 2,
- +# ifndef __ASSUME_POSIX_TIMERS
- + int ret =
- +# endif
- + INTERNAL_SYSCALL (clock_gettime, err, 2,
- (cond->__data.__nwaiters
- & ((1 << COND_NWAITERS_SHIFT) - 1)),
- &rt);
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <endian.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread-functions.h uClibc/libpthread/nptl/sysdeps/pthread/pthread-functions.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread-functions.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread-functions.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _PTHREAD_FUNCTIONS_H
- #define _PTHREAD_FUNCTIONS_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread.h uClibc/libpthread/nptl/sysdeps/pthread/pthread.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _PTHREAD_H
- #define _PTHREAD_H 1
- @@ -228,7 +227,7 @@
- getting passed ARG. Creation attributed come from ATTR. The new
- handle is stored in *NEWTHREAD. */
- extern int pthread_create (pthread_t *__restrict __newthread,
- - __const pthread_attr_t *__restrict __attr,
- + const pthread_attr_t *__restrict __attr,
- void *(*__start_routine) (void *),
- void *__restrict __arg) __THROW __nonnull ((1, 3));
-
- @@ -258,7 +257,7 @@
- This function is a cancellation point and therefore not marked with
- __THROW. */
- extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
- - __const struct timespec *__abstime);
- + const struct timespec *__abstime);
- #endif
-
- /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
- @@ -287,7 +286,7 @@
- __THROW __nonnull ((1));
-
- /* Get detach state attribute. */
- -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
- +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
- int *__detachstate)
- __THROW __nonnull ((1, 2));
-
- @@ -298,7 +297,7 @@
-
-
- /* Get the size of the guard area created for stack overflow protection. */
- -extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
- +extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
- size_t *__guardsize)
- __THROW __nonnull ((1, 2));
-
- @@ -309,18 +308,18 @@
-
-
- /* Return in *PARAM the scheduling parameters of *ATTR. */
- -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict
- __attr,
- struct sched_param *__restrict __param)
- __THROW __nonnull ((1, 2));
-
- /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
- extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
- - __const struct sched_param *__restrict
- + const struct sched_param *__restrict
- __param) __THROW __nonnull ((1, 2));
-
- /* Return in *POLICY the scheduling policy of *ATTR. */
- -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
- __attr, int *__restrict __policy)
- __THROW __nonnull ((1, 2));
-
- @@ -329,7 +328,7 @@
- __THROW __nonnull ((1));
-
- /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
- -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
- __attr, int *__restrict __inherit)
- __THROW __nonnull ((1, 2));
-
- @@ -340,7 +339,7 @@
-
-
- /* Return in *SCOPE the scheduling contention scope of *ATTR. */
- -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
- +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
- int *__restrict __scope)
- __THROW __nonnull ((1, 2));
-
- @@ -349,7 +348,7 @@
- __THROW __nonnull ((1));
-
- /* Return the previously set address for the stack. */
- -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
- __attr, void **__restrict __stackaddr)
- __THROW __nonnull ((1, 2)) __attribute_deprecated__;
-
- @@ -362,7 +361,7 @@
- __THROW __nonnull ((1)) __attribute_deprecated__;
-
- /* Return the currently used minimal stack size. */
- -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
- +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
- __attr, size_t *__restrict __stacksize)
- __THROW __nonnull ((1, 2));
-
- @@ -375,7 +374,7 @@
-
- #ifdef __USE_XOPEN2K
- /* Return the previously set address for the stack. */
- -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
- +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
- void **__restrict __stackaddr,
- size_t *__restrict __stacksize)
- __THROW __nonnull ((1, 2, 3));
- @@ -392,12 +391,12 @@
- the processors represented in CPUSET. */
- extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
- size_t __cpusetsize,
- - __const cpu_set_t *__cpuset)
- + const cpu_set_t *__cpuset)
- __THROW __nonnull ((1, 3));
-
- /* Get bit set in CPUSET representing the processors threads created with
- ATTR can run on. */
- -extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr,
- +extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
- size_t __cpusetsize,
- cpu_set_t *__cpuset)
- __THROW __nonnull ((1, 3));
- @@ -416,7 +415,7 @@
- /* Set the scheduling parameters for TARGET_THREAD according to POLICY
- and *PARAM. */
- extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
- - __const struct sched_param *__param)
- + const struct sched_param *__param)
- __THROW __nonnull ((3));
-
- /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
- @@ -449,7 +448,7 @@
- /* Limit specified thread TH to run only on the processors represented
- in CPUSET. */
- extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
- - __const cpu_set_t *__cpuset)
- + const cpu_set_t *__cpuset)
- __THROW __nonnull ((3));
-
- /* Get bit set in CPUSET representing the processors TH can run on. */
- @@ -581,6 +580,7 @@
- function the compiler is free to decide inlining the change when
- needed or fall back on the copy which must exist somewhere
- else. */
- +void __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame);
- __extern_inline void
- __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
- {
- @@ -724,7 +724,7 @@
-
- /* Initialize a mutex. */
- extern int pthread_mutex_init (pthread_mutex_t *__mutex,
- - __const pthread_mutexattr_t *__mutexattr)
- + const pthread_mutexattr_t *__mutexattr)
- __THROW __nonnull ((1));
-
- /* Destroy a mutex. */
- @@ -742,7 +742,7 @@
- #ifdef __USE_XOPEN2K
- /* Wait until lock becomes available, or specified time passes. */
- extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime) __THROW __nonnull ((1, 2));
- #endif
-
- @@ -752,7 +752,7 @@
-
-
- /* Get the priority ceiling of MUTEX. */
- -extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
- +extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
- __restrict __mutex,
- int *__restrict __prioceiling)
- __THROW __nonnull ((1, 2));
- @@ -788,7 +788,7 @@
- __THROW __nonnull ((1));
-
- /* Get the process-shared flag of the mutex attribute ATTR. */
- -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
- +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
- __restrict __attr,
- int *__restrict __pshared)
- __THROW __nonnull ((1, 2));
- @@ -800,7 +800,7 @@
-
- #if defined __USE_UNIX98 || defined __USE_XOPEN2K8
- /* Return in *KIND the mutex kind attribute in *ATTR. */
- -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
- +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
- __attr, int *__restrict __kind)
- __THROW __nonnull ((1, 2));
-
- @@ -812,7 +812,7 @@
- #endif
-
- /* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */
- -extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
- +extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
- __restrict __attr,
- int *__restrict __protocol)
- __THROW __nonnull ((1, 2));
- @@ -824,7 +824,7 @@
- __THROW __nonnull ((1));
-
- /* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */
- -extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
- +extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
- __restrict __attr,
- int *__restrict __prioceiling)
- __THROW __nonnull ((1, 2));
- @@ -836,11 +836,11 @@
-
- #ifdef __USE_XOPEN2K
- /* Get the robustness flag of the mutex attribute ATTR. */
- -extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
- +extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
- int *__robustness)
- __THROW __nonnull ((1, 2));
- # ifdef __USE_GNU
- -extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr,
- +extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
- int *__robustness)
- __THROW __nonnull ((1, 2));
- # endif
- @@ -863,7 +863,7 @@
- /* Initialize read-write lock RWLOCK using attributes ATTR, or use
- the default values if later is NULL. */
- extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
- - __const pthread_rwlockattr_t *__restrict
- + const pthread_rwlockattr_t *__restrict
- __attr) __THROW __nonnull ((1));
-
- /* Destroy read-write lock RWLOCK. */
- @@ -881,7 +881,7 @@
- # ifdef __USE_XOPEN2K
- /* Try to acquire read lock for RWLOCK or return after specfied time. */
- extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime) __THROW __nonnull ((1, 2));
- # endif
-
- @@ -896,7 +896,7 @@
- # ifdef __USE_XOPEN2K
- /* Try to acquire write lock for RWLOCK or return after specfied time. */
- extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime) __THROW __nonnull ((1, 2));
- # endif
-
- @@ -916,7 +916,7 @@
- __THROW __nonnull ((1));
-
- /* Return current setting of process-shared attribute of ATTR in PSHARED. */
- -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
- +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
- __restrict __attr,
- int *__restrict __pshared)
- __THROW __nonnull ((1, 2));
- @@ -927,7 +927,7 @@
- __THROW __nonnull ((1));
-
- /* Return current setting of reader/writer preference. */
- -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
- +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
- __restrict __attr,
- int *__restrict __pref)
- __THROW __nonnull ((1, 2));
- @@ -943,7 +943,7 @@
- /* Initialize condition variable COND using attributes ATTR, or use
- the default values if later is NULL. */
- extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
- - __const pthread_condattr_t *__restrict
- + const pthread_condattr_t *__restrict
- __cond_attr) __THROW __nonnull ((1));
-
- /* Destroy condition variable COND. */
- @@ -976,7 +976,7 @@
- __THROW. */
- extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
- pthread_mutex_t *__restrict __mutex,
- - __const struct timespec *__restrict
- + const struct timespec *__restrict
- __abstime) __nonnull ((1, 2, 3));
-
- /* Functions for handling condition variable attributes. */
- @@ -990,7 +990,7 @@
- __THROW __nonnull ((1));
-
- /* Get the process-shared flag of the condition variable attribute ATTR. */
- -extern int pthread_condattr_getpshared (__const pthread_condattr_t *
- +extern int pthread_condattr_getpshared (const pthread_condattr_t *
- __restrict __attr,
- int *__restrict __pshared)
- __THROW __nonnull ((1, 2));
- @@ -1001,7 +1001,7 @@
-
- #ifdef __USE_XOPEN2K
- /* Get the clock selected for the conditon variable attribute ATTR. */
- -extern int pthread_condattr_getclock (__const pthread_condattr_t *
- +extern int pthread_condattr_getclock (const pthread_condattr_t *
- __restrict __attr,
- __clockid_t *__restrict __clock_id)
- __THROW __nonnull ((1, 2));
- @@ -1043,7 +1043,7 @@
- /* Initialize BARRIER with the attributes in ATTR. The barrier is
- opened when COUNT waiters arrived. */
- extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
- - __const pthread_barrierattr_t *__restrict
- + const pthread_barrierattr_t *__restrict
- __attr, unsigned int __count)
- __THROW __nonnull ((1));
-
- @@ -1065,7 +1065,7 @@
- __THROW __nonnull ((1));
-
- /* Get the process-shared flag of the barrier attribute ATTR. */
- -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
- +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
- __restrict __attr,
- int *__restrict __pshared)
- __THROW __nonnull ((1, 2));
- @@ -1097,7 +1097,7 @@
-
- /* Store POINTER in the thread-specific data slot identified by KEY. */
- extern int pthread_setspecific (pthread_key_t __key,
- - __const void *__pointer) __THROW ;
- + const void *__pointer) __THROW ;
-
-
- #ifdef __USE_XOPEN2K
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_once.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_once.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_once.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_sigmask.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_sigmask.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_sigmask.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_sigmask.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_destroy.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_spin_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_spin_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_init.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_spin_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_spin_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_unlock.c uClibc/libpthread/nptl/sysdeps/pthread/pthread_spin_unlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_unlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pthread_spin_unlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <atomic.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-initfini.c uClibc/libpthread/nptl/sysdeps/pthread/pt-initfini.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pt-initfini.c 2014-02-03 12:32:57.000000000 +0100
- @@ -23,8 +23,7 @@
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-longjmp.c uClibc/libpthread/nptl/sysdeps/pthread/pt-longjmp.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-longjmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pt-longjmp.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,14 +13,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdlib.h>
- #include "pthreadP.h"
-
- +extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
- +
- void
- longjmp (jmp_buf env, int val)
- {
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-sigaction.c uClibc/libpthread/nptl/sysdeps/pthread/pt-sigaction.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-sigaction.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/pt-sigaction.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/setxid.h uClibc/libpthread/nptl/sysdeps/pthread/setxid.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/setxid.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/setxid.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/sigfillset.c uClibc/libpthread/nptl/sysdeps/pthread/sigfillset.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/sigfillset.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/pthread/sigfillset.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,20 @@
- +/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <pthreadP.h>
- +
- +#include <../../../../libc/signal/sigfillset.c>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/sigprocmask.c uClibc/libpthread/nptl/sysdeps/pthread/sigprocmask.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/sigprocmask.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/pthread/sigprocmask.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,21 @@
- +/* Copyright (C) 1997,1998,1999,2000,2001,2003 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <pthreadP.h>
- +#undef _LARGEFILE64_SOURCE
- +
- +#include <../../../../libc/sysdeps/linux/common/sigprocmask.c>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_create.c uClibc/libpthread/nptl/sysdeps/pthread/timer_create.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_create.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/timer_create.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_delete.c uClibc/libpthread/nptl/sysdeps/pthread/timer_delete.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_delete.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/timer_delete.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_getoverr.c uClibc/libpthread/nptl/sysdeps/pthread/timer_getoverr.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_getoverr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/timer_getoverr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_gettime.c uClibc/libpthread/nptl/sysdeps/pthread/timer_gettime.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_gettime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/timer_gettime.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_routines.c uClibc/libpthread/nptl/sysdeps/pthread/timer_routines.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_routines.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/timer_routines.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_settime.c uClibc/libpthread/nptl/sysdeps/pthread/timer_settime.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_settime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/timer_settime.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/tpp.c uClibc/libpthread/nptl/sysdeps/pthread/tpp.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/tpp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/tpp.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <atomic.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c uClibc/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <dlfcn.h>
- #include <stdio.h>
- @@ -112,6 +111,11 @@
- _Unwind_Reason_Code
- __gcc_personality_v0 (int version, _Unwind_Action actions,
- _Unwind_Exception_Class exception_class,
- + struct _Unwind_Exception *ue_header,
- + struct _Unwind_Context *context);
- +_Unwind_Reason_Code
- +__gcc_personality_v0 (int version, _Unwind_Action actions,
- + _Unwind_Exception_Class exception_class,
- struct _Unwind_Exception *ue_header,
- struct _Unwind_Context *context)
- {
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/unwind-resume.c uClibc/libpthread/nptl/sysdeps/pthread/unwind-resume.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/unwind-resume.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/pthread/unwind-resume.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <dlfcn.h>
- #include <stdio.h>
- @@ -66,6 +65,11 @@
- _Unwind_Reason_Code
- __gcc_personality_v0 (int version, _Unwind_Action actions,
- _Unwind_Exception_Class exception_class,
- + struct _Unwind_Exception *ue_header,
- + struct _Unwind_Context *context);
- +_Unwind_Reason_Code
- +__gcc_personality_v0 (int version, _Unwind_Action actions,
- + _Unwind_Exception_Class exception_class,
- struct _Unwind_Exception *ue_header,
- struct _Unwind_Context *context)
- {
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/dl-tls.h uClibc/libpthread/nptl/sysdeps/sh/dl-tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sh/dl-tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- /* Type used for the representation of TLS information in the GOT. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/jmpbuf-unwind.h uClibc/libpthread/nptl/sysdeps/sh/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sh/jmpbuf-unwind.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdint.h>
- @@ -26,8 +25,3 @@
-
- #define _JMPBUF_UNWINDS_ADJ(jmpbuf, address, adj) \
- ((uintptr_t) (address) - (adj) < (uintptr_t) (jmpbuf)[0].__regs[7] - (adj))
- -
- -extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
- -
- -/* We use the normal lobngjmp for unwinding. */
- -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthreaddef.h uClibc/libpthread/nptl/sysdeps/sh/pthreaddef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sh/pthreaddef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_init.c uClibc/libpthread/nptl/sysdeps/sh/pthread_spin_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sh/pthread_spin_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Not needed. pthread_spin_init is an alias for pthread_spin_unlock. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c uClibc/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_trylock.S uClibc/libpthread/nptl/sysdeps/sh/pthread_spin_trylock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sh/pthread_spin_trylock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread-errnos.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_unlock.S uClibc/libpthread/nptl/sysdeps/sh/pthread_spin_unlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_unlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sh/pthread_spin_unlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- .globl pthread_spin_unlock
- .type pthread_spin_unlock,@function
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/tls.h uClibc/libpthread/nptl/sysdeps/sh/tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sh/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/dl-tls.h uClibc/libpthread/nptl/sysdeps/sparc/dl-tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/dl-tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- /* Type used for the representation of TLS information in the GOT. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h uClibc/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdint.h>
- @@ -26,7 +25,3 @@
-
- #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
- -
- -/* We use the normal longjmp for unwinding. */
- -extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
- -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h uClibc/libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Default stack size. */
- #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c uClibc/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,16 +13,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- int
- pthread_spin_lock (pthread_spinlock_t *lock)
- {
- - __asm__ __volatile
- + __asm__ __volatile__
- ("1: ldstub [%0], %%g2\n"
- " orcc %%g2, 0x0, %%g0\n"
- " bne,a 2f\n"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c uClibc/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c uClibc/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,16 +13,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- int
- pthread_spin_lock (pthread_spinlock_t *lock)
- {
- - __asm__ __volatile
- + __asm__ __volatile__
- ("1: ldstub [%0], %%g2\n"
- " brnz,pn %%g2, 2f\n"
- " membar #StoreLoad | #StoreStore\n"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h uClibc/libpthread/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdint.h>
- @@ -26,6 +25,3 @@
-
- #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
- -
- -/* We use the normal lobngjmp for unwinding. */
- -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h uClibc/libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Default stack size. */
- #define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c uClibc/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,16 +13,15 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
-
- int
- pthread_spin_lock (pthread_spinlock_t *lock)
- {
- - __asm__ __volatile
- + __asm__ __volatile__
- ("1: ldstub [%0], %%g5\n"
- " brnz,pn %%g5, 2f\n"
- " membar #StoreLoad | #StoreStore\n"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c uClibc/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- @@ -24,7 +23,7 @@
- pthread_spin_trylock (pthread_spinlock_t *lock)
- {
- int res;
- - __asm__ __volatile
- + __asm__ __volatile__
- ("ldstub [%1], %0\n"
- "membar #StoreLoad | #StoreStore"
- : "=r" (res)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c uClibc/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <atomic.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/tls.h uClibc/libpthread/nptl/sysdeps/sparc/tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/sparc/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SEMAPHORE_H
- # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/createthread.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/createthread.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/createthread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/createthread.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Value passed to 'clone' for initialization of the thread register. */
- #define TLS_VALUE (pd + 1)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/fork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/fork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/fork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sched.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Libr \ary; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _LOWLEVELLOCK_H
- #define _LOWLEVELLOCK_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tcb-offsets.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tcb-offsets.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/pthreadtypes.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/pthreadtypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/semaphore.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/semaphore.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SEMAPHORE_H
- # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/createthread.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/createthread.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/createthread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/createthread.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Value passed to 'clone' for initialization of the thread register. */
- #define TLS_VALUE (pd + 1)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/fork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/fork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/fork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sched.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/libc-lowlevellock.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/libc-lowlevellock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/libc-lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/libc-lowlevellock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* No difference to lowlevellock.c, except we lose a couple of functions. */
- #include "lowlevellock.c"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LOWLEVELLOCK_H
- #define _LOWLEVELLOCK_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <tcb-offsets.h>
-
- @@ -35,4 +34,4 @@
- cmp r0, #0; /* If we are the parent... */ \
- strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */
-
- -#INCLUDE <../../../../../../../LIBC/SYSDEPS/LINUX/ARM/VFORK.S>
- +#include "../../../../../../../libc/sysdeps/linux/arm/vfork.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tcb-offsets.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <dlfcn.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <dlfcn.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/arm/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <tcb-offsets.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- /* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_POSIX_OPT_H
- #define _BITS_POSIX_OPT_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/createthread.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/createthread.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/createthread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/createthread.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Value passed to 'clone' for initialization of the thread register. */
- #define TLS_VALUE pd
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/exit-thread.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/exit-thread.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/exit-thread.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/exit-thread.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <stdlib.h>
- @@ -58,9 +57,15 @@
- #endif
- }
-
- -extern __typeof(fork) __libc_fork;
- pid_t
- -__libc_fork (void)
- +#if defined __arm__ && defined __thumb__ && __GNUC_PREREQ (4,6)
- +/* GCC PR target/53735
- + * In thumb1 we run out of registers when compiling with Os so relax that
- + * to have more registers available for spilling by using O2 here.
- + */
- +attribute_optimize("O2")
- +#endif
- +fork (void)
- {
- pid_t pid;
- struct used_handler
- @@ -223,7 +228,4 @@
-
- return pid;
- }
- -weak_alias(__libc_fork,__fork)
- -libc_hidden_proto(fork)
- -weak_alias(__libc_fork,fork)
- -libc_hidden_weak(fork)
- +libc_hidden_def(fork)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/fork.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/fork.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/fork.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/fork.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <lowlevellock.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,14 +13,17 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
- #include <tls.h>
- #include <sysdep.h>
-
- +#ifdef __NR_getxpid
- +# undef __NR_getpid
- +# define __NR_getpid __NR_getxpid
- +#endif
-
- #ifndef NOT_IN_libc
- static inline __attribute__((always_inline)) pid_t really_getpid (pid_t oldval);
- @@ -46,8 +49,7 @@
- }
- #endif
-
- -extern __typeof(getpid) __getpid;
- -pid_t
- +static pid_t
- __getpid (void)
- {
- #ifdef NOT_IN_libc
- @@ -60,6 +62,8 @@
- #endif
- return result;
- }
- -libc_hidden_proto(getpid)
- weak_alias(__getpid, getpid)
- libc_hidden_weak(getpid)
- +#if !defined NOT_IN_libc && !defined __NR_getppid
- +strong_alias(getpid,getppid)
- +#endif
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SEMAPHORE_H
- # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/createthread.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/createthread.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/createthread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/createthread.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The "thread register" gets initialized from a segment descriptor.
- Initialize such a descriptor first. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/fork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/fork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/fork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sched.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "lowlevellock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- @@ -25,10 +24,10 @@
-
- .text
-
- - .globl __new_sem_post
- - .type __new_sem_post,@function
- + .globl sem_post
- + .type sem_post,@function
- .align 16
- -__new_sem_post:
- +sem_post:
- cfi_startproc
- pushl %ebx
- cfi_adjust_cfa_offset(4)
- @@ -126,9 +125,7 @@
- cfi_restore(%ebx)
- ret
- cfi_endproc
- - .size __new_sem_post,.-__new_sem_post
- -weak_alias(__new_sem_post, sem_post)
- -
- + .size sem_post,.-sem_post
-
- #ifdef __PIC__
- .section .gnu.linkonce.t.__x86.get_pc_thunk.bx,"ax",@progbits
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- @@ -23,10 +22,10 @@
-
- .text
-
- - .globl __new_sem_trywait
- - .type __new_sem_trywait,@function
- + .globl sem_trywait
- + .type sem_trywait,@function
- .align 16
- -__new_sem_trywait:
- +sem_trywait:
- movl 4(%esp), %ecx
-
- movl (%ecx), %eax
- @@ -63,9 +62,7 @@
- #endif
- orl $-1, %eax
- ret
- - .size __new_sem_trywait,.-__new_sem_trywait
- -weak_alias(__new_sem_trywait, sem_trywait)
- -
- + .size sem_trywait,.-sem_trywait
-
- #ifdef __PIC__
- .section .gnu.linkonce.t.__x86.get_pc_thunk.cx,"ax",@progbits
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- @@ -29,10 +28,10 @@
-
- .text
-
- - .globl __new_sem_wait
- - .type __new_sem_wait,@function
- + .globl sem_wait
- + .type sem_wait,@function
- .align 16
- -__new_sem_wait:
- +sem_wait:
- .LSTARTCODE:
- pushl %ebx
- .Lpush_ebx:
- @@ -129,8 +128,7 @@
- orl $-1, %eax
-
- jmp 9b
- - .size __new_sem_wait,.-__new_sem_wait
- -weak_alias(__new_sem_wait, sem_wait)
- + .size sem_wait,.-sem_wait
-
-
- .type sem_wait_cleanup,@function
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevellock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevellock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevellock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/lowlevellock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/lowlevelrobustlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_barrier_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_barrier_wait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_barrier_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_barrier_wait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_cond_broadcast.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_cond_signal.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_cond_timedwait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_cond_wait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_rwlock_rdlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_rwlock_timedrdlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_rwlock_timedwrlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_rwlock_unlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_rwlock_wrlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_post.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_post.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_post.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_post.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/sem_post.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/sem_timedwait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/sem_trywait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_wait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_wait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/sem_wait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevellock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevellock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevellock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/lowlevellock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/lowlevelrobustlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_barrier_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_barrier_wait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_barrier_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_barrier_wait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_cond_broadcast.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_cond_signal.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define HAVE_CMOV 1
- #include "../i486/pthread_cond_timedwait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_cond_wait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_rwlock_rdlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_rwlock_timedrdlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_rwlock_timedwrlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define HAVE_CMOV 1
- #include "../i486/pthread_rwlock_unlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/pthread_rwlock_wrlock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_post.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_post.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_post.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_post.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/sem_post.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/sem_timedwait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/sem_trywait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_wait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_wait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "../i486/sem_wait.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LOWLEVELLOCK_H
- #define _LOWLEVELLOCK_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unwindbuf.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #define _ERRNO_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/smp.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/smp.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/i386/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <tcb-offsets.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/internaltypes.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/internaltypes.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/internaltypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/internaltypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _INTERNALTYPES_H
- #define _INTERNALTYPES_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stddef.h>
- @@ -25,7 +24,6 @@
- #pragma weak __pthread_cleanup_upto
-
-
- -void _longjmp_unwind (jmp_buf env, int val);
- void
- _longjmp_unwind (jmp_buf env, int val)
- {
- @@ -38,3 +36,4 @@
- __pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME);
- #endif
- }
- +libc_hidden_def(_longjmp_unwind)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* No difference to lowlevellock.c, except we lose a couple of functions. */
- #include "lowlevellock.c"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
- #include <list.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch 2014-02-03 12:32:57.000000000 +0100
- @@ -62,22 +62,24 @@
- pthread_getcpuclockid.c pthread_kill.c \
- pthread_mutex_cond_lock.c pthread_yield.c \
- sem_post.c sem_timedwait.c sem_trywait.c sem_wait.c \
- - pt-fork.c pt-sleep.c pthread_sigqueue.c pt-tempname.c \
- - sigtimedwait.c sigwaitinfo.c sigwait.c \
- + pt-tempname.c \
- + pthread_sigqueue.c \
- lowlevellock.c lowlevelrobustlock.c
- +# pt-sleep.c pt-fork.c sigtimedwait.c sigwaitinfo.c sigwait.c
-
- libpthread_linux_SSRC := #ptw-close.S ptw-open.S ptw-waitid.S ptw-waidpid.S ptw-write.S
-
- libc_linux_CSRC += libc_pthread_init.c libc_multiple_threads.c \
- register-atfork.c unregister-atfork.c getpid.c \
- - raise.c sleep.c jmp-unwind.c libc-lowlevellock.c
- + raise.c jmp-unwind.c libc-lowlevellock.c
- + #sleep.c
-
- librt_linux_CSRC += mq_notify.c timer_create.c timer_delete.c \
- timer_getoverr.c timer_gettime.c timer_routines.c \
- timer_settime.c
-
- # These provide both a cancellable and a not cancellable implementation
- -libc_linux_SSRC = close.S open.S write.S read.S waitpid.S
- +libc_linux_SSRC = #close.S open.S write.S read.S waitpid.S
- libc_linux_SSRC := $(filter-out $(libc_linux_arch_SSRC-OMIT),$(libc_linux_SSRC))
-
- libpthread_linux_CSRC := $(filter-out $(notdir $(libpthread_linux_arch_OBJS:.o=.c)),$(libpthread_linux_CSRC))
- @@ -141,13 +143,14 @@
- CFLAGS-OMIT-getpid.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-OMIT-raise.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-OMIT-sleep.c = -DNOT_IN_libc -DIS_IN_libpthread
- +CFLAGS-OMIT-jmp-unwind.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
-
- -CFLAGS-OMIT-close.S = -DNOT_IN_libc -DIS_IN_libpthread
- -CFLAGS-OMIT-open.S = -DNOT_IN_libc -DIS_IN_libpthread
- -CFLAGS-OMIT-read.S = -DNOT_IN_libc -DIS_IN_libpthread
- -CFLAGS-OMIT-write.S = -DNOT_IN_libc -DIS_IN_libpthread
- -CFLAGS-OMIT-waitpid.S = -DNOT_IN_libc -DIS_IN_libpthread
- +#CFLAGS-OMIT-close.S = -DNOT_IN_libc -DIS_IN_libpthread
- +#CFLAGS-OMIT-open.S = -DNOT_IN_libc -DIS_IN_libpthread
- +#CFLAGS-OMIT-read.S = -DNOT_IN_libc -DIS_IN_libpthread
- +#CFLAGS-OMIT-write.S = -DNOT_IN_libc -DIS_IN_libpthread
- +#CFLAGS-OMIT-waitpid.S = -DNOT_IN_libc -DIS_IN_libpthread
-
- CFLAGS-OMIT-mq_notify.c = -DIS_IN_libpthread
- CFLAGS-OMIT-timer_create.c = -DIS_IN_libpthread
- @@ -157,11 +160,11 @@
- CFLAGS-OMIT-timer_routines.c = -DIS_IN_libpthread
- CFLAGS-OMIT-timer_settime.c = -DIS_IN_libpthread
-
- -ASFLAGS-open.S = -D_LIBC_REENTRANT
- -ASFLAGS-close.S = -D_LIBC_REENTRANT
- -ASFLAGS-read.S = -D_LIBC_REENTRANT
- -ASFLAGS-write.S = -D_LIBC_REENTRANT
- -ASFLAGS-waitpid.S = -D_LIBC_REENTRANT
- +#ASFLAGS-open.S = -D_LIBC_REENTRANT
- +#ASFLAGS-close.S = -D_LIBC_REENTRANT
- +#ASFLAGS-read.S = -D_LIBC_REENTRANT
- +#ASFLAGS-write.S = -D_LIBC_REENTRANT
- +#ASFLAGS-waitpid.S = -D_LIBC_REENTRANT
-
- #
- # Create header files.
- @@ -174,8 +177,6 @@
- CFLAGS-gen_structsem.c = -S
- CFLAGS-gen_unwindbuf.c = -S
-
- -PTHREAD_GENERATE_MANGLE ?= -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*\$$/\#define \1 \2/p"
- -
- PTHREAD_LINUX_SYM := $(notdir $(wildcard $(libpthread_linux_DIR)/*.sym))
- PTHREAD_LINUX_SYM_C := $(addprefix $(libpthread_linux_OUT)/gen_,$(PTHREAD_LINUX_SYM:.sym=.c))
- PTHREAD_LINUX_SYM_S := $(PTHREAD_LINUX_SYM_C:.c=.s)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/pthreadtypes.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/pthreadtypes.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/pthreadtypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,181 @@
- +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#ifndef _BITS_PTHREADTYPES_H
- +#define _BITS_PTHREADTYPES_H 1
- +
- +#include <endian.h>
- +
- +#define __SIZEOF_PTHREAD_ATTR_T 36
- +#define __SIZEOF_PTHREAD_MUTEX_T 24
- +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
- +#define __SIZEOF_PTHREAD_COND_T 48
- +#define __SIZEOF_PTHREAD_COND_COMPAT_T 12
- +#define __SIZEOF_PTHREAD_CONDATTR_T 4
- +#define __SIZEOF_PTHREAD_RWLOCK_T 32
- +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
- +#define __SIZEOF_PTHREAD_BARRIER_T 20
- +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
- +
- +
- +/* Thread identifiers. The structure of the attribute type is not
- + exposed on purpose. */
- +typedef unsigned long int pthread_t;
- +
- +
- +typedef union
- +{
- + char __size[__SIZEOF_PTHREAD_ATTR_T];
- + long int __align;
- +} pthread_attr_t;
- +
- +
- +typedef struct __pthread_internal_slist
- +{
- + struct __pthread_internal_slist *__next;
- +} __pthread_slist_t;
- +
- +
- +/* Data structures for mutex handling. The structure of the attribute
- + type is not exposed on purpose. */
- +typedef union
- +{
- + struct __pthread_mutex_s
- + {
- + int __lock;
- + unsigned int __count;
- + int __owner;
- + /* KIND must stay at this position in the structure to maintain
- + binary compatibility. */
- + int __kind;
- + unsigned int __nusers;
- + __extension__ union
- + {
- + int __spins;
- + __pthread_slist_t __list;
- + };
- + } __data;
- + char __size[__SIZEOF_PTHREAD_MUTEX_T];
- + long int __align;
- +} pthread_mutex_t;
- +
- +typedef union
- +{
- + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
- + long int __align;
- +} pthread_mutexattr_t;
- +
- +
- +/* Data structure for conditional variable handling. The structure of
- + the attribute type is not exposed on purpose. */
- +typedef union
- +{
- + struct
- + {
- + int __lock;
- + unsigned int __futex;
- + __extension__ unsigned long long int __total_seq;
- + __extension__ unsigned long long int __wakeup_seq;
- + __extension__ unsigned long long int __woken_seq;
- + void *__mutex;
- + unsigned int __nwaiters;
- + unsigned int __broadcast_seq;
- + } __data;
- + char __size[__SIZEOF_PTHREAD_COND_T];
- + __extension__ long long int __align;
- +} pthread_cond_t;
- +
- +typedef union
- +{
- + char __size[__SIZEOF_PTHREAD_CONDATTR_T];
- + long int __align;
- +} pthread_condattr_t;
- +
- +
- +/* Keys for thread-specific data */
- +typedef unsigned int pthread_key_t;
- +
- +
- +/* Once-only execution */
- +typedef int pthread_once_t;
- +
- +
- +#if defined __USE_UNIX98 || defined __USE_XOPEN2K
- +/* Data structure for read-write lock variable handling. The
- + structure of the attribute type is not exposed on purpose. */
- +typedef union
- +{
- + struct
- + {
- + int __lock;
- + unsigned int __nr_readers;
- + unsigned int __readers_wakeup;
- + unsigned int __writer_wakeup;
- + unsigned int __nr_readers_queued;
- + unsigned int __nr_writers_queued;
- +#if __BYTE_ORDER == __BIG_ENDIAN
- + unsigned char __pad1;
- + unsigned char __pad2;
- + unsigned char __shared;
- + /* FLAGS must stay at this position in the structure to maintain
- + binary compatibility. */
- + unsigned char __flags;
- +#else
- + /* FLAGS must stay at this position in the structure to maintain
- + binary compatibility. */
- + unsigned char __flags;
- + unsigned char __shared;
- + unsigned char __pad1;
- + unsigned char __pad2;
- +#endif
- + int __writer;
- + } __data;
- + char __size[__SIZEOF_PTHREAD_RWLOCK_T];
- + long int __align;
- +} pthread_rwlock_t;
- +
- +typedef union
- +{
- + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
- + long int __align;
- +} pthread_rwlockattr_t;
- +#endif
- +
- +
- +#ifdef __USE_XOPEN2K
- +/* POSIX spinlock data type. */
- +typedef volatile int pthread_spinlock_t;
- +
- +
- +/* POSIX barriers data type. The structure of the type is
- + deliberately not exposed. */
- +typedef union
- +{
- + char __size[__SIZEOF_PTHREAD_BARRIER_T];
- + long int __align;
- +} pthread_barrier_t;
- +
- +typedef union
- +{
- + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
- + int __align;
- +} pthread_barrierattr_t;
- +#endif
- +
- +
- +#endif /* bits/pthreadtypes.h */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/semaphore.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/semaphore.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/semaphore.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,35 @@
- +/* Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#ifndef _SEMAPHORE_H
- +# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
- +#endif
- +
- +
- +#define __SIZEOF_SEM_T 16
- +
- +
- +/* Value returned if `sem_open' failed. */
- +#define SEM_FAILED ((sem_t *) 0)
- +
- +
- +typedef union
- +{
- + char __size[__SIZEOF_SEM_T];
- + long int __align;
- +} sem_t;
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/clone.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/clone.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/clone.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/clone.S 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,9 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#define RESET_PID
- +#include <tcb-offsets.h>
- +#include "../../../../../../../libc/sysdeps/linux/metag/clone.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/createthread.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/createthread.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/createthread.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/createthread.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,23 @@
- +/* Copyright (C) 2005 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +/* Value passed to 'clone' for initialization of the thread register. */
- +#define TLS_VALUE (pd + 1)
- +
- +/* Get the real implementation. */
- +#include <sysdeps/pthread/createthread.c>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/fork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/fork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/fork.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/fork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,31 @@
- +/* Copyright (C) 2005 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Phil Blundell <pb@nexus.co.uk>, 2005
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <sched.h>
- +#include <signal.h>
- +#include <sysdep.h>
- +#include <tls.h>
- +
- +
- +#define ARCH_FORK() \
- + INLINE_SYSCALL (clone, 5, \
- + CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
- + NULL, NULL, &THREAD_SELF->tid, NULL)
- +
- +#include "../fork.c"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/libc-lowlevellock.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/libc-lowlevellock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/libc-lowlevellock.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/libc-lowlevellock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,21 @@
- +/* Copyright (C) 2003 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- + Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +/* No difference to lowlevellock.c, except we lose a couple of functions. */
- +#include "lowlevellock.c"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,134 @@
- +/* low level locking for pthread library. Generic futex-using version.
- + Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <errno.h>
- +#include <sysdep.h>
- +#include <lowlevellock.h>
- +#include <sys/time.h>
- +#include <tls.h>
- +
- +void
- +__lll_lock_wait_private (int *futex)
- +{
- + do
- + {
- + int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
- + if (oldval != 0)
- + lll_futex_wait (futex, 2, LLL_PRIVATE);
- + }
- + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
- +}
- +
- +
- +/* These functions don't get included in libc.so */
- +#ifdef IS_IN_libpthread
- +void
- +__lll_lock_wait (int *futex, int private)
- +{
- + do
- + {
- + int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
- + if (oldval != 0)
- + lll_futex_wait (futex, 2, private);
- + }
- + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
- +}
- +
- +
- +int
- +__lll_timedlock_wait (int *futex, const struct timespec *abstime, int private)
- +{
- + struct timespec rt;
- +
- + /* Reject invalid timeouts. */
- + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
- + return EINVAL;
- +
- + /* Upgrade the lock. */
- + if (atomic_exchange_acq (futex, 2) == 0)
- + return 0;
- +
- + do
- + {
- + struct timeval tv;
- +
- + /* Get the current time. */
- + (void) gettimeofday (&tv, NULL);
- +
- + /* Compute relative timeout. */
- + rt.tv_sec = abstime->tv_sec - tv.tv_sec;
- + rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
- + if (rt.tv_nsec < 0)
- + {
- + rt.tv_nsec += 1000000000;
- + --rt.tv_sec;
- + }
- +
- + /* Already timed out? */
- + if (rt.tv_sec < 0)
- + return ETIMEDOUT;
- +
- + // XYZ: Lost the lock to check whether it was private.
- + lll_futex_timed_wait (futex, 2, &rt, private);
- + }
- + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
- +
- + return 0;
- +}
- +
- +
- +int
- +__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
- +{
- + int tid;
- +
- + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
- + return EINVAL;
- +
- + /* Repeat until thread terminated. */
- + while ((tid = *tidp) != 0)
- + {
- + struct timeval tv;
- + struct timespec rt;
- +
- + /* Get the current time. */
- + (void) gettimeofday (&tv, NULL);
- +
- + /* Compute relative timeout. */
- + rt.tv_sec = abstime->tv_sec - tv.tv_sec;
- + rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
- + if (rt.tv_nsec < 0)
- + {
- + rt.tv_nsec += 1000000000;
- + --rt.tv_sec;
- + }
- +
- + /* Already timed out? */
- + if (rt.tv_sec < 0)
- + return ETIMEDOUT;
- +
- + /* Wait until thread terminates. */
- + // XYZ: Lost the lock to check whether it was private.
- + if (lll_futex_timed_wait (tidp, tid, &rt, LLL_SHARED) == -ETIMEDOUT)
- + return ETIMEDOUT;
- + }
- +
- + return 0;
- +}
- +#endif
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,279 @@
- +/* Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#ifndef _LOWLEVELLOCK_H
- +#define _LOWLEVELLOCK_H 1
- +
- +#include <time.h>
- +#include <sys/param.h>
- +#include <bits/pthreadtypes.h>
- +#include <atomic.h>
- +#include <sysdep.h>
- +#include <bits/kernel-features.h>
- +
- +#define FUTEX_WAIT 0
- +#define FUTEX_WAKE 1
- +#define FUTEX_REQUEUE 3
- +#define FUTEX_CMP_REQUEUE 4
- +#define FUTEX_WAKE_OP 5
- +#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
- +#define FUTEX_LOCK_PI 6
- +#define FUTEX_UNLOCK_PI 7
- +#define FUTEX_TRYLOCK_PI 8
- +#define FUTEX_WAIT_BITSET 9
- +#define FUTEX_WAKE_BITSET 10
- +#define FUTEX_PRIVATE_FLAG 128
- +#define FUTEX_CLOCK_REALTIME 256
- +
- +#define FUTEX_BITSET_MATCH_ANY 0xffffffff
- +
- +/* Values for 'private' parameter of locking macros. Yes, the
- + definition seems to be backwards. But it is not. The bit will be
- + reversed before passing to the system call. */
- +#define LLL_PRIVATE 0
- +#define LLL_SHARED FUTEX_PRIVATE_FLAG
- +
- +
- +#if !defined NOT_IN_libc || defined IS_IN_rtld
- +/* In libc.so or ld.so all futexes are private. */
- +# ifdef __ASSUME_PRIVATE_FUTEX
- +# define __lll_private_flag(fl, private) \
- + ((fl) | FUTEX_PRIVATE_FLAG)
- +# else
- +# define __lll_private_flag(fl, private) \
- + ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex))
- +# endif
- +#else
- +# ifdef __ASSUME_PRIVATE_FUTEX
- +# define __lll_private_flag(fl, private) \
- + (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
- +# else
- +# define __lll_private_flag(fl, private) \
- + (__builtin_constant_p (private) \
- + ? ((private) == 0 \
- + ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \
- + : (fl)) \
- + : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \
- + & THREAD_GETMEM (THREAD_SELF, header.private_futex))))
- +# endif
- +#endif
- +
- +
- +#define lll_futex_wait(futexp, val, private) \
- + lll_futex_timed_wait(futexp, val, NULL, private)
- +
- +#define lll_futex_timed_wait(futexp, val, timespec, private) \
- + ({ \
- + INTERNAL_SYSCALL_DECL (__err); \
- + long int __ret; \
- + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
- + __lll_private_flag (FUTEX_WAIT, private), \
- + (val), (timespec)); \
- + __ret; \
- + })
- +
- +#define lll_futex_wake(futexp, nr, private) \
- + ({ \
- + INTERNAL_SYSCALL_DECL (__err); \
- + long int __ret; \
- + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
- + __lll_private_flag (FUTEX_WAKE, private), \
- + (nr), 0); \
- + __ret; \
- + })
- +
- +#define lll_robust_dead(futexv, private) \
- + do \
- + { \
- + int *__futexp = &(futexv); \
- + atomic_or (__futexp, FUTEX_OWNER_DIED); \
- + lll_futex_wake (__futexp, 1, private); \
- + } \
- + while (0)
- +
- +/* Returns non-zero if error happened, zero if success. */
- +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \
- + ({ \
- + INTERNAL_SYSCALL_DECL (__err); \
- + long int __ret; \
- + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
- + __lll_private_flag (FUTEX_CMP_REQUEUE, private),\
- + (nr_wake), (nr_move), (mutex), (val)); \
- + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
- + })
- +
- +
- +/* Returns non-zero if error happened, zero if success. */
- +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
- + ({ \
- + INTERNAL_SYSCALL_DECL (__err); \
- + long int __ret; \
- + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
- + __lll_private_flag (FUTEX_WAKE_OP, private), \
- + (nr_wake), (nr_wake2), (futexp2), \
- + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
- + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
- + })
- +
- +
- +#define lll_trylock(lock) \
- + atomic_compare_and_exchange_val_acq(&(lock), 1, 0)
- +
- +#define lll_cond_trylock(lock) \
- + atomic_compare_and_exchange_val_acq(&(lock), 2, 0)
- +
- +#define __lll_robust_trylock(futex, id) \
- + (atomic_compare_and_exchange_val_acq (futex, id, 0) != 0)
- +#define lll_robust_trylock(lock, id) \
- + __lll_robust_trylock (&(lock), id)
- +
- +extern void __lll_lock_wait_private (int *futex) attribute_hidden;
- +extern void __lll_lock_wait (int *futex, int private) attribute_hidden;
- +extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden;
- +
- +#define __lll_lock(futex, private) \
- + ((void) ({ \
- + int *__futex = (futex); \
- + if (unlikely(atomic_compare_and_exchange_val_acq (__futex, 1, 0))) \
- + { \
- + if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \
- + __lll_lock_wait_private (__futex); \
- + else \
- + __lll_lock_wait (__futex, private); \
- + } \
- + }))
- +#define lll_lock(futex, private) __lll_lock (&(futex), private)
- +
- +
- +#define __lll_robust_lock(futex, id, private) \
- + ({ \
- + int *__futex = (futex); \
- + int __val = 0; \
- + \
- + if (unlikely(atomic_compare_and_exchange_bool_acq (__futex, id, 0))) \
- + __val = __lll_robust_lock_wait (__futex, private); \
- + __val; \
- + })
- +#define lll_robust_lock(futex, id, private) \
- + __lll_robust_lock (&(futex), id, private)
- +
- +
- +#define __lll_cond_lock(futex, private) \
- + ((void) ({ \
- + int *__futex = (futex); \
- + if (unlikely(atomic_exchange_acq (__futex, 2))) \
- + __lll_lock_wait (__futex, private); \
- + }))
- +#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
- +
- +
- +#define lll_robust_cond_lock(futex, id, private) \
- + __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private)
- +
- +
- +extern int __lll_timedlock_wait (int *futex, const struct timespec *,
- + int private) attribute_hidden;
- +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
- + int private) attribute_hidden;
- +
- +#define __lll_timedlock(futex, abstime, private) \
- + ({ \
- + int *__futex = (futex); \
- + int __val = 0; \
- + \
- + if (unlikely(atomic_exchange_acq (__futex, 1))) \
- + __val = __lll_timedlock_wait (__futex, abstime, private); \
- + __val; \
- + })
- +#define lll_timedlock(futex, abstime, private) \
- + __lll_timedlock (&(futex), abstime, private)
- +
- +
- +#define __lll_robust_timedlock(futex, abstime, id, private) \
- + ({ \
- + int *__futex = (futex); \
- + int __val = 0; \
- + \
- + if (unlikely(atomic_compare_and_exchange_bool_acq (__futex, id, 0))) \
- + __val = __lll_robust_timedlock_wait (__futex, abstime, private); \
- + __val; \
- + })
- +#define lll_robust_timedlock(futex, abstime, id, private) \
- + __lll_robust_timedlock (&(futex), abstime, id, private)
- +
- +
- +#define __lll_unlock(futex, private) \
- + (void) \
- + ({ int *__futex = (futex); \
- + int __oldval = atomic_exchange_rel (__futex, 0); \
- + if (unlikely(__oldval > 1)) \
- + lll_futex_wake (__futex, 1, private); \
- + })
- +#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
- +
- +
- +#define __lll_robust_unlock(futex, private) \
- + (void) \
- + ({ int *__futex = (futex); \
- + int __oldval = atomic_exchange_rel (__futex, 0); \
- + if (unlikely(__oldval & FUTEX_WAITERS)) \
- + lll_futex_wake (__futex, 1, private); \
- + })
- +#define lll_robust_unlock(futex, private) \
- + __lll_robust_unlock(&(futex), private)
- +
- +
- +#define lll_islocked(futex) \
- + (futex != 0)
- +
- +
- +/* Our internal lock implementation is identical to the binary-compatible
- + mutex implementation. */
- +
- +/* Initializers for lock. */
- +#define LLL_LOCK_INITIALIZER (0)
- +#define LLL_LOCK_INITIALIZER_LOCKED (1)
- +
- +/* The states of a lock are:
- + 0 - untaken
- + 1 - taken by one user
- + >1 - taken by more users */
- +
- +/* The kernel notifies a process which uses CLONE_CLEARTID via futex
- + wakeup when the clone terminates. The memory location contains the
- + thread ID while the clone is running and is reset to zero
- + afterwards. */
- +#define lll_wait_tid(tid) \
- + do { \
- + __typeof (tid) __tid; \
- + while ((__tid = (tid)) != 0) \
- + lll_futex_wait (&(tid), __tid, LLL_SHARED);\
- + } while (0)
- +
- +extern int __lll_timedwait_tid (int *, const struct timespec *)
- + attribute_hidden;
- +
- +#define lll_timedwait_tid(tid, abstime) \
- + ({ \
- + int __res = 0; \
- + if ((tid) != 0) \
- + __res = __lll_timedwait_tid (&(tid), (abstime)); \
- + __res; \
- + })
- +
- +#endif /* lowlevellock.h */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,13 @@
- +# Makefile for uClibc NPTL
- +#
- +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org>
- +#
- +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +top_srcdir=../../../../../../../
- +top_builddir=../../../../../../../
- +all: objs
- +include $(top_builddir)Rules.mak
- +include Makefile.arch
- +include $(top_srcdir)Makerules
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,31 @@
- +# Makefile for uClibc NPTL
- +#
- +# Copyright (C) 2006 Steven J. Hill <sjhill@uclibc.org>
- +#
- +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- +#
- +
- +libpthread_linux_arch_SSRC = pt-vfork.S
- +libpthread_linux_arch_CSRC = pthread_once.c \
- + pt-__syscall_rt_sigaction.c pt-__syscall_error.c \
- + lowlevellock.c
- +
- +libc_linux_arch_CSRC = fork.c libc-lowlevellock.c
- +libc_linux_arch_SSRC = clone.S vfork.S
- +libc_linux_arch_SSRC-OMIT = waitpid.S
- +
- +CFLAGS += $(SSP_ALL_CFLAGS)
- +
- +CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
- +CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread
- +CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
- +CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
- +ASFLAGS-vfork.S = -DIS_IN_libc -DNOT_IN_libpthread
- +ASFLAGS-clone.S = -DIS_IN_libc -DNOT_IN_libpthread
- +ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread
- +
- +ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
- +CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
- +endif
- +CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread
- +CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-gettimeofday.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-gettimeofday.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-gettimeofday.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-gettimeofday.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,11 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <sys/syscall.h>
- +#include <sys/time.h>
- +
- +int gettimeofday (struct timeval *, struct timezone *) attribute_hidden;
- +_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz);
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pthread_once.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pthread_once.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pthread_once.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pthread_once.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,100 @@
- +/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include "pthreadP.h"
- +#include <lowlevellock.h>
- +
- +unsigned long int __fork_generation attribute_hidden;
- +
- +static void
- +clear_once_control (void *arg)
- +{
- + pthread_once_t *once_control = (pthread_once_t *) arg;
- +
- + *once_control = 0;
- + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
- +}
- +
- +int
- +attribute_protected
- +__pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
- +{
- + for (;;)
- + {
- + int oldval;
- + int newval;
- +
- + /* Pseudo code:
- + newval = __fork_generation | 1;
- + oldval = *once_control;
- + if ((oldval & 2) == 0)
- + *once_control = newval;
- + Do this atomically.
- + */
- + do
- + {
- + newval = __fork_generation | 1;
- + oldval = *once_control;
- + if (oldval & 2)
- + break;
- + } while (atomic_compare_and_exchange_val_acq (once_control, newval, oldval) != oldval);
- +
- + /* Check if the initializer has already been done. */
- + if ((oldval & 2) != 0)
- + return 0;
- +
- + /* Check if another thread already runs the initializer. */
- + if ((oldval & 1) == 0)
- + break;
- +
- + /* Check whether the initializer execution was interrupted by a fork. */
- + if (oldval != newval)
- + break;
- +
- + /* Same generation, some other thread was faster. Wait. */
- + lll_futex_wait (once_control, oldval, LLL_PRIVATE);
- + }
- +
- + /* This thread is the first here. Do the initialization.
- + Register a cleanup handler so that in case the thread gets
- + interrupted the initialization can be restarted. */
- + pthread_cleanup_push (clear_once_control, once_control);
- +
- + init_routine ();
- +
- + pthread_cleanup_pop (0);
- +
- + /* Say that the initialisation is done. */
- + *once_control = __fork_generation | 2;
- +
- + /* Wake up all other threads. */
- + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
- +
- + return 0;
- +}
- +weak_alias (__pthread_once, pthread_once)
- +strong_alias (__pthread_once, __pthread_once_internal)
- +
- +#if defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__PIC__)
- +/* When statically linked, if pthread_create is used, this file
- + will be brought in. The exception handling code in GCC assumes
- + that if pthread_create is available, so are these. */
- +const void *include_pthread_getspecific attribute_hidden = pthread_getspecific;
- +const void *include_pthread_setspecific attribute_hidden = pthread_setspecific;
- +const void *include_pthread_key_create attribute_hidden = pthread_key_create;
- +#endif
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,7 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <../../../../../../../libc/sysdeps/linux/metag/__syscall_error.c>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,7 @@
- +/*
- + * Copyright (C) 2013 Imagination Technologies Ltd.
- + *
- + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <../../../../../../../libc/sysdeps/linux/common/__syscall_rt_sigaction.c>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,51 @@
- +/* Copyright (C) 2005 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <tcb-offsets.h>
- +#include <asm/unistd.h>
- +
- +#ifdef __PIC__
- +#define __VFORK_METAG_LOAD_TP ___metag_load_tp@PLT
- +#else
- +#define __VFORK_METAG_LOAD_TP ___metag_load_tp
- +#endif
- +
- +/* Save the PID value. */
- +#define SAVE_PID \
- + SETL [A0StP++], D0FrT, D1RtP; \
- + CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
- + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
- + GETD D0FrT, [D0Re0 + #PID]; \
- + NEG D0FrT, D0FrT; \
- + SETD [D0Re0 + #PID], D0FrT; \
- + GETL D0FrT, D1RtP, [--A0StP];
- +
- +#define RESTORE_PID \
- + CMP D0Re0, #0; \
- + BEQ 1f; \
- + MSETL [A0StP++], D0Re0, D0FrT; \
- + CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
- + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
- + GETD D0FrT, [D0Re0 + #PID]; \
- + NEG D0FrT, D0FrT; \
- + SETD [D0Re0 + #PID], D0FrT; \
- + GETL D0FrT, D1RtP, [--A0StP]; \
- + GETL D0Re0, D1Re0, [--A0StP]; \
- +1:
- +
- +#include <../../../../../../../libc/sysdeps/linux/metag/vfork.S>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/sysdep-cancel.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,152 @@
- +/* Copyright (C) 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <tls.h>
- +#include <sysdep.h>
- +#ifndef __ASSEMBLER__
- +# include <pthreadP.h>
- +#endif
- +
- +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
- +
- +/* NOTE: We do mark syscalls with unwind annotations, for the benefit of
- + cancellation; but they're really only accurate at the point of the
- + syscall. The ARM unwind directives are not rich enough without adding
- + a custom personality function. */
- +
- +#ifdef __ASSEMBLER__
- +#undef ret
- +#define ret \
- + CMP D0Re0, #-4095; \
- + MOVLO PC, D1RtP; \
- + MOV D1Ar1, D0Re0; \
- + B SYSCALL_ERROR;
- +#endif /* __ASSEMBLER__ */
- +
- +# undef PSEUDO
- +# define PSEUDO(name, syscall_name, args) \
- + .section ".text"; \
- + .type ___##syscall_name##_nocancel,%function; \
- + .globl ___##syscall_name##_nocancel; \
- + ___##syscall_name##_nocancel: \
- + cfi_startproc; \
- + DO_CALL (syscall_name, args); \
- + MOV PC, D1RtP; \
- + cfi_endproc; \
- + .size ___##syscall_name##_nocancel,.-___##syscall_name##_nocancel; \
- + .globl _##name; \
- + .type _##name, @function; \
- +name##: \
- +_##name##: \
- + DOCARGS_##args; \
- + SINGLE_THREAD_P; \
- + UNDOCARGS_##args; \
- + BNE .Lpseudo_cancel; \
- + cfi_remember_state; \
- + DO_CALL (syscall_name, 0); \
- + ret \
- + cfi_restore_state; \
- + .Lpseudo_cancel: \
- + MSETL [A0StP++], D0FrT, D0.5; \
- + DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \
- + CENABLE; \
- + MOV D0FrT, D0Re0; /* put mask in safe place. */ \
- + UNDOCARGS_##args; /* restore syscall args. */ \
- + DO_CALL(syscall_name, 0); /* do the call. */ \
- + MOV D0.5, D0Re0; /* save syscall return value. */ \
- + MOV D1Ar1, D0FrT; /* get mask back. */ \
- + CDISABLE; \
- + MOV D0Re0, D0.5; /* retrieve return value. */ \
- + GETL D0.5, D1.5, [--A0StP]; \
- + GETL D0FrT, D1RtP, [--A0StP];
- +
- +# define DOCARGS_0
- +# define UNDOCARGS_0
- +
- +# define DOCARGS_1 \
- + SETL [A0StP++], D1Ar1, D0Ar2
- +# define UNDOCARGS_1 \
- + GETL D1Ar1, D0Ar2, [--A0StP]
- +
- +# define DOCARGS_2 DOCARGS_1
- +
- +# define UNDOCARGS_2 UNDOCARGS_2
- +
- +# define DOCARGS_3 \
- + MSETL [A0StP++], D1Ar1, D1Ar3
- +
- +# define UNDOCARGS_3 \
- + GETL D1Ar1, D0Ar2, [--A0StP]; \
- + GETL D1Ar3, D0Ar4, [--A0StP]
- +
- +# define DOCARGS_4 DOCARGS_3
- +# define UNDOCARGS_4 UNDOCARGS_3
- +
- +# define DOCARGS_5 \
- + MSETL [A0StP++], D1Ar1, D1Ar3, D1Ar5
- +# define UNDOCARGS_5 \
- + GETL D1Ar1, D0Ar2, [--A0StP]; \
- + GETL D1Ar3, D0Ar4, [--A0StP]; \
- + GETL D1Ar5, D0Ar6, [--A0StP]
- +
- +# define DOCARGS_6 DOCARGS_5
- +# define UNDOCARGS_6 UNDOCARGS_5
- +
- +# ifdef IS_IN_libpthread
- +# define CENABLE CALLR D1RtP, ___pthread_enable_asynccancel@PLT
- +# define CDISABLE CALLR D1RtP, ___pthread_disable_asynccancel@PLT
- +# define __local_multiple_threads __pthread_multiple_threads
- +# elif !defined NOT_IN_libc
- +# define CENABLE CALLR D1RtP, ___libc_enable_asynccancel@PLT
- +# define CDISABLE CALLR D1RtP, ___libc_disable_asynccancel@PLT
- +# define __local_multiple_threads __libc_multiple_threads
- +# elif defined IS_IN_librt
- +# define CENABLE CALLR D1RtP, ___librt_enable_asynccancel@PLT
- +# define CDISABLE CALLR D1RtP, ___librt_disable_asynccancel@PLT
- +# else
- +# error Unsupported library
- +# endif
- +
- +#ifndef __ASSEMBLER__
- +# define SINGLE_THREAD_P \
- + likely(THREAD_GETMEM (THREAD_SELF, \
- + header.multiple_threads) == 0)
- +#else
- +# define SINGLE_THREAD_P \
- + SETL [A0StP++], D0FrT, D1RtP; \
- + CALLR D1RtP, ___metag_load_tp@PLT; \
- + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
- + GETD D0Re0, [D0Re0 + #MULTIPLE_THREADS_OFFSET]; \
- + CMP D0Re0, #0; \
- + GETL D0FrT, D1RtP, [--A0StP]
- +#endif
- +
- +
- +#elif !defined __ASSEMBLER__
- +
- +/* For rtld, et cetera. */
- +# define SINGLE_THREAD_P 1
- +# define NO_CANCELLATION 1
- +
- +#endif
- +
- +#ifndef __ASSEMBLER__
- +# define RTLD_SINGLE_THREAD_P \
- + likely(THREAD_GETMEM (THREAD_SELF, \
- + header.multiple_threads) == 0)
- +#endif
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/vfork.S 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/metag/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,56 @@
- +/* Copyright (C) 2005 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <tcb-offsets.h>
- +#include <asm/unistd.h>
- +
- +#ifdef __PIC__
- +#define __VFORK_METAG_LOAD_TP ___metag_load_tp@PLT
- +#else
- +#define __VFORK_METAG_LOAD_TP ___metag_load_tp
- +#endif
- +
- +/* Save the PID value. */
- +#define SAVE_PID \
- + SETL [A0StP++], D0FrT, D1RtP; \
- + CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
- + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
- + GETD D0FrT, [D0Re0 + #PID]; \
- + NEGS D0FrT, D0FrT; \
- + BNZ 1f; \
- + MOVT D0FrT, #0x8000; \
- +1: SETD [D0Re0 + #PID], D0FrT; \
- + GETL D0FrT, D1RtP, [--A0StP];
- +
- +#define RESTORE_PID \
- + CMP D0Re0, #0; \
- + BEQ 1f; \
- + MSETL [A0StP++], D0Re0, D0FrT; \
- + CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
- + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
- + GETD D0FrT, [D0Re0 + #PID]; \
- + NEG D0FrT, D0FrT; \
- + MOVT D1Re0, #0x8000; \
- + CMP D0FrT, D1Re0; \
- + XOREQ D0FrT, D0FrT, D0FrT; \
- + SETD [D0Re0 + #PID], D0FrT; \
- + GETL D0FrT, D1RtP, [--A0StP]; \
- + GETL D0Re0, D1Re0, [--A0StP]; \
- +1:
- +
- +#include <../../../../../../../libc/sysdeps/linux/metag/vfork.S>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/semaphore.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/semaphore.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SEMAPHORE_H
- # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/createthread.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/createthread.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/createthread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/createthread.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Value passed to 'clone' for initialization of the thread register. */
- #define TLS_VALUE ((void *) (pd) \
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LOWLEVELLOCK_H
- #define _LOWLEVELLOCK_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <features.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,18 +14,26 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/types.h>
- #include <sysdep.h>
-
- /* Uncancelable open. */
- +#if defined __NR_openat && !defined __NR_open
- +#define open_not_cancel(name, flags, mode) \
- + INLINE_SYSCALL (openat, 4, AT_FDCWD, (const char *) (name), \
- + (flags), (mode))
- +#define open_not_cancel_2(name, flags) \
- + INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), \
- + (flags))
- +#else
- #define open_not_cancel(name, flags, mode) \
- INLINE_SYSCALL (open, 3, (const char *) (name), (flags), (mode))
- #define open_not_cancel_2(name, flags) \
- INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
- +#endif
-
- /* Uncancelable openat. */
- #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SEMAPHORE_H
- # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/createthread.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/createthread.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/createthread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/createthread.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Value passed to 'clone' for initialization of the thread register. */
- #define TLS_VALUE ((void *) (pd) \
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LOWLEVELLOCK_H
- #define _LOWLEVELLOCK_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #define _ERRNO_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
- - 02110-1301 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #define _ERRNO_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #define _ERRNO_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
- - 02110-1301 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #define _ERRNO_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/sem_post.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/sem_post.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/sem_post.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/sem_post.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- @@ -25,7 +24,7 @@
- #include <semaphore.h>
-
- int
- -__new_sem_post (sem_t *sem)
- +sem_post (sem_t *sem)
- {
- struct new_sem *isem = (struct new_sem *) sem;
-
- @@ -44,4 +43,3 @@
- }
- return 0;
- }
- -weak_alias(__new_sem_post, sem_post)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,17 +13,16 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
-
- -extern int __libc_fork (void);
- -
- -pid_t
- +#if 0
- +static pid_t
- __fork (void)
- {
- return __libc_fork ();
- }
- strong_alias (__fork, fork)
- +#endif
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <limits.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <alloca.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_yield.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_yield.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_yield.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_yield.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <sched.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pt-raise.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pt-raise.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pt-raise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/pt-raise.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <limits.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_post.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sem_post.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_post.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sem_post.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- @@ -26,7 +25,7 @@
- #include <tls.h>
-
- int
- -__new_sem_post (sem_t *sem)
- +sem_post (sem_t *sem)
- {
- struct new_sem *isem = (struct new_sem *) sem;
-
- @@ -55,4 +54,3 @@
- }
- return 0;
- }
- -weak_alias(__new_sem_post, sem_post)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_trywait.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sem_trywait.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_trywait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sem_trywait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- @@ -26,7 +25,7 @@
-
-
- int
- -__new_sem_trywait (sem_t *sem)
- +sem_trywait (sem_t *sem)
- {
- int *futex = (int *) sem;
- int val;
- @@ -41,4 +40,3 @@
- __set_errno (EAGAIN);
- return -1;
- }
- -weak_alias(__new_sem_trywait, sem_trywait)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_wait.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sem_wait.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_wait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sem_wait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- @@ -38,7 +37,7 @@
-
-
- int
- -__new_sem_wait (sem_t *sem)
- +sem_wait (sem_t *sem)
- {
- struct new_sem *isem = (struct new_sem *) sem;
- int err;
- @@ -81,4 +80,3 @@
-
- return err;
- }
- -weak_alias(__new_sem_wait, sem_wait)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SEMAPHORE_H
- # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/createthread.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/createthread.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/createthread.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/createthread.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Value passed to 'clone' for initialization of the thread register. */
- #define TLS_VALUE (pd + 1)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/fork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/fork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/fork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sched.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,8 +12,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "lowlevellock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifdef __ASSEMBLER__
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LOWLEVELLOCK_H
- #define _LOWLEVELLOCK_H 1
- @@ -396,9 +395,9 @@
-
- #define lll_wait_tid(tid) \
- do { \
- - __typeof (tid) *__tid = &(tid); \
- - while (*__tid != 0) \
- - lll_futex_wait (__tid, *__tid, LLL_SHARED); \
- + __typeof (tid) __tid; \
- + while ((__tid = (tid)) != 0) \
- + lll_futex_wait (&(tid), __tid, LLL_SHARED); \
- } while (0)
-
- extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unwindbuf.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c 2014-02-03 12:32:57.000000000 +0100
- @@ -23,8 +23,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #define _ERRNO_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- @@ -25,10 +24,10 @@
-
- .text
-
- - .globl __new_sem_post
- - .type __new_sem_post,@function
- + .globl sem_post
- + .type sem_post,@function
- .align 5
- -__new_sem_post:
- +sem_post:
- mov.l @(VALUE,r4), r2
- 0:
- mov.l .Lmax, r1
- @@ -106,5 +105,4 @@
- .Lerrloc3:
- .long __errno_location@PLT-(.Lerrloc3b-.)
- #endif
- - .size __new_sem_post,.-__new_sem_post
- - weak_alias(__new_sem_post, sem_post)
- + .size sem_post,.-sem_post
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- @@ -24,10 +23,10 @@
-
- .text
-
- - .globl __new_sem_trywait
- - .type __new_sem_trywait,@function
- + .globl sem_trywait
- + .type sem_trywait,@function
- .align 5
- -__new_sem_trywait:
- +sem_trywait:
- mov.l r12, @-r15
- mov.l r8, @-r15
- sts.l pr, @-r15
- @@ -86,5 +85,4 @@
- .Lerrloc1:
- .long __errno_location@PLT-(.Lerrloc1b-.)
- #endif
- - .size __new_sem_trywait,.-__new_sem_trywait
- - weak_alias(__new_sem_trywait, sem_trywait)
- + .size sem_trywait,.-sem_trywait
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- @@ -30,10 +29,10 @@
-
- .text
-
- - .globl __new_sem_wait
- - .type __new_sem_wait,@function
- + .globl sem_wait
- + .type sem_wait,@function
- .align 5
- -__new_sem_wait:
- +sem_wait:
- .LSTARTCODE:
- mov.l r8, @-r15
- .Lpush_r8:
- @@ -161,8 +160,7 @@
- .long __pthread_enable_asynccancel-.Lenable0b
- .Ldisable0:
- .long __pthread_disable_asynccancel-.Ldisable0b
- - .size __new_sem_wait,.-__new_sem_wait
- - weak_alias(__new_sem_wait, sem_wait)
- + .size sem_wait,.-sem_wait
-
-
- .type sem_wait_cleanup,@function
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/smp.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/smp.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/smp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/smp.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- static inline int
- is_smp_system (void)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <tls.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #define _ERRNO_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
- #include <errno.h>
- @@ -67,7 +66,7 @@
-
-
- /* Return any pending signal or wait for one for the given time. */
- -int attribute_hidden
- +int
- __sigtimedwait (const sigset_t *set, siginfo_t *info,
- const struct timespec *timeout)
- {
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/smp.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/smp.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/smp.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/smp.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* Test whether the machine has more than one processor. This is not the
- best test but good enough. More complicated tests would require `malloc'
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,8 +14,7 @@
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + see <http://www.gnu.org/licenses/>. */
-
- /* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SEMAPHORE_H
- # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/fork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/fork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/fork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sched.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/libc-lowlevellock.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/libc-lowlevellock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/libc-lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/libc-lowlevellock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* No difference to lowlevellock.c, except we lose a couple of functions. */
- #include "lowlevellock.c"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Libr \ary; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #ifndef _LOWLEVELLOCK_H
- #define _LOWLEVELLOCK_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include "pthreadP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "pthreadP.h"
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_init.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_init.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <string.h>
- @@ -26,7 +25,7 @@
-
-
- int
- -__new_sem_init (sem, pshared, value)
- +sem_init (sem, pshared, value)
- sem_t *sem;
- int pshared;
- unsigned int value;
- @@ -53,5 +52,3 @@
-
- return 0;
- }
- -weak_alias(__new_sem_init, sem_init)
- -
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tcb-offsets.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- @@ -25,7 +24,7 @@
- #include <semaphore.h>
-
- int
- -__new_sem_post (sem_t *sem)
- +sem_post (sem_t *sem)
- {
- struct sparc_new_sem *isem = (struct sparc_new_sem *) sem;
- int nr;
- @@ -51,5 +50,3 @@
- }
- return 0;
- }
- -weak_alias(__new_sem_post, sem_post)
- -
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- @@ -26,7 +25,7 @@
-
-
- int
- -__new_sem_trywait (sem_t *sem)
- +sem_trywait (sem_t *sem)
- {
- struct sparc_old_sem *isem = (struct sparc_old_sem *) sem;
- int val;
- @@ -50,5 +49,3 @@
- __set_errno (EAGAIN);
- return -1;
- }
- -weak_alias(__new_sem_trywait, sem_trywait)
- -
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <sysdep.h>
- @@ -45,7 +44,7 @@
-
-
- int
- -__new_sem_wait (sem_t *sem)
- +sem_wait (sem_t *sem)
- {
- struct sparc_new_sem *isem = (struct sparc_new_sem *) sem;
- int err;
- @@ -123,5 +122,3 @@
-
- return err;
- }
- -weak_alias(__new_sem_wait, sem_wait)
- -
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <tls.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tcb-offsets.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tcb-offsets.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tcb-offsets.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <time.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <setjmp.h>
- @@ -49,7 +48,7 @@
- surprising for user code, although valid. We unblock all
- signals. */
- sigset_t ss;
- - sigemptyset (&ss);
- + __sigemptyset (&ss);
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8);
-
- @@ -69,13 +68,13 @@
-
-
- /* Helper function to support starting threads for SIGEV_THREAD. */
- -static void *
- +static attribute_noreturn void *
- timer_helper_thread (void *arg)
- {
- /* Wait for the SIGTIMER signal, allowing the setXid signal, and
- none else. */
- sigset_t ss;
- - sigemptyset (&ss);
- + __sigemptyset (&ss);
- __sigaddset (&ss, SIGTIMER);
-
- /* Endless loop of waiting for signals. The loop is only ended when
- @@ -175,7 +174,7 @@
- sigset_t ss;
- sigset_t oss;
- sigfillset (&ss);
- - /*__sigaddset (&ss, SIGCANCEL); - already done by sigfillset */
- + __sigaddset (&ss, SIGCANCEL);
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8);
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _SEMAPHORE_H
- # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tcb-offsets.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/compat-timer.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/compat-timer.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/compat-timer.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/compat-timer.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <signal.h>
- #include <time.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sched.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __pthread_enable_asynccancel __libc_enable_asynccancel
- #define __pthread_disable_asynccancel __libc_disable_asynccancel
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,8 +13,7 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "lowlevellock.S"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define __pthread_enable_asynccancel __librt_enable_asynccancel
- #define __pthread_disable_asynccancel __librt_disable_asynccancel
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _LOWLEVELLOCK_H
- #define _LOWLEVELLOCK_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <pthread-errnos.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <bits/kernel-features.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
- --- 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
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <tcb-offsets.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <bits/kernel-features.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <lowlevellock.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* We want an #include_next, but we are the main source file.
- So, #include ourselves and in that incarnation we can use #include_next. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/dl-tls.h uClibc/libpthread/nptl/sysdeps/x86_64/dl-tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/x86_64/dl-tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
-
- /* Type used for the representation of TLS information in the GOT. */
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/jmpbuf-unwind.h uClibc/libpthread/nptl/sysdeps/x86_64/jmpbuf-unwind.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/x86_64/jmpbuf-unwind.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdint.h>
- @@ -26,6 +25,3 @@
-
- #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_RSP] - (_adj))
- -
- -/* We use the normal lobngjmp for unwinding. */
- -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthreaddef.h uClibc/libpthread/nptl/sysdeps/x86_64/pthreaddef.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/x86_64/pthreaddef.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Default stack size. */
- #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthread_spin_trylock.S uClibc/libpthread/nptl/sysdeps/x86_64/pthread_spin_trylock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/x86_64/pthread_spin_trylock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread-errnos.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthread_spin_unlock.S uClibc/libpthread/nptl/sysdeps/x86_64/pthread_spin_unlock.S
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthread_spin_unlock.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/x86_64/pthread_spin_unlock.S 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- .globl pthread_spin_unlock
- .type pthread_spin_unlock,@function
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/tls.h uClibc/libpthread/nptl/sysdeps/x86_64/tls.h
- --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/tls.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/sysdeps/x86_64/tls.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _TLS_H
- #define _TLS_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/unwind.c uClibc/libpthread/nptl/unwind.c
- --- uClibc-0.9.33.2/libpthread/nptl/unwind.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/unwind.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <stdlib.h>
- @@ -99,7 +98,7 @@
- }
-
-
- -static void
- +static attribute_noreturn void
- unwind_cleanup (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc)
- {
- /* When we get here a C++ catch block didn't rethrow the object. We
- @@ -115,7 +114,7 @@
-
-
- void
- -attribute_protected
- +/*does not apply due to hidden_proto(): attribute_protected*/
- __cleanup_fct_attribute __attribute ((noreturn))
- #if !defined SHARED && !defined IS_IN_libpthread
- weak_function
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/vars.c uClibc/libpthread/nptl/vars.c
- --- uClibc-0.9.33.2/libpthread/nptl/vars.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/vars.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthreadP.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl/version.c uClibc/libpthread/nptl/version.c
- --- uClibc-0.9.33.2/libpthread/nptl/version.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl/version.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
- #include <sysdep.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/db_info.c uClibc/libpthread/nptl_db/db_info.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/db_info.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/db_info.c 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <tls.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/fetch-value.c uClibc/libpthread/nptl_db/fetch-value.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/fetch-value.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/fetch-value.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <byteswap.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/proc_service.h uClibc/libpthread/nptl_db/proc_service.h
- --- uClibc-0.9.33.2/libpthread/nptl_db/proc_service.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/proc_service.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* The definitions in this file must correspond to those in the debugger. */
- #include <sys/procfs.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/structs.def uClibc/libpthread/nptl_db/structs.def
- --- uClibc-0.9.33.2/libpthread/nptl_db/structs.def 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/structs.def 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef DB_STRUCT_ARRAY_FIELD
- # define DB_STRUCT_ARRAY_FIELD(type, field) DB_STRUCT_FIELD (type, field)
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_init.c uClibc/libpthread/nptl_db/td_init.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_init.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_log.c uClibc/libpthread/nptl_db/td_log.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_log.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_log.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_symbol_list.c uClibc/libpthread/nptl_db/td_symbol_list.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_symbol_list.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_symbol_list.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <assert.h>
- #ifndef __UCLIBC__
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_clear_event.c uClibc/libpthread/nptl_db/td_ta_clear_event.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_clear_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_clear_event.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_delete.c uClibc/libpthread/nptl_db/td_ta_delete.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_delete.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_delete.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_enable_stats.c uClibc/libpthread/nptl_db/td_ta_enable_stats.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_enable_stats.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_enable_stats.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_event_addr.c uClibc/libpthread/nptl_db/td_ta_event_addr.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_event_addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_event_addr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_event_getmsg.c uClibc/libpthread/nptl_db/td_ta_event_getmsg.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_event_getmsg.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_nthreads.c uClibc/libpthread/nptl_db/td_ta_get_nthreads.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_nthreads.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_get_nthreads.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_ph.c uClibc/libpthread/nptl_db/td_ta_get_ph.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_ph.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_get_ph.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_stats.c uClibc/libpthread/nptl_db/td_ta_get_stats.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_stats.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_get_stats.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_map_id2thr.c uClibc/libpthread/nptl_db/td_ta_map_id2thr.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_map_id2thr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_map_id2thr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_map_lwp2thr.c uClibc/libpthread/nptl_db/td_ta_map_lwp2thr.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_map_lwp2thr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_map_lwp2thr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_new.c uClibc/libpthread/nptl_db/td_ta_new.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_new.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_new.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_reset_stats.c uClibc/libpthread/nptl_db/td_ta_reset_stats.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_reset_stats.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_reset_stats.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_setconcurrency.c uClibc/libpthread/nptl_db/td_ta_setconcurrency.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_setconcurrency.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_setconcurrency.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_set_event.c uClibc/libpthread/nptl_db/td_ta_set_event.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_set_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_set_event.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_thr_iter.c uClibc/libpthread/nptl_db/td_ta_thr_iter.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_thr_iter.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_thr_iter.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_tsd_iter.c uClibc/libpthread/nptl_db/td_ta_tsd_iter.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_tsd_iter.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_ta_tsd_iter.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <alloca.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_clear_event.c uClibc/libpthread/nptl_db/td_thr_clear_event.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_clear_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_clear_event.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_dbresume.c uClibc/libpthread/nptl_db/td_thr_dbresume.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_dbresume.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_dbresume.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_dbsuspend.c uClibc/libpthread/nptl_db/td_thr_dbsuspend.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_dbsuspend.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_dbsuspend.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_event_enable.c uClibc/libpthread/nptl_db/td_thr_event_enable.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_event_enable.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_event_enable.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_event_getmsg.c uClibc/libpthread/nptl_db/td_thr_event_getmsg.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_event_getmsg.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <assert.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getfpregs.c uClibc/libpthread/nptl_db/td_thr_getfpregs.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getfpregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_getfpregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getgregs.c uClibc/libpthread/nptl_db/td_thr_getgregs.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getgregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_getgregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_get_info.c uClibc/libpthread/nptl_db/td_thr_get_info.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_get_info.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_get_info.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getxregs.c uClibc/libpthread/nptl_db/td_thr_getxregs.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getxregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_getxregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getxregsize.c uClibc/libpthread/nptl_db/td_thr_getxregsize.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getxregsize.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_getxregsize.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_set_event.c uClibc/libpthread/nptl_db/td_thr_set_event.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_set_event.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_set_event.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stddef.h>
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setfpregs.c uClibc/libpthread/nptl_db/td_thr_setfpregs.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setfpregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_setfpregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setgregs.c uClibc/libpthread/nptl_db/td_thr_setgregs.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setgregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_setgregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setprio.c uClibc/libpthread/nptl_db/td_thr_setprio.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setprio.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_setprio.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setsigpending.c uClibc/libpthread/nptl_db/td_thr_setsigpending.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setsigpending.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_setsigpending.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setxregs.c uClibc/libpthread/nptl_db/td_thr_setxregs.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setxregs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_setxregs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_sigsetmask.c uClibc/libpthread/nptl_db/td_thr_sigsetmask.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_sigsetmask.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_sigsetmask.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tlsbase.c uClibc/libpthread/nptl_db/td_thr_tlsbase.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tlsbase.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_tlsbase.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tls_get_addr.c uClibc/libpthread/nptl_db/td_thr_tls_get_addr.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tls_get_addr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_tls_get_addr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <link.h>
- #include "thread_dbP.h"
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tsd.c uClibc/libpthread/nptl_db/td_thr_tsd.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tsd.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_tsd.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
-
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_validate.c uClibc/libpthread/nptl_db/td_thr_validate.c
- --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_validate.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/td_thr_validate.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include "thread_dbP.h"
- #include <stdbool.h>
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/thread_db.h uClibc/libpthread/nptl_db/thread_db.h
- --- uClibc-0.9.33.2/libpthread/nptl_db/thread_db.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/thread_db.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _THREAD_DB_H
- #define _THREAD_DB_H 1
- diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/thread_dbP.h uClibc/libpthread/nptl_db/thread_dbP.h
- --- uClibc-0.9.33.2/libpthread/nptl_db/thread_dbP.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libpthread/nptl_db/thread_dbP.h 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _THREAD_DBP_H
- #define _THREAD_DBP_H 1
- diff -Nur uClibc-0.9.33.2/libresolv/resolv.c uClibc/libresolv/resolv.c
- --- uClibc-0.9.33.2/libresolv/resolv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libresolv/resolv.c 2014-02-03 12:32:57.000000000 +0100
- @@ -7,8 +7,6 @@
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
- -#include <features.h>
- -
- void __stub1(void);
- void __stub1(void)
- {
- diff -Nur uClibc-0.9.33.2/librt/clock_getcpuclockid.c uClibc/librt/clock_getcpuclockid.c
- --- uClibc-0.9.33.2/librt/clock_getcpuclockid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/librt/clock_getcpuclockid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <time.h>
- diff -Nur uClibc-0.9.33.2/librt/clock_gettime.c uClibc/librt/clock_gettime.c
- --- uClibc-0.9.33.2/librt/clock_gettime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/librt/clock_gettime.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sysdep.h>
- #include <errno.h>
- @@ -186,7 +185,6 @@
- #include <stdint.h>
- #include <time.h>
- #include <sys/time.h>
- -#include <libc-internal.h>
- #include <ldsodefs.h>
-
-
- diff -Nur uClibc-0.9.33.2/librt/clock_nanosleep.c uClibc/librt/clock_nanosleep.c
- --- uClibc-0.9.33.2/librt/clock_nanosleep.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/librt/clock_nanosleep.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <time.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/librt/Makefile.in uClibc/librt/Makefile.in
- --- uClibc-0.9.33.2/librt/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/librt/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -28,11 +28,20 @@
- ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- librt_filter_SRC += mq_notify.c timer_create.c timer_delete.c \
- timer_getoverr.c timer_gettime.c timer_settime.c
- +# these should really be guarded by ADVANCED_REALTIME, we use them in mq_send.c/mq_receive.c
- librt_SSRC := $(wildcard $(librt_DIR)/*.S)
- else
- librt_filter_SRC += clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c
- librt_SSRC :=
- endif
- +
- +librt_filter_SRC += $(if $(UCLIBC_HAS_ADVANCED_REALTIME),, \
- + spawn.c \
- + spawn_faction_addclose.c \
- + spawn_faction_adddup2.c \
- + spawn_faction_addopen.c \
- + spawn_faction_init.c)
- +
- librt_SRC := $(filter-out $(librt_filter_SRC),$(librt_SRC))
-
- librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC))
- diff -Nur uClibc-0.9.33.2/librt/mq_receive.c uClibc/librt/mq_receive.c
- --- uClibc-0.9.33.2/librt/mq_receive.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/librt/mq_receive.c 2014-02-03 12:32:57.000000000 +0100
- @@ -10,13 +10,18 @@
- #include <mqueue.h>
-
- #ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +# ifndef __UCLIBC_HAS_ADVANCED_REALTIME__
- +extern ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
- + unsigned int *msg_prio,
- + const struct timespec *abs_timeout);
- +# endif
- librt_hidden_proto(mq_timedreceive)
- #else
-
- # define __NR___syscall_mq_timedreceive __NR_mq_timedreceive
- static _syscall5(int, __syscall_mq_timedreceive, int, mqdes,
- char *, msg_ptr, size_t, msg_len, unsigned int *,
- - msg_prio, const void *, abs_timeout);
- + msg_prio, const void *, abs_timeout)
-
- # ifdef __UCLIBC_HAS_ADVANCED_REALTIME__
- /*
- diff -Nur uClibc-0.9.33.2/librt/mq_send.c uClibc/librt/mq_send.c
- --- uClibc-0.9.33.2/librt/mq_send.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/librt/mq_send.c 2014-02-03 12:32:57.000000000 +0100
- @@ -10,13 +10,17 @@
- #include <mqueue.h>
-
- #ifdef __UCLIBC_HAS_THREADS_NATIVE__
- +# ifndef __UCLIBC_HAS_ADVANCED_REALTIME__
- +extern int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
- + unsigned int msg_prio, const struct timespec *abs_timeout);
- +# endif
- librt_hidden_proto(mq_timedsend)
- #else
-
- # define __NR___syscall_mq_timedsend __NR_mq_timedsend
- static _syscall5(int, __syscall_mq_timedsend, int, mqdes,
- const char *, msg_ptr, size_t, msg_len, unsigned int,
- - msg_prio, const void *, abs_timeout);
- + msg_prio, const void *, abs_timeout)
-
- # ifdef __UCLIBC_HAS_ADVANCED_REALTIME__
- /*
- diff -Nur uClibc-0.9.33.2/librt/mq_timedreceive.S uClibc/librt/mq_timedreceive.S
- --- uClibc-0.9.33.2/librt/mq_timedreceive.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/librt/mq_timedreceive.S 2014-02-03 12:32:57.000000000 +0100
- @@ -2,9 +2,7 @@
- #ifndef __NR_mq_timedreceive
- #error Missing definition of NR_timedreceive needed for cancellation.
- #endif
- -PSEUDO (__mq_timedreceive, mq_timedreceive, 5)
- -ret
- -PSEUDO_END(__mq_timedreceive)
- -librt_hidden_def (__mq_timedreceive)
- -weak_alias (__mq_timedreceive, mq_timedreceive)
- -librt_hidden_weak (mq_timedreceive)
- +PSEUDO(mq_timedreceive, mq_timedreceive, 5)
- +ret_ERRVAL
- +PSEUDO_END(mq_timedreceive)
- +librt_hidden_def(mq_timedreceive)
- diff -Nur uClibc-0.9.33.2/librt/mq_timedsend.S uClibc/librt/mq_timedsend.S
- --- uClibc-0.9.33.2/librt/mq_timedsend.S 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/librt/mq_timedsend.S 2014-02-03 12:32:57.000000000 +0100
- @@ -2,9 +2,7 @@
- #ifndef __NR_mq_timedsend
- #error Missing definition of NR_timedsend needed for cancellation.
- #endif
- -PSEUDO (__mq_timedsend, mq_timedsend, 5)
- -ret
- -PSEUDO_END(__mq_timedsend)
- -librt_hidden_def (__mq_timedsend)
- -weak_alias (__mq_timedsend, mq_timedsend)
- -librt_hidden_weak (mq_timedsend)
- +PSEUDO(mq_timedsend, mq_timedsend, 5)
- +ret_ERRVAL
- +PSEUDO_END(mq_timedsend)
- +librt_hidden_def(mq_timedsend)
- diff -Nur uClibc-0.9.33.2/librt/spawn.c uClibc/librt/spawn.c
- --- uClibc-0.9.33.2/librt/spawn.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/librt/spawn.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,266 @@
- +/* Copyright (C) 2000, 2011 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <errno.h>
- +#include <alloca.h>
- +#include <unistd.h>
- +#include <signal.h>
- +#include <stdbool.h>
- +#include <fcntl.h>
- +
- +#include <sys/resource.h>
- +#include <not-cancel.h>
- +
- +#include <spawn.h>
- +#include "spawn_int.h"
- +
- +/* The Unix standard contains a long explanation of the way to signal
- + an error after the fork() was successful. Since no new wait status
- + was wanted there is no way to signal an error using one of the
- + available methods. The committee chose to signal an error by a
- + normal program exit with the exit code 127. */
- +#define SPAWN_ERROR 127
- +
- +/* Execute file actions.
- + * Returns true on error.
- + */
- +inline static bool execute_file_actions(const posix_spawn_file_actions_t *fa)
- +{
- + struct rlimit64 fdlimit;
- + bool have_fdlimit = false;
- + int cnt;
- +
- + for (cnt = 0; cnt < fa->__used; ++cnt) {
- + struct __spawn_action *action = &fa->__actions[cnt];
- +
- + switch (action->tag) {
- + case spawn_do_close:
- + if (close_not_cancel(action->action.close_action.fd) != 0) {
- + if (!have_fdlimit) {
- + getrlimit64(RLIMIT_NOFILE, &fdlimit);
- + have_fdlimit = true;
- + }
- +
- + /* Only signal errors for file descriptors out of range. */
- + if (0 > action->action.close_action.fd
- + || action->action.close_action.fd >= fdlimit.rlim_cur)
- + /* Signal the error. */
- + return true;
- + }
- + break;
- +
- + case spawn_do_open:;
- + int new_fd = open_not_cancel(action->action.open_action.path,
- + action->action.open_action.oflag
- + | O_LARGEFILE,
- + action->action.open_action.mode);
- +
- + if (new_fd == -1)
- + return true;
- +
- + /* Make sure the desired file descriptor is used. */
- + if (new_fd != action->action.open_action.fd) {
- + if (dup2(new_fd, action->action.open_action.fd)
- + != action->action.open_action.fd)
- + return true;
- +
- + if (close_not_cancel(new_fd) != 0)
- + return true;
- + }
- + break;
- +
- + case spawn_do_dup2:
- + if (dup2(action->action.dup2_action.fd,
- + action->action.dup2_action.newfd)
- + != action->action.dup2_action.newfd)
- + return true;
- + break;
- + }
- + }
- +
- + return false;
- +}
- +
- +#define DANGEROUS (POSIX_SPAWN_SETSIGMASK \
- + | POSIX_SPAWN_SETSIGDEF \
- + | POSIX_SPAWN_SETSCHEDPARAM \
- + | POSIX_SPAWN_SETSCHEDULER \
- + | POSIX_SPAWN_SETPGROUP \
- + | POSIX_SPAWN_RESETIDS)
- +inline static bool is_vfork_safe(short int flags)
- +{
- + return ((flags & POSIX_SPAWN_USEVFORK) || !(flags & DANGEROUS));
- +}
- +
- +
- +/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
- + Before running the process perform the actions described in FILE-ACTIONS. */
- +static int
- +__spawni(pid_t *pid, const char *file,
- + const posix_spawn_file_actions_t *fa,
- + const posix_spawnattr_t *attrp, char *const argv[],
- + char *const envp[], const char *path)
- +{
- + short int flags = attrp ? attrp->__flags : 0;
- +
- + pid_t new_pid;
- + if (is_vfork_safe(flags) && !fa)
- + new_pid = vfork();
- + else {
- +#ifdef __ARCH_USE_MMU__
- + new_pid = fork();
- +#else
- + return ENOSYS;
- +#endif
- + }
- +
- + if (new_pid) {
- + if (new_pid < 0)
- + return errno;
- +
- + if (pid)
- + *pid = new_pid;
- +
- + return 0;
- + }
- +
- + if (flags & POSIX_SPAWN_SETSIGMASK) {
- + if (sigprocmask(SIG_SETMASK, &attrp->__ss, NULL) != 0)
- + goto error;
- + }
- +
- + if (flags & POSIX_SPAWN_SETSIGDEF) {
- + /* We have to iterate over all signals. This could possibly be
- + done better but it requires system specific solutions since
- + the sigset_t data type can be very different on different
- + architectures. */
- + struct sigaction sa;
- + int sig;
- +
- + memset(&sa, 0, sizeof(sa));
- + sa.sa_handler = SIG_DFL;
- +
- + for (sig = 1; sig <= _NSIG; ++sig) {
- + if (sigismember(&attrp->__sd, sig)) {
- + if (sigaction(sig, &sa, NULL) != 0)
- + goto error;
- + }
- + }
- + }
- +
- + if (flags & POSIX_SPAWN_SETSCHEDULER) {
- + if (sched_setscheduler(0, attrp->__policy, &attrp->__sp) == -1)
- + goto error;
- + } else if (flags & POSIX_SPAWN_SETSCHEDPARAM) {
- + if (sched_setparam(0, &attrp->__sp) == -1)
- + goto error;
- + }
- +
- + if (flags & POSIX_SPAWN_SETPGROUP) {
- + if (setpgid(0, attrp->__pgrp) != 0)
- + goto error;
- + }
- +
- + if (flags & POSIX_SPAWN_RESETIDS) {
- + if (seteuid(getuid()) || setegid(getgid()))
- + goto error;
- + }
- +
- + if (fa && execute_file_actions(fa))
- + goto error;
- +
- + if (!path || strchr(file, '/')) {
- + execve(file, argv, envp);
- + goto error;
- + }
- +
- +
- + char *name;
- + {
- + size_t filelen = strlen(file) + 1;
- + size_t pathlen = strlen(path) + 1;
- + name = alloca(pathlen + filelen);
- +
- + /* Copy the file name at the top. */
- + name = (char *) memcpy(name + pathlen, file, filelen);
- +
- + /* And add the slash. */
- + *--name = '/';
- + }
- +
- + char *p;
- + do {
- + char *startp;
- + p = strchrnul(path, ':');
- +
- + /* Two adjacent colons, or a colon at the beginning or the end
- + of `PATH' means to search the current directory. */
- + if (p == path)
- + startp = name + 1;
- + else
- + startp = (char *) memcpy(name - (p - path), path, p - path);
- +
- + execve(startp, argv, envp);
- +
- + switch (errno) {
- + case EACCES:
- + case ENOENT:
- + case ESTALE:
- + case ENOTDIR:
- + /* Those errors indicate the file is missing or not
- + executable by us, in which case we want to just try
- + the next path directory. */
- + break;
- + default:
- + /* Some other error means we found an executable file,
- + but something went wrong executing it; return the
- + error to our caller. */
- + goto error;
- + }
- +
- + path = p;
- + } while (*p++ != '\0');
- +
- +error:
- + _exit(SPAWN_ERROR);
- +}
- +
- +/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
- + Before running the process perform the actions described in FILE-ACTIONS. */
- +int posix_spawn (pid_t *pid, const char *path,
- + const posix_spawn_file_actions_t *fa,
- + const posix_spawnattr_t *attrp, char *const argv[],
- + char *const envp[])
- +{
- + return __spawni(pid, path, fa, attrp, argv, envp, NULL);
- +}
- +
- +/* Spawn a new process executing FILE with the attributes describes in *ATTRP.
- + Before running the process perform the actions described in FILE-ACTIONS. */
- +int
- +posix_spawnp(pid_t *pid, const char *file,
- + const posix_spawn_file_actions_t *fa,
- + const posix_spawnattr_t *attrp, char *const argv[],
- + char *const envp[])
- +{
- + const char *path = getenv("PATH");
- +
- + if (!path)
- + path = ":/bin:/usr/bin";
- +
- + return __spawni(pid, file, fa, attrp, argv, envp, path);
- +}
- diff -Nur uClibc-0.9.33.2/librt/spawn_faction_addclose.c uClibc/librt/spawn_faction_addclose.c
- --- uClibc-0.9.33.2/librt/spawn_faction_addclose.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/librt/spawn_faction_addclose.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,51 @@
- +/* Copyright (C) 2000 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <errno.h>
- +#include <spawn.h>
- +#include <unistd.h>
- +
- +#include "spawn_int.h"
- +
- +/* Add an action to FILE-ACTIONS which tells the implementation to call
- + `close' for the given file descriptor during the `spawn' call. */
- +int
- +posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *file_actions,
- + int fd)
- +{
- + int maxfd = sysconf(_SC_OPEN_MAX);
- + struct __spawn_action *rec;
- +
- + /* Test for the validity of the file descriptor. */
- + if (fd < 0 || fd >= maxfd)
- + return EBADF;
- +
- + /* Allocate more memory if needed. */
- + if (file_actions->__used == file_actions->__allocated
- + && __posix_spawn_file_actions_realloc(file_actions) != 0)
- + /* This can only mean we ran out of memory. */
- + return ENOMEM;
- +
- + /* Add the new value. */
- + rec = &file_actions->__actions[file_actions->__used];
- + rec->tag = spawn_do_close;
- + rec->action.open_action.fd = fd;
- +
- + /* Account for the new entry. */
- + ++file_actions->__used;
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/librt/spawn_faction_adddup2.c uClibc/librt/spawn_faction_adddup2.c
- --- uClibc-0.9.33.2/librt/spawn_faction_adddup2.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/librt/spawn_faction_adddup2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,52 @@
- +/* Copyright (C) 2000 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <errno.h>
- +#include <spawn.h>
- +#include <unistd.h>
- +
- +#include "spawn_int.h"
- +
- +/* Add an action to FILE-ACTIONS which tells the implementation to call
- + `dup2' for the given file descriptors during the `spawn' call. */
- +int
- +posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *file_actions,
- + int fd, int newfd)
- +{
- + int maxfd = sysconf(_SC_OPEN_MAX);
- + struct __spawn_action *rec;
- +
- + /* Test for the validity of the file descriptor. */
- + if (fd < 0 || newfd < 0 || fd >= maxfd || newfd >= maxfd)
- + return EBADF;
- +
- + /* Allocate more memory if needed. */
- + if (file_actions->__used == file_actions->__allocated
- + && __posix_spawn_file_actions_realloc (file_actions) != 0)
- + /* This can only mean we ran out of memory. */
- + return ENOMEM;
- +
- + /* Add the new value. */
- + rec = &file_actions->__actions[file_actions->__used];
- + rec->tag = spawn_do_dup2;
- + rec->action.dup2_action.fd = fd;
- + rec->action.dup2_action.newfd = newfd;
- +
- + /* Account for the new entry. */
- + ++file_actions->__used;
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/librt/spawn_faction_addopen.c uClibc/librt/spawn_faction_addopen.c
- --- uClibc-0.9.33.2/librt/spawn_faction_addopen.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/librt/spawn_faction_addopen.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,55 @@
- +/* Copyright (C) 2000 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <errno.h>
- +#include <spawn.h>
- +#include <unistd.h>
- +
- +#include "spawn_int.h"
- +
- +/* Add an action to FILE-ACTIONS which tells the implementation to call
- + `open' for the given file during the `spawn' call. */
- +int
- +posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *file_actions,
- + int fd, const char *path, int oflag,
- + mode_t mode)
- +{
- + int maxfd = sysconf(_SC_OPEN_MAX);
- + struct __spawn_action *rec;
- +
- + /* Test for the validity of the file descriptor. */
- + if (fd < 0 || fd >= maxfd)
- + return EBADF;
- +
- + /* Allocate more memory if needed. */
- + if (file_actions->__used == file_actions->__allocated
- + && __posix_spawn_file_actions_realloc (file_actions) != 0)
- + /* This can only mean we ran out of memory. */
- + return ENOMEM;
- +
- + /* Add the new value. */
- + rec = &file_actions->__actions[file_actions->__used];
- + rec->tag = spawn_do_open;
- + rec->action.open_action.fd = fd;
- + rec->action.open_action.path = path;
- + rec->action.open_action.oflag = oflag;
- + rec->action.open_action.mode = mode;
- +
- + /* Account for the new entry. */
- + ++file_actions->__used;
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/librt/spawn_faction_init.c uClibc/librt/spawn_faction_init.c
- --- uClibc-0.9.33.2/librt/spawn_faction_init.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/librt/spawn_faction_init.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,42 @@
- +/* Copyright (C) 2000 Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include <errno.h>
- +#include <spawn.h>
- +#include <stdlib.h>
- +#include <string.h>
- +
- +#include "spawn_int.h"
- +
- +
- +/* Function used to increase the size of the allocated array. This
- + function is called from the `add'-functions. */
- +int
- +__posix_spawn_file_actions_realloc(posix_spawn_file_actions_t *file_actions)
- +{
- + int newalloc = file_actions->__allocated + 8;
- + void *newmem = realloc(file_actions->__actions,
- + newalloc * sizeof(struct __spawn_action));
- +
- + if (newmem == NULL)
- + /* Not enough memory. */
- + return ENOMEM;
- +
- + file_actions->__actions = (struct __spawn_action *)newmem;
- + file_actions->__allocated = newalloc;
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/librt/spawn_int.h uClibc/librt/spawn_int.h
- --- uClibc-0.9.33.2/librt/spawn_int.h 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/librt/spawn_int.h 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,35 @@
- +/* Data structure to contain the action information. */
- +struct __spawn_action {
- + enum {
- + spawn_do_close,
- + spawn_do_dup2,
- + spawn_do_open
- + } tag;
- +
- + union {
- + struct {
- + int fd;
- + } close_action;
- + struct {
- + int fd;
- + int newfd;
- + } dup2_action;
- + struct {
- + int fd;
- + const char *path;
- + int oflag;
- + mode_t mode;
- + } open_action;
- + } action;
- +};
- +
- +int __posix_spawn_file_actions_realloc(posix_spawn_file_actions_t *fa);
- +
- +/* handle !LFS */
- +#ifndef __UCLIBC_HAS_LFS__
- +# define rlimit64 rlimit
- +# define getrlimit64 getrlimit
- +#endif
- +#ifndef O_LARGEFILE
- +# define O_LARGEFILE 0
- +#endif
- diff -Nur uClibc-0.9.33.2/librt/timer_create.c uClibc/librt/timer_create.c
- --- uClibc-0.9.33.2/librt/timer_create.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/librt/timer_create.c 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- * timer_create.c - create a per-process timer.
- */
-
- +#include <stddef.h>
- #include <errno.h>
- #include <signal.h>
- #include <stdlib.h>
- @@ -13,10 +14,6 @@
-
- #ifdef __NR_timer_create
-
- -#ifndef offsetof
- -# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
- -#endif
- -
- #define __NR___syscall_timer_create __NR_timer_create
- static __inline__ _syscall3(int, __syscall_timer_create, clockid_t, clock_id,
- struct sigevent *, evp, kernel_timer_t *, ktimerid);
- diff -Nur uClibc-0.9.33.2/libubacktrace/arm/backtrace.c uClibc/libubacktrace/arm/backtrace.c
- --- uClibc-0.9.33.2/libubacktrace/arm/backtrace.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libubacktrace/arm/backtrace.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,6 +12,7 @@
- *
- */
-
- +#include <libgcc_s.h>
- #include <execinfo.h>
- #include <dlfcn.h>
- #include <stdlib.h>
- @@ -25,6 +26,7 @@
- int cnt, size;
- };
-
- +#ifdef SHARED
- static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
- static _Unwind_VRS_Result (*unwind_vrs_get) (_Unwind_Context *,
- _Unwind_VRS_RegClass,
- @@ -34,14 +36,18 @@
-
- static void backtrace_init (void)
- {
- - void *handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
- + void *handle = dlopen (LIBGCC_S_SO, RTLD_LAZY);
- if (handle == NULL
- || ((unwind_backtrace = dlsym (handle, "_Unwind_Backtrace")) == NULL)
- || ((unwind_vrs_get = dlsym (handle, "_Unwind_VRS_Get")) == NULL)) {
- - printf("libgcc_s.so.1 must be installed for backtrace to work\n");
- + printf(LIBGCC_S_SO " must be installed for backtrace to work\n");
- abort();
- }
- }
- +#else
- +# define unwind_backtrace _Unwind_Backtrace
- +# define unwind_vrs_get _Unwind_VRS_Get
- +#endif
- /* This function is identical to "_Unwind_GetGR", except that it uses
- "unwind_vrs_get" instead of "_Unwind_VRS_Get". */
- static inline _Unwind_Word
- @@ -62,7 +68,7 @@
- {
- struct trace_arg *arg = a;
-
- - assert (unwind_getip != NULL);
- + assert (unwind_getip(ctx) != NULL);
-
- /* We are first called with address in the __backtrace function. Skip it. */
- if (arg->cnt != -1)
- @@ -80,8 +86,10 @@
- {
- struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
-
- +#ifdef SHARED
- if (unwind_backtrace == NULL)
- backtrace_init();
- +#endif
-
- if (size >= 1)
- unwind_backtrace (backtrace_helper, &arg);
- diff -Nur uClibc-0.9.33.2/libubacktrace/arm/Makefile.arch uClibc/libubacktrace/arm/Makefile.arch
- --- uClibc-0.9.33.2/libubacktrace/arm/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libubacktrace/arm/Makefile.arch 2014-02-03 12:32:57.000000000 +0100
- @@ -14,4 +14,4 @@
- else
- libubacktrace-a-y+=$(libubacktrace_ARCH_OBJS)
- endif
- -libubacktrace-so-y+=$(libubacktrace_ARCH_OBJS:.o=.os)
- +libubacktrace-so-y+=$(libubacktrace_ARCH_OBJS:.o=.oS)
- diff -Nur uClibc-0.9.33.2/libubacktrace/backtrace.c uClibc/libubacktrace/backtrace.c
- --- uClibc-0.9.33.2/libubacktrace/backtrace.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libubacktrace/backtrace.c 2014-02-03 12:32:57.000000000 +0100
- @@ -20,6 +20,7 @@
- *
- */
-
- +#include <libgcc_s.h>
- #include <execinfo.h>
- #include <dlfcn.h>
- #include <stdlib.h>
- @@ -33,20 +34,25 @@
- int cnt, size;
- };
-
- +#ifdef SHARED
- static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
- static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *);
-
- static void backtrace_init (void)
- {
- - void *handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
- + void *handle = dlopen (LIBGCC_S_SO, RTLD_LAZY);
-
- if (handle == NULL
- || ((unwind_backtrace = dlsym (handle, "_Unwind_Backtrace")) == NULL)
- || ((unwind_getip = dlsym (handle, "_Unwind_GetIP")) == NULL)) {
- - printf("libgcc_s.so.1 must be installed for backtrace to work\n");
- + printf(LIBGCC_S_SO " must be installed for backtrace to work\n");
- abort();
- }
- }
- +#else
- +# define unwind_backtrace _Unwind_Backtrace
- +# define unwind_getip _Unwind_GetIP
- +#endif
-
- static _Unwind_Reason_Code
- backtrace_helper (struct _Unwind_Context *ctx, void *a)
- @@ -71,8 +77,10 @@
- {
- struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
-
- +#ifdef SHARED
- if (unwind_backtrace == NULL)
- backtrace_init();
- +#endif
-
- if (size >= 1)
- unwind_backtrace (backtrace_helper, &arg);
- diff -Nur uClibc-0.9.33.2/libubacktrace/backtracesyms.c uClibc/libubacktrace/backtracesyms.c
- --- uClibc-0.9.33.2/libubacktrace/backtracesyms.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libubacktrace/backtracesyms.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>.
-
- Based on glibc/sysdeps/generic/elf/backtracesyms.c
-
- diff -Nur uClibc-0.9.33.2/libubacktrace/backtracesymsfd.c uClibc/libubacktrace/backtracesymsfd.c
- --- uClibc-0.9.33.2/libubacktrace/backtracesymsfd.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libubacktrace/backtracesymsfd.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA.
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>.
-
- Based on glibc/sysdeps/generic/elf/backtracesymsfd.c
-
- diff -Nur uClibc-0.9.33.2/libubacktrace/Makefile.in uClibc/libubacktrace/Makefile.in
- --- uClibc-0.9.33.2/libubacktrace/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libubacktrace/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -25,11 +25,13 @@
- -include $(libubacktrace_ARCH_DIR)/Makefile.arch
-
- libubacktrace_SRC-y :=
- -libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtrace.c backtracesyms.c backtracesymsfd.c
- +libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtracesyms.c backtracesymsfd.c
- +libubacktrace_SRC_SHARED-$(UCLIBC_HAS_BACKTRACE) := backtrace.c
-
- # remove generic sources, if arch specific version is present
- ifneq ($(strip $(libubacktrace_ARCH_SRC-y)),)
- libubacktrace_SRC-y := $(filter-out $(notdir $(libubacktrace_ARCH_SRC-y)),$(libubacktrace_SRC-y))
- +libubacktrace_SRC_SHARED-y := $(filter-out $(notdir $(libubacktrace_ARCH_SRC-y)),$(libubacktrace_SRC_SHARED-y))
- endif
-
- # -fasynchronous-unwind-tables is required for backtrace to work using dwarf2
- @@ -43,12 +45,19 @@
- libubacktrace_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC-y))
- libubacktrace_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SRCS))
-
- +libubacktrace_SHARED_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC_SHARED-y))
- +libubacktrace_SHARED_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SHARED_SRCS))
- +
- +libubacktrace-shared-y := $(libubacktrace_SHARED_OBJS:.o=.oS)
- +libubacktrace-static-y := $(libubacktrace_SHARED_OBJS)
- +
- ifeq ($(DOPIC),y)
- -libubacktrace-a-y += $(libubacktrace_OBJS:.o=.os)
- +libubacktrace-a-y += $(libubacktrace_OBJS:.o=.os) $(libubacktrace-static-y:.o=.os)
- else
- -libubacktrace-a-y += $(libubacktrace_OBJS)
- +libubacktrace-a-y += $(libubacktrace_OBJS) $(libubacktrace-static-y)
- endif
- -libubacktrace-so-y += $(libubacktrace_OBJS:.o=.os)
- +libubacktrace-so-y += $(libubacktrace_OBJS:.o=.os) $(libubacktrace-shared-y)
- +
-
- lib-a-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.a
- lib-so-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.so
- @@ -56,11 +65,7 @@
- objclean-y += CLEAN_libubacktrace
-
- ifeq ($(DOMULTI),n)
- -ifeq ($(DOPIC),y)
- -$(top_builddir)lib/libubacktrace.so: $(top_builddir)lib/libubacktrace.a $(libdl.depend)
- -else
- $(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace_so.a $(libdl.depend)
- -endif
- $(call link.so,$(libubacktrace_FULL_NAME),$(ABI_VERSION))
- else
- $(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace.oS | $(libdl.depend)
- @@ -71,7 +76,7 @@
- $(Q)$(RM) $@
- $(do_ar)
-
- -$(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS) $(libubacktrace_ARCH_SRCS)
- +$(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS) $(libubacktrace_ARCH_SRCS) $(libubacktrace_SHARED_SRCS)
- $(Q)$(RM) $@
- $(compile-m)
-
- diff -Nur uClibc-0.9.33.2/libutil/forkpty.c uClibc/libutil/forkpty.c
- --- uClibc-0.9.33.2/libutil/forkpty.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libutil/forkpty.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/types.h>
- #include <termios.h>
- diff -Nur uClibc-0.9.33.2/libutil/logout.c uClibc/libutil/logout.c
- --- uClibc-0.9.33.2/libutil/logout.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libutil/logout.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/libutil/openpty.c uClibc/libutil/openpty.c
- --- uClibc-0.9.33.2/libutil/openpty.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/libutil/openpty.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/Makefile.help uClibc/Makefile.help
- --- uClibc-0.9.33.2/Makefile.help 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/Makefile.help 2014-02-03 12:32:56.000000000 +0100
- @@ -27,6 +27,7 @@
- @echo ' menuconfig - interactive curses-based configurator'
- @echo ' oldconfig - resolve any unresolved symbols in .config'
- @echo ' silentoldconfig - resolve any unresolved symbols in .config, silently'
- + @echo ' savedefconfig - Save current config (minimal config)'
- @echo ' randconfig - generate a random .config'
- @$(if $(arch-defconfigs), \
- @echo ''; \
- @@ -58,7 +59,7 @@
- @echo ' ARCH= - Use given arch for config targets'
- @echo ' SHELL= - Shell to use for make'
- @echo ' BUILD_CFLAGS= - extra CFLAGS for compiling host binaries'
- - @echo ' BUILD_LFLAGS= - extra LDFLAGS for linking host binaries'
- + @echo ' BUILD_LDFLAGS= - extra LDFLAGS for linking host binaries'
- @echo ' CONFIG_SHELL= - Shell to use for menuconfig'
- @echo
- @echo ' PREFIX= - Prepended prefix'
- diff -Nur uClibc-0.9.33.2/Makefile.in uClibc/Makefile.in
- --- uClibc-0.9.33.2/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/Makefile.in 2014-02-03 12:32:56.000000000 +0100
- @@ -8,18 +8,8 @@
- #--------------------------------------------------------------
- # You shouldn't need to mess with anything beyond this point...
- #--------------------------------------------------------------
- -clean_targets := clean realclean distclean \
- - objclean-y headers_clean-y CLEAN_utils
- -noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
- - defconfig allyesconfig allnoconfig \
- - release dist tags help
- -
- include $(top_srcdir)Rules.mak
- sub_headers := headers
- -ifndef KCONFIG_CONFIG
- -KCONFIG_CONFIG := $(top_builddir).config
- -endif
- -export KCONFIG_CONFIG
-
- ifeq ($(HAVE_DOT_CONFIG),y)
-
- @@ -56,6 +46,7 @@
-
- conf := $(top_builddir)extra/config/conf
- mconf := $(top_builddir)extra/config/mconf
- +nconf := $(top_builddir)extra/config/nconf
-
- ifeq ($(HAVE_DOT_CONFIG),y)
- # If the .config changes then we have to make sure that our includes are
- @@ -63,9 +54,9 @@
- # have uClibc_config.h as prerequisite but since we _symlink_ the headers
- # and do not (?) want to rely on 'make -L' we better update them right here,
- # on spot to save us from alot of hazzle.
- -$(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
- +$(top_builddir)include/bits/uClibc_config.h: $(conf) $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits
- @$(disp_gen)
- - $(Q)@$< -s $(top_srcdir)extra/Configs/Config.in
- + $(Q)$< -s $(Kconfig)
- $(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@
- $(Q)$(MAKE) headers-y
-
- @@ -76,6 +67,10 @@
- $(top_builddir)include/config/linuxthreads/old.h $(top_builddir)include/config/linuxthreads/new.h:
- @true
-
- +$(top_builddir)include/generated/unifdef_config.h: $(top_builddir)include/bits/uClibc_config.h | $(top_builddir)include/generated
- + @$(disp_gen)
- + $(Q)$(SED) -e '1,3d' $^ > $@
- +
- # For the moment, we have to keep re-running this target
- # because the fix includes scripts rely on pre-processers
- # in order to generate the headers correctly :(. That
- @@ -87,11 +82,21 @@
- export header_extra_args = -n
- endif
- HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h))
- +ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
- +HEADERS_BITS_COMMON_NO_LEGACY := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common-generic/bits/*.h))
- +HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_COMMON_NO_LEGACY),$(HEADERS_BITS_COMMON))
- +ALL_HEADERS_BITS_COMMON_NO_LEGACY := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_COMMON_NO_LEGACY))
- +endif
- +
- HEADERS_BITS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h))
- HEADERS_BITS_SUBARCH :=
- ifneq ($(TARGET_SUBARCH),)
- HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
- endif
- +ifneq ($(HEADERS_BITS_PTHREAD),)
- +HEADERS_BITS_ARCH := $(filter-out $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_ARCH))
- +HEADERS_BITS_SUBARCH:= $(filter-out $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_SUBARCH))
- +endif
- HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH) $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_COMMON))
-
- HEADERS_SYS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/sys/*.h))
- @@ -99,8 +104,11 @@
- HEADERS_SYS_COMMON := $(filter-out $(HEADERS_SYS_ARCH),$(HEADERS_SYS_COMMON))
-
- ALL_HEADERS_COMMON := $(top_builddir)include/fpu_control.h \
- + $(top_builddir)include/jmpbuf-offsets.h \
- + $(top_builddir)include/jmpbuf-unwind.h \
- $(top_builddir)include/dl-osinfo.h \
- - $(top_builddir)include/hp-timing.h
- + $(top_builddir)include/hp-timing.h \
- + $(top_builddir)include/not-cancel.h
- ALL_HEADERS_BITS_COMMON := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_COMMON))
- ALL_HEADERS_BITS_ARCH := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_ARCH))
- ifneq ($(TARGET_SUBARCH),)
- @@ -120,13 +128,17 @@
- $(ALL_HEADERS_SYS_ARCH) \
- $(ALL_HEADERS_BITS_PTHREAD)
-
- -$(top_builddir)include/fpu_control.h:
- +ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
- + target-headers-sysdep += $(ALL_HEADERS_BITS_COMMON_NO_LEGACY)
- +endif
- +
- +$(top_builddir)include/fpu_control.h $(top_builddir)include/jmpbuf-offsets.h $(top_builddir)include/jmpbuf-unwind.h:
- @$(disp_ln)
- $(Q)[ -r $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \
- $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \
- $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@
-
- -$(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h:
- +$(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h $(top_builddir)include/not-cancel.h:
- $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@
-
- $(ALL_HEADERS_BITS_COMMON):
- @@ -135,6 +147,11 @@
- $(ALL_HEADERS_BITS_ARCH):
- $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@
-
- +ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
- +$(ALL_HEADERS_BITS_COMMON_NO_LEGACY):
- + $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common-generic/bits/$(@F) $@
- +endif
- +
- ifneq ($(TARGET_SUBARCH),)
- $(ALL_HEADERS_BITS_SUBARCH):
- $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@
- @@ -155,6 +172,9 @@
- HEADERCLEAN_common:
- $(do_rm) $(ALL_HEADERS_COMMON)
- headers_clean-y += HEADERCLEAN_common
- +HEADERCLEAN_config:
- + $(do_rm) -r $(addprefix $(top_builddir)include/,config generated)
- +menuconfig-clean-y: HEADERCLEAN_config
-
- # The headers. Arch specific headers are specified via ARCH_HEADERS in
- # libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
- @@ -170,27 +190,22 @@
- $(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh | $(top_builddir)include/bits
- @$(disp_gen)
- $(Q)set -e; \
- - tmp=`mktemp $(top_builddir)include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \
- - [ -z "$$tmp" ] && tmp='$(top_builddir)include/bits/sysnum.h.new'; \
- - KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir="$(top_builddir)" CC="$(CC) $(CPU_CFLAGS)" $(SHELL) $< > $$tmp; \
- - if cmp $(top_builddir)include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
- - $(RM) $$tmp; \
- - else \
- - mv -f $$tmp $(top_builddir)include/bits/sysnum.h; \
- - fi
- + KERNEL_HEADERS="${KERNEL_HEADERS}" CC="$(CC) $(CPU_CFLAGS)" $(SHELL) $< > $@.new; \
- + cmp -s $@ $@.new && $(RM) $@.new || mv -f $@.new $@
- @# Ugly linux specific hack..
- $(Q)if grep -q __NR_ $@; then true; else \
- rm -f $@; \
- echo "ERROR: Could not generate syscalls."; \
- - echo "Make sure that you have proper kernel headers."; \
- - echo "Your .config in KERNEL_HEADERS=\"\" was set to:"; \
- + echo "Make sure that you have properly installed kernel headers."; \
- + echo "Your .config KERNEL_HEADERS=\"\" was set to:"; \
- echo "${KERNEL_HEADERS}"; \
- exit 1; \
- fi
-
- .PHONY: $(LOCAL_INSTALL_PATH)
- $(LOCAL_INSTALL_PATH):
- - $(Q)$(MAKE) PREFIX=$(shell pwd)/$(LOCAL_INSTALL_PATH) RUNTIME_PREFIX=/ \
- + $(Q)$(MAKE) PREFIX=$(LOCAL_INSTALL_PATH) \
- + RUNTIME_PREFIX=/ \
- DEVEL_PREFIX=/usr/ \
- HOSTCC="$(HOSTCC)" \
- install
- @@ -210,16 +225,27 @@
- # a "y" here means the feature is enabled and so we should *not* rm it.
- # if the option expands to nothing though, we can punt the headers.
- HEADERS_RM- := \
- + config \
- + generated \
- + internal \
- + cancel.h \
- dl-osinfo.h \
- + jmpbuf-offsets.h \
- + jmpbuf-unwind.h \
- hp-timing.h \
- + not-cancel.h \
- _lfs_64.h \
- bits/uClibc_arch_features.h \
- bits/kernel_sigaction.h \
- bits/kernel_stat.h \
- bits/kernel_types.h \
- + bits/libc-lock.h \
- + bits/stdio-lock.h \
- bits/syscalls.h \
- bits/syscalls-common.h \
- bits/uClibc_fpmax.h \
- + bits/uClibc_mutex.h \
- + bits/uClibc_pthread.h \
- bits/uClibc_uintmaxtostr.h \
- bits/uClibc_uwchar.h \
- bits/uClibc_va_copy.h \
- @@ -259,18 +285,23 @@
- HEADERS_RM-$(UCLIBC_HAS_REGEX) += regex.h regexp.h
- HEADERS_RM-$(UCLIBC_HAS_RPC) += rpc
- HEADERS_RM-$(UCLIBC_HAS_SHADOW) += shadow.h
- -HEADERS_RM-$(UCLIBC_HAS_SOCKET) += sys/socket.h bits/socket.h sys/socketvar.h
- +HEADERS_RM-$(UCLIBC_HAS_SOCKET) += sys/socket.h bits/socket.h sys/socketvar.h bits/socket_type.h
- HEADERS_RM-$(UCLIBC_HAS_SYSLOG) += syslog.h sys/syslog.h bits/syslog*.h
- HEADERS_RM-$(UCLIBC_HAS_THREADS) += *thread*.h semaphore.h \
- bits/*thread*.h \
- bits/initspin.h
- HEADERS_RM-$(UCLIBC_HAS_THREADS_NATIVE) += atomic.h bits/atomic.h
- +HEADERS_RM-$(UCLIBC_HAS_OBSTACK) += obstack.h
- HEADERS_RM-$(UCLIBC_HAS_UTMPX) += bits/utmpx.h utmpx.h
- HEADERS_RM-$(UCLIBC_HAS_WCHAR) += wchar.h wctype.h
- HEADERS_RM-$(UCLIBC_HAS_WORDEXP) += wordexp.h
- HEADERS_RM-$(UCLIBC_HAS_XATTR) += sys/xattr.h
- HEADERS_RM-$(UCLIBC_HAS_XLOCALE) += xlocale.h
- -HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += sys/eventfd.h sys/fsuid.h \
- +HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += \
- + sys/cachectl.h \
- + bits/eventfd.h \
- + sys/eventfd.h \
- + sys/fsuid.h \
- bits/inotify.h \
- sys/inotify.h \
- sys/kdaemon.h \
- @@ -288,11 +319,13 @@
- sys/sysinfo.h \
- bits/timerfd.h \
- sys/timerfd.h \
- + sys/sysmips.h \
- sys/vfs.h
- HEADERS_RM-$(UCLIBC_SUPPORT_AI_ADDRCONFIG) += ifaddrs.h
- HEADERS_RM-$(UCLIBC_SV4_DEPRECATED) += ustat.h sys/ustat.h bits/ustat.h
- HEADERS_RM-$(UCLIBC_SUSV3_LEGACY) += sys/timeb.h regexp.h
- HEADERS_RM-$(UCLIBC_SUSV4_LEGACY) += utime.h ucontext.h
- +HEADERS_RM-$(UCLIBC_HAS_ADVANCED_REALTIME) += spawn.h
-
- ifneq ($(findstring install,$(MAKECMDGOALS)),)
- $(addprefix $(PREFIX)$(DEVEL_PREFIX),include $(MULTILIB_DIR)):
- @@ -303,7 +336,9 @@
- $(do_mkdir)
- endif
- endif
- -install_headers: headers $(top_builddir)extra/scripts/unifdef | $(PREFIX)$(DEVEL_PREFIX)include
- +
- +
- +install_headers: headers $(top_builddir)extra/scripts/unifdef $(top_builddir)include/generated/unifdef_config.h | $(PREFIX)$(DEVEL_PREFIX)include
- @$(call disp_install,"include -> $(PREFIX)$(DEVEL_PREFIX)include")
- $(Q)top_builddir=$(top_builddir) \
- $(top_srcdir)extra/scripts/install_headers.sh \
- @@ -346,12 +381,7 @@
- else
- -$(INSTALL) -m 755 $(top_builddir)lib/libc.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
- endif
- -ifeq ($(UCLIBC_HAS_BACKTRACE),y)
- -# Add the AS_NEEDED entry for libubacktrace.so
- - if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_LIBNAME) ] ; then \
- - echo "GROUP ( $(UBACKTRACE_ASNEEDED) )" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
- - fi
- -endif
- + echo "$(UBACKTRACE_ASNEEDED)" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so
- ifeq ($(UCLIBC_HAS_THREADS),y)
- ifneq ($(LINUXTHREADS_OLD),y)
- ifeq ($(HARDWIRED_ABSPATH),y)
- @@ -422,49 +452,55 @@
- install_hostutils: hostutils
- $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils utils_install
-
- -$(addprefix $(top_builddir),include include/bits include/sys include/config lib extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
- +$(addprefix $(top_builddir),include include/bits include/sys include/config include/generated lib extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
- $(do_mkdir)
-
- # configuration
- # ---------------------------------------------------------------------------
- -$(conf) $(mconf): | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog
- +$(conf) $(mconf) $(nconf): | $(top_builddir)include/config $(top_builddir)include/generated $(top_builddir)extra/config/lxdialog
- $(Q)$(MAKE) -C extra/config $(@F)
-
- arch-defconfigs := $(notdir $(wildcard $(top_srcdir)extra/Configs/defconfigs/$(ARCH)/*_defconfig))
-
- menuconfig: $(mconf)
- - $(Q)$< extra/Configs/Config.in
- -
- + $(Q)$< $(Kconfig)
- config: $(conf)
- - $(Q)$< extra/Configs/Config.in
- -
- -oldconfig: $(conf)
- - $(Q)$< -o extra/Configs/Config.in
- + $(Q)$< $(Kconfig)
- +nconfig: $(nconf)
- + $(Q)$< $(Kconfig)
-
- +oldaskconfig: $(conf)
- + $(Q)$< -a $(Kconfig)
- silentoldconfig: $(conf)
- - $(Q)$< -s extra/Configs/Config.in
- -
- -randconfig: $(conf)
- - $(Q)$< -r extra/Configs/Config.in
- -
- + $(Q)$< -s $(Kconfig)
- +oldconfig: $(conf)
- + $(Q)$< -o $(Kconfig)
- +allnoconfig: $(conf)
- + $(Q)$< -n $(Kconfig)
- allyesconfig: $(conf)
- - $(Q)$< -y extra/Configs/Config.in
- + $(Q)$< -y $(Kconfig)
- $(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" \
- -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" \
- -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" \
- -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" \
- -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" \
- $(KCONFIG_CONFIG)
- - $(Q)$< -o extra/Configs/Config.in
- -
- -allnoconfig: $(conf)
- - $(Q)$< -n extra/Configs/Config.in
- -
- -defconfig: $(conf)
- - $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
- + $(Q)$< -o $(Kconfig)
- +alldefconfig: $(conf)
- + $(Q)$< -A $(Kconfig)
- +randconfig: $(conf)
- + $(Q)$< -r $(Kconfig)
-
- -%_defconfig: $(conf)
- - $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
- +cmd_defconfig = $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ $(Kconfig)
- +defconfig: $(conf) ; $(cmd_defconfig)
- +%_defconfig: $(conf) ; $(cmd_defconfig)
- +
- +savedefconfig: $(conf)
- + $(Q)$< -S defconfig $(Kconfig)
- +listnewconfig: $(conf)
- + $(Q)$< -l $(Kconfig)
- +olddefconfig: $(conf)
- + $(Q)$< -d $(Kconfig)
-
- menuconfig-clean-y:
- $(Q)$(MAKE) -C extra/config CLEAN_extra/config
- @@ -484,11 +520,11 @@
- $(Q)$(RM) $(top_builddir)extra/scripts/unifdef
- $(Q)$(RM) -r $(LOCAL_INSTALL_PATH)
-
- -distclean: clean
- +distclean: realclean
- -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \;
- $(RM) $(top_builddir).config $(top_builddir).config.old $(top_builddir).config.cmd
- - $(RM) $(top_builddir)extra/locale/*.tgz
- - $(MAKE) -C extra/config distclean
- + $(Q)$(RM) $(top_builddir)extra/locale/*.tgz
- + @$(MAKE) -C extra/config distclean
-
- dist release:
- $(RM) ../uClibc-$(VERSION).tar
- @@ -499,7 +535,9 @@
- du -b ../uClibc-$(VERSION).tar.{bz2,xz}
-
- test check: test_compile
- - $(Q)$(MAKE) -C test
- + $(Q)$(MAKE) -C test \
- + $(if $(O),top_builddir=$(O)/)
-
- test_compile: $(LOCAL_INSTALL_PATH)
- - $(Q)$(MAKE) -C test compile
- + $(Q)$(MAKE) -C test compile \
- + $(if $(O),top_builddir=$(O)/)
- diff -Nur uClibc-0.9.33.2/Makerules uClibc/Makerules
- --- uClibc-0.9.33.2/Makerules 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/Makerules 2014-02-03 12:32:56.000000000 +0100
- @@ -50,6 +50,10 @@
- endif
- $(shared_objs) $(ar_objs): | $(sub_headers)
-
- +define objects_with_syms
- + $(foreach o,$(2),$(if $(shell $(NM) $(1) $(o) | grep .),$(o)))
- +endef
- +
- headers-y: $(headers-y)
- @true
-
- @@ -243,7 +247,7 @@
- cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) $(sort $(foreach d,$(^:$(top_srcdir)=),$(collect_multi_flags)))
- cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^
- cmd_t_strip = $(STRIPTOOL) $(STRIP_FLAGS) $@
- -cmd_ar = $(AR) $(ARFLAGS) $@ $^
- +cmd_ar = $(AR) $(ARFLAGS) $@ $(call objects_with_syms,,$^)
-
- define do_ln
- @$(disp_ln)
- @@ -300,7 +304,7 @@
- -Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \
- -Wl,--verbose 2>&1 | LC_ALL=C \
- sed -e '/^=========/,/^=========/!d;/^=========/d' \
- - -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' > $@.lds
- + -e 's/\. = .* + SIZEOF_HEADERS;/& $(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds
- endef
-
- define link.so
- @@ -373,14 +377,9 @@
- $(top_builddir)lib/interp.c: | $(top_builddir)lib
- $(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@.tmp
- $(Q)echo "#include <features.h>" >> $@.tmp
- -ifeq ($(HARDWIRED_ABSPATH),y)
- $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
- "(\".interp\"))) =\""$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UCLIBC_LDSO)"\";" >> $@.tmp
- $(Q)$(SED) -i -e 's://:/:g' $@.tmp
- -else
- - $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
- - "(\".interp\"))) =\""$(UCLIBC_LDSO)"\";" >> $@.tmp
- -endif
- $(Q)mv $@.tmp $@
-
- $(interp): $(top_builddir)lib/interp.c | $(sub_headers)
- @@ -470,6 +469,8 @@
- $(libm-a-y) $(libm-so-y) \
- $(libpthread-a-y) $(libpthread-so-y) $(libpthread-nonshared-y) \
- $(libthread_db-a-y) $(libthread_db-so-y) $(libpthread-generated-y) \
- + $(START_FILE-libpthread.so) $(END_FILE-libpthread.so) \
- + $(PTHREAD_INITFINI:.c=.s) \
- $(librt-a-y) $(librt-so-y) $(libresolv-a-y) $(libresolv-so-y) \
- $(libcrypt-a-y) $(libcrypt-so-y) $(libutil-a-y) $(libutil-so-y) \
- $(libnsl-a-y) $(libnsl-so-y) $(ldso-y) $(libdl-a-y) $(libdl-so-y) \
- diff -Nur uClibc-0.9.33.2/Rules.mak uClibc/Rules.mak
- --- uClibc-0.9.33.2/Rules.mak 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/Rules.mak 2014-02-15 14:18:15.000000000 +0100
- @@ -27,6 +27,15 @@
- # file named ".config". Don't mess with this file unless
- # you know what you are doing.
-
- +clean_targets := clean realclean distclean \
- + objclean-y headers_clean-y CLEAN_utils
- +noconfig_targets := menuconfig config nconfig \
- + oldaskconfig silentoldconfig oldconfig allnoconfig allyesconfig \
- + alldefconfig randconfig defconfig savedefconfig listnewconfig \
- + olddefconfig \
- + xconfig gconfig update-po-config mconf qconf gconf nconf conf \
- + release dist tags help
- +
-
- #-----------------------------------------------------------
- # If you are running a cross compiler, you will want to set
- @@ -63,7 +72,7 @@
-
- # Select the compiler needed to build binaries for your development system
- HOSTCC = gcc
- -BUILD_CFLAGS = -Os -Wall
- +BUILD_CFLAGS = -Os
-
- #---------------------------------------------------------
- # Nothing beyond this point should ever be touched by mere
- @@ -74,10 +83,25 @@
- qstrip = $(strip $(subst ",,$(1)))
- #"))
-
- +# kconfig stuff
- +KCONFIG_CONFIG ?= $(top_builddir).config
- +KCONFIG_CONFIG := $(abspath $(KCONFIG_CONFIG))
- +export KCONFIG_CONFIG
- +KCONFIG_AUTOCONFIG := $(dir $(KCONFIG_CONFIG))include/config/auto.conf
- +export KCONFIG_AUTOCONFIG
- +KCONFIG_TRISTATE := $(dir $(KCONFIG_CONFIG))include/config/tristate.conf
- +export KCONFIG_TRISTATE
- +srctree := $(abspath $(top_srcdir))
- +export srctree
- +KCONFIG_AUTOHEADER := $(dir $(KCONFIG_CONFIG))include/generated/autoconf.h
- +export KCONFIG_AUTOHEADER
- +Kconfig := $(abspath $(top_srcdir)extra/Configs/Config.in)
- +
- # Pull in the user's uClibc configuration
- -ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
- --include $(top_builddir).config
- +ifeq ($(filter $(noconfig_targets) clean CLEAN_%,$(MAKECMDGOALS)),)
- +-include $(KCONFIG_CONFIG)
- endif
- +
- TARGET_ARCH:=$(call qstrip,$(TARGET_ARCH))
- ifeq ($(TARGET_ARCH),)
- ARCH ?= $(shell uname -m | $(SED) -e s/i.86/i386/ \
- @@ -93,19 +117,20 @@
- export ARCH
-
- # Make certain these contain a final "/", but no "//"s.
- -TARGET_SUBARCH:=$(call qstrip,$(TARGET_SUBARCH))
- -RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(RUNTIME_PREFIX)))))
- -DEVEL_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(DEVEL_PREFIX)))))
- -MULTILIB_DIR:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(MULTILIB_DIR)))))
- -KERNEL_HEADERS:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(KERNEL_HEADERS)))))
- +scrub_path = $(strip $(subst //,/, $(subst ,/, $(call qstrip,$(1)))))
- +TARGET_SUBARCH := $(call qstrip,$(TARGET_SUBARCH))
- +RUNTIME_PREFIX := $(call scrub_path,$(RUNTIME_PREFIX))
- +DEVEL_PREFIX := $(call scrub_path,$(DEVEL_PREFIX))
- +MULTILIB_DIR := $(call scrub_path,$(MULTILIB_DIR))
- +KERNEL_HEADERS := $(call scrub_path,$(KERNEL_HEADERS))
- export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS MULTILIB_DIR
-
-
- # Now config hard core
- MAJOR_VERSION := 0
- MINOR_VERSION := 9
- -SUBLEVEL := 33
- -EXTRAVERSION :=.2
- +SUBLEVEL := 34
- +EXTRAVERSION :=-git
- VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL)
- ABI_VERSION := $(MAJOR_VERSION)
- ifneq ($(EXTRAVERSION),)
- @@ -118,13 +143,19 @@
- LIBC := libc
- SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION)
- UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION)
- -ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),)
- +
- +UCLIBC_LDSO_NAME := ld-uClibc
- +ARCH_NATIVE_BIT := 32
- +ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 powerpc64 s390x sparc64 x86_64 ),)
- UCLIBC_LDSO_NAME := ld64-uClibc
- ARCH_NATIVE_BIT := 64
- else
- -UCLIBC_LDSO_NAME := ld-uClibc
- -ARCH_NATIVE_BIT := 32
- +ifeq ($(CONFIG_MIPS_N64_ABI),y)
- +UCLIBC_LDSO_NAME := ld64-uClibc
- +ARCH_NATIVE_BIT := 64
- +endif
- endif
- +
- UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION)
- NONSHARED_LIBNAME := uclibc_nonshared.a
- libc := $(top_builddir)lib/$(SHARED_LIBNAME)
- @@ -169,8 +200,9 @@
- check_as=$(shell \
- if $(CC) -Wa,$(1) -Wa,-Z -c -o /dev/null -xassembler /dev/null > /dev/null 2>&1; \
- then echo "-Wa,$(1)"; fi)
- +# FIXME: filter -fuse-ld=% and pass that, too!!
- check_ld=$(shell \
- - if $(LD) $(1) -o /dev/null -b binary /dev/null > /dev/null 2>&1; \
- + if $(CC) -Wl,$(1) $(CFLAG_-nostdlib) -o /dev/null -Wl,-b,binary /dev/null > /dev/null 2>&1; \
- then echo "$(1)"; fi)
-
- # Use variable indirection here so that we can have variable
- @@ -221,6 +253,8 @@
-
- ARFLAGS:=cr
-
- +# Note: The check for -nostdlib has to be before all calls to check_ld
- +$(eval $(call check-gcc-var,-nostdlib))
-
- # Flags in OPTIMIZATION are used only for non-debug builds
-
- @@ -246,6 +280,7 @@
- GCC_MAJOR_VER ?= $(word 1,$(GCC_VER))
- #GCC_MINOR_VER ?= $(word 2,$(GCC_VER))
-
- +ifneq ($(TARGET_ARCH),arc)
- ifeq ($(GCC_MAJOR_VER),4)
- # shrinks code, results are from 4.0.2
- # 0.36%
- @@ -258,7 +293,7 @@
- $(eval $(call check-gcc-var,-fno-strength-reduce))
- OPTIMIZATION += $(CFLAG_-fno-strength-reduce)
- endif
- -
- +endif
-
- # CPU_CFLAGS-y contain options which are not warnings,
- # not include or library paths, and not optimizations.
- @@ -311,7 +346,9 @@
- $(eval $(call check-gcc-var,-fomit-frame-pointer))
- OPTIMIZATION += $(CFLAG_-fomit-frame-pointer)
-
- -ifeq ($(CONFIG_386)$(CONFIG_486)$(CONFIG_586)$(CONFIG_586MMX),y)
- +ifeq ($(CONFIG_386)$(CONFIG_486)$(CONFIG_586),y)
- + # TODO: Change this to a gcc version check. This bug
- + # should be fixed with at least gcc-4.3.
- # Non-SSE capable processor.
- # NB: this may make SSE insns segfault!
- # -O1 -march=pentium3, -Os -msse etc are known to be affected.
- @@ -330,18 +367,6 @@
- # -falign-jumps: reachable only by a jump
- # Generic: no alignment at all (smallest code)
- GCC_FALIGN=$(call check_gcc,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,-malign-jumps=1 -malign-loops=1)
- -ifeq ($(CONFIG_K7),y)
- - # Align functions to four bytes, use default for jumps and loops (why?)
- - GCC_FALIGN=$(call check_gcc,-falign-functions=4 -falign-labels=1,-malign-functions=4)
- -endif
- -ifeq ($(CONFIG_CRUSOE),y)
- - # Use compiler's default for functions, jumps and loops (why?)
- - GCC_FALIGN=$(call check_gcc,-falign-functions=0 -falign-labels=1,-malign-functions=0)
- -endif
- -ifeq ($(CONFIG_CYRIXIII),y)
- - # Use compiler's default for functions, jumps and loops (why?)
- - GCC_FALIGN=$(call check_gcc,-falign-functions=0 -falign-labels=1,-malign-functions=0)
- -endif
- OPTIMIZATION+=$(GCC_FALIGN)
-
- # Putting each function and data object into its own section
- @@ -366,22 +391,6 @@
-
- CPU_LDFLAGS-y+=-m32
- CPU_CFLAGS-y+=-m32
- - CPU_CFLAGS-$(CONFIG_386)+=-march=i386
- - CPU_CFLAGS-$(CONFIG_486)+=-march=i486
- - CPU_CFLAGS-$(CONFIG_ELAN)+=-march=i486
- - CPU_CFLAGS-$(CONFIG_586)+=-march=i586
- - CPU_CFLAGS-$(CONFIG_586MMX)+=$(call check_gcc,-march=pentium-mmx,-march=i586)
- - CPU_CFLAGS-$(CONFIG_686)+=-march=i686
- - CPU_CFLAGS-$(CONFIG_PENTIUMII)+=$(call check_gcc,-march=pentium2,-march=i686)
- - CPU_CFLAGS-$(CONFIG_PENTIUMIII)+=$(call check_gcc,-march=pentium3,-march=i686)
- - CPU_CFLAGS-$(CONFIG_PENTIUM4)+=$(call check_gcc,-march=pentium4,-march=i686)
- - CPU_CFLAGS-$(CONFIG_K6)+=$(call check_gcc,-march=k6,-march=i586)
- - CPU_CFLAGS-$(CONFIG_K7)+=$(call check_gcc,-march=athlon,-march=i686)
- - CPU_CFLAGS-$(CONFIG_CRUSOE)+=-march=i686
- - CPU_CFLAGS-$(CONFIG_WINCHIPC6)+=$(call check_gcc,-march=winchip-c6,-march=i586)
- - CPU_CFLAGS-$(CONFIG_WINCHIP2)+=$(call check_gcc,-march=winchip2,-march=i586)
- - CPU_CFLAGS-$(CONFIG_CYRIXIII)+=$(call check_gcc,-march=c3,-march=i486)
- - CPU_CFLAGS-$(CONFIG_NEHEMIAH)+=$(call check_gcc,-march=c3-2,-march=i686)
- endif
-
- ifeq ($(TARGET_ARCH),sparc)
- @@ -397,6 +406,12 @@
- CPU_CFLAGS-$(COMPILE_IN_THUMB_MODE)+=-mthumb
- endif
-
- +ifeq ($(TARGET_ARCH),metag)
- + SYMBOL_PREFIX=_
- + CPU_CFLAGS-$(CONFIG_META_1_2)+=
- + CPU_CFLAGS-$(CONFIG_META_2_1)+=-Wa,-mcpu=metac21
- +endif
- +
- ifeq ($(TARGET_ARCH),mips)
- OPTIMIZATION+=-mno-split-addresses
- CPU_CFLAGS-$(CONFIG_MIPS_ISA_1)+=-mips1
- @@ -406,6 +421,7 @@
- CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32
- CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32R2)+=-march=mips32r2 -mtune=mips32r2
- CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
- + CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64R2)+=-mips64r2 -mtune=mips64r2
- ifeq ($(strip $(ARCH_BIG_ENDIAN)),y)
- CPU_LDFLAGS-$(CONFIG_MIPS_N64_ABI)+=-Wl,-melf64btsmip
- CPU_LDFLAGS-$(CONFIG_MIPS_O32_ABI)+=-Wl,-melf32btsmip
- @@ -537,6 +553,12 @@
- CPU_LDFLAGS-y += $(CPU_CFLAGS)
- endif
-
- +ifeq ($(TARGET_ARCH),arc)
- + CPU_CFLAGS-y += -mlock -mswape
- + CPU_CFLAGS-$(CONFIG_ARC_CPU_700) += -mA7
- + CPU_LDFLAGS-y += $(CPU_CFLAGS) -marclinux
- +endif
- +
- $(eval $(call check-gcc-var,$(PIEFLAG_NAME)))
- PIEFLAG := $(CFLAG_$(PIEFLAG_NAME))
- ifeq ($(PIEFLAG),)
- @@ -546,11 +568,11 @@
- # well as the LD PIE flag (below) because we can't rely on
- # gcc passing -pie if we used -fPIE. We need to directly use -pie
- # instead of -Wl,-pie as gcc picks up the wrong startfile/endfile
- -$(eval $(call cache-output-var,LDPIEFLAG,$(LD) --help 2>/dev/null | grep -q -- -pie && echo "-pie"))
- +$(eval $(call cache-output-var,LDPIEFLAG,$(CC) -Wl$(comma)--help 2>/dev/null | grep -q -- -pie && echo "-pie"))
-
- # Check for --as-needed support in linker
- ifndef LD_FLAG_ASNEEDED
- -_LD_FLAG_ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -- --as-needed)
- +_LD_FLAG_ASNEEDED:=$(shell $(CC) -Wl,--help 2>/dev/null | grep -- --as-needed)
- ifneq ($(_LD_FLAG_ASNEEDED),)
- export LD_FLAG_ASNEEDED:=--as-needed
- endif
- @@ -574,11 +596,18 @@
-
- # Check for AS_NEEDED support in linker script (binutils>=2.16.1 has it)
- ifndef ASNEEDED
- -export ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UCLIBC_LDSO) )" || echo "$(UCLIBC_LDSO)")
- -ifeq ($(UCLIBC_HAS_BACKTRACE),y)
- +export ASNEEDED:=$(shell $(CC) -Wl,--help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UCLIBC_LDSO) )" || echo "$(UCLIBC_LDSO)")
- +
- # Only used in installed libc.so linker script
- -UBACKTRACE_FULL_NAME := $(RUNTIME_PREFIX)lib/$(UBACKTRACE_DSO)
- -export UBACKTRACE_ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UBACKTRACE_FULL_NAME) )" || echo "$(UBACKTRACE_FULL_NAME)")
- +ifeq ($(UCLIBC_HAS_BACKTRACE),y)
- +ifeq ($(HARDWIRED_ABSPATH),y)
- +UBACKTRACE_FULL_NAME := $(subst //,/,$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UBACKTRACE_DSO))
- +else
- +UBACKTRACE_FULL_NAME := $(UBACKTRACE_DSO)
- +endif
- +export UBACKTRACE_ASNEEDED:=$(shell $(CC) -Wl,--help 2>/dev/null | grep -q -- --as-needed && \
- + echo "GROUP ( AS_NEEDED ( $(UBACKTRACE_FULL_NAME) ) )" || \
- + echo "GROUP ( $(UBACKTRACE_FULL_NAME) )")
- else
- export UBACKTRACE_ASNEEDED:=""
- endif
- @@ -623,14 +652,17 @@
- SSP_CFLAGS := $(SSP_DISABLE_FLAGS)
- endif
-
- -$(eval $(call check-gcc-var,-nostdlib))
- -
- # Collect all CFLAGS components
- -CFLAGS := -include $(top_srcdir)include/libc-symbols.h \
- - $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \
- - -nostdinc -I$(top_builddir)include -I$(top_srcdir)include -I. \
- +CFLAGS := $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \
- + -nostdinc -I$(top_builddir)include \
- + -I$(top_srcdir)include -include libc-symbols.h \
- + -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
- -I$(top_srcdir)libc/sysdeps/linux \
- - -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
- + -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
- + -I$(top_srcdir)ldso/include -I.
- +ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
- +CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
- +endif
-
- # We need this to be checked within libc-symbols.h
- ifneq ($(HAVE_SHARED),y)
- @@ -720,7 +752,7 @@
- ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- PTINC:= -I$(top_builddir)$(PTDIR) \
- -I$(top_srcdir)$(PTDIR) \
- - $(if $(TARGET_ARCH),-I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/$(TARGET_SUBARCH)) \
- + $(if $(TARGET_SUBARCH),-I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/$(TARGET_SUBARCH)) \
- -I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH) \
- -I$(top_builddir)$(PTDIR)/sysdeps/$(TARGET_ARCH) \
- -I$(top_srcdir)$(PTDIR)/sysdeps/$(TARGET_ARCH) \
- @@ -728,9 +760,7 @@
- -I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux \
- -I$(top_srcdir)$(PTDIR)/sysdeps/pthread \
- -I$(top_srcdir)$(PTDIR)/sysdeps/pthread/bits \
- - -I$(top_srcdir)$(PTDIR)/sysdeps/generic \
- - -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
- - -I$(top_srcdir)ldso/include
- + -I$(top_srcdir)$(PTDIR)/sysdeps/generic
- #
- # Test for TLS if NPTL support was selected.
- #
- @@ -763,13 +793,14 @@
- PTINC :=
- endif
- CFLAGS += -I$(top_srcdir)libc/sysdeps/linux/common
- -CFLAGS += -I$(KERNEL_HEADERS)
-
- #CFLAGS += -iwithprefix include-fixed -iwithprefix include
- $(eval $(call cache-output-var,CC_IPREFIX,$(CC) -print-file-name=include))
- CC_INC := -isystem $(dir $(CC_IPREFIX))include-fixed -isystem $(CC_IPREFIX)
- CFLAGS += $(CC_INC)
-
- +CFLAGS += -I$(KERNEL_HEADERS)
- +
- ifneq ($(DOASSERTS),y)
- CFLAGS+=-DNDEBUG
- endif
- @@ -786,7 +817,11 @@
-
- LIBGCC_CFLAGS ?= $(CFLAGS) $(CPU_CFLAGS-y)
- $(eval $(call cache-output-var,LIBGCC,$(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name))
- +$(eval $(call cache-output-var,LIBGCC_EH,$(CC) $(LIBGCC_CFLAGS) -print-file-name=libgcc_eh.a))
- +# with -O0 we (e.g. lockf) might end up with references to
- +# _Unwind_Resume, so pull in gcc_eh in this case..
- LIBGCC_DIR:=$(dir $(LIBGCC))
- +LIBGCC += $(if $(DODEBUG),$(LIBGCC_EH))
-
- # moved from libpthread/linuxthreads
- ifeq ($(UCLIBC_CTOR_DTOR),y)
- @@ -794,4 +829,6 @@
- SHARED_END_FILES:=$(LIBGCC_DIR)crtendS.o $(top_builddir)lib/crtn.o
- endif
-
- -LOCAL_INSTALL_PATH := install_dir
- +LOCAL_INSTALL_PATH := $(if $(O),$(O)/)install_dir
- +
- +PTHREAD_GENERATE_MANGLE ?= -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*\$$/\#define \1 \2/p"
- diff -Nur uClibc-0.9.33.2/test/API/Makefile uClibc/test/API/Makefile
- --- uClibc-0.9.33.2/test/API/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/API/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/args/Makefile uClibc/test/args/Makefile
- --- uClibc-0.9.33.2/test/args/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/args/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/assert/Makefile uClibc/test/assert/Makefile
- --- uClibc-0.9.33.2/test/assert/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/assert/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/build/Makefile uClibc/test/build/Makefile
- --- uClibc-0.9.33.2/test/build/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/build/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/crypt/Makefile uClibc/test/crypt/Makefile
- --- uClibc-0.9.33.2/test/crypt/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/crypt/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/ctype/Makefile uClibc/test/ctype/Makefile
- --- uClibc-0.9.33.2/test/ctype/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/ctype/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/dlopen/libA.c uClibc/test/dlopen/libA.c
- --- uClibc-0.9.33.2/test/dlopen/libA.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/dlopen/libA.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,7 @@
- +extern void libB_func(void);
- +
- +void libA_func(void);
- +void libA_func(void)
- +{
- + libB_func();
- +}
- diff -Nur uClibc-0.9.33.2/test/dlopen/libB.c uClibc/test/dlopen/libB.c
- --- uClibc-0.9.33.2/test/dlopen/libB.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/dlopen/libB.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,7 @@
- +extern void libC_func(void);
- +
- +void libB_func(void);
- +void libB_func(void)
- +{
- + libC_func();
- +}
- diff -Nur uClibc-0.9.33.2/test/dlopen/libC.c uClibc/test/dlopen/libC.c
- --- uClibc-0.9.33.2/test/dlopen/libC.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/dlopen/libC.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,30 @@
- +#include <dlfcn.h>
- +#include <stdio.h>
- +#include <stdlib.h>
- +
- +#define LIBNAME "libB.so"
- +void _libC_fini(void);
- +void _libC_fini(void)
- +{
- + printf("libC_fini():finish - atexit()\n");
- +}
- +
- +void libC_fini(void);
- +void libC_fini(void)
- +{
- + _libC_fini();
- +}
- +
- +void libC_func(void);
- +void libC_func(void)
- +{
- + void *libB;
- +
- + libB = dlopen(LIBNAME, RTLD_LAZY);
- + if (!libB) {
- + fprintf(stderr, "Could not open ./%s: %s\n", LIBNAME, dlerror());
- + exit(1);
- + }
- +
- + atexit(libC_fini);
- +}
- diff -Nur uClibc-0.9.33.2/test/dlopen/Makefile uClibc/test/dlopen/Makefile
- --- uClibc-0.9.33.2/test/dlopen/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/dlopen/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,11 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- -ifneq ($(HAVE_SHARED),y)
- -TESTS_DISABLED := test3
- -LDFLAGS_libtest.so := -lpthread
- -endif
- -
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/dlopen/Makefile.in uClibc/test/dlopen/Makefile.in
- --- uClibc-0.9.33.2/test/dlopen/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/dlopen/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -4,7 +4,13 @@
- # rules need a little love to work with glibc ...
- export UCLIBC_ONLY := 1
-
- -TESTS := dltest dltest2 dlstatic test1 test2 test3 dlundef dlafk dladdr
- +TESTS := dltest dltest2 dlstatic test1 test2 test3 dlundef dlafk dladdr \
- + testscope
- +
- +ifneq ($(HAVE_SHARED),y)
- +TESTS_DISABLED := test3
- +LDFLAGS_libtest.so := -lpthread
- +endif
-
- CFLAGS_dltest := -DLIBNAME="\"./libtest.so\""
- CFLAGS_dltest2 := -DLIBNAME="\"./libtest3.so\""
- @@ -18,22 +24,42 @@
- LDFLAGS_test2 := -ldl
- LDFLAGS_test3 := -ldl ./libtest1.so ./libtest2.so -Wl,-rpath,.
- LDFLAGS_dladdr := -ldl
- +LDFLAGS_testscope:= -ldl
-
- DEBUG_LIBS := X
- WRAPPER := env $(DEBUG_LIBS)=all LD_LIBRARY_PATH="$$PWD:.:$(LD_LIBRARY_PATH)"
-
- +# Build libC.so without -mprefergot compilation flag to force a
- +# R_SH_JMP_SLOT relocation instead of R_SH_GLOB_DAT for _libC_fini. This is
- +# needed to resolve the _libC_fini symbol when used (by libC.so destructor),
- +# whereas with GLOB_DAT relocation the resolution happens in the GOT entry
- +# when the libC is loaded, for the same reason remove also the "-z now"
- +# linker flag.
- +# These are needed to spot the issue test case want raise.
- +
- +ifeq ($(TARGET_ARCH),sh)
- +CFLAGS-OMIT-libC.c = -mprefergot
- +endif
- +LDFLAGS-OMIT-libC.c = -Wl,-z,now
- +
- dltest: libtest.so
- dltest2: libtest3.so
- dlstatic: libstatic.so
- dlundef: libundef.so
- dlafk: libafk.so
- +testscope:libA.so
- libafk.so: libafk-temp.so
- LDFLAGS_libafk.so := ./libafk-temp.so -Wl,-rpath,.
- test1: libtest1.so
- test2: libtest1.so libtest2.so
- test3: libtest1.so libtest2.so
- libtest1.so: libtest2.so
- +libB.so: libC.so
- +libA.so: libB.so
- LDFLAGS_libtest.so := -lpthread
- LDFLAGS_libtest1.so := ./libtest2.so -Wl,-rpath,.
- LDFLAGS_libtest2.so := -Wl,-rpath,.
- LDFLAGS_libtest3.so := -lpthread -Wl,-rpath,.
- +LDFLAGS_libC.so := -ldl
- +LDFLAGS_libB.so := ./libC.so -Wl,-rpath,.
- +LDFLAGS_libA.so := ./libB.so -Wl,-rpath,.
- diff -Nur uClibc-0.9.33.2/test/dlopen/testscope.c uClibc/test/dlopen/testscope.c
- --- uClibc-0.9.33.2/test/dlopen/testscope.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/dlopen/testscope.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,29 @@
- +#include <dlfcn.h>
- +#include <stdio.h>
- +#include <stdlib.h>
- +
- +#define LIBNAME "libA.so"
- +int main(int argc, char **argv)
- +{
- + void *libA;
- + void (*libAfn)(void);
- + char *error;
- +
- + libA = dlopen(LIBNAME, RTLD_LAZY);
- + if (!libA) {
- + fprintf(stderr, "Could not open ./%s: %s\n", LIBNAME, dlerror());
- + exit(1);
- + }
- +
- + libAfn = dlsym(libA, "libA_func");
- + if ((error = dlerror()) != NULL) {
- + fprintf(stderr, "Could not locate symbol 'libA_func': %s\n", error);
- + exit(1);
- + }
- +
- + libAfn();
- +
- + dlclose(libA);
- +
- + return EXIT_SUCCESS;
- +}
- diff -Nur uClibc-0.9.33.2/test/.gitignore uClibc/test/.gitignore
- --- uClibc-0.9.33.2/test/.gitignore 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/.gitignore 2014-02-03 12:32:57.000000000 +0100
- @@ -29,13 +29,19 @@
- dlopen/dlundef
- dlopen/libafk.so
- dlopen/libafk-temp.so
- +dlopen/libA.so
- +dlopen/libB.so
- +dlopen/libC.so
- dlopen/libstatic.so
- dlopen/libtest[123].so
- dlopen/libtest.so
- dlopen/libundef.so
- dlopen/test[1-3]
- +dlopen/testscope
- inet/bug-if1
- inet/gethost_r-align
- +inet/gethostid
- +inet/getnetent
- inet/if_nameindex
- inet/tst-aton
- inet/tst-ether_aton
- @@ -43,13 +49,28 @@
- inet/tst-ethers-line
- inet/tst-network
- inet/tst-ntoa
- -inet/gethostid
- -inet/getnetent
- +inet/tst-res
- +inet/tst-sock-nonblock
- librt/shmtest
- locale/bug-iconv-trans
- +locale/bug-usesetlocale
- +locale/C
- locale/collate-test
- locale/dump-ctype
- locale/gen-unicode-ctype
- +locale/show-ucs-data
- +locale/tst-digits
- +locale/tst-langinfo
- +locale/tst-mbswcs[1-6]
- +locale/tst_nl_langinfo
- +locale/tst-numeric
- +locale/tst-setlocale
- +locale/tst-sscanf
- +locale/tst-trans
- +locale/tst-wctype
- +locale/tst-xlocale1
- +locale/tst-xlocale2
- +locale/xfrm-test
- locale-mbwc/tst_iswalnum
- locale-mbwc/tst_iswalpha
- locale-mbwc/tst_iswcntrl
- @@ -100,16 +121,6 @@
- locale-mbwc/tst_wctype
- locale-mbwc/tst_wcwidth
- locale-mbwc/tst2_mbrtowc
- -locale/show-ucs-data
- -locale/tst-digits
- -locale/tst-langinfo
- -locale/tst-mbswcs[1-6]
- -locale/tst_nl_langinfo
- -locale/tst-numeric
- -locale/tst-setlocale
- -locale/tst-sscanf
- -locale/tst-trans
- -locale/tst-wctype
- malloc/malloc
- malloc/mallocbug
- malloc/malloc-standard-alignment
- @@ -146,8 +157,11 @@
- misc/seek
- misc/sem
- misc/stdarg
- +misc/tst-inotify
- misc/tst-scandir
- misc/tst-seekdir
- +misc/tst-statfs
- +misc/tst-statvfs
- misc/tst-utmp
- mmap/mmap
- mmap/mmap2
- @@ -243,6 +257,7 @@
- signal/signal
- signal/tst-raise
- signal/tst-signal
- +signal/tst-signalfd
- signal/tst-sigset
- signal/tst-sigsimple
- silly/hello
- @@ -250,10 +265,12 @@
- stat/memcmp-stat
- stat/stat
- stat/stat64
- +stat/stat-loop256
- stdio/64bit
- stdio/fclose-loop
- stdlib/ptytest
- stdlib/qsort
- +stdlib/testarc4random
- stdlib/testatexit
- stdlib/test-canon
- stdlib/test-canon2
- @@ -282,6 +299,7 @@
- time/tst-mktime
- time/tst-mktime3
- time/tst-strptime2
- +time/tst-timerfd
- time/tst_wcsftime
- tls/tst-tls[1-9]
- tls/tst-tls1[0-8]
- @@ -302,6 +320,8 @@
- unistd/getopt
- unistd/getopt_long
- unistd/tstgetopt
- +unistd/tst-posix_fallocate
- +unistd/tst-posix_fallocate64
- unistd/tst-preadwrite
- unistd/tst-preadwrite64
- unistd/vfork
- diff -Nur uClibc-0.9.33.2/test/inet/bug-if1.c uClibc/test/inet/bug-if1.c
- --- uClibc-0.9.33.2/test/inet/bug-if1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/inet/bug-if1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <limits.h>
- diff -Nur uClibc-0.9.33.2/test/inet/gethostid.c uClibc/test/inet/gethostid.c
- --- uClibc-0.9.33.2/test/inet/gethostid.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/inet/gethostid.c 2014-02-03 12:32:57.000000000 +0100
- @@ -1,6 +1,6 @@
- #include <unistd.h>
- #include <stdio.h>
- int main(void) {
- - printf("hostid=%d\n", gethostid());
- + printf("hostid=%ld\n", gethostid());
- return 0;
- }
- diff -Nur uClibc-0.9.33.2/test/inet/getnetent.c uClibc/test/inet/getnetent.c
- --- uClibc-0.9.33.2/test/inet/getnetent.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/inet/getnetent.c 2014-02-03 12:32:57.000000000 +0100
- @@ -8,7 +8,7 @@
- while (net->n_net && !((net->n_net >> 24) & 0xff)) {
- net->n_net <<= 8;
- }
- - printf("%lu.%lu.%lu.%lu\n",
- + printf("%u.%u.%u.%u\n",
- (net->n_net >> 24) & 0xff, (net->n_net >> 16) & 0xff,
- (net->n_net >> 8) & 0xff, net->n_net & 0xff);
- }
- diff -Nur uClibc-0.9.33.2/test/inet/Makefile uClibc/test/inet/Makefile
- --- uClibc-0.9.33.2/test/inet/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/inet/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/inet/Makefile.in uClibc/test/inet/Makefile.in
- --- uClibc-0.9.33.2/test/inet/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/inet/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -7,5 +7,11 @@
- endif
-
- ifeq ($(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
- -TESTS_DISABLED := tst-ether_aton tst-ethers tst-ethers-line
- +TESTS_DISABLED += tst-ether_aton tst-ethers tst-ethers-line
- +endif
- +
- +ifeq ($(UCLIBC_HAS_RESOLVER_SUPPORT),)
- +TESTS_DISABLED += tst-res
- +else
- +LDFLAGS_tst-res_glibc := -lresolv # assume it's glibc or somebody with that lib
- endif
- diff -Nur uClibc-0.9.33.2/test/inet/tst-network.c uClibc/test/inet/tst-network.c
- --- uClibc-0.9.33.2/test/inet/tst-network.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/inet/tst-network.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <sys/socket.h>
- diff -Nur uClibc-0.9.33.2/test/inet/tst-res.c uClibc/test/inet/tst-res.c
- --- uClibc-0.9.33.2/test/inet/tst-res.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/inet/tst-res.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,44 @@
- +#include <stdlib.h>
- +#include <assert.h>
- +#include <sys/types.h>
- +#include <netinet/in.h>
- +#include <arpa/nameser.h>
- +#include <resolv.h>
- +#include <netdb.h>
- +
- +int main(int argc, char **argv)
- +{
- + int r;
- + struct __res_state state;
- +
- + r = res_ninit(&state);
- + if (r) {
- + herror("ninit");
- + abort();
- + }
- + r = res_init();
- + if (r) {
- + herror("init");
- + abort();
- + }
- +
- +#ifdef __UCLIBC_HAS_BSD_RES_CLOSE__
- + res_close();
- +#endif
- +#ifdef __UCLIBC__
- + /* assume there is at least one resolver configured */
- + assert (state._u._ext.nscount > 0);
- +#else
- + assert (state._u._ext.nscount == 0);
- +#endif
- + assert (state.options & RES_INIT);
- + res_nclose(&state);
- +#ifdef __UCLIBC__
- + /* We wipe the whole thing */
- + assert ((state.options & RES_INIT) == 0);
- +#endif
- + assert (state._u._ext.nscount == 0);
- +
- + return 0;
- +}
- +
- diff -Nur uClibc-0.9.33.2/test/inet/tst-sock-nonblock.c uClibc/test/inet/tst-sock-nonblock.c
- --- uClibc-0.9.33.2/test/inet/tst-sock-nonblock.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/inet/tst-sock-nonblock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,53 @@
- +/* vi: set sw=4 ts=4 sts=4: */
- +/*
- + * Nonblocking socket test for uClibc
- + * Copyright (C) 2012 by Kevin Cernekee <cernekee@gmail.com>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include <string.h>
- +#include <unistd.h>
- +#include <errno.h>
- +#include <error.h>
- +#include <sys/types.h>
- +#include <sys/socket.h>
- +#include <sys/un.h>
- +#include <sys/fcntl.h>
- +
- +static int
- +do_test(void)
- +{
- + int fd, ret, result = 0;
- + struct sockaddr_un sa;
- + char buf;
- +
- + fd = socket(AF_UNIX, SOCK_DGRAM | SOCK_NONBLOCK, 0);
- + if (fd < 0) {
- + perror("socket()");
- + result = 1;
- + }
- +
- + memset(&sa, 0, sizeof(sa));
- + sa.sun_family = AF_UNIX;
- + strcpy(sa.sun_path, "socktest");
- + unlink("socktest");
- + if (bind(fd, (const struct sockaddr *)&sa, sizeof(sa)) < 0) {
- + perror("bind()");
- + result = 1;
- + }
- +
- + ret = read(fd, &buf, sizeof(buf));
- + if (ret != -1 || errno != EAGAIN) {
- + error(0, 0, "Nonblocking read returned %d", ret);
- + result = 1;
- + }
- +
- + return result;
- +}
- +
- +#define TIMEOUT 5
- +#define TEST_FUNCTION do_test ()
- +#include "../test-skeleton.c"
- diff -Nur uClibc-0.9.33.2/test/librt/Makefile uClibc/test/librt/Makefile
- --- uClibc-0.9.33.2/test/librt/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/librt/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/locale/collate-test.c uClibc/test/locale/collate-test.c
- --- uClibc-0.9.33.2/test/locale/collate-test.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/collate-test.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <ctype.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/locale/dump-ctype.c uClibc/test/locale/dump-ctype.c
- --- uClibc-0.9.33.2/test/locale/dump-ctype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/dump-ctype.c 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Usage example:
- $ dump-ctype de_DE.UTF-8
- diff -Nur uClibc-0.9.33.2/test/locale/gen-unicode-ctype.c uClibc/test/locale/gen-unicode-ctype.c
- --- uClibc-0.9.33.2/test/locale/gen-unicode-ctype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/gen-unicode-ctype.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Usage example:
- $ gen-unicode /usr/local/share/Unidata/UnicodeData.txt 3.1
- diff -Nur uClibc-0.9.33.2/test/locale/Makefile uClibc/test/locale/Makefile
- --- uClibc-0.9.33.2/test/locale/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/locale/tst-C-locale.c uClibc/test/locale/tst-C-locale.c
- --- uClibc-0.9.33.2/test/locale/tst-C-locale.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-C-locale.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <ctype.h>
- #include <langinfo.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-ctype.c uClibc/test/locale/tst-ctype.c
- --- uClibc-0.9.33.2/test/locale/tst-ctype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-ctype.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <ctype.h>
- #include <locale.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-digits.c uClibc/test/locale/tst-digits.c
- --- uClibc-0.9.33.2/test/locale/tst-digits.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-digits.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <ctype.h>
- #include <langinfo.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-fmon.c uClibc/test/locale/tst-fmon.c
- --- uClibc-0.9.33.2/test/locale/tst-fmon.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-fmon.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <locale.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-langinfo.c uClibc/test/locale/tst-langinfo.c
- --- uClibc-0.9.33.2/test/locale/tst-langinfo.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-langinfo.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <langinfo.h>
- #include <locale.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-langinfo.input uClibc/test/locale/tst-langinfo.input
- --- uClibc-0.9.33.2/test/locale/tst-langinfo.input 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-langinfo.input 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- # Lesser General Public License for more details.
-
- # You should have received a copy of the GNU Lesser General Public
- -# License along with the GNU C Library; if not, write to the Free
- -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- -# 02111-1307 USA.
- +# License along with the GNU C Library; see the file COPYING.LIB. If
- +# not, see <http://www.gnu.org/licenses/>.
-
-
- # Run the test program.
- diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs1.c uClibc/test/locale/tst-mbswcs1.c
- --- uClibc-0.9.33.2/test/locale/tst-mbswcs1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-mbswcs1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs2.c uClibc/test/locale/tst-mbswcs2.c
- --- uClibc-0.9.33.2/test/locale/tst-mbswcs2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-mbswcs2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs3.c uClibc/test/locale/tst-mbswcs3.c
- --- uClibc-0.9.33.2/test/locale/tst-mbswcs3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-mbswcs3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs4.c uClibc/test/locale/tst-mbswcs4.c
- --- uClibc-0.9.33.2/test/locale/tst-mbswcs4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-mbswcs4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs5.c uClibc/test/locale/tst-mbswcs5.c
- --- uClibc-0.9.33.2/test/locale/tst-mbswcs5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-mbswcs5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs6.c uClibc/test/locale/tst-mbswcs6.c
- --- uClibc-0.9.33.2/test/locale/tst-mbswcs6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-mbswcs6.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <locale.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-numeric.c uClibc/test/locale/tst-numeric.c
- --- uClibc-0.9.33.2/test/locale/tst-numeric.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-numeric.c 2014-02-03 12:32:57.000000000 +0100
- @@ -16,9 +16,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <locale.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-rpmatch.c uClibc/test/locale/tst-rpmatch.c
- --- uClibc-0.9.33.2/test/locale/tst-rpmatch.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-rpmatch.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <locale.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-trans.c uClibc/test/locale/tst-trans.c
- --- uClibc-0.9.33.2/test/locale/tst-trans.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-trans.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <locale.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/locale/tst-wctype.c uClibc/test/locale/tst-wctype.c
- --- uClibc-0.9.33.2/test/locale/tst-wctype.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/tst-wctype.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <error.h>
- #include <locale.h>
- diff -Nur uClibc-0.9.33.2/test/locale/xfrm-test.c uClibc/test/locale/xfrm-test.c
- --- uClibc-0.9.33.2/test/locale/xfrm-test.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale/xfrm-test.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <ctype.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/locale-mbwc/Makefile uClibc/test/locale-mbwc/Makefile
- --- uClibc-0.9.33.2/test/locale-mbwc/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/locale-mbwc/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/Makefile uClibc/test/Makefile
- --- uClibc-0.9.33.2/test/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -5,6 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
- +top_srcdir=../
- top_builddir=../
- include Rules.mak
-
- @@ -46,9 +47,9 @@
-
- run: compile subdirs_run
-
- -compile: $(top_builddir)/$(LOCAL_INSTALL_PATH) subdirs_compile
- +compile: $(top_builddir)$(LOCAL_INSTALL_PATH) subdirs_compile
-
- -$(top_builddir)/$(LOCAL_INSTALL_PATH):
- +$(top_builddir)$(LOCAL_INSTALL_PATH):
- $(Q)$(MAKE) -C $(top_builddir) $(LOCAL_INSTALL_PATH)
-
- tags:
- @@ -62,13 +63,16 @@
- subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
-
- $(patsubst %, _dir_%, $(DIRS)) : dummy
- - $(Q)$(MAKE) -C $(patsubst _dir_%, %, $@)
- + $(Q)$(MAKE) -C $(patsubst _dir_%, %, $@) \
- + KCONFIG_CONFIG=$(KCONFIG_CONFIG)
-
- $(patsubst %, _dirrun_%, $(DIRS)) : dummy
- - $(Q)$(MAKE) -C $(patsubst _dirrun_%, %, $@) run
- + $(Q)$(MAKE) -C $(patsubst _dirrun_%, %, $@) run \
- + KCONFIG_CONFIG=$(KCONFIG_CONFIG)
-
- $(patsubst %, _dircompile_%, $(DIRS)) : dummy
- - $(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile
- + $(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile \
- + KCONFIG_CONFIG=$(KCONFIG_CONFIG)
-
- $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
- $(Q)$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
- diff -Nur uClibc-0.9.33.2/test/malloc/Makefile uClibc/test/malloc/Makefile
- --- uClibc-0.9.33.2/test/malloc/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/malloc/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/malloc/Makefile.in uClibc/test/malloc/Makefile.in
- --- uClibc-0.9.33.2/test/malloc/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/malloc/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -2,3 +2,11 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- TESTS_DISABLED := time_malloc
- +
- +ifneq ($(UCLIBC_SUSV2_LEGACY),y)
- +TESTS_DISABLED += tst-valloc
- +endif
- +
- +ifneq ($(UCLIBC_HAS_OBSTACK),y)
- +TESTS_DISABLED += tst-obstack
- +endif
- diff -Nur uClibc-0.9.33.2/test/malloc/tst-calloc.c uClibc/test/malloc/tst-calloc.c
- --- uClibc-0.9.33.2/test/malloc/tst-calloc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/malloc/tst-calloc.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <limits.h>
- diff -Nur uClibc-0.9.33.2/test/malloc/tst-malloc.c uClibc/test/malloc/tst-malloc.c
- --- uClibc-0.9.33.2/test/malloc/tst-malloc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/malloc/tst-malloc.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <malloc.h>
- diff -Nur uClibc-0.9.33.2/test/malloc/tst-mcheck.c uClibc/test/malloc/tst-mcheck.c
- --- uClibc-0.9.33.2/test/malloc/tst-mcheck.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/malloc/tst-mcheck.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/malloc/tst-obstack.c uClibc/test/malloc/tst-obstack.c
- --- uClibc-0.9.33.2/test/malloc/tst-obstack.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/malloc/tst-obstack.c 2014-02-03 12:32:57.000000000 +0100
- @@ -1,4 +1,8 @@
- -/* Test case by Alexandre Duret-Lutz <duret_g@epita.fr>. */
- +/* Test case by Alexandre Duret-Lutz <duret_g@epita.fr>.
- + * test_obstack_printf() added by Anthony G. Basile <blueness.gentoo.org>.
- + */
- +
- +#include <features.h>
- #include <obstack.h>
- #include <stdint.h>
- #include <stdio.h>
- @@ -26,7 +30,7 @@
- }
-
- int
- -main (void)
- +test_obstack_alloc (void)
- {
- int result = 0;
- int align = 2;
- @@ -62,3 +66,39 @@
-
- return result;
- }
- +
- +int
- +test_obstack_printf (void)
- +{
- + int result = 0;
- + int n;
- + char *s;
- + struct obstack ob;
- +
- + obstack_init (&ob);
- +
- + n = obstack_printf (&ob, "%s%d%c", "testing 1 ... 2 ... ", 3, '\n');
- + result |= (n != 22);
- + printf("obstack_printf => %d\n", n);
- +
- + n = obstack_printf (&ob, "%s%d%c", "testing 3 ... 2 ... ", 1, '\0');
- + result |= (n != 22);
- + printf("obstack_printf => %d\n", n);
- +
- + s = obstack_finish (&ob);
- + printf("obstack_printf => %s\n", s);
- + obstack_free (&ob, NULL);
- +
- + return result;
- +}
- +
- +int
- +main (void)
- +{
- + int result = 0;
- +
- + result |= test_obstack_alloc();
- + result |= test_obstack_printf();
- +
- + return result;
- +}
- diff -Nur uClibc-0.9.33.2/test/math/basic-test.c uClibc/test/math/basic-test.c
- --- uClibc-0.9.33.2/test/math/basic-test.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/basic-test.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define _ISOC99_SOURCE
-
- @@ -65,11 +64,6 @@
- check (#FLOAT " !isnan (1)", !(isnan (one_var))); \
- check (#FLOAT " !isnan (inf)", !(isnan (Inf_var))); \
- \
- - check (#FLOAT " inf == inf", Inf_var == Inf_var); \
- - check (#FLOAT " -inf == -inf", -Inf_var == -Inf_var); \
- - check (#FLOAT " inf != -inf", Inf_var != -Inf_var); \
- - check (#FLOAT " NaN != NaN", NaN_var != NaN_var); \
- - \
- /* \
- the same tests but this time with NAN from <bits/nan.h> \
- NAN is a double const \
- @@ -78,7 +72,6 @@
- check (#FLOAT " isnan (-NAN)", isnan (-NAN)); \
- check (#FLOAT " !isinf (NAN)", !(isinf (NAN))); \
- check (#FLOAT " !isinf (-NAN)", !(isinf (-NAN))); \
- - check (#FLOAT " NAN != NAN", NAN != NAN); \
- \
- /* \
- And again with the value returned by the `nan' function. \
- @@ -89,6 +82,48 @@
- check (#FLOAT " !isinf (-NAN)", !(isinf (-NANFUNC ("")))); \
- check (#FLOAT " NAN != NAN", NANFUNC ("") != NANFUNC ("")); \
- \
- + /* test if HUGE_VALx is ok */ \
- + x1 = HUGEVAL; \
- + check (#FLOAT " isinf (HUGE_VALx) == +1", isinf (x1) == +1); \
- + x1 = - HUGEVAL; \
- + check (#FLOAT " isinf (-HUGE_VALx) == -1", isinf (x1) == -1); \
- +}
- +#ifndef DO_C99_MATH
- +# undef TEST_FUNC
- +# define TEST_FUNC(NAME, FLOAT, NANFUNC, EPSILON, HUGEVAL) \
- +static void \
- +NAME(void) \
- +{ /* nothing */ }
- +#endif
- +
- +#define TEST_VAL(NAME, FLOAT, NANFUNC, EPSILON, HUGEVAL) \
- +static void \
- +NAME (void) \
- +{ \
- + /* Variables are declared volatile to forbid some compiler \
- + optimizations. */ \
- + volatile FLOAT Inf_var, NaN_var, zero_var, one_var; \
- + FLOAT x1, x2; \
- + \
- + zero_var = 0.0; \
- + one_var = 1.0; \
- + NaN_var = zero_var/zero_var; \
- + Inf_var = one_var / zero_var; \
- + \
- + (void) &zero_var; \
- + (void) &one_var; \
- + (void) &NaN_var; \
- + (void) &Inf_var; \
- + \
- + \
- + check (#FLOAT " inf == inf", Inf_var == Inf_var); \
- + check (#FLOAT " -inf == -inf", -Inf_var == -Inf_var); \
- + check (#FLOAT " inf != -inf", Inf_var != -Inf_var); \
- + check (#FLOAT " NaN != NaN", NaN_var != NaN_var); \
- + \
- + check (#FLOAT " NAN != NAN", NAN != NAN); \
- + \
- + \
- /* test if EPSILON is ok */ \
- x1 = 1.0; \
- x2 = x1 + EPSILON; \
- @@ -98,27 +133,28 @@
- x2 = x1 - EPSILON; \
- check (#FLOAT " 1 != 1-EPSILON", x1 != x2); \
- \
- - /* test if HUGE_VALx is ok */ \
- - x1 = HUGEVAL; \
- - check (#FLOAT " isinf (HUGE_VALx) == +1", isinf (x1) == +1); \
- - x1 = - HUGEVAL; \
- - check (#FLOAT " isinf (-HUGE_VALx) == -1", isinf (x1) == -1); \
- }
-
- -TEST_FUNC (float_test, float, nanf, FLT_EPSILON, HUGE_VALF)
- -TEST_FUNC (double_test, double, nan, DBL_EPSILON, HUGE_VAL)
- +TEST_VAL (float_test_value, float, nanf, FLT_EPSILON, HUGE_VALF)
- +TEST_FUNC (float_test_call, float, nanf, FLT_EPSILON, HUGE_VALF)
- +TEST_VAL (double_test_value, double, nan, DBL_EPSILON, HUGE_VAL)
- +TEST_FUNC (double_test_call, double, nan, DBL_EPSILON, HUGE_VAL)
- #ifndef NO_LONG_DOUBLE
- -TEST_FUNC (ldouble_test, long double, nanl, LDBL_EPSILON, HUGE_VALL)
- +TEST_VAL (ldouble_test_value, long double, nanl, LDBL_EPSILON, HUGE_VALL)
- +TEST_FUNC (ldouble_test_call, long double, nanl, LDBL_EPSILON, HUGE_VALL)
- #endif
-
- int
- main (void)
- {
- - float_test ();
- - double_test ();
- + float_test_value ();
- + float_test_call ();
- + double_test_value ();
- + double_test_call ();
-
- #ifndef NO_LONG_DOUBLE
- - ldouble_test ();
- + ldouble_test_value ();
- + ldouble_test_call ();
- #endif
-
- return errors != 0;
- diff -Nur uClibc-0.9.33.2/test/math/gen-libm-test.pl uClibc/test/math/gen-libm-test.pl
- --- uClibc-0.9.33.2/test/math/gen-libm-test.pl 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/gen-libm-test.pl 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- # Lesser General Public License for more details.
-
- # You should have received a copy of the GNU Lesser General Public
- -# License along with the GNU C Library; if not, write to the Free
- -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- -# 02111-1307 USA.
- +# License along with the GNU C Library; see the file COPYING.LIB. If
- +# not, see <http://www.gnu.org/licenses/>.
-
- # This file needs to be tidied up
- # Note that functions and tests share the same namespace.
- diff -Nur uClibc-0.9.33.2/test/math/libm-test.inc uClibc/test/math/libm-test.inc
- --- uClibc-0.9.33.2/test/math/libm-test.inc 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/libm-test.inc 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Part of testsuite for libm.
-
- diff -Nur uClibc-0.9.33.2/test/math/libm-test-ulps-sh uClibc/test/math/libm-test-ulps-sh
- --- uClibc-0.9.33.2/test/math/libm-test-ulps-sh 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/math/libm-test-ulps-sh 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,1094 @@
- +# Begin of automatic generation
- +
- +# asin
- +Test "asin (-0.5) == -pi/6":
- +float: 2
- +ifloat: 2
- +Test "asin (0.5) == pi/6":
- +float: 2
- +ifloat: 2
- +Test "asin (0.7) == 0.7753974966107530637":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +
- +# atan2
- +Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267":
- +float: 3
- +ifloat: 3
- +Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267":
- +float: 3
- +ifloat: 3
- +Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736":
- +float: 4
- +ifloat: 4
- +
- +# atanh
- +Test "atanh (0.7) == 0.8673005276940531944":
- +double: 1
- +idouble: 1
- +
- +# cabs
- +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
- +double: 1
- +idouble: 1
- +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +
- +# cacos
- +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
- +float: 1
- +ifloat: 1
- +
- +# cacosh
- +Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
- +double: 1
- +float: 7
- +idouble: 1
- +ifloat: 7
- +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
- +double: 1
- +float: 3
- +idouble: 1
- +ifloat: 3
- +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +# casin
- +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
- +double: 3
- +float: 2
- +idouble: 3
- +ifloat: 2
- +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
- +float: 1
- +ifloat: 1
- +
- +# casinh
- +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
- +double: 5
- +float: 1
- +idouble: 5
- +ifloat: 1
- +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
- +double: 3
- +float: 6
- +idouble: 3
- +ifloat: 6
- +Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
- +double: 1
- +idouble: 1
- +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
- +float: 1
- +ifloat: 1
- +
- +# catan
- +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
- +float: 3
- +ifloat: 3
- +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
- +float: 4
- +ifloat: 4
- +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
- +double: 1
- +idouble: 1
- +
- +# catanh
- +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
- +double: 4
- +idouble: 4
- +Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
- +float: 4
- +ifloat: 4
- +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
- +double: 1
- +float: 6
- +idouble: 1
- +ifloat: 6
- +
- +# cbrt
- +Test "cbrt (-27.0) == -3.0":
- +double: 1
- +idouble: 1
- +Test "cbrt (0.970299) == 0.99":
- +double: 1
- +idouble: 1
- +
- +# ccos
- +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
- +float: 1
- +ifloat: 1
- +Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
- +double: 1
- +idouble: 1
- +Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
- +double: 1
- +idouble: 1
- +
- +# ccosh
- +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
- +float: 1
- +ifloat: 1
- +Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
- +double: 1
- +idouble: 1
- +
- +# cexp
- +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
- +float: 1
- +ifloat: 1
- +Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
- +float: 1
- +ifloat: 1
- +
- +# clog
- +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
- +double: 1
- +float: 3
- +idouble: 1
- +ifloat: 3
- +
- +# clog10
- +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
- +double: 1
- +float: 5
- +idouble: 1
- +ifloat: 5
- +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
- +double: 1
- +idouble: 1
- +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
- +float: 1
- +ifloat: 1
- +
- +# cos
- +Test "cos (0.7) == 0.7648421872844884262":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "cos (M_PI_6l * 2.0) == 0.5":
- +double: 1
- +float: 0.5
- +idouble: 1
- +ifloat: 0.5
- +Test "cos (M_PI_6l * 4.0) == -0.5":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "cos (pi/2) == 0":
- +double: 0.2758
- +float: 0.3667
- +idouble: 0.2758
- +ifloat: 0.3667
- +
- +# cpow
- +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
- +double: 1
- +float: 4
- +idouble: 1
- +ifloat: 4
- +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
- +float: 2
- +ifloat: 2
- +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
- +double: 1.1031
- +float: 1.5
- +idouble: 1.1031
- +ifloat: 1.5
- +
- +# csin
- +Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
- +float: 1
- +ifloat: 1
- +
- +# csinh
- +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
- +double: 1
- +idouble: 1
- +Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
- +float: 1
- +ifloat: 1
- +
- +# csqrt
- +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
- +float: 1
- +ifloat: 1
- +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
- +float: 1
- +ifloat: 1
- +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
- +float: 1
- +ifloat: 1
- +
- +# ctan
- +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
- +double: 1
- +idouble: 1
- +Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
- +float: 1
- +ifloat: 1
- +Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +# ctanh
- +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
- +float: 1
- +ifloat: 1
- +Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +
- +# erfc
- +Test "erfc (0.7) == 0.32219880616258152702":
- +double: 1
- +idouble: 1
- +Test "erfc (1.2) == 0.089686021770364619762":
- +double: 2
- +float: 2
- +idouble: 2
- +ifloat: 2
- +Test "erfc (2.0) == 0.0046777349810472658379":
- +double: 1
- +idouble: 1
- +Test "erfc (4.1) == 0.67000276540848983727e-8":
- +double: 24
- +float: 12
- +idouble: 24
- +ifloat: 12
- +
- +# exp10
- +Test "exp10 (-1) == 0.1":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "exp10 (0.7) == 5.0118723362727228500":
- +float: 1
- +ifloat: 1
- +Test "exp10 (3) == 1000":
- +double: 6
- +float: 2
- +idouble: 6
- +ifloat: 2
- +
- +# expm1
- +Test "expm1 (1) == M_El - 1.0":
- +float: 1
- +ifloat: 1
- +
- +# fmod
- +Test "fmod (-6.5, -2.3) == -1.9":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "fmod (-6.5, 2.3) == -1.9":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "fmod (6.5, -2.3) == 1.9":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "fmod (6.5, 2.3) == 1.9":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +
- +# hypot
- +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
- +double: 1
- +idouble: 1
- +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +
- +# j0
- +Test "j0 (10.0) == -0.24593576445134833520":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "j0 (2.0) == 0.22389077914123566805":
- +float: 2
- +ifloat: 2
- +Test "j0 (8.0) == 0.17165080713755390609":
- +float: 1
- +ifloat: 1
- +
- +# j1
- +Test "j1 (10.0) == 0.043472746168861436670":
- +float: 2
- +ifloat: 2
- +Test "j1 (2.0) == 0.57672480775687338720":
- +double: 1
- +idouble: 1
- +Test "j1 (8.0) == 0.23463634685391462438":
- +double: 1
- +idouble: 1
- +
- +# jn
- +Test "jn (0, 10.0) == -0.24593576445134833520":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "jn (0, 2.0) == 0.22389077914123566805":
- +float: 2
- +ifloat: 2
- +Test "jn (0, 8.0) == 0.17165080713755390609":
- +float: 1
- +ifloat: 1
- +Test "jn (1, 10.0) == 0.043472746168861436670":
- +float: 2
- +ifloat: 2
- +Test "jn (1, 2.0) == 0.57672480775687338720":
- +double: 1
- +idouble: 1
- +Test "jn (1, 8.0) == 0.23463634685391462438":
- +double: 1
- +idouble: 1
- +Test "jn (10, 0.1) == 0.26905328954342155795e-19":
- +double: 6
- +float: 4
- +idouble: 6
- +ifloat: 4
- +Test "jn (10, 0.7) == 0.75175911502153953928e-11":
- +double: 3
- +float: 1
- +idouble: 3
- +ifloat: 1
- +Test "jn (10, 10.0) == 0.20748610663335885770":
- +double: 4
- +float: 3
- +idouble: 4
- +ifloat: 3
- +Test "jn (10, 2.0) == 0.25153862827167367096e-6":
- +float: 4
- +ifloat: 4
- +Test "jn (3, 0.1) == 0.000020820315754756261429":
- +double: 1
- +idouble: 1
- +Test "jn (3, 0.7) == 0.0069296548267508408077":
- +float: 1
- +ifloat: 1
- +Test "jn (3, 10.0) == 0.058379379305186812343":
- +double: 3
- +float: 1
- +idouble: 3
- +ifloat: 1
- +Test "jn (3, 2.0) == 0.12894324947440205110":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +
- +# lgamma
- +Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +
- +# log
- +Test "log (0.7) == -0.35667494393873237891263871124118447":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +# log10
- +Test "log10 (0.7) == -0.15490195998574316929":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "log10 (e) == log10(e)":
- +float: 1
- +ifloat: 1
- +
- +# log1p
- +Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +# log2
- +Test "log2 (0.7) == -0.51457317282975824043":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +# sincos
- +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
- +double: 1
- +float: 0.5
- +idouble: 1
- +ifloat: 0.5
- +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
- +double: 0.2758
- +float: 0.3667
- +idouble: 0.2758
- +ifloat: 0.3667
- +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res":
- +float: 1
- +ifloat: 1
- +
- +# sinh
- +Test "sinh (0.7) == 0.75858370183953350346":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +# tan
- +Test "tan (pi/4) == 1":
- +double: 0.5
- +idouble: 0.5
- +
- +# tanh
- +Test "tanh (0.7) == 0.60436777711716349631":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +# tgamma
- +Test "tgamma (-0.5) == -2 sqrt (pi)":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "tgamma (0.5) == sqrt (pi)":
- +float: 1
- +ifloat: 1
- +Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +# y0
- +Test "y0 (0.7) == -0.19066492933739506743":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "y0 (1.0) == 0.088256964215676957983":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "y0 (1.5) == 0.38244892379775884396":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "y0 (10.0) == 0.055671167283599391424":
- +float: 1
- +ifloat: 1
- +Test "y0 (8.0) == 0.22352148938756622053":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +# y1
- +Test "y1 (0.1) == -6.4589510947020269877":
- +double: 1
- +idouble: 1
- +Test "y1 (0.7) == -1.1032498719076333697":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "y1 (1.5) == -0.41230862697391129595":
- +float: 1
- +ifloat: 1
- +Test "y1 (10.0) == 0.24901542420695388392":
- +double: 3
- +float: 1
- +idouble: 3
- +ifloat: 1
- +Test "y1 (2.0) == -0.10703243154093754689":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "y1 (8.0) == -0.15806046173124749426":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +
- +# yn
- +Test "yn (0, 0.7) == -0.19066492933739506743":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "yn (0, 1.0) == 0.088256964215676957983":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "yn (0, 1.5) == 0.38244892379775884396":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +Test "yn (0, 10.0) == 0.055671167283599391424":
- +float: 1
- +ifloat: 1
- +Test "yn (0, 8.0) == 0.22352148938756622053":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "yn (1, 0.1) == -6.4589510947020269877":
- +double: 1
- +idouble: 1
- +Test "yn (1, 0.7) == -1.1032498719076333697":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "yn (1, 1.5) == -0.41230862697391129595":
- +float: 1
- +ifloat: 1
- +Test "yn (1, 10.0) == 0.24901542420695388392":
- +double: 3
- +float: 1
- +idouble: 3
- +ifloat: 1
- +Test "yn (1, 2.0) == -0.10703243154093754689":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "yn (1, 8.0) == -0.15806046173124749426":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +Test "yn (10, 0.1) == -0.11831335132045197885e19":
- +double: 2
- +float: 2
- +idouble: 2
- +ifloat: 2
- +Test "yn (10, 0.7) == -0.42447194260703866924e10":
- +double: 3
- +idouble: 3
- +Test "yn (10, 1.0) == -0.12161801427868918929e9":
- +double: 1
- +idouble: 1
- +Test "yn (10, 10.0) == -0.35981415218340272205":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "yn (10, 2.0) == -129184.54220803928264":
- +double: 2
- +idouble: 2
- +Test "yn (3, 0.1) == -5099.3323786129048894":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "yn (3, 0.7) == -15.819479052819633505":
- +double: 3
- +float: 1
- +idouble: 3
- +ifloat: 1
- +Test "yn (3, 10.0) == -0.25136265718383732978":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "yn (3, 2.0) == -1.1277837768404277861":
- +double: 1
- +idouble: 1
- +
- +# Maximal error of functions:
- +Function: "asin":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +
- +Function: "atan2":
- +float: 4
- +ifloat: 4
- +
- +Function: "atanh":
- +double: 1
- +idouble: 1
- +
- +Function: "cabs":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Real part of "cacos":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Imaginary part of "cacos":
- +float: 1
- +ifloat: 1
- +
- +Function: Real part of "cacosh":
- +double: 1
- +float: 7
- +idouble: 1
- +ifloat: 7
- +
- +Function: Imaginary part of "cacosh":
- +double: 1
- +float: 3
- +idouble: 1
- +ifloat: 3
- +
- +Function: Real part of "casin":
- +double: 3
- +float: 2
- +idouble: 3
- +ifloat: 2
- +
- +Function: Imaginary part of "casin":
- +float: 1
- +ifloat: 1
- +
- +Function: Real part of "casinh":
- +double: 5
- +float: 1
- +idouble: 5
- +ifloat: 1
- +
- +Function: Imaginary part of "casinh":
- +double: 3
- +float: 6
- +idouble: 3
- +ifloat: 6
- +
- +Function: Real part of "catan":
- +float: 4
- +ifloat: 4
- +
- +Function: Imaginary part of "catan":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Real part of "catanh":
- +double: 4
- +float: 1
- +idouble: 4
- +ifloat: 1
- +
- +Function: Imaginary part of "catanh":
- +double: 1
- +float: 6
- +idouble: 1
- +ifloat: 6
- +
- +Function: "cbrt":
- +double: 1
- +idouble: 1
- +
- +Function: Real part of "ccos":
- +double: 1
- +idouble: 1
- +
- +Function: Imaginary part of "ccos":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Real part of "ccosh":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Imaginary part of "ccosh":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Real part of "cexp":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Imaginary part of "cexp":
- +float: 1
- +ifloat: 1
- +
- +Function: Imaginary part of "clog":
- +double: 1
- +float: 3
- +idouble: 1
- +ifloat: 3
- +
- +Function: Real part of "clog10":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Imaginary part of "clog10":
- +double: 1
- +float: 5
- +idouble: 1
- +ifloat: 5
- +
- +Function: "cos":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +
- +Function: Real part of "cpow":
- +double: 1
- +float: 4
- +idouble: 1
- +ifloat: 4
- +
- +Function: Imaginary part of "cpow":
- +double: 1.1031
- +float: 2
- +idouble: 1.1031
- +ifloat: 2
- +
- +Function: Imaginary part of "csin":
- +float: 1
- +ifloat: 1
- +
- +Function: Real part of "csinh":
- +float: 1
- +ifloat: 1
- +
- +Function: Imaginary part of "csinh":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Real part of "csqrt":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Imaginary part of "csqrt":
- +float: 1
- +ifloat: 1
- +
- +Function: Real part of "ctan":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Imaginary part of "ctan":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: Real part of "ctanh":
- +double: 2
- +float: 2
- +idouble: 2
- +ifloat: 2
- +
- +Function: Imaginary part of "ctanh":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +
- +Function: "erfc":
- +double: 24
- +float: 12
- +idouble: 24
- +ifloat: 12
- +
- +Function: "exp10":
- +double: 6
- +float: 2
- +idouble: 6
- +ifloat: 2
- +
- +Function: "expm1":
- +float: 1
- +ifloat: 1
- +
- +Function: "fmod":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +
- +Function: "hypot":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: "j0":
- +double: 2
- +float: 2
- +idouble: 2
- +ifloat: 2
- +
- +Function: "j1":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +
- +Function: "jn":
- +double: 6
- +float: 4
- +idouble: 6
- +ifloat: 4
- +
- +Function: "lgamma":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +
- +Function: "log":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: "log10":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: "log1p":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: "log2":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: "sincos":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: "sinh":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: "tan":
- +double: 0.5
- +idouble: 0.5
- +
- +Function: "tanh":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: "tgamma":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: "y0":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +
- +Function: "y1":
- +double: 3
- +float: 2
- +idouble: 3
- +ifloat: 2
- +
- +Function: "yn":
- +double: 3
- +float: 2
- +idouble: 3
- +ifloat: 2
- +
- +# end of automatic generation
- diff -Nur uClibc-0.9.33.2/test/math/libm-test-ulps-sh4 uClibc/test/math/libm-test-ulps-sh4
- --- uClibc-0.9.33.2/test/math/libm-test-ulps-sh4 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/libm-test-ulps-sh4 1970-01-01 01:00:00.000000000 +0100
- @@ -1,1094 +0,0 @@
- -# Begin of automatic generation
- -
- -# asin
- -Test "asin (-0.5) == -pi/6":
- -float: 2
- -ifloat: 2
- -Test "asin (0.5) == pi/6":
- -float: 2
- -ifloat: 2
- -Test "asin (0.7) == 0.7753974966107530637":
- -double: 1
- -float: 2
- -idouble: 1
- -ifloat: 2
- -
- -# atan2
- -Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267":
- -float: 3
- -ifloat: 3
- -Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267":
- -float: 3
- -ifloat: 3
- -Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736":
- -float: 4
- -ifloat: 4
- -
- -# atanh
- -Test "atanh (0.7) == 0.8673005276940531944":
- -double: 1
- -idouble: 1
- -
- -# cabs
- -Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
- -double: 1
- -idouble: 1
- -Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -
- -# cacos
- -Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
- -float: 1
- -ifloat: 1
- -
- -# cacosh
- -Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
- -double: 1
- -float: 7
- -idouble: 1
- -ifloat: 7
- -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
- -double: 1
- -float: 3
- -idouble: 1
- -ifloat: 3
- -Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -# casin
- -Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
- -double: 3
- -float: 2
- -idouble: 3
- -ifloat: 2
- -Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
- -float: 1
- -ifloat: 1
- -
- -# casinh
- -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
- -double: 5
- -float: 1
- -idouble: 5
- -ifloat: 1
- -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
- -double: 3
- -float: 6
- -idouble: 3
- -ifloat: 6
- -Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
- -double: 1
- -idouble: 1
- -Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
- -float: 1
- -ifloat: 1
- -
- -# catan
- -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
- -float: 3
- -ifloat: 3
- -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
- -float: 4
- -ifloat: 4
- -Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
- -double: 1
- -idouble: 1
- -
- -# catanh
- -Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
- -double: 4
- -idouble: 4
- -Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
- -float: 4
- -ifloat: 4
- -Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
- -double: 1
- -float: 6
- -idouble: 1
- -ifloat: 6
- -
- -# cbrt
- -Test "cbrt (-27.0) == -3.0":
- -double: 1
- -idouble: 1
- -Test "cbrt (0.970299) == 0.99":
- -double: 1
- -idouble: 1
- -
- -# ccos
- -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
- -float: 1
- -ifloat: 1
- -Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
- -double: 1
- -idouble: 1
- -Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
- -double: 1
- -idouble: 1
- -
- -# ccosh
- -Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
- -float: 1
- -ifloat: 1
- -Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
- -double: 1
- -idouble: 1
- -
- -# cexp
- -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
- -float: 1
- -ifloat: 1
- -Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
- -float: 1
- -ifloat: 1
- -
- -# clog
- -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
- -double: 1
- -float: 3
- -idouble: 1
- -ifloat: 3
- -
- -# clog10
- -Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
- -double: 1
- -float: 5
- -idouble: 1
- -ifloat: 5
- -Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
- -double: 1
- -idouble: 1
- -Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
- -float: 1
- -ifloat: 1
- -
- -# cos
- -Test "cos (0.7) == 0.7648421872844884262":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "cos (M_PI_6l * 2.0) == 0.5":
- -double: 1
- -float: 0.5
- -idouble: 1
- -ifloat: 0.5
- -Test "cos (M_PI_6l * 4.0) == -0.5":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "cos (pi/2) == 0":
- -double: 0.2758
- -float: 0.3667
- -idouble: 0.2758
- -ifloat: 0.3667
- -
- -# cpow
- -Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
- -double: 1
- -float: 4
- -idouble: 1
- -ifloat: 4
- -Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
- -float: 2
- -ifloat: 2
- -Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
- -double: 1.1031
- -float: 1.5
- -idouble: 1.1031
- -ifloat: 1.5
- -
- -# csin
- -Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
- -float: 1
- -ifloat: 1
- -
- -# csinh
- -Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
- -double: 1
- -idouble: 1
- -Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
- -float: 1
- -ifloat: 1
- -
- -# csqrt
- -Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
- -float: 1
- -ifloat: 1
- -Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
- -float: 1
- -ifloat: 1
- -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
- -float: 1
- -ifloat: 1
- -
- -# ctan
- -Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
- -double: 1
- -idouble: 1
- -Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
- -float: 1
- -ifloat: 1
- -Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -# ctanh
- -Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
- -double: 1
- -float: 2
- -idouble: 1
- -ifloat: 2
- -Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
- -float: 1
- -ifloat: 1
- -Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -
- -# erfc
- -Test "erfc (0.7) == 0.32219880616258152702":
- -double: 1
- -idouble: 1
- -Test "erfc (1.2) == 0.089686021770364619762":
- -double: 2
- -float: 2
- -idouble: 2
- -ifloat: 2
- -Test "erfc (2.0) == 0.0046777349810472658379":
- -double: 1
- -idouble: 1
- -Test "erfc (4.1) == 0.67000276540848983727e-8":
- -double: 24
- -float: 12
- -idouble: 24
- -ifloat: 12
- -
- -# exp10
- -Test "exp10 (-1) == 0.1":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "exp10 (0.7) == 5.0118723362727228500":
- -float: 1
- -ifloat: 1
- -Test "exp10 (3) == 1000":
- -double: 6
- -float: 2
- -idouble: 6
- -ifloat: 2
- -
- -# expm1
- -Test "expm1 (1) == M_El - 1.0":
- -float: 1
- -ifloat: 1
- -
- -# fmod
- -Test "fmod (-6.5, -2.3) == -1.9":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "fmod (-6.5, 2.3) == -1.9":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "fmod (6.5, -2.3) == 1.9":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "fmod (6.5, 2.3) == 1.9":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -
- -# hypot
- -Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
- -double: 1
- -idouble: 1
- -Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
- -float: 1
- -ifloat: 1
- -
- -# j0
- -Test "j0 (10.0) == -0.24593576445134833520":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "j0 (2.0) == 0.22389077914123566805":
- -float: 2
- -ifloat: 2
- -Test "j0 (8.0) == 0.17165080713755390609":
- -float: 1
- -ifloat: 1
- -
- -# j1
- -Test "j1 (10.0) == 0.043472746168861436670":
- -float: 2
- -ifloat: 2
- -Test "j1 (2.0) == 0.57672480775687338720":
- -double: 1
- -idouble: 1
- -Test "j1 (8.0) == 0.23463634685391462438":
- -double: 1
- -idouble: 1
- -
- -# jn
- -Test "jn (0, 10.0) == -0.24593576445134833520":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "jn (0, 2.0) == 0.22389077914123566805":
- -float: 2
- -ifloat: 2
- -Test "jn (0, 8.0) == 0.17165080713755390609":
- -float: 1
- -ifloat: 1
- -Test "jn (1, 10.0) == 0.043472746168861436670":
- -float: 2
- -ifloat: 2
- -Test "jn (1, 2.0) == 0.57672480775687338720":
- -double: 1
- -idouble: 1
- -Test "jn (1, 8.0) == 0.23463634685391462438":
- -double: 1
- -idouble: 1
- -Test "jn (10, 0.1) == 0.26905328954342155795e-19":
- -double: 6
- -float: 4
- -idouble: 6
- -ifloat: 4
- -Test "jn (10, 0.7) == 0.75175911502153953928e-11":
- -double: 3
- -float: 1
- -idouble: 3
- -ifloat: 1
- -Test "jn (10, 10.0) == 0.20748610663335885770":
- -double: 4
- -float: 3
- -idouble: 4
- -ifloat: 3
- -Test "jn (10, 2.0) == 0.25153862827167367096e-6":
- -float: 4
- -ifloat: 4
- -Test "jn (3, 0.1) == 0.000020820315754756261429":
- -double: 1
- -idouble: 1
- -Test "jn (3, 0.7) == 0.0069296548267508408077":
- -float: 1
- -ifloat: 1
- -Test "jn (3, 10.0) == 0.058379379305186812343":
- -double: 3
- -float: 1
- -idouble: 3
- -ifloat: 1
- -Test "jn (3, 2.0) == 0.12894324947440205110":
- -double: 1
- -float: 2
- -idouble: 1
- -ifloat: 2
- -
- -# lgamma
- -Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
- -double: 1
- -float: 2
- -idouble: 1
- -ifloat: 2
- -
- -# log
- -Test "log (0.7) == -0.35667494393873237891263871124118447":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -# log10
- -Test "log10 (0.7) == -0.15490195998574316929":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "log10 (e) == log10(e)":
- -float: 1
- -ifloat: 1
- -
- -# log1p
- -Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -# log2
- -Test "log2 (0.7) == -0.51457317282975824043":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -# sincos
- -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
- -double: 1
- -float: 0.5
- -idouble: 1
- -ifloat: 0.5
- -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
- -double: 0.2758
- -float: 0.3667
- -idouble: 0.2758
- -ifloat: 0.3667
- -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res":
- -float: 1
- -ifloat: 1
- -
- -# sinh
- -Test "sinh (0.7) == 0.75858370183953350346":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -# tan
- -Test "tan (pi/4) == 1":
- -double: 0.5
- -idouble: 0.5
- -
- -# tanh
- -Test "tanh (0.7) == 0.60436777711716349631":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -# tgamma
- -Test "tgamma (-0.5) == -2 sqrt (pi)":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "tgamma (0.5) == sqrt (pi)":
- -float: 1
- -ifloat: 1
- -Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -# y0
- -Test "y0 (0.7) == -0.19066492933739506743":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "y0 (1.0) == 0.088256964215676957983":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "y0 (1.5) == 0.38244892379775884396":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "y0 (10.0) == 0.055671167283599391424":
- -float: 1
- -ifloat: 1
- -Test "y0 (8.0) == 0.22352148938756622053":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -# y1
- -Test "y1 (0.1) == -6.4589510947020269877":
- -double: 1
- -idouble: 1
- -Test "y1 (0.7) == -1.1032498719076333697":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "y1 (1.5) == -0.41230862697391129595":
- -float: 1
- -ifloat: 1
- -Test "y1 (10.0) == 0.24901542420695388392":
- -double: 3
- -float: 1
- -idouble: 3
- -ifloat: 1
- -Test "y1 (2.0) == -0.10703243154093754689":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "y1 (8.0) == -0.15806046173124749426":
- -double: 1
- -float: 2
- -idouble: 1
- -ifloat: 2
- -
- -# yn
- -Test "yn (0, 0.7) == -0.19066492933739506743":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "yn (0, 1.0) == 0.088256964215676957983":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "yn (0, 1.5) == 0.38244892379775884396":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -Test "yn (0, 10.0) == 0.055671167283599391424":
- -float: 1
- -ifloat: 1
- -Test "yn (0, 8.0) == 0.22352148938756622053":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "yn (1, 0.1) == -6.4589510947020269877":
- -double: 1
- -idouble: 1
- -Test "yn (1, 0.7) == -1.1032498719076333697":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "yn (1, 1.5) == -0.41230862697391129595":
- -float: 1
- -ifloat: 1
- -Test "yn (1, 10.0) == 0.24901542420695388392":
- -double: 3
- -float: 1
- -idouble: 3
- -ifloat: 1
- -Test "yn (1, 2.0) == -0.10703243154093754689":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "yn (1, 8.0) == -0.15806046173124749426":
- -double: 1
- -float: 2
- -idouble: 1
- -ifloat: 2
- -Test "yn (10, 0.1) == -0.11831335132045197885e19":
- -double: 2
- -float: 2
- -idouble: 2
- -ifloat: 2
- -Test "yn (10, 0.7) == -0.42447194260703866924e10":
- -double: 3
- -idouble: 3
- -Test "yn (10, 1.0) == -0.12161801427868918929e9":
- -double: 1
- -idouble: 1
- -Test "yn (10, 10.0) == -0.35981415218340272205":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "yn (10, 2.0) == -129184.54220803928264":
- -double: 2
- -idouble: 2
- -Test "yn (3, 0.1) == -5099.3323786129048894":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "yn (3, 0.7) == -15.819479052819633505":
- -double: 3
- -float: 1
- -idouble: 3
- -ifloat: 1
- -Test "yn (3, 10.0) == -0.25136265718383732978":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -Test "yn (3, 2.0) == -1.1277837768404277861":
- -double: 1
- -idouble: 1
- -
- -# Maximal error of functions:
- -Function: "asin":
- -double: 1
- -float: 2
- -idouble: 1
- -ifloat: 2
- -
- -Function: "atan2":
- -float: 4
- -ifloat: 4
- -
- -Function: "atanh":
- -double: 1
- -idouble: 1
- -
- -Function: "cabs":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Real part of "cacos":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Imaginary part of "cacos":
- -float: 1
- -ifloat: 1
- -
- -Function: Real part of "cacosh":
- -double: 1
- -float: 7
- -idouble: 1
- -ifloat: 7
- -
- -Function: Imaginary part of "cacosh":
- -double: 1
- -float: 3
- -idouble: 1
- -ifloat: 3
- -
- -Function: Real part of "casin":
- -double: 3
- -float: 2
- -idouble: 3
- -ifloat: 2
- -
- -Function: Imaginary part of "casin":
- -float: 1
- -ifloat: 1
- -
- -Function: Real part of "casinh":
- -double: 5
- -float: 1
- -idouble: 5
- -ifloat: 1
- -
- -Function: Imaginary part of "casinh":
- -double: 3
- -float: 6
- -idouble: 3
- -ifloat: 6
- -
- -Function: Real part of "catan":
- -float: 4
- -ifloat: 4
- -
- -Function: Imaginary part of "catan":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Real part of "catanh":
- -double: 4
- -float: 1
- -idouble: 4
- -ifloat: 1
- -
- -Function: Imaginary part of "catanh":
- -double: 1
- -float: 6
- -idouble: 1
- -ifloat: 6
- -
- -Function: "cbrt":
- -double: 1
- -idouble: 1
- -
- -Function: Real part of "ccos":
- -double: 1
- -idouble: 1
- -
- -Function: Imaginary part of "ccos":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Real part of "ccosh":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Imaginary part of "ccosh":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Real part of "cexp":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Imaginary part of "cexp":
- -float: 1
- -ifloat: 1
- -
- -Function: Imaginary part of "clog":
- -double: 1
- -float: 3
- -idouble: 1
- -ifloat: 3
- -
- -Function: Real part of "clog10":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Imaginary part of "clog10":
- -double: 1
- -float: 5
- -idouble: 1
- -ifloat: 5
- -
- -Function: "cos":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -
- -Function: Real part of "cpow":
- -double: 1
- -float: 4
- -idouble: 1
- -ifloat: 4
- -
- -Function: Imaginary part of "cpow":
- -double: 1.1031
- -float: 2
- -idouble: 1.1031
- -ifloat: 2
- -
- -Function: Imaginary part of "csin":
- -float: 1
- -ifloat: 1
- -
- -Function: Real part of "csinh":
- -float: 1
- -ifloat: 1
- -
- -Function: Imaginary part of "csinh":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Real part of "csqrt":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Imaginary part of "csqrt":
- -float: 1
- -ifloat: 1
- -
- -Function: Real part of "ctan":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Imaginary part of "ctan":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: Real part of "ctanh":
- -double: 2
- -float: 2
- -idouble: 2
- -ifloat: 2
- -
- -Function: Imaginary part of "ctanh":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -
- -Function: "erfc":
- -double: 24
- -float: 12
- -idouble: 24
- -ifloat: 12
- -
- -Function: "exp10":
- -double: 6
- -float: 2
- -idouble: 6
- -ifloat: 2
- -
- -Function: "expm1":
- -float: 1
- -ifloat: 1
- -
- -Function: "fmod":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -
- -Function: "hypot":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: "j0":
- -double: 2
- -float: 2
- -idouble: 2
- -ifloat: 2
- -
- -Function: "j1":
- -double: 1
- -float: 2
- -idouble: 1
- -ifloat: 2
- -
- -Function: "jn":
- -double: 6
- -float: 4
- -idouble: 6
- -ifloat: 4
- -
- -Function: "lgamma":
- -double: 1
- -float: 2
- -idouble: 1
- -ifloat: 2
- -
- -Function: "log":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: "log10":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: "log1p":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: "log2":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: "sincos":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: "sinh":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: "tan":
- -double: 0.5
- -idouble: 0.5
- -
- -Function: "tanh":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: "tgamma":
- -double: 1
- -float: 1
- -idouble: 1
- -ifloat: 1
- -
- -Function: "y0":
- -double: 2
- -float: 1
- -idouble: 2
- -ifloat: 1
- -
- -Function: "y1":
- -double: 3
- -float: 2
- -idouble: 3
- -ifloat: 2
- -
- -Function: "yn":
- -double: 3
- -float: 2
- -idouble: 3
- -ifloat: 2
- -
- -# end of automatic generation
- diff -Nur uClibc-0.9.33.2/test/math/libm-test-ulps-xtensa uClibc/test/math/libm-test-ulps-xtensa
- --- uClibc-0.9.33.2/test/math/libm-test-ulps-xtensa 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/math/libm-test-ulps-xtensa 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,129 @@
- +# Begin of automatic generation
- +
- +# cos
- +Test "cos (M_PI_6l * 2.0) == 0.5":
- +double: 1
- +idouble: 1
- +Test "cos (M_PI_6l * 4.0) == -0.5":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +
- +# erf
- +Test "erf (0.75) == 0.711155633653515131598937834591410777":
- +double: 1
- +idouble: 1
- +Test "erf (1.25) == 0.922900128256458230136523481197281140":
- +double: 1
- +idouble: 1
- +
- +# erfc
- +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
- +double: 1
- +idouble: 1
- +
- +# exp
- +Test "exp (1) == e":
- +double: 1
- +idouble: 1
- +
- +# expm1
- +Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
- +double: 1
- +idouble: 1
- +
- +# hypot
- +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
- +float: 1
- +ifloat: 1
- +
- +# lgamma
- +Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +
- +# log10
- +Test "log10 (0.75) == -0.124938736608299953132449886193870744":
- +double: 1
- +idouble: 1
- +Test "log10 (e) == log10(e)":
- +float: 1
- +ifloat: 1
- +
- +# Maximal error of functions:
- +Function: "cos":
- +double: 2
- +float: 1
- +idouble: 2
- +ifloat: 1
- +
- +Function: "erf":
- +double: 1
- +idouble: 1
- +
- +Function: "erfc":
- +double: 1
- +idouble: 1
- +
- +Function: "exp":
- +double: 1
- +idouble: 1
- +
- +Function: "expm1":
- +double: 1
- +idouble: 1
- +
- +Function: "hypot":
- +float: 1
- +ifloat: 1
- +
- +Function: "lgamma":
- +double: 1
- +float: 2
- +idouble: 1
- +ifloat: 2
- +
- +Function: "log":
- +float: 1
- +ifloat: 1
- +
- +Function: "log10":
- +double: 1
- +float: 1
- +idouble: 1
- +ifloat: 1
- +
- +Function: "tan":
- +double: 1
- +idouble: 1
- +
- +# end of automatic generation
- diff -Nur uClibc-0.9.33.2/test/math/Makefile uClibc/test/math/Makefile
- --- uClibc-0.9.33.2/test/math/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/math/Makefile.in uClibc/test/math/Makefile.in
- --- uClibc-0.9.33.2/test/math/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -1,14 +1,16 @@
- # uClibc math tests
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- -TESTS := basic-test tst-definitions test-fpucw test-float test-ifloat test-double test-idouble \
- - rint signgam ilogb
- # gamma (removed from TESTS, need to add "small errors are ok" machinery there)
- -ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),y)
- -TESTS += test-ldouble test-ildoubl compile_test c99_test
- +TESTS_DISABLED := gamma
- +ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),)
- +TESTS_DISABLED += test-ldouble test-ildoubl compile_test c99_test
- else
- CFLAGS_basic-test := -DNO_LONG_DOUBLE
- endif
- +ifeq ($(DO_C99_MATH),)
- +TESTS_DISABLED += test-float test-ifloat test-double test-idouble rint signgam ilogb
- +endif
-
- DODIFF_rint := 1
- DODIFF_signgam := 1
- diff -Nur uClibc-0.9.33.2/test/math/test-double.c uClibc/test/math/test-double.c
- --- uClibc-0.9.33.2/test/math/test-double.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/test-double.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FUNC(function) function
- #define FLOAT double
- diff -Nur uClibc-0.9.33.2/test/math/test-float.c uClibc/test/math/test-float.c
- --- uClibc-0.9.33.2/test/math/test-float.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/test-float.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FUNC(function) function ## f
- #define FLOAT float
- diff -Nur uClibc-0.9.33.2/test/math/test-fpucw.c uClibc/test/math/test-fpucw.c
- --- uClibc-0.9.33.2/test/math/test-fpucw.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/test-fpucw.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fpu_control.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/math/test-idouble.c uClibc/test/math/test-idouble.c
- --- uClibc-0.9.33.2/test/math/test-idouble.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/test-idouble.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FUNC(function) function
- #define FLOAT double
- diff -Nur uClibc-0.9.33.2/test/math/test-ifloat.c uClibc/test/math/test-ifloat.c
- --- uClibc-0.9.33.2/test/math/test-ifloat.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/test-ifloat.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FUNC(function) function ## f
- #define FLOAT float
- diff -Nur uClibc-0.9.33.2/test/math/test-ildoubl.c uClibc/test/math/test-ildoubl.c
- --- uClibc-0.9.33.2/test/math/test-ildoubl.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/test-ildoubl.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FUNC(function) function##l
- #define FLOAT long double
- diff -Nur uClibc-0.9.33.2/test/math/test-ldouble.c uClibc/test/math/test-ldouble.c
- --- uClibc-0.9.33.2/test/math/test-ldouble.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/test-ldouble.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define FUNC(function) function##l
- #define FLOAT long double
- diff -Nur uClibc-0.9.33.2/test/math/tst-definitions.c uClibc/test/math/tst-definitions.c
- --- uClibc-0.9.33.2/test/math/tst-definitions.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/math/tst-definitions.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <math.h>
- diff -Nur uClibc-0.9.33.2/test/misc/bug-glob2.c uClibc/test/misc/bug-glob2.c
- --- uClibc-0.9.33.2/test/misc/bug-glob2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/misc/bug-glob2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/misc/Makefile uClibc/test/misc/Makefile
- --- uClibc-0.9.33.2/test/misc/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/misc/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/misc/Makefile.in uClibc/test/misc/Makefile.in
- --- uClibc-0.9.33.2/test/misc/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/misc/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -4,11 +4,18 @@
- TESTS_DISABLED := outb tst-fnmatch bug-glob1 tst-gnuglob
- ifeq ($(UCLIBC_HAS_LFS),)
- TESTS_DISABLED += dirent64
- +TESTS_DISABLED += tst-statfs # assuming host has LFS on
- endif
- CFLAGS_dirent64 := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-
- DODIFF_dirent := 1
- DODIFF_dirent64 := 1
- +DODIFF_tst-statfs := 1
- +DODIFF_tst-statvfs := 1
-
- OPTS_bug-glob1 := $(PWD)
- OPTS_tst-fnmatch := < tst-fnmatch.input
- +
- +MNTENTS = $(shell mount | while read dev on mp rest; do echo $$mp; done)
- +OPTS_tst-statfs := $(MNTENTS)
- +OPTS_tst-statvfs := $(MNTENTS)
- diff -Nur uClibc-0.9.33.2/test/misc/opendir-tst1.c uClibc/test/misc/opendir-tst1.c
- --- uClibc-0.9.33.2/test/misc/opendir-tst1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/misc/opendir-tst1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <dirent.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/test/misc/tst-fnmatch.c uClibc/test/misc/tst-fnmatch.c
- --- uClibc-0.9.33.2/test/misc/tst-fnmatch.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/misc/tst-fnmatch.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/misc/tst-fnmatch.input uClibc/test/misc/tst-fnmatch.input
- --- uClibc-0.9.33.2/test/misc/tst-fnmatch.input 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/misc/tst-fnmatch.input 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- # Lesser General Public License for more details.
-
- # You should have received a copy of the GNU Lesser General Public
- -# License along with the GNU C Library; if not, write to the Free
- -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- -# 02111-1307 USA.
- +# License along with the GNU C Library; see the file COPYING.LIB. If
- +# not, see <http://www.gnu.org/licenses/>.
-
-
- # Derived from the IEEE 2003.2 text. The standard only contains some
- diff -Nur uClibc-0.9.33.2/test/misc/tst-gnuglob.c uClibc/test/misc/tst-gnuglob.c
- --- uClibc-0.9.33.2/test/misc/tst-gnuglob.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/misc/tst-gnuglob.c 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <dirent.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/test/misc/tst-inotify.c uClibc/test/misc/tst-inotify.c
- --- uClibc-0.9.33.2/test/misc/tst-inotify.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/misc/tst-inotify.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,66 @@
- +/* vi: set sw=4 ts=4 sts=4: */
- +/*
- + * inotify test for uClibc
- + * Copyright (C) 2012 by Kevin Cernekee <cernekee@gmail.com>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include <string.h>
- +#include <unistd.h>
- +#include <errno.h>
- +#include <error.h>
- +#include <inttypes.h>
- +#include <sys/inotify.h>
- +#include <sys/fcntl.h>
- +
- +static int
- +do_test(void)
- +{
- + int ifd, fd, ret, result = 0;
- + struct inotify_event e;
- + char tfile[] = "/tmp/inotify.XXXXXX";
- +
- + fd = mkstemp(tfile);
- + close(fd);
- +
- + ifd = inotify_init1(IN_NONBLOCK);
- + if (ifd < 0) {
- + perror("inotify_init1()");
- + result = 1;
- + }
- + if (inotify_add_watch(ifd, tfile, IN_DELETE_SELF) < 0) {
- + perror("inotify_add_watch()");
- + result = 1;
- + }
- +
- + /* nonblocking inotify should return immediately with no events */
- + ret = read(ifd, &e, sizeof(e));
- + if (ret != -1 || errno != EAGAIN) {
- + error(0, 0, "first read() returned %d", ret);
- + result = 1;
- + }
- +
- + /* generate an event */
- + unlink(tfile);
- +
- + /* now check whether our event was seen */
- + ret = read(ifd, &e, sizeof(e));
- + if (ret != sizeof(e)) {
- + error(0, 0, "second read() returned %d", ret);
- + result = 1;
- + }
- +
- + if (!(e.mask & IN_DELETE_SELF)) {
- + error(0, 0, "incorrect event mask: %" PRIx32, e.mask);
- + result = 1;
- + }
- +
- + return result;
- +}
- +
- +#define TIMEOUT 5
- +#define TEST_FUNCTION do_test ()
- +#include "../test-skeleton.c"
- diff -Nur uClibc-0.9.33.2/test/misc/tst-statfs.c uClibc/test/misc/tst-statfs.c
- --- uClibc-0.9.33.2/test/misc/tst-statfs.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/misc/tst-statfs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,31 @@
- +#include <sys/vfs.h>
- +#include <errno.h>
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include <string.h>
- +
- +int
- +main(int argc, char* argv[])
- +{
- + struct statfs s;
- + int ret = 0, i;
- +
- + for (i = 1; i < argc; i++) {
- + if (statfs(argv[i], &s) != 0) {
- + fprintf(stderr, "%s: %s: statfs failed. %s\n",
- + *argv, argv[i], strerror(errno));
- + exit(EXIT_FAILURE);
- + }
- + ++ret;
- + printf("statfs %s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n",
- + argv[i], s.f_blocks, s.f_bfree, s.f_bsize);
- +#ifdef _STATFS_F_FRSIZE
- + printf("\tfrsize=%lld\n", s.f_frsize);
- +#elif defined __mips__
- + printf("\tfrsize=mips, unsupported?\n");
- +#else
- +# error no _STATFS_F_FRSIZE
- +#endif
- + }
- + exit(ret ? EXIT_SUCCESS : EXIT_FAILURE);
- +}
- diff -Nur uClibc-0.9.33.2/test/misc/tst-statvfs.c uClibc/test/misc/tst-statvfs.c
- --- uClibc-0.9.33.2/test/misc/tst-statvfs.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/misc/tst-statvfs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,26 @@
- +#include <sys/statvfs.h>
- +#include <errno.h>
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include <string.h>
- +
- +int
- +main(int argc, char* argv[])
- +{
- + struct statvfs s;
- + int i;
- +
- + for (i = 1; i < argc; i++) {
- + if (statvfs(argv[i], &s) != 0) {
- + fprintf(stderr, "%s: %s: statvfs failed. %s\n",
- + *argv, argv[i], strerror(errno));
- + exit(EXIT_FAILURE);
- + }
- + printf("statvfs %s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n",
- + argv[i], s.f_blocks, s.f_bfree, s.f_bsize);
- +#if 1 // def _STATFS_F_FRSIZE
- + printf("\tfrsize=%lld\n", s.f_frsize);
- +#endif
- + }
- + exit(EXIT_SUCCESS);
- +}
- diff -Nur uClibc-0.9.33.2/test/misc/tst-utmp.c uClibc/test/misc/tst-utmp.c
- --- uClibc-0.9.33.2/test/misc/tst-utmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/misc/tst-utmp.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/mmap/Makefile uClibc/test/mmap/Makefile
- --- uClibc-0.9.33.2/test/mmap/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/mmap/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/nptl/eintr.c uClibc/test/nptl/eintr.c
- --- uClibc-0.9.33.2/test/nptl/eintr.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/eintr.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-align2.c uClibc/test/nptl/tst-align2.c
- --- uClibc-0.9.33.2/test/nptl/tst-align2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-align2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sched.h>
- #include <stdbool.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-align3.c uClibc/test/nptl/tst-align3.c
- --- uClibc-0.9.33.2/test/nptl/tst-align3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-align3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdbool.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-align.c uClibc/test/nptl/tst-align.c
- --- uClibc-0.9.33.2/test/nptl/tst-align.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-align.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdbool.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-atfork1.c uClibc/test/nptl/tst-atfork1.c
- --- uClibc-0.9.33.2/test/nptl/tst-atfork1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-atfork1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-attr1.c uClibc/test/nptl/tst-attr1.c
- --- uClibc-0.9.33.2/test/nptl/tst-attr1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-attr1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-attr2.c uClibc/test/nptl/tst-attr2.c
- --- uClibc-0.9.33.2/test/nptl/tst-attr2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-attr2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-attr3.c uClibc/test/nptl/tst-attr3.c
- --- uClibc-0.9.33.2/test/nptl/tst-attr3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-attr3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-barrier1.c uClibc/test/nptl/tst-barrier1.c
- --- uClibc-0.9.33.2/test/nptl/tst-barrier1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-barrier1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-barrier2.c uClibc/test/nptl/tst-barrier2.c
- --- uClibc-0.9.33.2/test/nptl/tst-barrier2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-barrier2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-barrier3.c uClibc/test/nptl/tst-barrier3.c
- --- uClibc-0.9.33.2/test/nptl/tst-barrier3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-barrier3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Test of POSIX barriers. */
-
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-barrier4.c uClibc/test/nptl/tst-barrier4.c
- --- uClibc-0.9.33.2/test/nptl/tst-barrier4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-barrier4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This is a test for behavior not guaranteed by POSIX. */
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic1.c uClibc/test/nptl/tst-basic1.c
- --- uClibc-0.9.33.2/test/nptl/tst-basic1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-basic1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic2.c uClibc/test/nptl/tst-basic2.c
- --- uClibc-0.9.33.2/test/nptl/tst-basic2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-basic2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic3.c uClibc/test/nptl/tst-basic3.c
- --- uClibc-0.9.33.2/test/nptl/tst-basic3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-basic3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic4.c uClibc/test/nptl/tst-basic4.c
- --- uClibc-0.9.33.2/test/nptl/tst-basic4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-basic4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic5.c uClibc/test/nptl/tst-basic5.c
- --- uClibc-0.9.33.2/test/nptl/tst-basic5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-basic5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic6.c uClibc/test/nptl/tst-basic6.c
- --- uClibc-0.9.33.2/test/nptl/tst-basic6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-basic6.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel10.c uClibc/test/nptl/tst-cancel10.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel10.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel10.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel11.c uClibc/test/nptl/tst-cancel11.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel11.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel11.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel12.c uClibc/test/nptl/tst-cancel12.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel12.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel12.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel13.c uClibc/test/nptl/tst-cancel13.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel13.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel13.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel14.c uClibc/test/nptl/tst-cancel14.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel14.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel14.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel15.c uClibc/test/nptl/tst-cancel15.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel15.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel15.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel16.c uClibc/test/nptl/tst-cancel16.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel16.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel16.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel18.c uClibc/test/nptl/tst-cancel18.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel18.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel18.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel19.c uClibc/test/nptl/tst-cancel19.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel19.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel19.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel1.c uClibc/test/nptl/tst-cancel1.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel20.c uClibc/test/nptl/tst-cancel20.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel20.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel20.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel21.c uClibc/test/nptl/tst-cancel21.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel21.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel21.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel22.c uClibc/test/nptl/tst-cancel22.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel22.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel22.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel2.c uClibc/test/nptl/tst-cancel2.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel3.c uClibc/test/nptl/tst-cancel3.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel4.c uClibc/test/nptl/tst-cancel4.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* NOTE: this tests functionality beyond POSIX. POSIX does not allow
- exit to be called more than once. */
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel6.c uClibc/test/nptl/tst-cancel6.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel6.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel7.c uClibc/test/nptl/tst-cancel7.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel7.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel7.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel8.c uClibc/test/nptl/tst-cancel8.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel8.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel8.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel9.c uClibc/test/nptl/tst-cancel9.c
- --- uClibc-0.9.33.2/test/nptl/tst-cancel9.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cancel9.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fcntl.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup0.c uClibc/test/nptl/tst-cleanup0.c
- --- uClibc-0.9.33.2/test/nptl/tst-cleanup0.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cleanup0.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup1.c uClibc/test/nptl/tst-cleanup1.c
- --- uClibc-0.9.33.2/test/nptl/tst-cleanup1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cleanup1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup2.c uClibc/test/nptl/tst-cleanup2.c
- --- uClibc-0.9.33.2/test/nptl/tst-cleanup2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cleanup2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <setjmp.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup3.c uClibc/test/nptl/tst-cleanup3.c
- --- uClibc-0.9.33.2/test/nptl/tst-cleanup3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cleanup3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup4aux.c uClibc/test/nptl/tst-cleanup4aux.c
- --- uClibc-0.9.33.2/test/nptl/tst-cleanup4aux.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cleanup4aux.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup4.c uClibc/test/nptl/tst-cleanup4.c
- --- uClibc-0.9.33.2/test/nptl/tst-cleanup4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cleanup4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-clock1.c uClibc/test/nptl/tst-clock1.c
- --- uClibc-0.9.33.2/test/nptl/tst-clock1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-clock1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-clock2.c uClibc/test/nptl/tst-clock2.c
- --- uClibc-0.9.33.2/test/nptl/tst-clock2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-clock2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-clock.c uClibc/test/nptl/tst-clock.c
- --- uClibc-0.9.33.2/test/nptl/tst-clock.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-clock.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-clock_nanosleep.c uClibc/test/nptl/tst-clock_nanosleep.c
- --- uClibc-0.9.33.2/test/nptl/tst-clock_nanosleep.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-clock_nanosleep.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond10.c uClibc/test/nptl/tst-cond10.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond10.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond10.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <error.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond11.c uClibc/test/nptl/tst-cond11.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond11.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond11.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond12.c uClibc/test/nptl/tst-cond12.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond12.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond12.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond14.c uClibc/test/nptl/tst-cond14.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond14.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond14.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond15.c uClibc/test/nptl/tst-cond15.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond15.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond15.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond16.c uClibc/test/nptl/tst-cond16.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond16.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond16.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond18.c uClibc/test/nptl/tst-cond18.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond18.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond18.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond19.c uClibc/test/nptl/tst-cond19.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond19.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond19.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond1.c uClibc/test/nptl/tst-cond1.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <error.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond20.c uClibc/test/nptl/tst-cond20.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond20.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond20.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond23.c uClibc/test/nptl/tst-cond23.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond23.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond23.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond2.c uClibc/test/nptl/tst-cond2.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <error.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond3.c uClibc/test/nptl/tst-cond3.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond4.c uClibc/test/nptl/tst-cond4.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond5.c uClibc/test/nptl/tst-cond5.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond6.c uClibc/test/nptl/tst-cond6.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond6.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond7.c uClibc/test/nptl/tst-cond7.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond7.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond7.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond8.c uClibc/test/nptl/tst-cond8.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond8.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond8.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond9.c uClibc/test/nptl/tst-cond9.c
- --- uClibc-0.9.33.2/test/nptl/tst-cond9.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cond9.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cpuclock1.c uClibc/test/nptl/tst-cpuclock1.c
- --- uClibc-0.9.33.2/test/nptl/tst-cpuclock1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cpuclock1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-cpuclock2.c uClibc/test/nptl/tst-cpuclock2.c
- --- uClibc-0.9.33.2/test/nptl/tst-cpuclock2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-cpuclock2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
-
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-detach1.c uClibc/test/nptl/tst-detach1.c
- --- uClibc-0.9.33.2/test/nptl/tst-detach1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-detach1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-eintr1.c uClibc/test/nptl/tst-eintr1.c
- --- uClibc-0.9.33.2/test/nptl/tst-eintr1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-eintr1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-eintr2.c uClibc/test/nptl/tst-eintr2.c
- --- uClibc-0.9.33.2/test/nptl/tst-eintr2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-eintr2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-eintr3.c uClibc/test/nptl/tst-eintr3.c
- --- uClibc-0.9.33.2/test/nptl/tst-eintr3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-eintr3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-eintr4.c uClibc/test/nptl/tst-eintr4.c
- --- uClibc-0.9.33.2/test/nptl/tst-eintr4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-eintr4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-eintr5.c uClibc/test/nptl/tst-eintr5.c
- --- uClibc-0.9.33.2/test/nptl/tst-eintr5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-eintr5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-exec2.c uClibc/test/nptl/tst-exec2.c
- --- uClibc-0.9.33.2/test/nptl/tst-exec2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-exec2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <paths.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-exec3.c uClibc/test/nptl/tst-exec3.c
- --- uClibc-0.9.33.2/test/nptl/tst-exec3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-exec3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <paths.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-exec4.c uClibc/test/nptl/tst-exec4.c
- --- uClibc-0.9.33.2/test/nptl/tst-exec4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-exec4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-exit1.c uClibc/test/nptl/tst-exit1.c
- --- uClibc-0.9.33.2/test/nptl/tst-exit1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-exit1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* NOTE: this tests functionality beyond POSIX. POSIX does not allow
- exit to be called more than once. */
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-fini1.c uClibc/test/nptl/tst-fini1.c
- --- uClibc-0.9.33.2/test/nptl/tst-fini1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-fini1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <unistd.h>
-
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-fini1mod.c uClibc/test/nptl/tst-fini1mod.c
- --- uClibc-0.9.33.2/test/nptl/tst-fini1mod.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-fini1mod.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-flock1.c uClibc/test/nptl/tst-flock1.c
- --- uClibc-0.9.33.2/test/nptl/tst-flock1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-flock1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-flock2.c uClibc/test/nptl/tst-flock2.c
- --- uClibc-0.9.33.2/test/nptl/tst-flock2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-flock2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-fork1.c uClibc/test/nptl/tst-fork1.c
- --- uClibc-0.9.33.2/test/nptl/tst-fork1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-fork1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-fork2.c uClibc/test/nptl/tst-fork2.c
- --- uClibc-0.9.33.2/test/nptl/tst-fork2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-fork2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-fork3.c uClibc/test/nptl/tst-fork3.c
- --- uClibc-0.9.33.2/test/nptl/tst-fork3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-fork3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-fork4.c uClibc/test/nptl/tst-fork4.c
- --- uClibc-0.9.33.2/test/nptl/tst-fork4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-fork4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-initializers1.c uClibc/test/nptl/tst-initializers1.c
- --- uClibc-0.9.33.2/test/nptl/tst-initializers1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-initializers1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
-
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-join1.c uClibc/test/nptl/tst-join1.c
- --- uClibc-0.9.33.2/test/nptl/tst-join1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-join1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-join2.c uClibc/test/nptl/tst-join2.c
- --- uClibc-0.9.33.2/test/nptl/tst-join2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-join2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-join3.c uClibc/test/nptl/tst-join3.c
- --- uClibc-0.9.33.2/test/nptl/tst-join3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-join3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-join4.c uClibc/test/nptl/tst-join4.c
- --- uClibc-0.9.33.2/test/nptl/tst-join4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-join4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-join5.c uClibc/test/nptl/tst-join5.c
- --- uClibc-0.9.33.2/test/nptl/tst-join5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-join5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-key1.c uClibc/test/nptl/tst-key1.c
- --- uClibc-0.9.33.2/test/nptl/tst-key1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-key1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-key2.c uClibc/test/nptl/tst-key2.c
- --- uClibc-0.9.33.2/test/nptl/tst-key2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-key2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-key3.c uClibc/test/nptl/tst-key3.c
- --- uClibc-0.9.33.2/test/nptl/tst-key3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-key3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-key4.c uClibc/test/nptl/tst-key4.c
- --- uClibc-0.9.33.2/test/nptl/tst-key4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-key4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill1.c uClibc/test/nptl/tst-kill1.c
- --- uClibc-0.9.33.2/test/nptl/tst-kill1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-kill1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill2.c uClibc/test/nptl/tst-kill2.c
- --- uClibc-0.9.33.2/test/nptl/tst-kill2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-kill2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill3.c uClibc/test/nptl/tst-kill3.c
- --- uClibc-0.9.33.2/test/nptl/tst-kill3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-kill3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill4.c uClibc/test/nptl/tst-kill4.c
- --- uClibc-0.9.33.2/test/nptl/tst-kill4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-kill4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill5.c uClibc/test/nptl/tst-kill5.c
- --- uClibc-0.9.33.2/test/nptl/tst-kill5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-kill5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill6.c uClibc/test/nptl/tst-kill6.c
- --- uClibc-0.9.33.2/test/nptl/tst-kill6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-kill6.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue1.c uClibc/test/nptl/tst-mqueue1.c
- --- uClibc-0.9.33.2/test/nptl/tst-mqueue1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mqueue1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue2.c uClibc/test/nptl/tst-mqueue2.c
- --- uClibc-0.9.33.2/test/nptl/tst-mqueue2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mqueue2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue3.c uClibc/test/nptl/tst-mqueue3.c
- --- uClibc-0.9.33.2/test/nptl/tst-mqueue3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mqueue3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <mqueue.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue4.c uClibc/test/nptl/tst-mqueue4.c
- --- uClibc-0.9.33.2/test/nptl/tst-mqueue4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mqueue4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue5.c uClibc/test/nptl/tst-mqueue5.c
- --- uClibc-0.9.33.2/test/nptl/tst-mqueue5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mqueue5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue6.c uClibc/test/nptl/tst-mqueue6.c
- --- uClibc-0.9.33.2/test/nptl/tst-mqueue6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mqueue6.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue7.c uClibc/test/nptl/tst-mqueue7.c
- --- uClibc-0.9.33.2/test/nptl/tst-mqueue7.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mqueue7.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue8.c uClibc/test/nptl/tst-mqueue8.c
- --- uClibc-0.9.33.2/test/nptl/tst-mqueue8.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mqueue8.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <mqueue.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue9.c uClibc/test/nptl/tst-mqueue9.c
- --- uClibc-0.9.33.2/test/nptl/tst-mqueue9.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mqueue9.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <mqueue.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue.h uClibc/test/nptl/tst-mqueue.h
- --- uClibc-0.9.33.2/test/nptl/tst-mqueue.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mqueue.h 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <mqueue.h>
- #include <search.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex1.c uClibc/test/nptl/tst-mutex1.c
- --- uClibc-0.9.33.2/test/nptl/tst-mutex1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mutex1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex2.c uClibc/test/nptl/tst-mutex2.c
- --- uClibc-0.9.33.2/test/nptl/tst-mutex2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mutex2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex3.c uClibc/test/nptl/tst-mutex3.c
- --- uClibc-0.9.33.2/test/nptl/tst-mutex3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mutex3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex4.c uClibc/test/nptl/tst-mutex4.c
- --- uClibc-0.9.33.2/test/nptl/tst-mutex4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mutex4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex5.c uClibc/test/nptl/tst-mutex5.c
- --- uClibc-0.9.33.2/test/nptl/tst-mutex5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mutex5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex6.c uClibc/test/nptl/tst-mutex6.c
- --- uClibc-0.9.33.2/test/nptl/tst-mutex6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mutex6.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex7.c uClibc/test/nptl/tst-mutex7.c
- --- uClibc-0.9.33.2/test/nptl/tst-mutex7.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mutex7.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex8.c uClibc/test/nptl/tst-mutex8.c
- --- uClibc-0.9.33.2/test/nptl/tst-mutex8.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mutex8.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This test checks behavior not required by POSIX. */
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex9.c uClibc/test/nptl/tst-mutex9.c
- --- uClibc-0.9.33.2/test/nptl/tst-mutex9.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-mutex9.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-once1.c uClibc/test/nptl/tst-once1.c
- --- uClibc-0.9.33.2/test/nptl/tst-once1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-once1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-once2.c uClibc/test/nptl/tst-once2.c
- --- uClibc-0.9.33.2/test/nptl/tst-once2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-once2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-once3.c uClibc/test/nptl/tst-once3.c
- --- uClibc-0.9.33.2/test/nptl/tst-once3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-once3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-once4.c uClibc/test/nptl/tst-once4.c
- --- uClibc-0.9.33.2/test/nptl/tst-once4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-once4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-popen1.c uClibc/test/nptl/tst-popen1.c
- --- uClibc-0.9.33.2/test/nptl/tst-popen1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-popen1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-raise1.c uClibc/test/nptl/tst-raise1.c
- --- uClibc-0.9.33.2/test/nptl/tst-raise1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-raise1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock10.c uClibc/test/nptl/tst-rwlock10.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock10.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock10.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #define INIT PTHREAD_RWLOCK_INITIALIZER
- #include "tst-rwlock8.c"
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock11.c uClibc/test/nptl/tst-rwlock11.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock11.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock11.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #define INIT PTHREAD_RWLOCK_INITIALIZER
- #include "tst-rwlock9.c"
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock12.c uClibc/test/nptl/tst-rwlock12.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock12.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock12.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock13.c uClibc/test/nptl/tst-rwlock13.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock13.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock13.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock14.c uClibc/test/nptl/tst-rwlock14.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock14.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock14.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock1.c uClibc/test/nptl/tst-rwlock1.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock2.c uClibc/test/nptl/tst-rwlock2.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock3.c uClibc/test/nptl/tst-rwlock3.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This test case checks more than standard compliance. An
- implementation may provide this service but it is not required to
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock4.c uClibc/test/nptl/tst-rwlock4.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock5.c uClibc/test/nptl/tst-rwlock5.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock6.c uClibc/test/nptl/tst-rwlock6.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock6.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock7.c uClibc/test/nptl/tst-rwlock7.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock7.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock7.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock8.c uClibc/test/nptl/tst-rwlock8.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock8.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock8.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock9.c uClibc/test/nptl/tst-rwlock9.c
- --- uClibc-0.9.33.2/test/nptl/tst-rwlock9.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-rwlock9.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sched1.c uClibc/test/nptl/tst-sched1.c
- --- uClibc-0.9.33.2/test/nptl/tst-sched1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sched1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem10.c uClibc/test/nptl/tst-sem10.c
- --- uClibc-0.9.33.2/test/nptl/tst-sem10.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sem10.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem1.c uClibc/test/nptl/tst-sem1.c
- --- uClibc-0.9.33.2/test/nptl/tst-sem1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sem1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <semaphore.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem2.c uClibc/test/nptl/tst-sem2.c
- --- uClibc-0.9.33.2/test/nptl/tst-sem2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sem2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <semaphore.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem3.c uClibc/test/nptl/tst-sem3.c
- --- uClibc-0.9.33.2/test/nptl/tst-sem3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sem3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <semaphore.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem4.c uClibc/test/nptl/tst-sem4.c
- --- uClibc-0.9.33.2/test/nptl/tst-sem4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sem4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem5.c uClibc/test/nptl/tst-sem5.c
- --- uClibc-0.9.33.2/test/nptl/tst-sem5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sem5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <semaphore.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem6.c uClibc/test/nptl/tst-sem6.c
- --- uClibc-0.9.33.2/test/nptl/tst-sem6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sem6.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <semaphore.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem7.c uClibc/test/nptl/tst-sem7.c
- --- uClibc-0.9.33.2/test/nptl/tst-sem7.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sem7.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem8.c uClibc/test/nptl/tst-sem8.c
- --- uClibc-0.9.33.2/test/nptl/tst-sem8.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sem8.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem9.c uClibc/test/nptl/tst-sem9.c
- --- uClibc-0.9.33.2/test/nptl/tst-sem9.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sem9.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <fcntl.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal1.c uClibc/test/nptl/tst-signal1.c
- --- uClibc-0.9.33.2/test/nptl/tst-signal1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-signal1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal2.c uClibc/test/nptl/tst-signal2.c
- --- uClibc-0.9.33.2/test/nptl/tst-signal2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-signal2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal3.c uClibc/test/nptl/tst-signal3.c
- --- uClibc-0.9.33.2/test/nptl/tst-signal3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-signal3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal4.c uClibc/test/nptl/tst-signal4.c
- --- uClibc-0.9.33.2/test/nptl/tst-signal4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-signal4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal5.c uClibc/test/nptl/tst-signal5.c
- --- uClibc-0.9.33.2/test/nptl/tst-signal5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-signal5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal6.c uClibc/test/nptl/tst-signal6.c
- --- uClibc-0.9.33.2/test/nptl/tst-signal6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-signal6.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal7.c uClibc/test/nptl/tst-signal7.c
- --- uClibc-0.9.33.2/test/nptl/tst-signal7.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-signal7.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-spin1.c uClibc/test/nptl/tst-spin1.c
- --- uClibc-0.9.33.2/test/nptl/tst-spin1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-spin1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-spin2.c uClibc/test/nptl/tst-spin2.c
- --- uClibc-0.9.33.2/test/nptl/tst-spin2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-spin2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-spin3.c uClibc/test/nptl/tst-spin3.c
- --- uClibc-0.9.33.2/test/nptl/tst-spin3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-spin3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-stack1.c uClibc/test/nptl/tst-stack1.c
- --- uClibc-0.9.33.2/test/nptl/tst-stack1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-stack1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-stack2.c uClibc/test/nptl/tst-stack2.c
- --- uClibc-0.9.33.2/test/nptl/tst-stack2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-stack2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Test whether it is possible to create a thread with PTHREAD_STACK_MIN
- stack size. */
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-stack-align.h uClibc/test/nptl/tst-stack-align.h
- --- uClibc-0.9.33.2/test/nptl/tst-stack-align.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-stack-align.h 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <stdint.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-stdio1.c uClibc/test/nptl/tst-stdio1.c
- --- uClibc-0.9.33.2/test/nptl/tst-stdio1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-stdio1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-stdio2.c uClibc/test/nptl/tst-stdio2.c
- --- uClibc-0.9.33.2/test/nptl/tst-stdio2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-stdio2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-sysconf.c uClibc/test/nptl/tst-sysconf.c
- --- uClibc-0.9.33.2/test/nptl/tst-sysconf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-sysconf.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-timer4.c uClibc/test/nptl/tst-timer4.c
- --- uClibc-0.9.33.2/test/nptl/tst-timer4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-timer4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls1.c uClibc/test/nptl/tst-tls1.c
- --- uClibc-0.9.33.2/test/nptl/tst-tls1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tls1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls2.c uClibc/test/nptl/tst-tls2.c
- --- uClibc-0.9.33.2/test/nptl/tst-tls2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tls2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls3.c uClibc/test/nptl/tst-tls3.c
- --- uClibc-0.9.33.2/test/nptl/tst-tls3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tls3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <dlfcn.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls3mod.c uClibc/test/nptl/tst-tls3mod.c
- --- uClibc-0.9.33.2/test/nptl/tst-tls3mod.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tls3mod.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <semaphore.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls4.c uClibc/test/nptl/tst-tls4.c
- --- uClibc-0.9.33.2/test/nptl/tst-tls4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tls4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <dlfcn.h>
- #include <errno.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls4moda.c uClibc/test/nptl/tst-tls4moda.c
- --- uClibc-0.9.33.2/test/nptl/tst-tls4moda.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tls4moda.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls4modb.c uClibc/test/nptl/tst-tls4modb.c
- --- uClibc-0.9.33.2/test/nptl/tst-tls4modb.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tls4modb.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls5.c uClibc/test/nptl/tst-tls5.c
- --- uClibc-0.9.33.2/test/nptl/tst-tls5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tls5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Check alignment, overlapping and layout of TLS variables. */
- #include <stdint.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tsd1.c uClibc/test/nptl/tst-tsd1.c
- --- uClibc-0.9.33.2/test/nptl/tst-tsd1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tsd1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tsd2.c uClibc/test/nptl/tst-tsd2.c
- --- uClibc-0.9.33.2/test/nptl/tst-tsd2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tsd2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tsd3.c uClibc/test/nptl/tst-tsd3.c
- --- uClibc-0.9.33.2/test/nptl/tst-tsd3.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tsd3.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tsd4.c uClibc/test/nptl/tst-tsd4.c
- --- uClibc-0.9.33.2/test/nptl/tst-tsd4.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tsd4.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <limits.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-tsd5.c uClibc/test/nptl/tst-tsd5.c
- --- uClibc-0.9.33.2/test/nptl/tst-tsd5.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-tsd5.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <pthread.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-typesizes.c uClibc/test/nptl/tst-typesizes.c
- --- uClibc-0.9.33.2/test/nptl/tst-typesizes.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-typesizes.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <pthreadP.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-umask1.c uClibc/test/nptl/tst-umask1.c
- --- uClibc-0.9.33.2/test/nptl/tst-umask1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-umask1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <fcntl.h>
- #include <pthread.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-unload.c uClibc/test/nptl/tst-unload.c
- --- uClibc-0.9.33.2/test/nptl/tst-unload.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-unload.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; see the file COPYING.LIB. If not,
- - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - Boston, MA 02111-1307, USA. */
- + License along with the GNU C Library; see the file COPYING.LIB. If
- + not, see <http://www.gnu.org/licenses/>. */
-
- #include <dlfcn.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-vfork1.c uClibc/test/nptl/tst-vfork1.c
- --- uClibc-0.9.33.2/test/nptl/tst-vfork1.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-vfork1.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-vfork1x.c uClibc/test/nptl/tst-vfork1x.c
- --- uClibc-0.9.33.2/test/nptl/tst-vfork1x.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-vfork1x.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-vfork2.c uClibc/test/nptl/tst-vfork2.c
- --- uClibc-0.9.33.2/test/nptl/tst-vfork2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-vfork2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/nptl/tst-vfork2x.c uClibc/test/nptl/tst-vfork2x.c
- --- uClibc-0.9.33.2/test/nptl/tst-vfork2x.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/nptl/tst-vfork2x.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/pthread/Makefile uClibc/test/pthread/Makefile
- --- uClibc-0.9.33.2/test/pthread/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/pthread/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/pwd_grp/Makefile uClibc/test/pwd_grp/Makefile
- --- uClibc-0.9.33.2/test/pwd_grp/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/pwd_grp/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/regex/Makefile uClibc/test/regex/Makefile
- --- uClibc-0.9.33.2/test/regex/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/regex/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/regex/tst-regexloc.c uClibc/test/regex/tst-regexloc.c
- --- uClibc-0.9.33.2/test/regex/tst-regexloc.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/regex/tst-regexloc.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <sys/types.h>
- #include <regex.h>
- diff -Nur uClibc-0.9.33.2/test/rpc/Makefile uClibc/test/rpc/Makefile
- --- uClibc-0.9.33.2/test/rpc/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/rpc/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/Rules.mak uClibc/test/Rules.mak
- --- uClibc-0.9.33.2/test/Rules.mak 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/Rules.mak 2014-02-03 12:32:57.000000000 +0100
- @@ -8,18 +8,34 @@
- .SUFFIXES:
-
- top_builddir ?= ../
- +abs_top_builddir ?= $(shell cd $(top_builddir); pwd)/
-
- TESTDIR=$(top_builddir)test/
-
- -include $(top_builddir)/Rules.mak
- -ifndef TEST_INSTALLED_UCLIBC
- +include $(top_srcdir)Rules.mak
- +ifeq ($(filter $(clean_targets) CLEAN_%,$(MAKECMDGOALS)),)
- +ifeq ($(HAVE_DOT_CONFIG),)
- +$(error no HAVE_DOT_CONFIG, failed to read .config)
- +endif
- +endif
- +
- ifdef UCLIBC_LDSO
- ifeq (,$(findstring /,$(UCLIBC_LDSO)))
- -UCLIBC_LDSO := $(top_builddir)lib/$(UCLIBC_LDSO)
- +UCLIBC_LDSO := $(UCLIBC_LDSO)
- +else
- +UCLIBC_LDSO := $(notdir $(UCLIBC_LDSO))
- endif
- else
- -UCLIBC_LDSO := $(firstword $(wildcard $(top_builddir)lib/ld*))
- +UCLIBC_LDSO := $(notdir $(firstword $(wildcard $(top_builddir)lib/ld*)))
- endif
- +ifndef TEST_INSTALLED_UCLIBC
- +ifeq ($(LDSO_SAFE_RUNPATH),y)
- +UCLIBC_PATH := $(abs_top_builddir)lib
- +else
- +UCLIBC_PATH := $(top_builddir)lib
- +endif
- +else
- +UCLIBC_PATH := $(RUNTIME_PREFIX)$(MULTILIB_DIR)
- endif
- #--------------------------------------------------------
- # Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
- @@ -81,15 +97,14 @@
- LDFLAGS += -Wl,-static -static-libgcc
- endif
-
- -LDFLAGS += -B$(top_builddir)lib -Wl,-rpath,$(top_builddir)lib -Wl,-rpath-link,$(top_builddir)lib
- -UCLIBC_LDSO_ABSPATH=$(shell pwd)
- -ifdef TEST_INSTALLED_UCLIBC
- -LDFLAGS += -Wl,-rpath,./
- -UCLIBC_LDSO_ABSPATH=$(RUNTIME_PREFIX)$(MULTILIB_DIR)
- +ifndef TEST_INSTALLED_UCLIBC
- +LDFLAGS += -B$(UCLIBC_PATH) -Wl,-rpath,$(UCLIBC_PATH):$(shell pwd) -Wl,-rpath-link,$(UCLIBC_PATH):$(shell pwd)
- +else
- +LDFLAGS += -Wl,-rpath,$(shell pwd)
- endif
-
- ifeq ($(findstring -static,$(LDFLAGS)),)
- -LDFLAGS += -Wl,--dynamic-linker,$(UCLIBC_LDSO_ABSPATH)/$(UCLIBC_LDSO)
- +LDFLAGS += -Wl,--dynamic-linker,$(UCLIBC_PATH)/$(UCLIBC_LDSO)
- endif
-
- ifeq ($(LDSO_GNU_HASH_SUPPORT),y)
- diff -Nur uClibc-0.9.33.2/test/setjmp/bug269-setjmp.c uClibc/test/setjmp/bug269-setjmp.c
- --- uClibc-0.9.33.2/test/setjmp/bug269-setjmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/setjmp/bug269-setjmp.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */ ;
- + License along with the GNU C Library; If not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* Test case for Bugzilla # 269 */
-
- diff -Nur uClibc-0.9.33.2/test/setjmp/Makefile uClibc/test/setjmp/Makefile
- --- uClibc-0.9.33.2/test/setjmp/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/setjmp/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/setjmp/tst-setjmp.c uClibc/test/setjmp/tst-setjmp.c
- --- uClibc-0.9.33.2/test/setjmp/tst-setjmp.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/setjmp/tst-setjmp.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <setjmp.h>
- diff -Nur uClibc-0.9.33.2/test/signal/Makefile uClibc/test/signal/Makefile
- --- uClibc-0.9.33.2/test/signal/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/signal/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/signal/tst-raise.c uClibc/test/signal/tst-raise.c
- --- uClibc-0.9.33.2/test/signal/tst-raise.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/signal/tst-raise.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/test/signal/tst-signalfd.c uClibc/test/signal/tst-signalfd.c
- --- uClibc-0.9.33.2/test/signal/tst-signalfd.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/signal/tst-signalfd.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,63 @@
- +/* vi: set sw=4 ts=4 sts=4: */
- +/*
- + * signalfd test for uClibc
- + * Copyright (C) 2012 by Kevin Cernekee <cernekee@gmail.com>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include <string.h>
- +#include <unistd.h>
- +#include <errno.h>
- +#include <error.h>
- +#include <signal.h>
- +#include <sys/signalfd.h>
- +#include <sys/fcntl.h>
- +
- +static int
- +do_test(void)
- +{
- + int fd, ret, result = 0;
- + struct signalfd_siginfo ssi;
- + sigset_t mask;
- +
- + sigemptyset(&mask);
- + sigaddset(&mask, SIGUSR1);
- + sigprocmask(SIG_BLOCK, &mask, NULL);
- +
- + fd = signalfd(-1, &mask, SFD_NONBLOCK);
- + if (fd < 0) {
- + printf("signalfd() failed: %s\n", strerror(errno));
- + result = 1;
- + }
- +
- + /* this should return immediately with EAGAIN due to SFD_NONBLOCK */
- + memset(&ssi, 0, sizeof(ssi));
- + ret = read(fd, &ssi, sizeof(ssi));
- + if (ret != -1 || errno != EAGAIN) {
- + error(0, 0, "first read() returned %d", ret);
- + result = 1;
- + }
- +
- + kill(getpid(), SIGUSR1);
- +
- + /* this should return a struct ssi indicating receipt of SIGUSR1 */
- + ret = read(fd, &ssi, sizeof(ssi));
- + if (ret != sizeof(ssi)) {
- + error(0, 0, "second read() returned %d", ret);
- + result = 1;
- + }
- +
- + if (ssi.ssi_signo != SIGUSR1) {
- + error(0, 0, "ssi contains bogus signo");
- + result = 1;
- + }
- +
- + return result;
- +}
- +
- +#define TIMEOUT 5
- +#define TEST_FUNCTION do_test ()
- +#include "../test-skeleton.c"
- diff -Nur uClibc-0.9.33.2/test/signal/tst-sigsimple.c uClibc/test/signal/tst-sigsimple.c
- --- uClibc-0.9.33.2/test/signal/tst-sigsimple.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/signal/tst-sigsimple.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <signal.h>
- diff -Nur uClibc-0.9.33.2/test/silly/Makefile uClibc/test/silly/Makefile
- --- uClibc-0.9.33.2/test/silly/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/silly/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/stat/Makefile uClibc/test/stat/Makefile
- --- uClibc-0.9.33.2/test/stat/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/stat/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/stdio/Makefile uClibc/test/stdio/Makefile
- --- uClibc-0.9.33.2/test/stdio/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/stdio/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/stdlib/Makefile uClibc/test/stdlib/Makefile
- --- uClibc-0.9.33.2/test/stdlib/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/stdlib/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/stdlib/testarc4random.c uClibc/test/stdlib/testarc4random.c
- --- uClibc-0.9.33.2/test/stdlib/testarc4random.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/stdlib/testarc4random.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,12 @@
- +#include <stdlib.h>
- +#include <stdio.h>
- +
- +int main(void)
- +{
- +#ifdef __UCLIBC_HAS_ARC4RANDOM__
- + int random_number;
- + random_number = arc4random() % 65536;
- + printf("%d\n", random_number);
- +#endif
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/test/stdlib/test-canon2.c uClibc/test/stdlib/test-canon2.c
- --- uClibc-0.9.33.2/test/stdlib/test-canon2.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/stdlib/test-canon2.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <string.h>
- diff -Nur uClibc-0.9.33.2/test/stdlib/test-canon.c uClibc/test/stdlib/test-canon.c
- --- uClibc-0.9.33.2/test/stdlib/test-canon.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/stdlib/test-canon.c 2014-02-03 12:32:57.000000000 +0100
- @@ -15,9 +15,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- /* This file must be run from within a directory called "stdlib". */
-
- diff -Nur uClibc-0.9.33.2/test/string/Makefile uClibc/test/string/Makefile
- --- uClibc-0.9.33.2/test/string/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/string/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/string/stratcliff.c uClibc/test/string/stratcliff.c
- --- uClibc-0.9.33.2/test/string/stratcliff.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/string/stratcliff.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define _GNU_SOURCE 1
-
- diff -Nur uClibc-0.9.33.2/test/string/testcopy.c uClibc/test/string/testcopy.c
- --- uClibc-0.9.33.2/test/string/testcopy.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/string/testcopy.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/string/tester.c uClibc/test/string/tester.c
- --- uClibc-0.9.33.2/test/string/tester.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/string/tester.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _GNU_SOURCE
- #define _GNU_SOURCE
- diff -Nur uClibc-0.9.33.2/test/string/test-ffs.c uClibc/test/string/test-ffs.c
- --- uClibc-0.9.33.2/test/string/test-ffs.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/string/test-ffs.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdlib.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/string/tst-bswap.c uClibc/test/string/tst-bswap.c
- --- uClibc-0.9.33.2/test/string/tst-bswap.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/string/tst-bswap.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <byteswap.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/string/tst-inlcall.c uClibc/test/string/tst-inlcall.c
- --- uClibc-0.9.33.2/test/string/tst-inlcall.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/string/tst-inlcall.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #ifndef _GNU_SOURCE
- #define _GNU_SOURCE
- diff -Nur uClibc-0.9.33.2/test/termios/Makefile uClibc/test/termios/Makefile
- --- uClibc-0.9.33.2/test/termios/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/termios/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/Test.mak uClibc/test/Test.mak
- --- uClibc-0.9.33.2/test/Test.mak 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/Test.mak 2014-02-03 12:32:57.000000000 +0100
- @@ -35,7 +35,9 @@
- CLEAN_TARGETS := $(U_TARGETS) $(G_TARGETS)
- CLEAN_TARGETS += $(TESTS_DISABLED) $(addsuffix _glibc,$(TESTS_DISABLED)) $(GLIBC_TESTS_DISABLED)
- COMPILE_TARGETS := $(TARGETS)
- -RUN_TARGETS := $(addsuffix .exe,$(TARGETS))
- +# We sort the targets so uClibc and host-libc tests are run adjacent
- +RUN_TARGETS := $(sort $(addsuffix .exe,$(TARGETS)))
- +COMPILE_TARGETS := $(sort $(COMPILE_TARGETS))
- # provide build rules even for disabled tests:
- U_TARGETS += $(TESTS_DISABLED)
- G_TARGETS += $(addsuffix _glibc,$(TESTS_DISABLED)) $(GLIBC_TESTS_DISABLED)
- @@ -99,13 +101,15 @@
-
- $(U_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS)
- $(showlink)
- - $(Q)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$@) -c $@.c -o $@.o
- + $(Q)$(CC) $(filter-out $(CFLAGS-OMIT-$@),$(CFLAGS)) $(EXTRA_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$@) -c $@.c -o $@.o
- $(Q)$(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$@)
-
- $(G_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS)
- $(showlink)
- - $(Q)$(HOSTCC) $(HOST_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$(patsubst %_glibc,%,$@)) -c $(patsubst %_glibc,%,$@).c -o $@.o
- - $(Q)$(HOSTCC) $(HOST_LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$(patsubst %_glibc,%,$@))
- + $(Q)$(HOSTCC) $(filter-out $(HOST_CFLAGS-OMIT-$(patsubst %_glibc,%,$@)),$(HOST_CFLAGS)) \
- + $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$(patsubst %_glibc,%,$@)) \
- + -c $(patsubst %_glibc,%,$@).c -o $@.o
- + $(Q)$(HOSTCC) $(HOST_LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$(patsubst %_glibc,%,$@)) $(LDFLAGS_$@)
-
-
- shell_%:
- @@ -117,9 +121,11 @@
- %.so: %.c
- $(showlink)
- $(Q)$(CC) \
- - $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(patsubst %_glibc,%,$@)) \
- + $(filter-out $(CFLAGS-OMIT-$<),$(CFLAGS)) $(EXTRA_CFLAGS) \
- + $(CFLAGS_$(patsubst %_glibc,%,$@)) \
- -fPIC -shared $< -o $@ -Wl,-soname,$@ \
- - $(LDFLAGS) $(EXTRA_LIBS) $(LDFLAGS_$(patsubst %_glibc,%,$@))
- + $(filter-out $(LDFLAGS-OMIT-$<),$(LDFLAGS)) $(EXTRA_LIBS) \
- + $(LDFLAGS_$(patsubst %_glibc,%,$@))
-
- clean:
- $(showclean)
- diff -Nur uClibc-0.9.33.2/test/test-skeleton.c uClibc/test/test-skeleton.c
- --- uClibc-0.9.33.2/test/test-skeleton.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/test-skeleton.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <getopt.h>
- @@ -104,7 +103,7 @@
- create_temp_file (const char *base, char **filename)
- {
- char *fname;
- - int fd;
- + int _fd;
-
- fname = (char *) malloc (strlen (test_dir) + 1 + strlen (base)
- + sizeof ("XXXXXX"));
- @@ -115,8 +114,8 @@
- }
- strcpy (stpcpy (stpcpy (stpcpy (fname, test_dir), "/"), base), "XXXXXX");
-
- - fd = mkstemp (fname);
- - if (fd == -1)
- + _fd = mkstemp (fname);
- + if (_fd == -1)
- {
- printf ("cannot open temporary file '%s': %s\n", fname, strerror(errno));
- free (fname);
- @@ -127,13 +126,13 @@
- if (filename != NULL)
- *filename = fname;
-
- - return fd;
- + return _fd;
- }
-
- /* Timeout handler. We kill the child and exit with an error. */
- static void
- __attribute__ ((noreturn))
- -timeout_handler (int sig __attribute__ ((unused)))
- +signal_handler (int sig __attribute__ ((unused)))
- {
- int killed = 0;
- int status;
- @@ -168,6 +167,12 @@
- CLEANUP_HANDLER;
- #endif
-
- + if (sig == SIGINT)
- + {
- + signal (sig, SIG_DFL);
- + raise (sig);
- + }
- +
- /* If we expected this signal: good! */
- #ifdef EXPECTED_SIGNAL
- if (EXPECTED_SIGNAL == SIGALRM)
- @@ -190,6 +195,7 @@
- exit (1);
- }
-
- +#ifdef __XXX_HANDLE_CTRL_C
- static void
- __attribute__ ((noreturn))
- handler_killpid(int sig)
- @@ -199,6 +205,7 @@
- raise(sig); /* kill ourself */
- _exit(128 + sig); /* paranoia */
- }
- +#endif
-
- /* We provide the entry point here. */
- int
- @@ -345,18 +352,23 @@
- exit (1);
- }
-
- +#ifdef __XXX_HANDLE_CTRL_C
- signal (SIGTERM, handler_killpid);
- signal (SIGINT, handler_killpid);
- signal (SIGQUIT, handler_killpid);
- +#endif
-
- /* Set timeout. */
- #ifndef TIMEOUT
- /* Default timeout is two seconds. */
- # define TIMEOUT 2
- #endif
- - signal (SIGALRM, timeout_handler);
- + signal (SIGALRM, signal_handler);
- alarm (TIMEOUT * timeoutfactor);
-
- + /* Make sure we clean up if the wrapper gets interrupted. */
- + signal (SIGINT, signal_handler);
- +
- /* Wait for the regular termination. */
- termpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0));
- if (termpid == -1)
- diff -Nur uClibc-0.9.33.2/test/testsuite.h uClibc/test/testsuite.h
- --- uClibc-0.9.33.2/test/testsuite.h 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/testsuite.h 2014-02-03 12:32:57.000000000 +0100
- @@ -27,11 +27,12 @@
- {
- failures++;
-
- - printf("\nFAILED TEST %lu: \n\t%s\n", (unsigned long)test_number, command);
- + printf("\nFAILED TEST %lu: \n\t%s\nResult: %d",
- + (unsigned long)test_number, command, result);
- printf("AT LINE: %d, FILE: %s\n\n", line, file);
- }
-
- -void success_msg(int result, const char* command)
- +void success_msg(int result __attribute__((unused)), const char* command __attribute__((unused)))
- {
- #if 0
- printf("passed test: %s == 0\n", command);
- diff -Nur uClibc-0.9.33.2/test/time/Makefile uClibc/test/time/Makefile
- --- uClibc-0.9.33.2/test/time/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/time/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/time/test_time.c uClibc/test/time/test_time.c
- --- uClibc-0.9.33.2/test/time/test_time.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/time/test_time.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,9 +12,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <stdio.h>
- #include <stdlib.h>
- diff -Nur uClibc-0.9.33.2/test/time/tst-strptime.c uClibc/test/time/tst-strptime.c
- --- uClibc-0.9.33.2/test/time/tst-strptime.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/time/tst-strptime.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <locale.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/time/tst-timerfd.c uClibc/test/time/tst-timerfd.c
- --- uClibc-0.9.33.2/test/time/tst-timerfd.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/time/tst-timerfd.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,71 @@
- +/* vi: set sw=4 ts=4 sts=4: */
- +/*
- + * timerfd test for uClibc
- + * Copyright (C) 2012 by Kevin Cernekee <cernekee@gmail.com>
- + *
- + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- + */
- +
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include <string.h>
- +#include <unistd.h>
- +#include <errno.h>
- +#include <error.h>
- +#include <signal.h>
- +#include <stdint.h>
- +#include <inttypes.h>
- +#include <time.h>
- +#include <sys/timerfd.h>
- +#include <sys/fcntl.h>
- +
- +static int
- +do_test(void)
- +{
- + int fd, ret, result = 0;
- + struct itimerspec s;
- + uint64_t val;
- + time_t start, now;
- +
- + fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
- + if (fd < 0) {
- + perror("timerfd() failed");
- + result = 1;
- + }
- + s.it_value.tv_sec = 1;
- + s.it_value.tv_nsec = 0;
- + s.it_interval.tv_sec = 0;
- + s.it_interval.tv_nsec = 0;
- + timerfd_settime(fd, 0, &s, NULL);
- + start = time(NULL);
- +
- + /* this should return immediately with EAGAIN due to TFD_NONBLOCK */
- + ret = read(fd, &val, sizeof(val));
- + if (ret != -1 || errno != EAGAIN) {
- + error(0, 0, "first read() returned %d", ret);
- + result = 1;
- + }
- +
- + /* let the timer expire, then check it again */
- + do {
- + now = time(NULL);
- + } while (now - start < 2);
- +
- + ret = read(fd, &val, sizeof(val));
- + if (ret != sizeof(val)) {
- + error(0, 0, "second read() returned %d", ret);
- + result = 1;
- + }
- +
- + /* we are expecting a single expiration, since it_interval is 0 */
- + if (val != 1) {
- + error(0, 0, "wrong number of expirations: %" PRIx64, val);
- + result = 1;
- + }
- +
- + return result;
- +}
- +
- +#define TIMEOUT 5
- +#define TEST_FUNCTION do_test ()
- +#include "../test-skeleton.c"
- diff -Nur uClibc-0.9.33.2/test/time/tst-timezone.c uClibc/test/time/tst-timezone.c
- --- uClibc-0.9.33.2/test/time/tst-timezone.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/time/tst-timezone.c 2014-02-03 12:32:57.000000000 +0100
- @@ -13,9 +13,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <time.h>
- #include <stdio.h>
- diff -Nur uClibc-0.9.33.2/test/tls/Makefile.in uClibc/test/tls/Makefile.in
- --- uClibc-0.9.33.2/test/tls/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/tls/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -102,9 +102,9 @@
- LDFLAGS_tst-tls7 := -ldl
- LDFLAGS_tst-tls8 := -ldl
- LDFLAGS_tst-tls9 := -ldl
- -LDFLAGS_tst-tls10 := -Wl,-rpath-link=. tst-tlsmod8.so
- -LDFLAGS_tst-tls11 := -Wl,-rpath-link=. tst-tlsmod10.so
- -LDFLAGS_tst-tls12 := -Wl,-rpath-link=. tst-tlsmod12.so
- +LDFLAGS_tst-tls10 := -Wl,-rpath-link=. tst-tlsmod8.so tst-tlsmod7.so
- +LDFLAGS_tst-tls11 := -Wl,-rpath-link=. tst-tlsmod9.so tst-tlsmod10.so
- +LDFLAGS_tst-tls12 := -Wl,-rpath-link=. tst-tlsmod11.so tst-tlsmod12.so
- LDFLAGS_tst-tls13 := -ldl -Wl,-rpath-link=.
- LDFLAGS_tst-tls14 := -ldl -Wl,-rpath-link=. tst-tlsmod14a.so
- LDFLAGS_tst-tls15 := -ldl -Wl,-rpath-link=.
- diff -Nur uClibc-0.9.33.2/test/tls/tst-tls6.c uClibc/test/tls/tst-tls6.c
- --- uClibc-0.9.33.2/test/tls/tst-tls6.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/tls/tst-tls6.c 2014-02-15 14:18:15.000000000 +0100
- @@ -38,13 +38,12 @@
- time. The value of the first round is used. */
- #ifdef __UCLIBC__
- if (modid == -1)
- - modid = ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid;
- - else if (((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid
- - != (size_t) modid)
- + modid = ((struct dyn_elf *) h)->dyn->l_tls_modid;
- + else if (((struct dyn_elf *)h)->dyn->l_tls_modid != (size_t) modid)
- {
- printf ("round %d: modid now %zu, initially %d\n",
- i,
- - ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid,
- + ((struct dyn_elf *)h)->dyn->l_tls_modid,
- modid);
- result = 1;
- }
- diff -Nur uClibc-0.9.33.2/test/tls/tst-tls7.c uClibc/test/tls/tst-tls7.c
- --- uClibc-0.9.33.2/test/tls/tst-tls7.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/tls/tst-tls7.c 2014-02-15 14:18:15.000000000 +0100
- @@ -36,13 +36,12 @@
- time. The value of the first round is used. */
- #ifdef __UCLIBC__
- if (modid == -1)
- - modid = ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid;
- - else if (((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid
- - != (size_t) modid)
- + modid = ((struct dyn_elf *) h)->dyn->l_tls_modid;
- + else if (((struct dyn_elf *)h)->dyn->l_tls_modid != (size_t) modid)
- {
- printf ("round %d: modid now %zu, initially %d\n",
- i,
- - ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid,
- + ((struct dyn_elf *)h)->dyn->l_tls_modid,
- modid);
- result = 1;
- }
- diff -Nur uClibc-0.9.33.2/test/tls/tst-tls8.c uClibc/test/tls/tst-tls8.c
- --- uClibc-0.9.33.2/test/tls/tst-tls8.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/tls/tst-tls8.c 2014-02-15 14:18:15.000000000 +0100
- @@ -41,13 +41,12 @@
- time. The value of the first round is used. */
- #ifdef __UCLIBC__
- if (modid1 == (size_t) -1)
- - modid1 = ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid;
- - else if (((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid
- - != (size_t) modid1)
- + modid1 = ((struct dyn_elf *) h1)->dyn->l_tls_modid;
- + else if (((struct dyn_elf *)h1)->dyn->l_tls_modid != (size_t) modid1)
- {
- printf ("round %d: modid now %zd, initially %zd\n",
- i,
- - ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid,
- + ((struct dyn_elf *)h1)->dyn->l_tls_modid,
- modid1);
- result = 1;
- }
- @@ -85,23 +84,23 @@
- time. The value of the first round is used. */
- #ifdef __UCLIBC__
- if (modid2 == (size_t) -1)
- - modid2 = ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid;
- - else if (((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid
- + modid2 = ((struct dyn_elf *)h2)->dyn->l_tls_modid;
- + else if (((struct dyn_elf *)h2)->dyn->l_tls_modid
- != (size_t) modid2)
- {
- printf ("round %d: modid now %zd, initially %zd\n",
- i,
- - ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid,
- + ((struct dyn_elf *)h2)->dyn->l_tls_modid,
- modid2);
- result = 1;
- }
- #else
- if (modid2 == (size_t) -1)
- - modid2 = ((struct link_map *) h1)->l_tls_modid;
- - else if (((struct link_map *) h1)->l_tls_modid != modid2)
- + modid2 = ((struct link_map *) h2)->l_tls_modid;
- + else if (((struct link_map *) h2)->l_tls_modid != modid2)
- {
- printf ("round %d: modid now %zd, initially %zd\n",
- - i, ((struct link_map *) h1)->l_tls_modid, modid2);
- + i, ((struct link_map *) h2)->l_tls_modid, modid2);
- result = 1;
- }
- #endif
- @@ -139,12 +138,12 @@
- We make sure that the module gets assigned the same ID every
- time. The value of the first round is used. */
- #ifdef __UCLIBC__
- - if (((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid
- + if (((struct dyn_elf *)h1)->dyn->l_tls_modid
- != modid1)
- {
- printf ("round %d: modid now %zd, initially %zd\n",
- i,
- - ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid,
- + ((struct dyn_elf *)h1)->dyn->l_tls_modid,
- modid1);
- result = 1;
- }
- @@ -179,20 +178,20 @@
- We make sure that the module gets assigned the same ID every
- time. The value of the first round is used. */
- #ifdef __UCLIBC__
- - if (((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid
- + if (((struct dyn_elf *)h2)->dyn->l_tls_modid
- != modid2)
- {
- printf ("round %d: modid now %zd, initially %zd\n",
- i,
- - ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid,
- + ((struct dyn_elf *)h2)->dyn->l_tls_modid,
- modid2);
- result = 1;
- }
- #else
- - if (((struct link_map *) h1)->l_tls_modid != modid2)
- + if (((struct link_map *) h2)->l_tls_modid != modid2)
- {
- printf ("round %d: modid now %zd, initially %zd\n",
- - i, ((struct link_map *) h1)->l_tls_modid, modid2);
- + i, ((struct link_map *) h2)->l_tls_modid, modid2);
- result = 1;
- }
- #endif
- diff -Nur uClibc-0.9.33.2/test/unistd/Makefile uClibc/test/unistd/Makefile
- --- uClibc-0.9.33.2/test/unistd/Makefile 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/unistd/Makefile 2014-02-03 12:32:57.000000000 +0100
- @@ -2,6 +2,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- top_builddir=../../
- +top_srcdir=../../
- include ../Rules.mak
- -include Makefile.in
- include ../Test.mak
- diff -Nur uClibc-0.9.33.2/test/unistd/Makefile.in uClibc/test/unistd/Makefile.in
- --- uClibc-0.9.33.2/test/unistd/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/unistd/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -2,7 +2,10 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
- ifeq ($(UCLIBC_HAS_LFS),)
- -TESTS_DISABLED := tst-preadwrite64
- +TESTS_DISABLED := tst-preadwrite64 tst-posix_fallocate64
- +endif
- +ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),)
- +TESTS_DISABLED += tst-posix_fallocate
- endif
- OPTS_getopt := -abcXXX -9
- OPTS_getopt_long := --add XXX --delete YYY --verbose
- diff -Nur uClibc-0.9.33.2/test/unistd/tst-posix_fallocate64.c uClibc/test/unistd/tst-posix_fallocate64.c
- --- uClibc-0.9.33.2/test/unistd/tst-posix_fallocate64.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/unistd/tst-posix_fallocate64.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,2 @@
- +#define TST_POSIX_FALLOCATE64
- +#include "tst-posix_fallocate.c"
- diff -Nur uClibc-0.9.33.2/test/unistd/tst-posix_fallocate.c uClibc/test/unistd/tst-posix_fallocate.c
- --- uClibc-0.9.33.2/test/unistd/tst-posix_fallocate.c 1970-01-01 01:00:00.000000000 +0100
- +++ uClibc/test/unistd/tst-posix_fallocate.c 2014-02-03 12:32:57.000000000 +0100
- @@ -0,0 +1,127 @@
- +#include <fcntl.h>
- +#include <sys/stat.h>
- +
- +#ifndef TST_POSIX_FALLOCATE64
- +# define stat64 stat
- +# define fstat64 fstat
- +# else
- +# ifndef O_LARGEFILE
- +# error no O_LARGEFILE but you want to test with LFS enabled
- +# endif
- +#endif
- +
- +static void do_prepare (void);
- +#define PREPARE(argc, argv) do_prepare ()
- +static int do_test (void);
- +#define TEST_FUNCTION do_test ()
- +#include <test-skeleton.c>
- +
- +static int fd;
- +static void
- +do_prepare (void)
- +{
- + fd = create_temp_file ("tst-posix_fallocate.", NULL);
- + if (fd == -1)
- + {
- + printf ("cannot create temporary file: %m\n");
- + exit (1);
- + }
- +}
- +
- +
- +static int
- +do_test (void)
- +{
- + struct stat64 st;
- +
- + if (fstat64 (fd, &st) != 0)
- + {
- + puts ("1st fstat failed");
- + return 1;
- + }
- +
- + if (st.st_size != 0)
- + {
- + puts ("file not created with size 0");
- + return 1;
- + }
- +
- + if (posix_fallocate (fd, 512, 768) != 0)
- + {
- + puts ("1st posix_fallocate call failed");
- + return 1;
- + }
- +
- + if (fstat64 (fd, &st) != 0)
- + {
- + puts ("2nd fstat failed");
- + return 1;
- + }
- +
- + if (st.st_size != 512 + 768)
- + {
- + printf ("file size after 1st posix_fallocate call is %llu, expected %u\n",
- + (unsigned long long int) st.st_size, 512u + 768u);
- + return 1;
- + }
- +
- + if (posix_fallocate (fd, 0, 1024) != 0)
- + {
- + puts ("2nd posix_fallocate call failed");
- + return 1;
- + }
- +
- + if (fstat64 (fd, &st) != 0)
- + {
- + puts ("3rd fstat failed");
- + return 1;
- + }
- +
- + if (st.st_size != 512 + 768)
- + {
- + puts ("file size changed in 2nd posix_fallocate");
- + return 1;
- + }
- +
- + if (posix_fallocate (fd, 2048, 64) != 0)
- + {
- + puts ("3rd posix_fallocate call failed");
- + return 1;
- + }
- +
- + if (fstat64 (fd, &st) != 0)
- + {
- + puts ("4th fstat failed");
- + return 1;
- + }
- +
- + if (st.st_size != 2048 + 64)
- + {
- + printf ("file size after 3rd posix_fallocate call is %llu, expected %u\n",
- + (unsigned long long int) st.st_size, 2048u + 64u);
- + return 1;
- + }
- +#ifdef TST_POSIX_FALLOCATE64
- + if (posix_fallocate64 (fd, 4097ULL, 4294967295ULL + 2ULL) != 0)
- + {
- + puts ("4th posix_fallocate call failed");
- + return 1;
- + }
- +
- + if (fstat64 (fd, &st) != 0)
- + {
- + puts ("5th fstat failed");
- + return 1;
- + }
- +
- + if (st.st_size != 4097ULL + 4294967295ULL + 2ULL)
- + {
- + printf ("file size after 4th posix_fallocate call is %llu, expected %llu\n",
- + (unsigned long long int) st.st_size, 4097ULL + 4294967295ULL + 2ULL);
- + return 1;
- + }
- +#endif
- + close (fd);
- +
- + return 0;
- +}
- diff -Nur uClibc-0.9.33.2/test/unistd/tst-preadwrite64.c uClibc/test/unistd/tst-preadwrite64.c
- --- uClibc-0.9.33.2/test/unistd/tst-preadwrite64.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/unistd/tst-preadwrite64.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #define PREAD pread64
- #define PWRITE pwrite64
- diff -Nur uClibc-0.9.33.2/test/unistd/tst-preadwrite.c uClibc/test/unistd/tst-preadwrite.c
- --- uClibc-0.9.33.2/test/unistd/tst-preadwrite.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/test/unistd/tst-preadwrite.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,9 +14,8 @@
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- - License along with the GNU C Library; if not, write to the Free
- - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- - 02111-1307 USA. */
- + License along with the GNU C Library; if not, see
- + <http://www.gnu.org/licenses/>. */
-
- #include <errno.h>
- #include <error.h>
- diff -Nur uClibc-0.9.33.2/TODO uClibc/TODO
- --- uClibc-0.9.33.2/TODO 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/TODO 2014-02-03 12:32:56.000000000 +0100
- @@ -88,6 +88,11 @@
- *) Cleanup/scrub all the Makefile copyright junk
- *) Fix dlopen, for both static and dynamic cases, and make it
- fully comply with SuSv3
- + *) check if sched_getcpu is only pulled in where it should be
- + *) remove HANDLE_OLDER_RLIMIT, NEW_GETRLIMIT (conditionalize on
- + ugetrlimit, it seems, else use the modern variant)
- + *) simplify exec*() in the light of execvpe (perhaps single internal
- + impl); USE_GNU for execvpe (and other GNU extensions, see psm).
-
-
- TODO list for AFTER the uClibc 1.0.0 release:
- @@ -180,3 +185,4 @@
- b) Write a space-efficient gettext substitute, to avoid storing large amounts
- of redundant data.
-
- +
- diff -Nur uClibc-0.9.33.2/utils/chroot_realpath.c uClibc/utils/chroot_realpath.c
- --- uClibc-0.9.33.2/utils/chroot_realpath.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/utils/chroot_realpath.c 2014-02-03 12:32:57.000000000 +0100
- @@ -14,8 +14,7 @@
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; see the file COPYING.LIB. If not,
- - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- - * Boston, MA 02111-1307, USA.
- + * see <http://www.gnu.org/licenses/>.
- *
- * 2005/09/12: Dan Howell (modified from realpath.c to emulate chroot)
- */
- diff -Nur uClibc-0.9.33.2/utils/getconf.c uClibc/utils/getconf.c
- --- uClibc-0.9.33.2/utils/getconf.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/utils/getconf.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,10 +12,10 @@
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- - along with this program; if not, write to the Free Software Foundation,
- - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- + along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
- #define _GNU_SOURCE 1
- +#include "porting.h"
- #include <unistd.h>
- #include <errno.h>
- #include <string.h>
- @@ -1052,13 +1052,11 @@
- };
- static const int nspecs = sizeof (specs) / sizeof (specs[0]);
-
- -#ifdef __UCLIBC_HAS___PROGNAME__
- -extern const char *__progname;
- -#else
- -#define __progname "foo"
- +#ifndef __UCLIBC_HAS___PROGNAME__
- +static const char *__progname = "getconf";
- #endif
-
- -static void
- +static attribute_noreturn void
- usage (void)
- {
- fprintf (stderr,
- @@ -1070,7 +1068,7 @@
- }
-
-
- -static void
- +static attribute_noreturn void
- print_all (const char *path)
- {
- register const struct conf *c;
- diff -Nur uClibc-0.9.33.2/utils/iconv.c uClibc/utils/iconv.c
- --- uClibc-0.9.33.2/utils/iconv.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/utils/iconv.c 2014-02-03 12:32:57.000000000 +0100
- @@ -12,8 +12,8 @@
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- - * License along with this library; if not, write to the Free
- - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- + * License along with this library; if not, see
- + * <http://www.gnu.org/licenses/>.
- */
-
- /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
- @@ -98,15 +98,22 @@
- * Manuel
- */
-
- +/* keep libgen before string.h - and porting.h to use the
- + * XPG version of basename */
- +#include <libgen.h>
- #include "porting.h"
- #include <string.h>
- #include <iconv.h>
- #include <stdarg.h>
- -#include <libgen.h>
- #include <wchar.h>
- #include "wchar.c" /* for _UC_iconv_t and __iconv_codesets */
-
- -extern const unsigned char __iconv_codesets[];
- +#ifdef L_iconv_main
- +static
- +#else
- +extern
- +#endif
- +const unsigned char __iconv_codesets[];
-
- #define IBUF BUFSIZ
- #define OBUF BUFSIZ
- diff -Nur uClibc-0.9.33.2/utils/ldconfig.c uClibc/utils/ldconfig.c
- --- uClibc-0.9.33.2/utils/ldconfig.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/utils/ldconfig.c 2014-02-03 12:32:57.000000000 +0100
- @@ -57,8 +57,6 @@
- /* Code indicating core file. */
- #define CMAGIC 0421
-
- -char *___strtok = NULL;
- -
- char *prog = NULL;
- int debug = 0; /* debug mode */
- int verbose = 0; /* verbose mode */
- @@ -96,6 +94,7 @@
- extern char *chroot_realpath(const char *chroot, const char *path,
- char resolved_path[]);
-
- +#if defined __UCLIBC_STATIC_LDCONFIG__ || !defined __UCLIBC_HAS_BSD_ERR__
- /* These two are used internally -- you shouldn't need to use them */
- static void verror_msg(const char *s, va_list p)
- {
- @@ -114,8 +113,7 @@
- fprintf(stderr, "\n");
- }
-
- -static void err(int errnum, const char *s, ...) attribute_noreturn;
- -static void err(int errnum, const char *s, ...)
- +static attribute_noreturn void err(int errnum, const char *s, ...)
- {
- va_list p;
-
- @@ -146,6 +144,9 @@
- vperror_msg(s, p);
- va_end(p);
- }
- +#else
- +# include <err.h>
- +#endif
-
- static void *xmalloc(size_t size)
- {
- @@ -257,10 +258,10 @@
- && N_MAGIC_SWAP(exec) != QMAGIC) {
- elf_hdr = (ElfW(Ehdr) *) & exec;
- if (elf_hdr->e_ident[0] != 0x7f ||
- - strncmp((char *)elf_hdr->e_ident + 1, "ELF", 3) != 0)
- + strncmp((const char *)elf_hdr->e_ident + 1, "ELF", 3) != 0)
- {
- /* silently ignore linker scripts */
- - if (strncmp((char *)&exec, "/* GNU ld", 9) != 0)
- + if (strncmp((const char *)&exec, "/* GNU ld", 9) != 0)
- warnx("%s is not a shared library, skipping", buff);
- } else {
- /* always call readsoname to update type */
- @@ -282,7 +283,7 @@
- /* if the soname does not match the filename,
- issue a warning, but only in debug mode. */
- int len = strlen(good);
- - if (debug && (strncmp(good, name, len) != 0
- + if (debug && (strncmp((const char *)good, name, len) != 0
- || (name[len] != '\0' && name[len] != '.')))
- warnx("%s has inconsistent soname (%s)", buff, good);
- }
- @@ -784,8 +785,7 @@
- }
- #endif
-
- -static void usage(void) attribute_noreturn;
- -static void usage(void)
- +static attribute_noreturn void usage(void)
- {
- fprintf(stderr,
- #ifdef __LDSO_CACHE_SUPPORT__
- diff -Nur uClibc-0.9.33.2/utils/ldd.c uClibc/utils/ldd.c
- --- uClibc-0.9.33.2/utils/ldd.c 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/utils/ldd.c 2014-02-03 12:32:57.000000000 +0100
- @@ -20,6 +20,11 @@
- #define ELFCLASSM ELFCLASS64
- #endif
-
- +#if defined(__arc__)
- +#define MATCH_MACHINE(x) (x == EM_ARCOMPACT)
- +#define ELFCLASSM ELFCLASS32
- +#endif
- +
- #if defined(__arm__) || defined(__thumb__)
- #define MATCH_MACHINE(x) (x == EM_ARM)
- #define ELFCLASSM ELFCLASS32
- @@ -63,6 +68,11 @@
- #define ELFCLASSM ELFCLASS32
- #endif
-
- +#if defined(__metag__)
- +#define MATCH_MACHINE(x) (x == EM_METAG)
- +#define ELFCLASSM ELFCLASS32
- +#endif
- +
- #if defined(__mips__)
- #define MATCH_MACHINE(x) (x == EM_MIPS || x == EM_MIPS_RS3_LE)
- #define ELFCLASSM ELFCLASS32
- @@ -106,6 +116,11 @@
- #define ELFCLASSM ELFCLASS32
- #endif
-
- +#if defined(__xtensa__)
- +#define MATCH_MACHINE(x) (x == EM_XTENSA)
- +#define ELFCLASSM ELFCLASS32
- +#endif
- +
- #ifndef MATCH_MACHINE
- # ifdef __linux__
- # include <asm/elf.h>
- @@ -127,7 +142,6 @@
- #define ELFDATAM ELFDATA2MSB
- #endif
-
- -#define ARRAY_SIZE(v) (sizeof(v) / sizeof(*v))
- #define TRUSTED_LDSO UCLIBC_RUNTIME_PREFIX "lib/" UCLIBC_LDSO
-
- struct library {
- @@ -145,7 +159,7 @@
-
- static __inline__ uint32_t byteswap32_to_host(uint32_t value)
- {
- - if (byteswap == 1) {
- + if (byteswap) {
- return (bswap_32(value));
- } else {
- return (value);
- @@ -153,7 +167,7 @@
- }
- static __inline__ uint64_t byteswap64_to_host(uint64_t value)
- {
- - if (byteswap == 1) {
- + if (byteswap) {
- return (bswap_64(value));
- } else {
- return (value);
- @@ -232,14 +246,7 @@
- }
-
- /* Check if the target endianness matches the host's endianness */
- - byteswap = 0;
- - if (UCLIBC_ENDIAN_HOST == UCLIBC_ENDIAN_LITTLE) {
- - if (ehdr->e_ident[5] == ELFDATA2MSB)
- - byteswap = 1;
- - } else if (UCLIBC_ENDIAN_HOST == UCLIBC_ENDIAN_BIG) {
- - if (ehdr->e_ident[5] == ELFDATA2LSB)
- - byteswap = 1;
- - }
- + byteswap = !(ehdr->e_ident[5] == ELFDATAM);
-
- /* Be very lazy, and only byteswap the stuff we use */
- if (byteswap) {
- @@ -707,6 +714,7 @@
- };
- # ifdef __LDSO_STANDALONE_SUPPORT__
- char * lib_path = getenv("LD_LIBRARY_PATH");
- +
- /* The 'extended' environment inclusing the LD_LIBRARY_PATH */
- static char *ext_environment[ARRAY_SIZE(environment) + 1];
- char **envp = (char **) environment;
- diff -Nur uClibc-0.9.33.2/utils/Makefile.in uClibc/utils/Makefile.in
- --- uClibc-0.9.33.2/utils/Makefile.in 2012-05-15 09:20:09.000000000 +0200
- +++ uClibc/utils/Makefile.in 2014-02-03 12:32:57.000000000 +0100
- @@ -10,6 +10,7 @@
-
- CFLAGS-utils := \
- $(SSP_ALL_CFLAGS) \
- + -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
- -I$(top_srcdir)ldso/include \
- -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
- -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
- @@ -36,8 +37,7 @@
- # Need CFLAGS-utils explicitly, because the source file is not located in utils
- CFLAGS-iconv := $(CFLAGS-utils) \
- $(CFLAGS-utils-shared) \
- - -I$(top_srcdir)libc/misc/wchar \
- - -DL_iconv_main \
- + -I$(top_srcdir)libc/misc/wchar
-
- CFLAGS-locale := $(CFLAGS-utils)
- CFLAGS-getconf :=$(CFLAGS-utils) \
- @@ -56,9 +56,11 @@
- $(UTILS_CONFIG_FLAGS-y)
- BUILD_CFLAGS-ldconfig.host := \
- -DBUILDING_LINKAGE \
- + -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
- -I$(top_srcdir)ldso/include
- BUILD_CFLAGS-ldd.host := \
- -DBUILDING_LINKAGE \
- + -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
- -I$(top_srcdir)ldso/include \
- -include $(top_srcdir)include/elf.h
- BUILD_CFLAGS-locale.host := \
|