libc.info-6 293 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169
  1. This is libc.info, produced by makeinfo version 7.3 from libc.texinfo.
  2. This is ‘The GNU C Library Reference Manual’, for version 2.43.
  3. Copyright © 1993-2026 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Free Software Needs Free Documentation" and
  8. "GNU Lesser General Public License", the Front-Cover texts being "A GNU
  9. Manual", and with the Back-Cover Texts as in (a) below. A copy of the
  10. license is included in the section entitled "GNU Free Documentation
  11. License".
  12. (a) The FSF's Back-Cover Text is: "You have the freedom to copy and
  13. modify this GNU manual. Buying copies from the FSF supports it in
  14. developing GNU and promoting software freedom."
  15. INFO-DIR-SECTION Software libraries
  16. START-INFO-DIR-ENTRY
  17. * Libc: (libc). C library.
  18. END-INFO-DIR-ENTRY
  19. INFO-DIR-SECTION GNU C library functions and macros
  20. START-INFO-DIR-ENTRY
  21. * ALTWERASE: (libc)Local Modes.
  22. * ARGP_ERR_UNKNOWN: (libc)Argp Parser Functions.
  23. * ARG_MAX: (libc)General Limits.
  24. * BAUD_MAX: (libc)Line Speed.
  25. * BC_BASE_MAX: (libc)Utility Limits.
  26. * BC_DIM_MAX: (libc)Utility Limits.
  27. * BC_SCALE_MAX: (libc)Utility Limits.
  28. * BC_STRING_MAX: (libc)Utility Limits.
  29. * BRKINT: (libc)Input Modes.
  30. * BUFSIZ: (libc)Controlling Buffering.
  31. * CCTS_OFLOW: (libc)Control Modes.
  32. * CHAR_BIT: (libc)Width of Type.
  33. * CHILD_MAX: (libc)General Limits.
  34. * CIGNORE: (libc)Control Modes.
  35. * CLK_TCK: (libc)Processor Time.
  36. * CLOCAL: (libc)Control Modes.
  37. * CLOCKS_PER_SEC: (libc)CPU Time.
  38. * CLOCK_BOOTTIME: (libc)Getting the Time.
  39. * CLOCK_BOOTTIME_ALARM: (libc)Getting the Time.
  40. * CLOCK_MONOTONIC: (libc)Getting the Time.
  41. * CLOCK_MONOTONIC_COARSE: (libc)Getting the Time.
  42. * CLOCK_MONOTONIC_RAW: (libc)Getting the Time.
  43. * CLOCK_PROCESS_CPUTIME_ID: (libc)Getting the Time.
  44. * CLOCK_REALTIME: (libc)Getting the Time.
  45. * CLOCK_REALTIME_ALARM: (libc)Getting the Time.
  46. * CLOCK_REALTIME_COARSE: (libc)Getting the Time.
  47. * CLOCK_TAI: (libc)Getting the Time.
  48. * CLOCK_THREAD_CPUTIME_ID: (libc)Getting the Time.
  49. * COLL_WEIGHTS_MAX: (libc)Utility Limits.
  50. * CPU_ALLOC: (libc)CPU Affinity.
  51. * CPU_ALLOC_SIZE: (libc)CPU Affinity.
  52. * CPU_AND: (libc)CPU Affinity.
  53. * CPU_AND_S: (libc)CPU Affinity.
  54. * CPU_CLR: (libc)CPU Affinity.
  55. * CPU_CLR_S: (libc)CPU Affinity.
  56. * CPU_COUNT: (libc)CPU Affinity.
  57. * CPU_COUNT_S: (libc)CPU Affinity.
  58. * CPU_EQUAL: (libc)CPU Affinity.
  59. * CPU_EQUAL_S: (libc)CPU Affinity.
  60. * CPU_FEATURE_ACTIVE: (libc)X86.
  61. * CPU_FEATURE_PRESENT: (libc)X86.
  62. * CPU_FREE: (libc)CPU Affinity.
  63. * CPU_ISSET: (libc)CPU Affinity.
  64. * CPU_ISSET_S: (libc)CPU Affinity.
  65. * CPU_OR: (libc)CPU Affinity.
  66. * CPU_OR_S: (libc)CPU Affinity.
  67. * CPU_SET: (libc)CPU Affinity.
  68. * CPU_SETSIZE: (libc)CPU Affinity.
  69. * CPU_SET_S: (libc)CPU Affinity.
  70. * CPU_XOR: (libc)CPU Affinity.
  71. * CPU_XOR_S: (libc)CPU Affinity.
  72. * CPU_ZERO: (libc)CPU Affinity.
  73. * CPU_ZERO_S: (libc)CPU Affinity.
  74. * CREAD: (libc)Control Modes.
  75. * CRTS_IFLOW: (libc)Control Modes.
  76. * CS5: (libc)Control Modes.
  77. * CS6: (libc)Control Modes.
  78. * CS7: (libc)Control Modes.
  79. * CS8: (libc)Control Modes.
  80. * CSIZE: (libc)Control Modes.
  81. * CSTOPB: (libc)Control Modes.
  82. * DLFO_EH_SEGMENT_TYPE: (libc)Dynamic Linker Introspection.
  83. * DLFO_STRUCT_HAS_EH_COUNT: (libc)Dynamic Linker Introspection.
  84. * DLFO_STRUCT_HAS_EH_DBASE: (libc)Dynamic Linker Introspection.
  85. * DTTOIF: (libc)Directory Entries.
  86. * E2BIG: (libc)Error Codes.
  87. * EACCES: (libc)Error Codes.
  88. * EADDRINUSE: (libc)Error Codes.
  89. * EADDRNOTAVAIL: (libc)Error Codes.
  90. * EADV: (libc)Error Codes.
  91. * EAFNOSUPPORT: (libc)Error Codes.
  92. * EAGAIN: (libc)Error Codes.
  93. * EALREADY: (libc)Error Codes.
  94. * EAUTH: (libc)Error Codes.
  95. * EBACKGROUND: (libc)Error Codes.
  96. * EBADE: (libc)Error Codes.
  97. * EBADF: (libc)Error Codes.
  98. * EBADFD: (libc)Error Codes.
  99. * EBADMSG: (libc)Error Codes.
  100. * EBADR: (libc)Error Codes.
  101. * EBADRPC: (libc)Error Codes.
  102. * EBADRQC: (libc)Error Codes.
  103. * EBADSLT: (libc)Error Codes.
  104. * EBFONT: (libc)Error Codes.
  105. * EBUSY: (libc)Error Codes.
  106. * ECANCELED: (libc)Error Codes.
  107. * ECHILD: (libc)Error Codes.
  108. * ECHO: (libc)Local Modes.
  109. * ECHOCTL: (libc)Local Modes.
  110. * ECHOE: (libc)Local Modes.
  111. * ECHOK: (libc)Local Modes.
  112. * ECHOKE: (libc)Local Modes.
  113. * ECHONL: (libc)Local Modes.
  114. * ECHOPRT: (libc)Local Modes.
  115. * ECHRNG: (libc)Error Codes.
  116. * ECOMM: (libc)Error Codes.
  117. * ECONNABORTED: (libc)Error Codes.
  118. * ECONNREFUSED: (libc)Error Codes.
  119. * ECONNRESET: (libc)Error Codes.
  120. * ED: (libc)Error Codes.
  121. * EDEADLK: (libc)Error Codes.
  122. * EDEADLOCK: (libc)Error Codes.
  123. * EDESTADDRREQ: (libc)Error Codes.
  124. * EDIED: (libc)Error Codes.
  125. * EDOM: (libc)Error Codes.
  126. * EDOTDOT: (libc)Error Codes.
  127. * EDQUOT: (libc)Error Codes.
  128. * EEXIST: (libc)Error Codes.
  129. * EFAULT: (libc)Error Codes.
  130. * EFBIG: (libc)Error Codes.
  131. * EFTYPE: (libc)Error Codes.
  132. * EGRATUITOUS: (libc)Error Codes.
  133. * EGREGIOUS: (libc)Error Codes.
  134. * EHOSTDOWN: (libc)Error Codes.
  135. * EHOSTUNREACH: (libc)Error Codes.
  136. * EHWPOISON: (libc)Error Codes.
  137. * EIDRM: (libc)Error Codes.
  138. * EIEIO: (libc)Error Codes.
  139. * EILSEQ: (libc)Error Codes.
  140. * EINPROGRESS: (libc)Error Codes.
  141. * EINTR: (libc)Error Codes.
  142. * EINVAL: (libc)Error Codes.
  143. * EIO: (libc)Error Codes.
  144. * EISCONN: (libc)Error Codes.
  145. * EISDIR: (libc)Error Codes.
  146. * EISNAM: (libc)Error Codes.
  147. * EKEYEXPIRED: (libc)Error Codes.
  148. * EKEYREJECTED: (libc)Error Codes.
  149. * EKEYREVOKED: (libc)Error Codes.
  150. * EL2HLT: (libc)Error Codes.
  151. * EL2NSYNC: (libc)Error Codes.
  152. * EL3HLT: (libc)Error Codes.
  153. * EL3RST: (libc)Error Codes.
  154. * ELIBACC: (libc)Error Codes.
  155. * ELIBBAD: (libc)Error Codes.
  156. * ELIBEXEC: (libc)Error Codes.
  157. * ELIBMAX: (libc)Error Codes.
  158. * ELIBSCN: (libc)Error Codes.
  159. * ELNRNG: (libc)Error Codes.
  160. * ELOOP: (libc)Error Codes.
  161. * EMEDIUMTYPE: (libc)Error Codes.
  162. * EMFILE: (libc)Error Codes.
  163. * EMLINK: (libc)Error Codes.
  164. * EMSGSIZE: (libc)Error Codes.
  165. * EMULTIHOP: (libc)Error Codes.
  166. * ENAMETOOLONG: (libc)Error Codes.
  167. * ENAVAIL: (libc)Error Codes.
  168. * ENEEDAUTH: (libc)Error Codes.
  169. * ENETDOWN: (libc)Error Codes.
  170. * ENETRESET: (libc)Error Codes.
  171. * ENETUNREACH: (libc)Error Codes.
  172. * ENFILE: (libc)Error Codes.
  173. * ENOANO: (libc)Error Codes.
  174. * ENOBUFS: (libc)Error Codes.
  175. * ENOCSI: (libc)Error Codes.
  176. * ENODATA: (libc)Error Codes.
  177. * ENODEV: (libc)Error Codes.
  178. * ENOENT: (libc)Error Codes.
  179. * ENOEXEC: (libc)Error Codes.
  180. * ENOKEY: (libc)Error Codes.
  181. * ENOLCK: (libc)Error Codes.
  182. * ENOLINK: (libc)Error Codes.
  183. * ENOMEDIUM: (libc)Error Codes.
  184. * ENOMEM: (libc)Error Codes.
  185. * ENOMSG: (libc)Error Codes.
  186. * ENONET: (libc)Error Codes.
  187. * ENOPKG: (libc)Error Codes.
  188. * ENOPROTOOPT: (libc)Error Codes.
  189. * ENOSPC: (libc)Error Codes.
  190. * ENOSR: (libc)Error Codes.
  191. * ENOSTR: (libc)Error Codes.
  192. * ENOSYS: (libc)Error Codes.
  193. * ENOTBLK: (libc)Error Codes.
  194. * ENOTCONN: (libc)Error Codes.
  195. * ENOTDIR: (libc)Error Codes.
  196. * ENOTEMPTY: (libc)Error Codes.
  197. * ENOTNAM: (libc)Error Codes.
  198. * ENOTRECOVERABLE: (libc)Error Codes.
  199. * ENOTSOCK: (libc)Error Codes.
  200. * ENOTSUP: (libc)Error Codes.
  201. * ENOTTY: (libc)Error Codes.
  202. * ENOTUNIQ: (libc)Error Codes.
  203. * ENXIO: (libc)Error Codes.
  204. * EOF: (libc)EOF and Errors.
  205. * EOPNOTSUPP: (libc)Error Codes.
  206. * EOVERFLOW: (libc)Error Codes.
  207. * EOWNERDEAD: (libc)Error Codes.
  208. * EPERM: (libc)Error Codes.
  209. * EPFNOSUPPORT: (libc)Error Codes.
  210. * EPIPE: (libc)Error Codes.
  211. * EPROCLIM: (libc)Error Codes.
  212. * EPROCUNAVAIL: (libc)Error Codes.
  213. * EPROGMISMATCH: (libc)Error Codes.
  214. * EPROGUNAVAIL: (libc)Error Codes.
  215. * EPROTO: (libc)Error Codes.
  216. * EPROTONOSUPPORT: (libc)Error Codes.
  217. * EPROTOTYPE: (libc)Error Codes.
  218. * EQUIV_CLASS_MAX: (libc)Utility Limits.
  219. * ERANGE: (libc)Error Codes.
  220. * EREMCHG: (libc)Error Codes.
  221. * EREMOTE: (libc)Error Codes.
  222. * EREMOTEIO: (libc)Error Codes.
  223. * ERESTART: (libc)Error Codes.
  224. * ERFKILL: (libc)Error Codes.
  225. * EROFS: (libc)Error Codes.
  226. * ERPCMISMATCH: (libc)Error Codes.
  227. * ESHUTDOWN: (libc)Error Codes.
  228. * ESOCKTNOSUPPORT: (libc)Error Codes.
  229. * ESPIPE: (libc)Error Codes.
  230. * ESRCH: (libc)Error Codes.
  231. * ESRMNT: (libc)Error Codes.
  232. * ESTALE: (libc)Error Codes.
  233. * ESTRPIPE: (libc)Error Codes.
  234. * ETIME: (libc)Error Codes.
  235. * ETIMEDOUT: (libc)Error Codes.
  236. * ETOOMANYREFS: (libc)Error Codes.
  237. * ETXTBSY: (libc)Error Codes.
  238. * EUCLEAN: (libc)Error Codes.
  239. * EUNATCH: (libc)Error Codes.
  240. * EUSERS: (libc)Error Codes.
  241. * EWOULDBLOCK: (libc)Error Codes.
  242. * EXDEV: (libc)Error Codes.
  243. * EXFULL: (libc)Error Codes.
  244. * EXIT_FAILURE: (libc)Exit Status.
  245. * EXIT_SUCCESS: (libc)Exit Status.
  246. * EXPR_NEST_MAX: (libc)Utility Limits.
  247. * FD_CLOEXEC: (libc)Descriptor Flags.
  248. * FD_CLR: (libc)Waiting for I/O.
  249. * FD_ISSET: (libc)Waiting for I/O.
  250. * FD_SET: (libc)Waiting for I/O.
  251. * FD_SETSIZE: (libc)Waiting for I/O.
  252. * FD_ZERO: (libc)Waiting for I/O.
  253. * FE_SNANS_ALWAYS_SIGNAL: (libc)Infinity and NaN.
  254. * FILENAME_MAX: (libc)Limits for Files.
  255. * FLUSHO: (libc)Local Modes.
  256. * FOPEN_MAX: (libc)Opening Streams.
  257. * FP_ILOGB0: (libc)Exponents and Logarithms.
  258. * FP_ILOGBNAN: (libc)Exponents and Logarithms.
  259. * FP_LLOGB0: (libc)Exponents and Logarithms.
  260. * FP_LLOGBNAN: (libc)Exponents and Logarithms.
  261. * F_DUPFD: (libc)Duplicating Descriptors.
  262. * F_GETFD: (libc)Descriptor Flags.
  263. * F_GETFL: (libc)Getting File Status Flags.
  264. * F_GETLK: (libc)File Locks.
  265. * F_GETOWN: (libc)Interrupt Input.
  266. * F_OFD_GETLK: (libc)Open File Description Locks.
  267. * F_OFD_SETLK: (libc)Open File Description Locks.
  268. * F_OFD_SETLKW: (libc)Open File Description Locks.
  269. * F_OK: (libc)Testing File Access.
  270. * F_SETFD: (libc)Descriptor Flags.
  271. * F_SETFL: (libc)Getting File Status Flags.
  272. * F_SETLK: (libc)File Locks.
  273. * F_SETLKW: (libc)File Locks.
  274. * F_SETOWN: (libc)Interrupt Input.
  275. * HUGE_VAL: (libc)Math Error Reporting.
  276. * HUGE_VALF: (libc)Math Error Reporting.
  277. * HUGE_VALL: (libc)Math Error Reporting.
  278. * HUGE_VAL_FN: (libc)Math Error Reporting.
  279. * HUGE_VAL_FNx: (libc)Math Error Reporting.
  280. * HUPCL: (libc)Control Modes.
  281. * I: (libc)Complex Numbers.
  282. * ICANON: (libc)Local Modes.
  283. * ICRNL: (libc)Input Modes.
  284. * IEXTEN: (libc)Local Modes.
  285. * IFNAMSIZ: (libc)Interface Naming.
  286. * IFTODT: (libc)Directory Entries.
  287. * IGNBRK: (libc)Input Modes.
  288. * IGNCR: (libc)Input Modes.
  289. * IGNPAR: (libc)Input Modes.
  290. * IMAXBEL: (libc)Input Modes.
  291. * INADDR_ANY: (libc)Host Address Data Type.
  292. * INADDR_BROADCAST: (libc)Host Address Data Type.
  293. * INADDR_LOOPBACK: (libc)Host Address Data Type.
  294. * INADDR_NONE: (libc)Host Address Data Type.
  295. * INFINITY: (libc)Infinity and NaN.
  296. * INLCR: (libc)Input Modes.
  297. * INPCK: (libc)Input Modes.
  298. * IPPORT_RESERVED: (libc)Ports.
  299. * IPPORT_USERRESERVED: (libc)Ports.
  300. * ISIG: (libc)Local Modes.
  301. * ISTRIP: (libc)Input Modes.
  302. * IXANY: (libc)Input Modes.
  303. * IXOFF: (libc)Input Modes.
  304. * IXON: (libc)Input Modes.
  305. * LINE_MAX: (libc)Utility Limits.
  306. * LINK_MAX: (libc)Limits for Files.
  307. * L_ctermid: (libc)Identifying the Terminal.
  308. * L_cuserid: (libc)Who Logged In.
  309. * L_tmpnam: (libc)Temporary Files.
  310. * MAXNAMLEN: (libc)Limits for Files.
  311. * MAXSYMLINKS: (libc)Symbolic Links.
  312. * MAX_CANON: (libc)Limits for Files.
  313. * MAX_INPUT: (libc)Limits for Files.
  314. * MB_CUR_MAX: (libc)Selecting the Conversion.
  315. * MB_LEN_MAX: (libc)Selecting the Conversion.
  316. * MDMBUF: (libc)Control Modes.
  317. * MSG_DONTROUTE: (libc)Socket Data Options.
  318. * MSG_OOB: (libc)Socket Data Options.
  319. * MSG_PEEK: (libc)Socket Data Options.
  320. * NAME_MAX: (libc)Limits for Files.
  321. * NAN: (libc)Infinity and NaN.
  322. * NCCS: (libc)Mode Data Types.
  323. * NGROUPS_MAX: (libc)General Limits.
  324. * NOFLSH: (libc)Local Modes.
  325. * NOKERNINFO: (libc)Local Modes.
  326. * NSIG: (libc)Standard Signals.
  327. * NULL: (libc)Null Pointer Constant.
  328. * ONLCR: (libc)Output Modes.
  329. * ONOEOT: (libc)Output Modes.
  330. * OPEN_MAX: (libc)General Limits.
  331. * OPOST: (libc)Output Modes.
  332. * OXTABS: (libc)Output Modes.
  333. * O_ACCMODE: (libc)Access Modes.
  334. * O_APPEND: (libc)Operating Modes.
  335. * O_ASYNC: (libc)Operating Modes.
  336. * O_CREAT: (libc)Open-time Flags.
  337. * O_DIRECTORY: (libc)Open-time Flags.
  338. * O_EXCL: (libc)Open-time Flags.
  339. * O_EXEC: (libc)Access Modes.
  340. * O_EXLOCK: (libc)Open-time Flags.
  341. * O_FSYNC: (libc)Operating Modes.
  342. * O_IGNORE_CTTY: (libc)Open-time Flags.
  343. * O_NDELAY: (libc)Operating Modes.
  344. * O_NOATIME: (libc)Operating Modes.
  345. * O_NOCTTY: (libc)Open-time Flags.
  346. * O_NOFOLLOW: (libc)Open-time Flags.
  347. * O_NOLINK: (libc)Open-time Flags.
  348. * O_NONBLOCK: (libc)Open-time Flags.
  349. * O_NONBLOCK: (libc)Operating Modes.
  350. * O_NOTRANS: (libc)Open-time Flags.
  351. * O_PATH: (libc)Access Modes.
  352. * O_RDONLY: (libc)Access Modes.
  353. * O_RDWR: (libc)Access Modes.
  354. * O_READ: (libc)Access Modes.
  355. * O_SHLOCK: (libc)Open-time Flags.
  356. * O_SYNC: (libc)Operating Modes.
  357. * O_TMPFILE: (libc)Open-time Flags.
  358. * O_TRUNC: (libc)Open-time Flags.
  359. * O_WRITE: (libc)Access Modes.
  360. * O_WRONLY: (libc)Access Modes.
  361. * PARENB: (libc)Control Modes.
  362. * PARMRK: (libc)Input Modes.
  363. * PARODD: (libc)Control Modes.
  364. * PATH_MAX: (libc)Limits for Files.
  365. * PA_FLAG_MASK: (libc)Parsing a Template String.
  366. * PENDIN: (libc)Local Modes.
  367. * PF_FILE: (libc)Local Namespace Details.
  368. * PF_INET6: (libc)Internet Namespace.
  369. * PF_INET: (libc)Internet Namespace.
  370. * PF_LOCAL: (libc)Local Namespace Details.
  371. * PF_UNIX: (libc)Local Namespace Details.
  372. * PIPE_BUF: (libc)Limits for Files.
  373. * PTHREAD_ATTR_NO_SIGMASK_NP: (libc)Initial Thread Signal Mask.
  374. * P_tmpdir: (libc)Temporary Files.
  375. * RAND_MAX: (libc)ISO Random.
  376. * RE_DUP_MAX: (libc)General Limits.
  377. * RLIM_INFINITY: (libc)Limits on Resources.
  378. * RSEQ_SIG: (libc)Restartable Sequences.
  379. * R_OK: (libc)Testing File Access.
  380. * SA_NOCLDSTOP: (libc)Flags for Sigaction.
  381. * SA_NOCLDWAIT: (libc)Flags for Sigaction.
  382. * SA_NODEFER: (libc)Flags for Sigaction.
  383. * SA_ONSTACK: (libc)Flags for Sigaction.
  384. * SA_RESETHAND: (libc)Flags for Sigaction.
  385. * SA_RESTART: (libc)Flags for Sigaction.
  386. * SA_SIGINFO: (libc)Flags for Sigaction.
  387. * SEEK_CUR: (libc)File Positioning.
  388. * SEEK_END: (libc)File Positioning.
  389. * SEEK_SET: (libc)File Positioning.
  390. * SIGABRT: (libc)Program Error Signals.
  391. * SIGALRM: (libc)Alarm Signals.
  392. * SIGBUS: (libc)Program Error Signals.
  393. * SIGCHLD: (libc)Job Control Signals.
  394. * SIGCLD: (libc)Job Control Signals.
  395. * SIGCONT: (libc)Job Control Signals.
  396. * SIGEMT: (libc)Program Error Signals.
  397. * SIGFPE: (libc)Program Error Signals.
  398. * SIGHUP: (libc)Termination Signals.
  399. * SIGILL: (libc)Program Error Signals.
  400. * SIGINFO: (libc)Miscellaneous Signals.
  401. * SIGINT: (libc)Termination Signals.
  402. * SIGIO: (libc)Asynchronous I/O Signals.
  403. * SIGIOT: (libc)Program Error Signals.
  404. * SIGKILL: (libc)Termination Signals.
  405. * SIGLOST: (libc)Operation Error Signals.
  406. * SIGPIPE: (libc)Operation Error Signals.
  407. * SIGPOLL: (libc)Asynchronous I/O Signals.
  408. * SIGPROF: (libc)Alarm Signals.
  409. * SIGPWR: (libc)Miscellaneous Signals.
  410. * SIGQUIT: (libc)Termination Signals.
  411. * SIGSEGV: (libc)Program Error Signals.
  412. * SIGSTKFLT: (libc)Program Error Signals.
  413. * SIGSTOP: (libc)Job Control Signals.
  414. * SIGSYS: (libc)Program Error Signals.
  415. * SIGTERM: (libc)Termination Signals.
  416. * SIGTRAP: (libc)Program Error Signals.
  417. * SIGTSTP: (libc)Job Control Signals.
  418. * SIGTTIN: (libc)Job Control Signals.
  419. * SIGTTOU: (libc)Job Control Signals.
  420. * SIGURG: (libc)Asynchronous I/O Signals.
  421. * SIGUSR1: (libc)Miscellaneous Signals.
  422. * SIGUSR2: (libc)Miscellaneous Signals.
  423. * SIGVTALRM: (libc)Alarm Signals.
  424. * SIGWINCH: (libc)Miscellaneous Signals.
  425. * SIGXCPU: (libc)Operation Error Signals.
  426. * SIGXFSZ: (libc)Operation Error Signals.
  427. * SIG_ERR: (libc)Basic Signal Handling.
  428. * SNAN: (libc)Infinity and NaN.
  429. * SNANF: (libc)Infinity and NaN.
  430. * SNANFN: (libc)Infinity and NaN.
  431. * SNANFNx: (libc)Infinity and NaN.
  432. * SNANL: (libc)Infinity and NaN.
  433. * SOCK_DGRAM: (libc)Communication Styles.
  434. * SOCK_RAW: (libc)Communication Styles.
  435. * SOCK_RDM: (libc)Communication Styles.
  436. * SOCK_SEQPACKET: (libc)Communication Styles.
  437. * SOCK_STREAM: (libc)Communication Styles.
  438. * SOL_SOCKET: (libc)Socket-Level Options.
  439. * SPEED_MAX: (libc)Line Speed.
  440. * SSIZE_MAX: (libc)General Limits.
  441. * STREAM_MAX: (libc)General Limits.
  442. * SUN_LEN: (libc)Local Namespace Details.
  443. * S_IFMT: (libc)Testing File Type.
  444. * S_ISBLK: (libc)Testing File Type.
  445. * S_ISCHR: (libc)Testing File Type.
  446. * S_ISDIR: (libc)Testing File Type.
  447. * S_ISFIFO: (libc)Testing File Type.
  448. * S_ISLNK: (libc)Testing File Type.
  449. * S_ISREG: (libc)Testing File Type.
  450. * S_ISSOCK: (libc)Testing File Type.
  451. * S_TYPEISMQ: (libc)Testing File Type.
  452. * S_TYPEISSEM: (libc)Testing File Type.
  453. * S_TYPEISSHM: (libc)Testing File Type.
  454. * TIME_UTC: (libc)Getting the Time.
  455. * TMP_MAX: (libc)Temporary Files.
  456. * TOSTOP: (libc)Local Modes.
  457. * TZNAME_MAX: (libc)General Limits.
  458. * VDISCARD: (libc)Other Special.
  459. * VDSUSP: (libc)Signal Characters.
  460. * VEOF: (libc)Editing Characters.
  461. * VEOL2: (libc)Editing Characters.
  462. * VEOL: (libc)Editing Characters.
  463. * VERASE: (libc)Editing Characters.
  464. * VINTR: (libc)Signal Characters.
  465. * VKILL: (libc)Editing Characters.
  466. * VLNEXT: (libc)Other Special.
  467. * VMIN: (libc)Noncanonical Input.
  468. * VQUIT: (libc)Signal Characters.
  469. * VREPRINT: (libc)Editing Characters.
  470. * VSTART: (libc)Start/Stop Characters.
  471. * VSTATUS: (libc)Other Special.
  472. * VSTOP: (libc)Start/Stop Characters.
  473. * VSUSP: (libc)Signal Characters.
  474. * VTIME: (libc)Noncanonical Input.
  475. * VWERASE: (libc)Editing Characters.
  476. * WCHAR_MAX: (libc)Extended Char Intro.
  477. * WCHAR_MIN: (libc)Extended Char Intro.
  478. * WCOREDUMP: (libc)Process Completion Status.
  479. * WEOF: (libc)EOF and Errors.
  480. * WEOF: (libc)Extended Char Intro.
  481. * WEXITSTATUS: (libc)Process Completion Status.
  482. * WIFEXITED: (libc)Process Completion Status.
  483. * WIFSIGNALED: (libc)Process Completion Status.
  484. * WIFSTOPPED: (libc)Process Completion Status.
  485. * WSTOPSIG: (libc)Process Completion Status.
  486. * WTERMSIG: (libc)Process Completion Status.
  487. * W_OK: (libc)Testing File Access.
  488. * X_OK: (libc)Testing File Access.
  489. * _Complex_I: (libc)Complex Numbers.
  490. * _Exit: (libc)Termination Internals.
  491. * _Fork: (libc)Creating a Process.
  492. * _IOFBF: (libc)Controlling Buffering.
  493. * _IOLBF: (libc)Controlling Buffering.
  494. * _IONBF: (libc)Controlling Buffering.
  495. * _Imaginary_I: (libc)Complex Numbers.
  496. * _PATH_UTMP: (libc)Manipulating the Database.
  497. * _PATH_WTMP: (libc)Manipulating the Database.
  498. * _POSIX2_C_DEV: (libc)System Options.
  499. * _POSIX2_C_VERSION: (libc)Version Supported.
  500. * _POSIX2_FORT_DEV: (libc)System Options.
  501. * _POSIX2_FORT_RUN: (libc)System Options.
  502. * _POSIX2_LOCALEDEF: (libc)System Options.
  503. * _POSIX2_SW_DEV: (libc)System Options.
  504. * _POSIX_CHOWN_RESTRICTED: (libc)Options for Files.
  505. * _POSIX_JOB_CONTROL: (libc)System Options.
  506. * _POSIX_NO_TRUNC: (libc)Options for Files.
  507. * _POSIX_SAVED_IDS: (libc)System Options.
  508. * _POSIX_VDISABLE: (libc)Options for Files.
  509. * _POSIX_VERSION: (libc)Version Supported.
  510. * __fbufsize: (libc)Controlling Buffering.
  511. * __flbf: (libc)Controlling Buffering.
  512. * __fpending: (libc)Controlling Buffering.
  513. * __fpurge: (libc)Flushing Buffers.
  514. * __freadable: (libc)Opening Streams.
  515. * __freading: (libc)Opening Streams.
  516. * __fsetlocking: (libc)Streams and Threads.
  517. * __fwritable: (libc)Opening Streams.
  518. * __fwriting: (libc)Opening Streams.
  519. * __gconv_end_fct: (libc)glibc iconv Implementation.
  520. * __gconv_fct: (libc)glibc iconv Implementation.
  521. * __gconv_init_fct: (libc)glibc iconv Implementation.
  522. * __ppc_get_timebase: (libc)PowerPC.
  523. * __ppc_get_timebase_freq: (libc)PowerPC.
  524. * __ppc_mdoio: (libc)PowerPC.
  525. * __ppc_mdoom: (libc)PowerPC.
  526. * __ppc_set_ppr_low: (libc)PowerPC.
  527. * __ppc_set_ppr_med: (libc)PowerPC.
  528. * __ppc_set_ppr_med_high: (libc)PowerPC.
  529. * __ppc_set_ppr_med_low: (libc)PowerPC.
  530. * __ppc_set_ppr_very_low: (libc)PowerPC.
  531. * __ppc_yield: (libc)PowerPC.
  532. * __riscv_flush_icache: (libc)RISC-V.
  533. * __va_copy: (libc)Argument Macros.
  534. * __x86_get_cpuid_feature_leaf: (libc)X86.
  535. * _dl_find_object: (libc)Dynamic Linker Introspection.
  536. * _exit: (libc)Termination Internals.
  537. * _flushlbf: (libc)Flushing Buffers.
  538. * _tolower: (libc)Case Conversion.
  539. * _toupper: (libc)Case Conversion.
  540. * a64l: (libc)Encode Binary Data.
  541. * abort: (libc)Aborting a Program.
  542. * abs: (libc)Absolute Value.
  543. * accept: (libc)Accepting Connections.
  544. * access: (libc)Testing File Access.
  545. * acos: (libc)Inverse Trig Functions.
  546. * acosf: (libc)Inverse Trig Functions.
  547. * acosfN: (libc)Inverse Trig Functions.
  548. * acosfNx: (libc)Inverse Trig Functions.
  549. * acosh: (libc)Hyperbolic Functions.
  550. * acoshf: (libc)Hyperbolic Functions.
  551. * acoshfN: (libc)Hyperbolic Functions.
  552. * acoshfNx: (libc)Hyperbolic Functions.
  553. * acoshl: (libc)Hyperbolic Functions.
  554. * acosl: (libc)Inverse Trig Functions.
  555. * acospi: (libc)Inverse Trig Functions.
  556. * acospif: (libc)Inverse Trig Functions.
  557. * acospifN: (libc)Inverse Trig Functions.
  558. * acospifNx: (libc)Inverse Trig Functions.
  559. * acospil: (libc)Inverse Trig Functions.
  560. * addmntent: (libc)mtab.
  561. * addseverity: (libc)Adding Severity Classes.
  562. * adjtime: (libc)Setting and Adjusting the Time.
  563. * adjtimex: (libc)Setting and Adjusting the Time.
  564. * aio_cancel64: (libc)Cancel AIO Operations.
  565. * aio_cancel: (libc)Cancel AIO Operations.
  566. * aio_error64: (libc)Status of AIO Operations.
  567. * aio_error: (libc)Status of AIO Operations.
  568. * aio_fsync64: (libc)Synchronizing AIO Operations.
  569. * aio_fsync: (libc)Synchronizing AIO Operations.
  570. * aio_init: (libc)Configuration of AIO.
  571. * aio_read64: (libc)Asynchronous Reads/Writes.
  572. * aio_read: (libc)Asynchronous Reads/Writes.
  573. * aio_return64: (libc)Status of AIO Operations.
  574. * aio_return: (libc)Status of AIO Operations.
  575. * aio_suspend64: (libc)Synchronizing AIO Operations.
  576. * aio_suspend: (libc)Synchronizing AIO Operations.
  577. * aio_write64: (libc)Asynchronous Reads/Writes.
  578. * aio_write: (libc)Asynchronous Reads/Writes.
  579. * alarm: (libc)Setting an Alarm.
  580. * aligned_alloc: (libc)Aligned Memory Blocks.
  581. * alloca: (libc)Variable Size Automatic.
  582. * alphasort64: (libc)Scanning Directory Content.
  583. * alphasort: (libc)Scanning Directory Content.
  584. * arc4random: (libc)High Quality Random.
  585. * arc4random_buf: (libc)High Quality Random.
  586. * arc4random_uniform: (libc)High Quality Random.
  587. * argp_error: (libc)Argp Helper Functions.
  588. * argp_failure: (libc)Argp Helper Functions.
  589. * argp_help: (libc)Argp Help.
  590. * argp_parse: (libc)Argp.
  591. * argp_state_help: (libc)Argp Helper Functions.
  592. * argp_usage: (libc)Argp Helper Functions.
  593. * argz_add: (libc)Argz Functions.
  594. * argz_add_sep: (libc)Argz Functions.
  595. * argz_append: (libc)Argz Functions.
  596. * argz_count: (libc)Argz Functions.
  597. * argz_create: (libc)Argz Functions.
  598. * argz_create_sep: (libc)Argz Functions.
  599. * argz_delete: (libc)Argz Functions.
  600. * argz_extract: (libc)Argz Functions.
  601. * argz_insert: (libc)Argz Functions.
  602. * argz_next: (libc)Argz Functions.
  603. * argz_replace: (libc)Argz Functions.
  604. * argz_stringify: (libc)Argz Functions.
  605. * asctime: (libc)Formatting Calendar Time.
  606. * asctime_r: (libc)Formatting Calendar Time.
  607. * asin: (libc)Inverse Trig Functions.
  608. * asinf: (libc)Inverse Trig Functions.
  609. * asinfN: (libc)Inverse Trig Functions.
  610. * asinfNx: (libc)Inverse Trig Functions.
  611. * asinh: (libc)Hyperbolic Functions.
  612. * asinhf: (libc)Hyperbolic Functions.
  613. * asinhfN: (libc)Hyperbolic Functions.
  614. * asinhfNx: (libc)Hyperbolic Functions.
  615. * asinhl: (libc)Hyperbolic Functions.
  616. * asinl: (libc)Inverse Trig Functions.
  617. * asinpi: (libc)Inverse Trig Functions.
  618. * asinpif: (libc)Inverse Trig Functions.
  619. * asinpifN: (libc)Inverse Trig Functions.
  620. * asinpifNx: (libc)Inverse Trig Functions.
  621. * asinpil: (libc)Inverse Trig Functions.
  622. * asprintf: (libc)Dynamic Output.
  623. * assert: (libc)Consistency Checking.
  624. * assert_perror: (libc)Consistency Checking.
  625. * atan2: (libc)Inverse Trig Functions.
  626. * atan2f: (libc)Inverse Trig Functions.
  627. * atan2fN: (libc)Inverse Trig Functions.
  628. * atan2fNx: (libc)Inverse Trig Functions.
  629. * atan2l: (libc)Inverse Trig Functions.
  630. * atan2pi: (libc)Inverse Trig Functions.
  631. * atan2pif: (libc)Inverse Trig Functions.
  632. * atan2pifN: (libc)Inverse Trig Functions.
  633. * atan2pifNx: (libc)Inverse Trig Functions.
  634. * atan2pil: (libc)Inverse Trig Functions.
  635. * atan: (libc)Inverse Trig Functions.
  636. * atanf: (libc)Inverse Trig Functions.
  637. * atanfN: (libc)Inverse Trig Functions.
  638. * atanfNx: (libc)Inverse Trig Functions.
  639. * atanh: (libc)Hyperbolic Functions.
  640. * atanhf: (libc)Hyperbolic Functions.
  641. * atanhfN: (libc)Hyperbolic Functions.
  642. * atanhfNx: (libc)Hyperbolic Functions.
  643. * atanhl: (libc)Hyperbolic Functions.
  644. * atanl: (libc)Inverse Trig Functions.
  645. * atanpi: (libc)Inverse Trig Functions.
  646. * atanpif: (libc)Inverse Trig Functions.
  647. * atanpifN: (libc)Inverse Trig Functions.
  648. * atanpifNx: (libc)Inverse Trig Functions.
  649. * atanpil: (libc)Inverse Trig Functions.
  650. * atexit: (libc)Cleanups on Exit.
  651. * atof: (libc)Parsing of Floats.
  652. * atoi: (libc)Parsing of Integers.
  653. * atol: (libc)Parsing of Integers.
  654. * atoll: (libc)Parsing of Integers.
  655. * backtrace: (libc)Backtraces.
  656. * backtrace_symbols: (libc)Backtraces.
  657. * backtrace_symbols_fd: (libc)Backtraces.
  658. * basename: (libc)Finding Tokens in a String.
  659. * basename: (libc)Finding Tokens in a String.
  660. * bcmp: (libc)String/Array Comparison.
  661. * bcopy: (libc)Copying Strings and Arrays.
  662. * bind: (libc)Setting Address.
  663. * bind_textdomain_codeset: (libc)Charset conversion in gettext.
  664. * bindtextdomain: (libc)Locating gettext catalog.
  665. * brk: (libc)Resizing the Data Segment.
  666. * bsearch: (libc)Array Search Function.
  667. * btowc: (libc)Converting a Character.
  668. * bzero: (libc)Copying Strings and Arrays.
  669. * cabs: (libc)Absolute Value.
  670. * cabsf: (libc)Absolute Value.
  671. * cabsfN: (libc)Absolute Value.
  672. * cabsfNx: (libc)Absolute Value.
  673. * cabsl: (libc)Absolute Value.
  674. * cacos: (libc)Inverse Trig Functions.
  675. * cacosf: (libc)Inverse Trig Functions.
  676. * cacosfN: (libc)Inverse Trig Functions.
  677. * cacosfNx: (libc)Inverse Trig Functions.
  678. * cacosh: (libc)Hyperbolic Functions.
  679. * cacoshf: (libc)Hyperbolic Functions.
  680. * cacoshfN: (libc)Hyperbolic Functions.
  681. * cacoshfNx: (libc)Hyperbolic Functions.
  682. * cacoshl: (libc)Hyperbolic Functions.
  683. * cacosl: (libc)Inverse Trig Functions.
  684. * call_once: (libc)Call Once.
  685. * calloc: (libc)Allocating Cleared Space.
  686. * canonicalize: (libc)FP Bit Twiddling.
  687. * canonicalize_file_name: (libc)Symbolic Links.
  688. * canonicalizef: (libc)FP Bit Twiddling.
  689. * canonicalizefN: (libc)FP Bit Twiddling.
  690. * canonicalizefNx: (libc)FP Bit Twiddling.
  691. * canonicalizel: (libc)FP Bit Twiddling.
  692. * carg: (libc)Operations on Complex.
  693. * cargf: (libc)Operations on Complex.
  694. * cargfN: (libc)Operations on Complex.
  695. * cargfNx: (libc)Operations on Complex.
  696. * cargl: (libc)Operations on Complex.
  697. * casin: (libc)Inverse Trig Functions.
  698. * casinf: (libc)Inverse Trig Functions.
  699. * casinfN: (libc)Inverse Trig Functions.
  700. * casinfNx: (libc)Inverse Trig Functions.
  701. * casinh: (libc)Hyperbolic Functions.
  702. * casinhf: (libc)Hyperbolic Functions.
  703. * casinhfN: (libc)Hyperbolic Functions.
  704. * casinhfNx: (libc)Hyperbolic Functions.
  705. * casinhl: (libc)Hyperbolic Functions.
  706. * casinl: (libc)Inverse Trig Functions.
  707. * catan: (libc)Inverse Trig Functions.
  708. * catanf: (libc)Inverse Trig Functions.
  709. * catanfN: (libc)Inverse Trig Functions.
  710. * catanfNx: (libc)Inverse Trig Functions.
  711. * catanh: (libc)Hyperbolic Functions.
  712. * catanhf: (libc)Hyperbolic Functions.
  713. * catanhfN: (libc)Hyperbolic Functions.
  714. * catanhfNx: (libc)Hyperbolic Functions.
  715. * catanhl: (libc)Hyperbolic Functions.
  716. * catanl: (libc)Inverse Trig Functions.
  717. * catclose: (libc)The catgets Functions.
  718. * catgets: (libc)The catgets Functions.
  719. * catopen: (libc)The catgets Functions.
  720. * cbrt: (libc)Exponents and Logarithms.
  721. * cbrtf: (libc)Exponents and Logarithms.
  722. * cbrtfN: (libc)Exponents and Logarithms.
  723. * cbrtfNx: (libc)Exponents and Logarithms.
  724. * cbrtl: (libc)Exponents and Logarithms.
  725. * ccos: (libc)Trig Functions.
  726. * ccosf: (libc)Trig Functions.
  727. * ccosfN: (libc)Trig Functions.
  728. * ccosfNx: (libc)Trig Functions.
  729. * ccosh: (libc)Hyperbolic Functions.
  730. * ccoshf: (libc)Hyperbolic Functions.
  731. * ccoshfN: (libc)Hyperbolic Functions.
  732. * ccoshfNx: (libc)Hyperbolic Functions.
  733. * ccoshl: (libc)Hyperbolic Functions.
  734. * ccosl: (libc)Trig Functions.
  735. * ceil: (libc)Rounding Functions.
  736. * ceilf: (libc)Rounding Functions.
  737. * ceilfN: (libc)Rounding Functions.
  738. * ceilfNx: (libc)Rounding Functions.
  739. * ceill: (libc)Rounding Functions.
  740. * cexp: (libc)Exponents and Logarithms.
  741. * cexpf: (libc)Exponents and Logarithms.
  742. * cexpfN: (libc)Exponents and Logarithms.
  743. * cexpfNx: (libc)Exponents and Logarithms.
  744. * cexpl: (libc)Exponents and Logarithms.
  745. * cfgetibaud: (libc)Line Speed.
  746. * cfgetispeed: (libc)Line Speed.
  747. * cfgetobaud: (libc)Line Speed.
  748. * cfgetospeed: (libc)Line Speed.
  749. * cfmakeraw: (libc)Noncanonical Input.
  750. * cfsetbaud: (libc)Line Speed.
  751. * cfsetibaud: (libc)Line Speed.
  752. * cfsetispeed: (libc)Line Speed.
  753. * cfsetobaud: (libc)Line Speed.
  754. * cfsetospeed: (libc)Line Speed.
  755. * cfsetspeed: (libc)Line Speed.
  756. * chdir: (libc)Working Directory.
  757. * chmod: (libc)Setting Permissions.
  758. * chown: (libc)File Owner.
  759. * cimag: (libc)Operations on Complex.
  760. * cimagf: (libc)Operations on Complex.
  761. * cimagfN: (libc)Operations on Complex.
  762. * cimagfNx: (libc)Operations on Complex.
  763. * cimagl: (libc)Operations on Complex.
  764. * clearenv: (libc)Environment Access.
  765. * clearerr: (libc)Error Recovery.
  766. * clearerr_unlocked: (libc)Error Recovery.
  767. * clock: (libc)CPU Time.
  768. * clock_getres: (libc)Getting the Time.
  769. * clock_gettime: (libc)Getting the Time.
  770. * clock_nanosleep: (libc)Sleeping.
  771. * clock_settime: (libc)Setting and Adjusting the Time.
  772. * clog10: (libc)Exponents and Logarithms.
  773. * clog10f: (libc)Exponents and Logarithms.
  774. * clog10fN: (libc)Exponents and Logarithms.
  775. * clog10fNx: (libc)Exponents and Logarithms.
  776. * clog10l: (libc)Exponents and Logarithms.
  777. * clog: (libc)Exponents and Logarithms.
  778. * clogf: (libc)Exponents and Logarithms.
  779. * clogfN: (libc)Exponents and Logarithms.
  780. * clogfNx: (libc)Exponents and Logarithms.
  781. * clogl: (libc)Exponents and Logarithms.
  782. * close: (libc)Opening and Closing Files.
  783. * close_range: (libc)Opening and Closing Files.
  784. * closedir: (libc)Reading/Closing Directory.
  785. * closefrom: (libc)Opening and Closing Files.
  786. * closelog: (libc)closelog.
  787. * cnd_broadcast: (libc)ISO C Condition Variables.
  788. * cnd_destroy: (libc)ISO C Condition Variables.
  789. * cnd_init: (libc)ISO C Condition Variables.
  790. * cnd_signal: (libc)ISO C Condition Variables.
  791. * cnd_timedwait: (libc)ISO C Condition Variables.
  792. * cnd_wait: (libc)ISO C Condition Variables.
  793. * compoundn: (libc)Exponents and Logarithms.
  794. * compoundnf: (libc)Exponents and Logarithms.
  795. * compoundnfN: (libc)Exponents and Logarithms.
  796. * compoundnfNx: (libc)Exponents and Logarithms.
  797. * compoundnl: (libc)Exponents and Logarithms.
  798. * confstr: (libc)String Parameters.
  799. * conj: (libc)Operations on Complex.
  800. * conjf: (libc)Operations on Complex.
  801. * conjfN: (libc)Operations on Complex.
  802. * conjfNx: (libc)Operations on Complex.
  803. * conjl: (libc)Operations on Complex.
  804. * connect: (libc)Connecting.
  805. * copy_file_range: (libc)Copying File Data.
  806. * copysign: (libc)FP Bit Twiddling.
  807. * copysignf: (libc)FP Bit Twiddling.
  808. * copysignfN: (libc)FP Bit Twiddling.
  809. * copysignfNx: (libc)FP Bit Twiddling.
  810. * copysignl: (libc)FP Bit Twiddling.
  811. * cos: (libc)Trig Functions.
  812. * cosf: (libc)Trig Functions.
  813. * cosfN: (libc)Trig Functions.
  814. * cosfNx: (libc)Trig Functions.
  815. * cosh: (libc)Hyperbolic Functions.
  816. * coshf: (libc)Hyperbolic Functions.
  817. * coshfN: (libc)Hyperbolic Functions.
  818. * coshfNx: (libc)Hyperbolic Functions.
  819. * coshl: (libc)Hyperbolic Functions.
  820. * cosl: (libc)Trig Functions.
  821. * cospi: (libc)Trig Functions.
  822. * cospif: (libc)Trig Functions.
  823. * cospifN: (libc)Trig Functions.
  824. * cospifNx: (libc)Trig Functions.
  825. * cospil: (libc)Trig Functions.
  826. * cpow: (libc)Exponents and Logarithms.
  827. * cpowf: (libc)Exponents and Logarithms.
  828. * cpowfN: (libc)Exponents and Logarithms.
  829. * cpowfNx: (libc)Exponents and Logarithms.
  830. * cpowl: (libc)Exponents and Logarithms.
  831. * cproj: (libc)Operations on Complex.
  832. * cprojf: (libc)Operations on Complex.
  833. * cprojfN: (libc)Operations on Complex.
  834. * cprojfNx: (libc)Operations on Complex.
  835. * cprojl: (libc)Operations on Complex.
  836. * creal: (libc)Operations on Complex.
  837. * crealf: (libc)Operations on Complex.
  838. * crealfN: (libc)Operations on Complex.
  839. * crealfNx: (libc)Operations on Complex.
  840. * creall: (libc)Operations on Complex.
  841. * creat64: (libc)Opening and Closing Files.
  842. * creat: (libc)Opening and Closing Files.
  843. * csin: (libc)Trig Functions.
  844. * csinf: (libc)Trig Functions.
  845. * csinfN: (libc)Trig Functions.
  846. * csinfNx: (libc)Trig Functions.
  847. * csinh: (libc)Hyperbolic Functions.
  848. * csinhf: (libc)Hyperbolic Functions.
  849. * csinhfN: (libc)Hyperbolic Functions.
  850. * csinhfNx: (libc)Hyperbolic Functions.
  851. * csinhl: (libc)Hyperbolic Functions.
  852. * csinl: (libc)Trig Functions.
  853. * csqrt: (libc)Exponents and Logarithms.
  854. * csqrtf: (libc)Exponents and Logarithms.
  855. * csqrtfN: (libc)Exponents and Logarithms.
  856. * csqrtfNx: (libc)Exponents and Logarithms.
  857. * csqrtl: (libc)Exponents and Logarithms.
  858. * ctan: (libc)Trig Functions.
  859. * ctanf: (libc)Trig Functions.
  860. * ctanfN: (libc)Trig Functions.
  861. * ctanfNx: (libc)Trig Functions.
  862. * ctanh: (libc)Hyperbolic Functions.
  863. * ctanhf: (libc)Hyperbolic Functions.
  864. * ctanhfN: (libc)Hyperbolic Functions.
  865. * ctanhfNx: (libc)Hyperbolic Functions.
  866. * ctanhl: (libc)Hyperbolic Functions.
  867. * ctanl: (libc)Trig Functions.
  868. * ctermid: (libc)Identifying the Terminal.
  869. * ctime: (libc)Formatting Calendar Time.
  870. * ctime_r: (libc)Formatting Calendar Time.
  871. * cuserid: (libc)Who Logged In.
  872. * daddl: (libc)Misc FP Arithmetic.
  873. * dcgettext: (libc)Translation with gettext.
  874. * dcngettext: (libc)Advanced gettext functions.
  875. * ddivl: (libc)Misc FP Arithmetic.
  876. * dfmal: (libc)Misc FP Arithmetic.
  877. * dgettext: (libc)Translation with gettext.
  878. * difftime: (libc)Calculating Elapsed Time.
  879. * dirfd: (libc)Opening a Directory.
  880. * dirname: (libc)Finding Tokens in a String.
  881. * div: (libc)Integer Division.
  882. * dlinfo: (libc)Dynamic Linker Introspection.
  883. * dmull: (libc)Misc FP Arithmetic.
  884. * dngettext: (libc)Advanced gettext functions.
  885. * dprintf: (libc)Formatted Output Functions.
  886. * drand48: (libc)SVID Random.
  887. * drand48_r: (libc)SVID Random.
  888. * drem: (libc)Remainder Functions.
  889. * dremf: (libc)Remainder Functions.
  890. * dreml: (libc)Remainder Functions.
  891. * dsqrtl: (libc)Misc FP Arithmetic.
  892. * dsubl: (libc)Misc FP Arithmetic.
  893. * dup2: (libc)Duplicating Descriptors.
  894. * dup3: (libc)Duplicating Descriptors.
  895. * dup: (libc)Duplicating Descriptors.
  896. * ecvt: (libc)System V Number Conversion.
  897. * ecvt_r: (libc)System V Number Conversion.
  898. * endfsent: (libc)fstab.
  899. * endgrent: (libc)Scanning All Groups.
  900. * endhostent: (libc)Host Names.
  901. * endmntent: (libc)mtab.
  902. * endnetent: (libc)Networks Database.
  903. * endnetgrent: (libc)Lookup Netgroup.
  904. * endprotoent: (libc)Protocols Database.
  905. * endpwent: (libc)Scanning All Users.
  906. * endservent: (libc)Services Database.
  907. * endutent: (libc)Manipulating the Database.
  908. * endutxent: (libc)XPG Functions.
  909. * envz_add: (libc)Envz Functions.
  910. * envz_entry: (libc)Envz Functions.
  911. * envz_get: (libc)Envz Functions.
  912. * envz_merge: (libc)Envz Functions.
  913. * envz_remove: (libc)Envz Functions.
  914. * envz_strip: (libc)Envz Functions.
  915. * epoll_create: (libc)Other Low-Level I/O APIs.
  916. * epoll_wait: (libc)Other Low-Level I/O APIs.
  917. * erand48: (libc)SVID Random.
  918. * erand48_r: (libc)SVID Random.
  919. * erf: (libc)Special Functions.
  920. * erfc: (libc)Special Functions.
  921. * erfcf: (libc)Special Functions.
  922. * erfcfN: (libc)Special Functions.
  923. * erfcfNx: (libc)Special Functions.
  924. * erfcl: (libc)Special Functions.
  925. * erff: (libc)Special Functions.
  926. * erffN: (libc)Special Functions.
  927. * erffNx: (libc)Special Functions.
  928. * erfl: (libc)Special Functions.
  929. * err: (libc)Error Messages.
  930. * errno: (libc)Checking for Errors.
  931. * error: (libc)Error Messages.
  932. * error_at_line: (libc)Error Messages.
  933. * errx: (libc)Error Messages.
  934. * execl: (libc)Executing a File.
  935. * execle: (libc)Executing a File.
  936. * execlp: (libc)Executing a File.
  937. * execv: (libc)Executing a File.
  938. * execve: (libc)Executing a File.
  939. * execvp: (libc)Executing a File.
  940. * exit: (libc)Normal Termination.
  941. * exp10: (libc)Exponents and Logarithms.
  942. * exp10f: (libc)Exponents and Logarithms.
  943. * exp10fN: (libc)Exponents and Logarithms.
  944. * exp10fNx: (libc)Exponents and Logarithms.
  945. * exp10l: (libc)Exponents and Logarithms.
  946. * exp10m1: (libc)Exponents and Logarithms.
  947. * exp10m1f: (libc)Exponents and Logarithms.
  948. * exp10m1fN: (libc)Exponents and Logarithms.
  949. * exp10m1fNx: (libc)Exponents and Logarithms.
  950. * exp10m1l: (libc)Exponents and Logarithms.
  951. * exp2: (libc)Exponents and Logarithms.
  952. * exp2f: (libc)Exponents and Logarithms.
  953. * exp2fN: (libc)Exponents and Logarithms.
  954. * exp2fNx: (libc)Exponents and Logarithms.
  955. * exp2l: (libc)Exponents and Logarithms.
  956. * exp2m1: (libc)Exponents and Logarithms.
  957. * exp2m1f: (libc)Exponents and Logarithms.
  958. * exp2m1fN: (libc)Exponents and Logarithms.
  959. * exp2m1fNx: (libc)Exponents and Logarithms.
  960. * exp2m1l: (libc)Exponents and Logarithms.
  961. * exp: (libc)Exponents and Logarithms.
  962. * expf: (libc)Exponents and Logarithms.
  963. * expfN: (libc)Exponents and Logarithms.
  964. * expfNx: (libc)Exponents and Logarithms.
  965. * expl: (libc)Exponents and Logarithms.
  966. * explicit_bzero: (libc)Erasing Sensitive Data.
  967. * expm1: (libc)Exponents and Logarithms.
  968. * expm1f: (libc)Exponents and Logarithms.
  969. * expm1fN: (libc)Exponents and Logarithms.
  970. * expm1fNx: (libc)Exponents and Logarithms.
  971. * expm1l: (libc)Exponents and Logarithms.
  972. * fMaddfN: (libc)Misc FP Arithmetic.
  973. * fMaddfNx: (libc)Misc FP Arithmetic.
  974. * fMdivfN: (libc)Misc FP Arithmetic.
  975. * fMdivfNx: (libc)Misc FP Arithmetic.
  976. * fMfmafN: (libc)Misc FP Arithmetic.
  977. * fMfmafNx: (libc)Misc FP Arithmetic.
  978. * fMmulfN: (libc)Misc FP Arithmetic.
  979. * fMmulfNx: (libc)Misc FP Arithmetic.
  980. * fMsqrtfN: (libc)Misc FP Arithmetic.
  981. * fMsqrtfNx: (libc)Misc FP Arithmetic.
  982. * fMsubfN: (libc)Misc FP Arithmetic.
  983. * fMsubfNx: (libc)Misc FP Arithmetic.
  984. * fMxaddfN: (libc)Misc FP Arithmetic.
  985. * fMxaddfNx: (libc)Misc FP Arithmetic.
  986. * fMxdivfN: (libc)Misc FP Arithmetic.
  987. * fMxdivfNx: (libc)Misc FP Arithmetic.
  988. * fMxfmafN: (libc)Misc FP Arithmetic.
  989. * fMxfmafNx: (libc)Misc FP Arithmetic.
  990. * fMxmulfN: (libc)Misc FP Arithmetic.
  991. * fMxmulfNx: (libc)Misc FP Arithmetic.
  992. * fMxsqrtfN: (libc)Misc FP Arithmetic.
  993. * fMxsqrtfNx: (libc)Misc FP Arithmetic.
  994. * fMxsubfN: (libc)Misc FP Arithmetic.
  995. * fMxsubfNx: (libc)Misc FP Arithmetic.
  996. * fabs: (libc)Absolute Value.
  997. * fabsf: (libc)Absolute Value.
  998. * fabsfN: (libc)Absolute Value.
  999. * fabsfNx: (libc)Absolute Value.
  1000. * fabsl: (libc)Absolute Value.
  1001. * faccessat: (libc)Testing File Access.
  1002. * fadd: (libc)Misc FP Arithmetic.
  1003. * faddl: (libc)Misc FP Arithmetic.
  1004. * fchdir: (libc)Working Directory.
  1005. * fchmod: (libc)Setting Permissions.
  1006. * fchown: (libc)File Owner.
  1007. * fclose: (libc)Closing Streams.
  1008. * fcloseall: (libc)Closing Streams.
  1009. * fcntl: (libc)Control Operations.
  1010. * fcvt: (libc)System V Number Conversion.
  1011. * fcvt_r: (libc)System V Number Conversion.
  1012. * fdatasync: (libc)Synchronizing I/O.
  1013. * fdim: (libc)Misc FP Arithmetic.
  1014. * fdimf: (libc)Misc FP Arithmetic.
  1015. * fdimfN: (libc)Misc FP Arithmetic.
  1016. * fdimfNx: (libc)Misc FP Arithmetic.
  1017. * fdiml: (libc)Misc FP Arithmetic.
  1018. * fdiv: (libc)Misc FP Arithmetic.
  1019. * fdivl: (libc)Misc FP Arithmetic.
  1020. * fdopen: (libc)Descriptors and Streams.
  1021. * fdopendir: (libc)Opening a Directory.
  1022. * feclearexcept: (libc)Status bit operations.
  1023. * fedisableexcept: (libc)Control Functions.
  1024. * feenableexcept: (libc)Control Functions.
  1025. * fegetenv: (libc)Control Functions.
  1026. * fegetexcept: (libc)Control Functions.
  1027. * fegetexceptflag: (libc)Status bit operations.
  1028. * fegetmode: (libc)Control Functions.
  1029. * fegetround: (libc)Rounding.
  1030. * feholdexcept: (libc)Control Functions.
  1031. * feof: (libc)EOF and Errors.
  1032. * feof_unlocked: (libc)EOF and Errors.
  1033. * feraiseexcept: (libc)Status bit operations.
  1034. * ferror: (libc)EOF and Errors.
  1035. * ferror_unlocked: (libc)EOF and Errors.
  1036. * fesetenv: (libc)Control Functions.
  1037. * fesetexcept: (libc)Status bit operations.
  1038. * fesetexceptflag: (libc)Status bit operations.
  1039. * fesetmode: (libc)Control Functions.
  1040. * fesetround: (libc)Rounding.
  1041. * fetestexcept: (libc)Status bit operations.
  1042. * fetestexceptflag: (libc)Status bit operations.
  1043. * feupdateenv: (libc)Control Functions.
  1044. * fexecve: (libc)Executing a File.
  1045. * fflush: (libc)Flushing Buffers.
  1046. * fflush_unlocked: (libc)Flushing Buffers.
  1047. * ffma: (libc)Misc FP Arithmetic.
  1048. * ffmal: (libc)Misc FP Arithmetic.
  1049. * fgetc: (libc)Character Input.
  1050. * fgetc_unlocked: (libc)Character Input.
  1051. * fgetgrent: (libc)Scanning All Groups.
  1052. * fgetgrent_r: (libc)Scanning All Groups.
  1053. * fgetpos64: (libc)Portable Positioning.
  1054. * fgetpos: (libc)Portable Positioning.
  1055. * fgetpwent: (libc)Scanning All Users.
  1056. * fgetpwent_r: (libc)Scanning All Users.
  1057. * fgets: (libc)Line Input.
  1058. * fgets_unlocked: (libc)Line Input.
  1059. * fgetwc: (libc)Character Input.
  1060. * fgetwc_unlocked: (libc)Character Input.
  1061. * fgetws: (libc)Line Input.
  1062. * fgetws_unlocked: (libc)Line Input.
  1063. * fileno: (libc)Descriptors and Streams.
  1064. * fileno_unlocked: (libc)Descriptors and Streams.
  1065. * finite: (libc)Floating Point Classes.
  1066. * finitef: (libc)Floating Point Classes.
  1067. * finitel: (libc)Floating Point Classes.
  1068. * flockfile: (libc)Streams and Threads.
  1069. * floor: (libc)Rounding Functions.
  1070. * floorf: (libc)Rounding Functions.
  1071. * floorfN: (libc)Rounding Functions.
  1072. * floorfNx: (libc)Rounding Functions.
  1073. * floorl: (libc)Rounding Functions.
  1074. * fma: (libc)Misc FP Arithmetic.
  1075. * fmaf: (libc)Misc FP Arithmetic.
  1076. * fmafN: (libc)Misc FP Arithmetic.
  1077. * fmafNx: (libc)Misc FP Arithmetic.
  1078. * fmal: (libc)Misc FP Arithmetic.
  1079. * fmax: (libc)Misc FP Arithmetic.
  1080. * fmaxf: (libc)Misc FP Arithmetic.
  1081. * fmaxfN: (libc)Misc FP Arithmetic.
  1082. * fmaxfNx: (libc)Misc FP Arithmetic.
  1083. * fmaximum: (libc)Misc FP Arithmetic.
  1084. * fmaximum_mag: (libc)Misc FP Arithmetic.
  1085. * fmaximum_mag_num: (libc)Misc FP Arithmetic.
  1086. * fmaximum_mag_numf: (libc)Misc FP Arithmetic.
  1087. * fmaximum_mag_numfN: (libc)Misc FP Arithmetic.
  1088. * fmaximum_mag_numfNx: (libc)Misc FP Arithmetic.
  1089. * fmaximum_mag_numl: (libc)Misc FP Arithmetic.
  1090. * fmaximum_magf: (libc)Misc FP Arithmetic.
  1091. * fmaximum_magfN: (libc)Misc FP Arithmetic.
  1092. * fmaximum_magfNx: (libc)Misc FP Arithmetic.
  1093. * fmaximum_magl: (libc)Misc FP Arithmetic.
  1094. * fmaximum_num: (libc)Misc FP Arithmetic.
  1095. * fmaximum_numf: (libc)Misc FP Arithmetic.
  1096. * fmaximum_numfN: (libc)Misc FP Arithmetic.
  1097. * fmaximum_numfNx: (libc)Misc FP Arithmetic.
  1098. * fmaximum_numl: (libc)Misc FP Arithmetic.
  1099. * fmaximumf: (libc)Misc FP Arithmetic.
  1100. * fmaximumfN: (libc)Misc FP Arithmetic.
  1101. * fmaximumfNx: (libc)Misc FP Arithmetic.
  1102. * fmaximuml: (libc)Misc FP Arithmetic.
  1103. * fmaxl: (libc)Misc FP Arithmetic.
  1104. * fmaxmag: (libc)Misc FP Arithmetic.
  1105. * fmaxmagf: (libc)Misc FP Arithmetic.
  1106. * fmaxmagfN: (libc)Misc FP Arithmetic.
  1107. * fmaxmagfNx: (libc)Misc FP Arithmetic.
  1108. * fmaxmagl: (libc)Misc FP Arithmetic.
  1109. * fmemopen: (libc)String Streams.
  1110. * fmin: (libc)Misc FP Arithmetic.
  1111. * fminf: (libc)Misc FP Arithmetic.
  1112. * fminfN: (libc)Misc FP Arithmetic.
  1113. * fminfNx: (libc)Misc FP Arithmetic.
  1114. * fminimum: (libc)Misc FP Arithmetic.
  1115. * fminimum_mag: (libc)Misc FP Arithmetic.
  1116. * fminimum_mag_num: (libc)Misc FP Arithmetic.
  1117. * fminimum_mag_numf: (libc)Misc FP Arithmetic.
  1118. * fminimum_mag_numfN: (libc)Misc FP Arithmetic.
  1119. * fminimum_mag_numfNx: (libc)Misc FP Arithmetic.
  1120. * fminimum_mag_numl: (libc)Misc FP Arithmetic.
  1121. * fminimum_magf: (libc)Misc FP Arithmetic.
  1122. * fminimum_magfN: (libc)Misc FP Arithmetic.
  1123. * fminimum_magfNx: (libc)Misc FP Arithmetic.
  1124. * fminimum_magl: (libc)Misc FP Arithmetic.
  1125. * fminimum_num: (libc)Misc FP Arithmetic.
  1126. * fminimum_numf: (libc)Misc FP Arithmetic.
  1127. * fminimum_numfN: (libc)Misc FP Arithmetic.
  1128. * fminimum_numfNx: (libc)Misc FP Arithmetic.
  1129. * fminimum_numl: (libc)Misc FP Arithmetic.
  1130. * fminimumf: (libc)Misc FP Arithmetic.
  1131. * fminimumfN: (libc)Misc FP Arithmetic.
  1132. * fminimumfNx: (libc)Misc FP Arithmetic.
  1133. * fminimuml: (libc)Misc FP Arithmetic.
  1134. * fminl: (libc)Misc FP Arithmetic.
  1135. * fminmag: (libc)Misc FP Arithmetic.
  1136. * fminmagf: (libc)Misc FP Arithmetic.
  1137. * fminmagfN: (libc)Misc FP Arithmetic.
  1138. * fminmagfNx: (libc)Misc FP Arithmetic.
  1139. * fminmagl: (libc)Misc FP Arithmetic.
  1140. * fmod: (libc)Remainder Functions.
  1141. * fmodf: (libc)Remainder Functions.
  1142. * fmodfN: (libc)Remainder Functions.
  1143. * fmodfNx: (libc)Remainder Functions.
  1144. * fmodl: (libc)Remainder Functions.
  1145. * fmtmsg: (libc)Printing Formatted Messages.
  1146. * fmul: (libc)Misc FP Arithmetic.
  1147. * fmull: (libc)Misc FP Arithmetic.
  1148. * fnmatch: (libc)Wildcard Matching.
  1149. * fopen64: (libc)Opening Streams.
  1150. * fopen: (libc)Opening Streams.
  1151. * fopencookie: (libc)Streams and Cookies.
  1152. * fork: (libc)Creating a Process.
  1153. * forkpty: (libc)Pseudo-Terminal Pairs.
  1154. * fpathconf: (libc)Pathconf.
  1155. * fpclassify: (libc)Floating Point Classes.
  1156. * fprintf: (libc)Formatted Output Functions.
  1157. * fputc: (libc)Simple Output.
  1158. * fputc_unlocked: (libc)Simple Output.
  1159. * fputs: (libc)Simple Output.
  1160. * fputs_unlocked: (libc)Simple Output.
  1161. * fputwc: (libc)Simple Output.
  1162. * fputwc_unlocked: (libc)Simple Output.
  1163. * fputws: (libc)Simple Output.
  1164. * fputws_unlocked: (libc)Simple Output.
  1165. * fread: (libc)Block Input/Output.
  1166. * fread_unlocked: (libc)Block Input/Output.
  1167. * free: (libc)Freeing after Malloc.
  1168. * free_aligned_sized: (libc)Freeing after Malloc.
  1169. * free_sized: (libc)Freeing after Malloc.
  1170. * freopen64: (libc)Opening Streams.
  1171. * freopen: (libc)Opening Streams.
  1172. * frexp: (libc)Normalization Functions.
  1173. * frexpf: (libc)Normalization Functions.
  1174. * frexpfN: (libc)Normalization Functions.
  1175. * frexpfNx: (libc)Normalization Functions.
  1176. * frexpl: (libc)Normalization Functions.
  1177. * fromfp: (libc)Rounding Functions.
  1178. * fromfpf: (libc)Rounding Functions.
  1179. * fromfpfN: (libc)Rounding Functions.
  1180. * fromfpfNx: (libc)Rounding Functions.
  1181. * fromfpl: (libc)Rounding Functions.
  1182. * fromfpx: (libc)Rounding Functions.
  1183. * fromfpxf: (libc)Rounding Functions.
  1184. * fromfpxfN: (libc)Rounding Functions.
  1185. * fromfpxfNx: (libc)Rounding Functions.
  1186. * fromfpxl: (libc)Rounding Functions.
  1187. * fscanf: (libc)Formatted Input Functions.
  1188. * fseek: (libc)File Positioning.
  1189. * fseeko64: (libc)File Positioning.
  1190. * fseeko: (libc)File Positioning.
  1191. * fsetpos64: (libc)Portable Positioning.
  1192. * fsetpos: (libc)Portable Positioning.
  1193. * fsqrt: (libc)Misc FP Arithmetic.
  1194. * fsqrtl: (libc)Misc FP Arithmetic.
  1195. * fstat64: (libc)Reading Attributes.
  1196. * fstat: (libc)Reading Attributes.
  1197. * fstatat64: (libc)Reading Attributes.
  1198. * fstatat: (libc)Reading Attributes.
  1199. * fsub: (libc)Misc FP Arithmetic.
  1200. * fsubl: (libc)Misc FP Arithmetic.
  1201. * fsync: (libc)Synchronizing I/O.
  1202. * ftell: (libc)File Positioning.
  1203. * ftello64: (libc)File Positioning.
  1204. * ftello: (libc)File Positioning.
  1205. * ftruncate64: (libc)File Size.
  1206. * ftruncate: (libc)File Size.
  1207. * ftrylockfile: (libc)Streams and Threads.
  1208. * ftw64: (libc)Working with Directory Trees.
  1209. * ftw: (libc)Working with Directory Trees.
  1210. * funlockfile: (libc)Streams and Threads.
  1211. * futimens: (libc)File Times.
  1212. * futimes: (libc)File Times.
  1213. * fwide: (libc)Streams and I18N.
  1214. * fwprintf: (libc)Formatted Output Functions.
  1215. * fwrite: (libc)Block Input/Output.
  1216. * fwrite_unlocked: (libc)Block Input/Output.
  1217. * fwscanf: (libc)Formatted Input Functions.
  1218. * gamma: (libc)Special Functions.
  1219. * gammaf: (libc)Special Functions.
  1220. * gammal: (libc)Special Functions.
  1221. * gcvt: (libc)System V Number Conversion.
  1222. * get_avphys_pages: (libc)Query Memory Parameters.
  1223. * get_current_dir_name: (libc)Working Directory.
  1224. * get_nprocs: (libc)Processor Resources.
  1225. * get_nprocs_conf: (libc)Processor Resources.
  1226. * get_phys_pages: (libc)Query Memory Parameters.
  1227. * getauxval: (libc)Auxiliary Vector.
  1228. * getc: (libc)Character Input.
  1229. * getc_unlocked: (libc)Character Input.
  1230. * getchar: (libc)Character Input.
  1231. * getchar_unlocked: (libc)Character Input.
  1232. * getcontext: (libc)System V contexts.
  1233. * getcpu: (libc)CPU Affinity.
  1234. * getcwd: (libc)Working Directory.
  1235. * getdate: (libc)General Time String Parsing.
  1236. * getdate_r: (libc)General Time String Parsing.
  1237. * getdelim: (libc)Line Input.
  1238. * getdents64: (libc)Low-level Directory Access.
  1239. * getdomainname: (libc)Host Identification.
  1240. * getegid: (libc)Reading Persona.
  1241. * getentropy: (libc)Unpredictable Bytes.
  1242. * getenv: (libc)Environment Access.
  1243. * geteuid: (libc)Reading Persona.
  1244. * getfsent: (libc)fstab.
  1245. * getfsfile: (libc)fstab.
  1246. * getfsspec: (libc)fstab.
  1247. * getgid: (libc)Reading Persona.
  1248. * getgrent: (libc)Scanning All Groups.
  1249. * getgrent_r: (libc)Scanning All Groups.
  1250. * getgrgid: (libc)Lookup Group.
  1251. * getgrgid_r: (libc)Lookup Group.
  1252. * getgrnam: (libc)Lookup Group.
  1253. * getgrnam_r: (libc)Lookup Group.
  1254. * getgrouplist: (libc)Setting Groups.
  1255. * getgroups: (libc)Reading Persona.
  1256. * gethostbyaddr: (libc)Host Names.
  1257. * gethostbyaddr_r: (libc)Host Names.
  1258. * gethostbyname2: (libc)Host Names.
  1259. * gethostbyname2_r: (libc)Host Names.
  1260. * gethostbyname: (libc)Host Names.
  1261. * gethostbyname_r: (libc)Host Names.
  1262. * gethostent: (libc)Host Names.
  1263. * gethostid: (libc)Host Identification.
  1264. * gethostname: (libc)Host Identification.
  1265. * getitimer: (libc)Setting an Alarm.
  1266. * getline: (libc)Line Input.
  1267. * getloadavg: (libc)Processor Resources.
  1268. * getlogin: (libc)Who Logged In.
  1269. * getmntent: (libc)mtab.
  1270. * getmntent_r: (libc)mtab.
  1271. * getnetbyaddr: (libc)Networks Database.
  1272. * getnetbyname: (libc)Networks Database.
  1273. * getnetent: (libc)Networks Database.
  1274. * getnetgrent: (libc)Lookup Netgroup.
  1275. * getnetgrent_r: (libc)Lookup Netgroup.
  1276. * getopt: (libc)Using Getopt.
  1277. * getopt_long: (libc)Getopt Long Options.
  1278. * getopt_long_only: (libc)Getopt Long Options.
  1279. * getpagesize: (libc)Query Memory Parameters.
  1280. * getpass: (libc)getpass.
  1281. * getpayload: (libc)FP Bit Twiddling.
  1282. * getpayloadf: (libc)FP Bit Twiddling.
  1283. * getpayloadfN: (libc)FP Bit Twiddling.
  1284. * getpayloadfNx: (libc)FP Bit Twiddling.
  1285. * getpayloadl: (libc)FP Bit Twiddling.
  1286. * getpeername: (libc)Who is Connected.
  1287. * getpgid: (libc)Process Group Functions.
  1288. * getpgrp: (libc)Process Group Functions.
  1289. * getpid: (libc)Process Identification.
  1290. * getppid: (libc)Process Identification.
  1291. * getpriority: (libc)Traditional Scheduling Functions.
  1292. * getprotobyname: (libc)Protocols Database.
  1293. * getprotobynumber: (libc)Protocols Database.
  1294. * getprotoent: (libc)Protocols Database.
  1295. * getpt: (libc)Allocation.
  1296. * getpwent: (libc)Scanning All Users.
  1297. * getpwent_r: (libc)Scanning All Users.
  1298. * getpwnam: (libc)Lookup User.
  1299. * getpwnam_r: (libc)Lookup User.
  1300. * getpwuid: (libc)Lookup User.
  1301. * getpwuid_r: (libc)Lookup User.
  1302. * getrandom: (libc)Unpredictable Bytes.
  1303. * getrlimit64: (libc)Limits on Resources.
  1304. * getrlimit: (libc)Limits on Resources.
  1305. * getrusage: (libc)Resource Usage.
  1306. * gets: (libc)Line Input.
  1307. * getservbyname: (libc)Services Database.
  1308. * getservbyport: (libc)Services Database.
  1309. * getservent: (libc)Services Database.
  1310. * getsid: (libc)Process Group Functions.
  1311. * getsockname: (libc)Reading Address.
  1312. * getsockopt: (libc)Socket Option Functions.
  1313. * getsubopt: (libc)Suboptions.
  1314. * gettext: (libc)Translation with gettext.
  1315. * gettid: (libc)Process Identification.
  1316. * gettimeofday: (libc)Getting the Time.
  1317. * getuid: (libc)Reading Persona.
  1318. * getumask: (libc)Setting Permissions.
  1319. * getutent: (libc)Manipulating the Database.
  1320. * getutent_r: (libc)Manipulating the Database.
  1321. * getutid: (libc)Manipulating the Database.
  1322. * getutid_r: (libc)Manipulating the Database.
  1323. * getutline: (libc)Manipulating the Database.
  1324. * getutline_r: (libc)Manipulating the Database.
  1325. * getutmp: (libc)XPG Functions.
  1326. * getutmpx: (libc)XPG Functions.
  1327. * getutxent: (libc)XPG Functions.
  1328. * getutxid: (libc)XPG Functions.
  1329. * getutxline: (libc)XPG Functions.
  1330. * getw: (libc)Character Input.
  1331. * getwc: (libc)Character Input.
  1332. * getwc_unlocked: (libc)Character Input.
  1333. * getwchar: (libc)Character Input.
  1334. * getwchar_unlocked: (libc)Character Input.
  1335. * getwd: (libc)Working Directory.
  1336. * glob64: (libc)Calling Glob.
  1337. * glob: (libc)Calling Glob.
  1338. * globfree64: (libc)More Flags for Globbing.
  1339. * globfree: (libc)More Flags for Globbing.
  1340. * gmtime: (libc)Broken-down Time.
  1341. * gmtime_r: (libc)Broken-down Time.
  1342. * grantpt: (libc)Allocation.
  1343. * gsignal: (libc)Signaling Yourself.
  1344. * gtty: (libc)BSD Terminal Modes.
  1345. * hasmntopt: (libc)mtab.
  1346. * hcreate: (libc)Hash Search Function.
  1347. * hcreate_r: (libc)Hash Search Function.
  1348. * hdestroy: (libc)Hash Search Function.
  1349. * hdestroy_r: (libc)Hash Search Function.
  1350. * hsearch: (libc)Hash Search Function.
  1351. * hsearch_r: (libc)Hash Search Function.
  1352. * htonl: (libc)Byte Order.
  1353. * htons: (libc)Byte Order.
  1354. * hypot: (libc)Exponents and Logarithms.
  1355. * hypotf: (libc)Exponents and Logarithms.
  1356. * hypotfN: (libc)Exponents and Logarithms.
  1357. * hypotfNx: (libc)Exponents and Logarithms.
  1358. * hypotl: (libc)Exponents and Logarithms.
  1359. * iconv: (libc)Generic Conversion Interface.
  1360. * iconv_close: (libc)Generic Conversion Interface.
  1361. * iconv_open: (libc)Generic Conversion Interface.
  1362. * if_freenameindex: (libc)Interface Naming.
  1363. * if_indextoname: (libc)Interface Naming.
  1364. * if_nameindex: (libc)Interface Naming.
  1365. * if_nametoindex: (libc)Interface Naming.
  1366. * ilogb: (libc)Exponents and Logarithms.
  1367. * ilogbf: (libc)Exponents and Logarithms.
  1368. * ilogbfN: (libc)Exponents and Logarithms.
  1369. * ilogbfNx: (libc)Exponents and Logarithms.
  1370. * ilogbl: (libc)Exponents and Logarithms.
  1371. * imaxabs: (libc)Absolute Value.
  1372. * imaxdiv: (libc)Integer Division.
  1373. * in6addr_any: (libc)Host Address Data Type.
  1374. * in6addr_loopback: (libc)Host Address Data Type.
  1375. * index: (libc)Search Functions.
  1376. * inet_addr: (libc)Host Address Functions.
  1377. * inet_aton: (libc)Host Address Functions.
  1378. * inet_lnaof: (libc)Host Address Functions.
  1379. * inet_makeaddr: (libc)Host Address Functions.
  1380. * inet_netof: (libc)Host Address Functions.
  1381. * inet_network: (libc)Host Address Functions.
  1382. * inet_ntoa: (libc)Host Address Functions.
  1383. * inet_ntop: (libc)Host Address Functions.
  1384. * inet_pton: (libc)Host Address Functions.
  1385. * initgroups: (libc)Setting Groups.
  1386. * initstate: (libc)BSD Random.
  1387. * initstate_r: (libc)BSD Random.
  1388. * innetgr: (libc)Netgroup Membership.
  1389. * ioctl: (libc)IOCTLs.
  1390. * isalnum: (libc)Classification of Characters.
  1391. * isalpha: (libc)Classification of Characters.
  1392. * isascii: (libc)Classification of Characters.
  1393. * isatty: (libc)Is It a Terminal.
  1394. * isblank: (libc)Classification of Characters.
  1395. * iscanonical: (libc)Floating Point Classes.
  1396. * iscntrl: (libc)Classification of Characters.
  1397. * isdigit: (libc)Classification of Characters.
  1398. * iseqsig: (libc)FP Comparison Functions.
  1399. * isfinite: (libc)Floating Point Classes.
  1400. * isgraph: (libc)Classification of Characters.
  1401. * isgreater: (libc)FP Comparison Functions.
  1402. * isgreaterequal: (libc)FP Comparison Functions.
  1403. * isinf: (libc)Floating Point Classes.
  1404. * isinff: (libc)Floating Point Classes.
  1405. * isinfl: (libc)Floating Point Classes.
  1406. * isless: (libc)FP Comparison Functions.
  1407. * islessequal: (libc)FP Comparison Functions.
  1408. * islessgreater: (libc)FP Comparison Functions.
  1409. * islower: (libc)Classification of Characters.
  1410. * isnan: (libc)Floating Point Classes.
  1411. * isnan: (libc)Floating Point Classes.
  1412. * isnanf: (libc)Floating Point Classes.
  1413. * isnanl: (libc)Floating Point Classes.
  1414. * isnormal: (libc)Floating Point Classes.
  1415. * isprint: (libc)Classification of Characters.
  1416. * ispunct: (libc)Classification of Characters.
  1417. * issignaling: (libc)Floating Point Classes.
  1418. * isspace: (libc)Classification of Characters.
  1419. * issubnormal: (libc)Floating Point Classes.
  1420. * isunordered: (libc)FP Comparison Functions.
  1421. * isupper: (libc)Classification of Characters.
  1422. * iswalnum: (libc)Classification of Wide Characters.
  1423. * iswalpha: (libc)Classification of Wide Characters.
  1424. * iswblank: (libc)Classification of Wide Characters.
  1425. * iswcntrl: (libc)Classification of Wide Characters.
  1426. * iswctype: (libc)Classification of Wide Characters.
  1427. * iswdigit: (libc)Classification of Wide Characters.
  1428. * iswgraph: (libc)Classification of Wide Characters.
  1429. * iswlower: (libc)Classification of Wide Characters.
  1430. * iswprint: (libc)Classification of Wide Characters.
  1431. * iswpunct: (libc)Classification of Wide Characters.
  1432. * iswspace: (libc)Classification of Wide Characters.
  1433. * iswupper: (libc)Classification of Wide Characters.
  1434. * iswxdigit: (libc)Classification of Wide Characters.
  1435. * isxdigit: (libc)Classification of Characters.
  1436. * iszero: (libc)Floating Point Classes.
  1437. * j0: (libc)Special Functions.
  1438. * j0f: (libc)Special Functions.
  1439. * j0fN: (libc)Special Functions.
  1440. * j0fNx: (libc)Special Functions.
  1441. * j0l: (libc)Special Functions.
  1442. * j1: (libc)Special Functions.
  1443. * j1f: (libc)Special Functions.
  1444. * j1fN: (libc)Special Functions.
  1445. * j1fNx: (libc)Special Functions.
  1446. * j1l: (libc)Special Functions.
  1447. * jn: (libc)Special Functions.
  1448. * jnf: (libc)Special Functions.
  1449. * jnfN: (libc)Special Functions.
  1450. * jnfNx: (libc)Special Functions.
  1451. * jnl: (libc)Special Functions.
  1452. * jrand48: (libc)SVID Random.
  1453. * jrand48_r: (libc)SVID Random.
  1454. * kill: (libc)Signaling Another Process.
  1455. * killpg: (libc)Signaling Another Process.
  1456. * l64a: (libc)Encode Binary Data.
  1457. * labs: (libc)Absolute Value.
  1458. * lcong48: (libc)SVID Random.
  1459. * lcong48_r: (libc)SVID Random.
  1460. * ldexp: (libc)Normalization Functions.
  1461. * ldexpf: (libc)Normalization Functions.
  1462. * ldexpfN: (libc)Normalization Functions.
  1463. * ldexpfNx: (libc)Normalization Functions.
  1464. * ldexpl: (libc)Normalization Functions.
  1465. * ldiv: (libc)Integer Division.
  1466. * lfind: (libc)Array Search Function.
  1467. * lgamma: (libc)Special Functions.
  1468. * lgamma_r: (libc)Special Functions.
  1469. * lgammaf: (libc)Special Functions.
  1470. * lgammafN: (libc)Special Functions.
  1471. * lgammafN_r: (libc)Special Functions.
  1472. * lgammafNx: (libc)Special Functions.
  1473. * lgammafNx_r: (libc)Special Functions.
  1474. * lgammaf_r: (libc)Special Functions.
  1475. * lgammal: (libc)Special Functions.
  1476. * lgammal_r: (libc)Special Functions.
  1477. * link: (libc)Hard Links.
  1478. * linkat: (libc)Hard Links.
  1479. * lio_listio64: (libc)Asynchronous Reads/Writes.
  1480. * lio_listio: (libc)Asynchronous Reads/Writes.
  1481. * listen: (libc)Listening.
  1482. * llabs: (libc)Absolute Value.
  1483. * lldiv: (libc)Integer Division.
  1484. * llogb: (libc)Exponents and Logarithms.
  1485. * llogbf: (libc)Exponents and Logarithms.
  1486. * llogbfN: (libc)Exponents and Logarithms.
  1487. * llogbfNx: (libc)Exponents and Logarithms.
  1488. * llogbl: (libc)Exponents and Logarithms.
  1489. * llrint: (libc)Rounding Functions.
  1490. * llrintf: (libc)Rounding Functions.
  1491. * llrintfN: (libc)Rounding Functions.
  1492. * llrintfNx: (libc)Rounding Functions.
  1493. * llrintl: (libc)Rounding Functions.
  1494. * llround: (libc)Rounding Functions.
  1495. * llroundf: (libc)Rounding Functions.
  1496. * llroundfN: (libc)Rounding Functions.
  1497. * llroundfNx: (libc)Rounding Functions.
  1498. * llroundl: (libc)Rounding Functions.
  1499. * localeconv: (libc)The Lame Way to Locale Data.
  1500. * localtime: (libc)Broken-down Time.
  1501. * localtime_r: (libc)Broken-down Time.
  1502. * log10: (libc)Exponents and Logarithms.
  1503. * log10f: (libc)Exponents and Logarithms.
  1504. * log10fN: (libc)Exponents and Logarithms.
  1505. * log10fNx: (libc)Exponents and Logarithms.
  1506. * log10l: (libc)Exponents and Logarithms.
  1507. * log10p1: (libc)Exponents and Logarithms.
  1508. * log10p1f: (libc)Exponents and Logarithms.
  1509. * log10p1fN: (libc)Exponents and Logarithms.
  1510. * log10p1fNx: (libc)Exponents and Logarithms.
  1511. * log10p1l: (libc)Exponents and Logarithms.
  1512. * log1p: (libc)Exponents and Logarithms.
  1513. * log1pf: (libc)Exponents and Logarithms.
  1514. * log1pfN: (libc)Exponents and Logarithms.
  1515. * log1pfNx: (libc)Exponents and Logarithms.
  1516. * log1pl: (libc)Exponents and Logarithms.
  1517. * log2: (libc)Exponents and Logarithms.
  1518. * log2f: (libc)Exponents and Logarithms.
  1519. * log2fN: (libc)Exponents and Logarithms.
  1520. * log2fNx: (libc)Exponents and Logarithms.
  1521. * log2l: (libc)Exponents and Logarithms.
  1522. * log2p1: (libc)Exponents and Logarithms.
  1523. * log2p1f: (libc)Exponents and Logarithms.
  1524. * log2p1fN: (libc)Exponents and Logarithms.
  1525. * log2p1fNx: (libc)Exponents and Logarithms.
  1526. * log2p1l: (libc)Exponents and Logarithms.
  1527. * log: (libc)Exponents and Logarithms.
  1528. * logb: (libc)Exponents and Logarithms.
  1529. * logbf: (libc)Exponents and Logarithms.
  1530. * logbfN: (libc)Exponents and Logarithms.
  1531. * logbfNx: (libc)Exponents and Logarithms.
  1532. * logbl: (libc)Exponents and Logarithms.
  1533. * logf: (libc)Exponents and Logarithms.
  1534. * logfN: (libc)Exponents and Logarithms.
  1535. * logfNx: (libc)Exponents and Logarithms.
  1536. * login: (libc)Logging In and Out.
  1537. * login_tty: (libc)Logging In and Out.
  1538. * logl: (libc)Exponents and Logarithms.
  1539. * logout: (libc)Logging In and Out.
  1540. * logp1: (libc)Exponents and Logarithms.
  1541. * logp1f: (libc)Exponents and Logarithms.
  1542. * logp1fN: (libc)Exponents and Logarithms.
  1543. * logp1fNx: (libc)Exponents and Logarithms.
  1544. * logp1l: (libc)Exponents and Logarithms.
  1545. * logwtmp: (libc)Logging In and Out.
  1546. * longjmp: (libc)Non-Local Details.
  1547. * lrand48: (libc)SVID Random.
  1548. * lrand48_r: (libc)SVID Random.
  1549. * lrint: (libc)Rounding Functions.
  1550. * lrintf: (libc)Rounding Functions.
  1551. * lrintfN: (libc)Rounding Functions.
  1552. * lrintfNx: (libc)Rounding Functions.
  1553. * lrintl: (libc)Rounding Functions.
  1554. * lround: (libc)Rounding Functions.
  1555. * lroundf: (libc)Rounding Functions.
  1556. * lroundfN: (libc)Rounding Functions.
  1557. * lroundfNx: (libc)Rounding Functions.
  1558. * lroundl: (libc)Rounding Functions.
  1559. * lsearch: (libc)Array Search Function.
  1560. * lseek64: (libc)File Position Primitive.
  1561. * lseek: (libc)File Position Primitive.
  1562. * lstat64: (libc)Reading Attributes.
  1563. * lstat: (libc)Reading Attributes.
  1564. * lutimes: (libc)File Times.
  1565. * madvise: (libc)Memory-mapped I/O.
  1566. * makecontext: (libc)System V contexts.
  1567. * mallinfo2: (libc)Statistics of Malloc.
  1568. * malloc: (libc)Basic Allocation.
  1569. * mallopt: (libc)Malloc Tunable Parameters.
  1570. * mblen: (libc)Non-reentrant Character Conversion.
  1571. * mbrlen: (libc)Converting a Character.
  1572. * mbrtowc: (libc)Converting a Character.
  1573. * mbsinit: (libc)Keeping the state.
  1574. * mbsnrtowcs: (libc)Converting Strings.
  1575. * mbsrtowcs: (libc)Converting Strings.
  1576. * mbstowcs: (libc)Non-reentrant String Conversion.
  1577. * mbtowc: (libc)Non-reentrant Character Conversion.
  1578. * mcheck: (libc)Heap Consistency Checking.
  1579. * memalign: (libc)Aligned Memory Blocks.
  1580. * memalignment: (libc)Aligned Memory Blocks.
  1581. * memccpy: (libc)Copying Strings and Arrays.
  1582. * memchr: (libc)Search Functions.
  1583. * memcmp: (libc)String/Array Comparison.
  1584. * memcpy: (libc)Copying Strings and Arrays.
  1585. * memfd_create: (libc)Memory-mapped I/O.
  1586. * memfrob: (libc)Obfuscating Data.
  1587. * memmem: (libc)Search Functions.
  1588. * memmove: (libc)Copying Strings and Arrays.
  1589. * mempcpy: (libc)Copying Strings and Arrays.
  1590. * memrchr: (libc)Search Functions.
  1591. * memset: (libc)Copying Strings and Arrays.
  1592. * memset_explicit: (libc)Erasing Sensitive Data.
  1593. * mkdir: (libc)Creating Directories.
  1594. * mkdirat: (libc)Creating Directories.
  1595. * mkdtemp: (libc)Temporary Files.
  1596. * mkfifo: (libc)FIFO Special Files.
  1597. * mknod: (libc)Making Special Files.
  1598. * mkstemp: (libc)Temporary Files.
  1599. * mktemp: (libc)Temporary Files.
  1600. * mktime: (libc)Broken-down Time.
  1601. * mlock2: (libc)Page Lock Functions.
  1602. * mlock: (libc)Page Lock Functions.
  1603. * mlockall: (libc)Page Lock Functions.
  1604. * mmap64: (libc)Memory-mapped I/O.
  1605. * mmap: (libc)Memory-mapped I/O.
  1606. * modf: (libc)Rounding Functions.
  1607. * modff: (libc)Rounding Functions.
  1608. * modffN: (libc)Rounding Functions.
  1609. * modffNx: (libc)Rounding Functions.
  1610. * modfl: (libc)Rounding Functions.
  1611. * mount: (libc)Mount-Unmount-Remount.
  1612. * mprobe: (libc)Heap Consistency Checking.
  1613. * mprotect: (libc)Memory Protection.
  1614. * mrand48: (libc)SVID Random.
  1615. * mrand48_r: (libc)SVID Random.
  1616. * mremap: (libc)Memory-mapped I/O.
  1617. * mseal: (libc)Memory Protection.
  1618. * msync: (libc)Memory-mapped I/O.
  1619. * mtrace: (libc)Tracing malloc.
  1620. * mtx_destroy: (libc)ISO C Mutexes.
  1621. * mtx_init: (libc)ISO C Mutexes.
  1622. * mtx_lock: (libc)ISO C Mutexes.
  1623. * mtx_timedlock: (libc)ISO C Mutexes.
  1624. * mtx_trylock: (libc)ISO C Mutexes.
  1625. * mtx_unlock: (libc)ISO C Mutexes.
  1626. * munlock: (libc)Page Lock Functions.
  1627. * munlockall: (libc)Page Lock Functions.
  1628. * munmap: (libc)Memory-mapped I/O.
  1629. * muntrace: (libc)Tracing malloc.
  1630. * nan: (libc)FP Bit Twiddling.
  1631. * nanf: (libc)FP Bit Twiddling.
  1632. * nanfN: (libc)FP Bit Twiddling.
  1633. * nanfNx: (libc)FP Bit Twiddling.
  1634. * nanl: (libc)FP Bit Twiddling.
  1635. * nanosleep: (libc)Sleeping.
  1636. * nearbyint: (libc)Rounding Functions.
  1637. * nearbyintf: (libc)Rounding Functions.
  1638. * nearbyintfN: (libc)Rounding Functions.
  1639. * nearbyintfNx: (libc)Rounding Functions.
  1640. * nearbyintl: (libc)Rounding Functions.
  1641. * nextafter: (libc)FP Bit Twiddling.
  1642. * nextafterf: (libc)FP Bit Twiddling.
  1643. * nextafterfN: (libc)FP Bit Twiddling.
  1644. * nextafterfNx: (libc)FP Bit Twiddling.
  1645. * nextafterl: (libc)FP Bit Twiddling.
  1646. * nextdown: (libc)FP Bit Twiddling.
  1647. * nextdownf: (libc)FP Bit Twiddling.
  1648. * nextdownfN: (libc)FP Bit Twiddling.
  1649. * nextdownfNx: (libc)FP Bit Twiddling.
  1650. * nextdownl: (libc)FP Bit Twiddling.
  1651. * nexttoward: (libc)FP Bit Twiddling.
  1652. * nexttowardf: (libc)FP Bit Twiddling.
  1653. * nexttowardl: (libc)FP Bit Twiddling.
  1654. * nextup: (libc)FP Bit Twiddling.
  1655. * nextupf: (libc)FP Bit Twiddling.
  1656. * nextupfN: (libc)FP Bit Twiddling.
  1657. * nextupfNx: (libc)FP Bit Twiddling.
  1658. * nextupl: (libc)FP Bit Twiddling.
  1659. * nftw64: (libc)Working with Directory Trees.
  1660. * nftw: (libc)Working with Directory Trees.
  1661. * ngettext: (libc)Advanced gettext functions.
  1662. * nice: (libc)Traditional Scheduling Functions.
  1663. * nl_langinfo: (libc)The Elegant and Fast Way.
  1664. * nrand48: (libc)SVID Random.
  1665. * nrand48_r: (libc)SVID Random.
  1666. * ntohl: (libc)Byte Order.
  1667. * ntohs: (libc)Byte Order.
  1668. * ntp_adjtime: (libc)Setting and Adjusting the Time.
  1669. * ntp_gettime: (libc)Setting and Adjusting the Time.
  1670. * obstack_1grow: (libc)Growing Objects.
  1671. * obstack_1grow_fast: (libc)Extra Fast Growing.
  1672. * obstack_alignment_mask: (libc)Obstacks Data Alignment.
  1673. * obstack_alloc: (libc)Allocation in an Obstack.
  1674. * obstack_base: (libc)Status of an Obstack.
  1675. * obstack_blank: (libc)Growing Objects.
  1676. * obstack_blank_fast: (libc)Extra Fast Growing.
  1677. * obstack_chunk_size: (libc)Obstack Chunks.
  1678. * obstack_copy0: (libc)Allocation in an Obstack.
  1679. * obstack_copy: (libc)Allocation in an Obstack.
  1680. * obstack_finish: (libc)Growing Objects.
  1681. * obstack_free: (libc)Freeing Obstack Objects.
  1682. * obstack_grow0: (libc)Growing Objects.
  1683. * obstack_grow: (libc)Growing Objects.
  1684. * obstack_init: (libc)Preparing for Obstacks.
  1685. * obstack_int_grow: (libc)Growing Objects.
  1686. * obstack_int_grow_fast: (libc)Extra Fast Growing.
  1687. * obstack_next_free: (libc)Status of an Obstack.
  1688. * obstack_object_size: (libc)Growing Objects.
  1689. * obstack_object_size: (libc)Status of an Obstack.
  1690. * obstack_printf: (libc)Dynamic Output.
  1691. * obstack_ptr_grow: (libc)Growing Objects.
  1692. * obstack_ptr_grow_fast: (libc)Extra Fast Growing.
  1693. * obstack_room: (libc)Extra Fast Growing.
  1694. * obstack_vprintf: (libc)Variable Arguments Output.
  1695. * offsetof: (libc)Structure Measurement.
  1696. * on_exit: (libc)Cleanups on Exit.
  1697. * open64: (libc)Opening and Closing Files.
  1698. * open: (libc)Opening and Closing Files.
  1699. * open_memstream: (libc)String Streams.
  1700. * openat2: (libc)Opening and Closing Files.
  1701. * openat64: (libc)Opening and Closing Files.
  1702. * openat: (libc)Opening and Closing Files.
  1703. * opendir: (libc)Opening a Directory.
  1704. * openlog: (libc)openlog.
  1705. * openpty: (libc)Pseudo-Terminal Pairs.
  1706. * parse_printf_format: (libc)Parsing a Template String.
  1707. * pathconf: (libc)Pathconf.
  1708. * pause: (libc)Using Pause.
  1709. * pclose: (libc)Pipe to a Subprocess.
  1710. * perror: (libc)Error Messages.
  1711. * pidfd_getpid: (libc)Querying a Process.
  1712. * pipe: (libc)Creating a Pipe.
  1713. * pkey_alloc: (libc)Memory Protection.
  1714. * pkey_free: (libc)Memory Protection.
  1715. * pkey_get: (libc)Memory Protection.
  1716. * pkey_mprotect: (libc)Memory Protection.
  1717. * pkey_set: (libc)Memory Protection.
  1718. * poll: (libc)Other Low-Level I/O APIs.
  1719. * popen: (libc)Pipe to a Subprocess.
  1720. * posix_fallocate64: (libc)Storage Allocation.
  1721. * posix_fallocate: (libc)Storage Allocation.
  1722. * posix_memalign: (libc)Aligned Memory Blocks.
  1723. * posix_openpt: (libc)Allocation.
  1724. * pow: (libc)Exponents and Logarithms.
  1725. * powf: (libc)Exponents and Logarithms.
  1726. * powfN: (libc)Exponents and Logarithms.
  1727. * powfNx: (libc)Exponents and Logarithms.
  1728. * powl: (libc)Exponents and Logarithms.
  1729. * pown: (libc)Exponents and Logarithms.
  1730. * pownf: (libc)Exponents and Logarithms.
  1731. * pownfN: (libc)Exponents and Logarithms.
  1732. * pownfNx: (libc)Exponents and Logarithms.
  1733. * pownl: (libc)Exponents and Logarithms.
  1734. * powr: (libc)Exponents and Logarithms.
  1735. * powrf: (libc)Exponents and Logarithms.
  1736. * powrfN: (libc)Exponents and Logarithms.
  1737. * powrfNx: (libc)Exponents and Logarithms.
  1738. * powrl: (libc)Exponents and Logarithms.
  1739. * pread64: (libc)I/O Primitives.
  1740. * pread: (libc)I/O Primitives.
  1741. * preadv2: (libc)Scatter-Gather.
  1742. * preadv64: (libc)Scatter-Gather.
  1743. * preadv64v2: (libc)Scatter-Gather.
  1744. * preadv: (libc)Scatter-Gather.
  1745. * printf: (libc)Formatted Output Functions.
  1746. * printf_size: (libc)Predefined Printf Handlers.
  1747. * printf_size_info: (libc)Predefined Printf Handlers.
  1748. * psignal: (libc)Signal Messages.
  1749. * pthread_attr_destroy: (libc)Creating and Destroying Threads.
  1750. * pthread_attr_getaffinity_np: (libc)Thread CPU Affinity.
  1751. * pthread_attr_getdetachstate: (libc)Creating and Destroying Threads.
  1752. * pthread_attr_getsigmask_np: (libc)Initial Thread Signal Mask.
  1753. * pthread_attr_init: (libc)Creating and Destroying Threads.
  1754. * pthread_attr_setaffinity_np: (libc)Thread CPU Affinity.
  1755. * pthread_attr_setdetachstate: (libc)Creating and Destroying Threads.
  1756. * pthread_attr_setsigmask_np: (libc)Initial Thread Signal Mask.
  1757. * pthread_barrier_destroy: (libc)POSIX Barriers.
  1758. * pthread_barrier_init: (libc)POSIX Barriers.
  1759. * pthread_barrier_wait: (libc)POSIX Barriers.
  1760. * pthread_clockjoin_np: (libc)Joining Threads.
  1761. * pthread_cond_clockwait: (libc)Waiting with Explicit Clocks.
  1762. * pthread_create: (libc)Creating and Destroying Threads.
  1763. * pthread_detach: (libc)Creating and Destroying Threads.
  1764. * pthread_equal: (libc)POSIX Threads Other APIs.
  1765. * pthread_getaffinity_np: (libc)Thread CPU Affinity.
  1766. * pthread_getattr_default_np: (libc)Default Thread Attributes.
  1767. * pthread_getcpuclockid: (libc)POSIX Threads Other APIs.
  1768. * pthread_getname_np: (libc)Thread Names.
  1769. * pthread_getspecific: (libc)Thread-specific Data.
  1770. * pthread_gettid_np: (libc)Process Identification.
  1771. * pthread_join: (libc)Creating and Destroying Threads.
  1772. * pthread_key_create: (libc)Thread-specific Data.
  1773. * pthread_key_delete: (libc)Thread-specific Data.
  1774. * pthread_kill: (libc)Creating and Destroying Threads.
  1775. * pthread_mutex_clocklock: (libc)POSIX Mutexes.
  1776. * pthread_mutex_destroy: (libc)POSIX Mutexes.
  1777. * pthread_mutex_init: (libc)POSIX Mutexes.
  1778. * pthread_mutex_lock: (libc)POSIX Mutexes.
  1779. * pthread_mutex_timedlock: (libc)POSIX Mutexes.
  1780. * pthread_mutex_trylock: (libc)POSIX Mutexes.
  1781. * pthread_mutex_unlock: (libc)POSIX Mutexes.
  1782. * pthread_mutexattr_destroy: (libc)POSIX Mutexes.
  1783. * pthread_mutexattr_gettype: (libc)POSIX Mutexes.
  1784. * pthread_mutexattr_init: (libc)POSIX Mutexes.
  1785. * pthread_mutexattr_settype: (libc)POSIX Mutexes.
  1786. * pthread_once: (libc)POSIX Threads Other APIs.
  1787. * pthread_rwlock_clockrdlock: (libc)Waiting with Explicit Clocks.
  1788. * pthread_rwlock_clockwrlock: (libc)Waiting with Explicit Clocks.
  1789. * pthread_self: (libc)Creating and Destroying Threads.
  1790. * pthread_setaffinity_np: (libc)Thread CPU Affinity.
  1791. * pthread_setattr_default_np: (libc)Default Thread Attributes.
  1792. * pthread_setname_np: (libc)Thread Names.
  1793. * pthread_setspecific: (libc)Thread-specific Data.
  1794. * pthread_sigmask: (libc)POSIX Threads Other APIs.
  1795. * pthread_spin_destroy: (libc)POSIX Spin Locks.
  1796. * pthread_spin_init: (libc)POSIX Spin Locks.
  1797. * pthread_spin_lock: (libc)POSIX Spin Locks.
  1798. * pthread_spin_trylock: (libc)POSIX Spin Locks.
  1799. * pthread_spin_unlock: (libc)POSIX Spin Locks.
  1800. * pthread_timedjoin_np: (libc)Joining Threads.
  1801. * pthread_tryjoin_np: (libc)Joining Threads.
  1802. * ptsname: (libc)Allocation.
  1803. * ptsname_r: (libc)Allocation.
  1804. * putc: (libc)Simple Output.
  1805. * putc_unlocked: (libc)Simple Output.
  1806. * putchar: (libc)Simple Output.
  1807. * putchar_unlocked: (libc)Simple Output.
  1808. * putenv: (libc)Environment Access.
  1809. * putpwent: (libc)Writing a User Entry.
  1810. * puts: (libc)Simple Output.
  1811. * pututline: (libc)Manipulating the Database.
  1812. * pututxline: (libc)XPG Functions.
  1813. * putw: (libc)Simple Output.
  1814. * putwc: (libc)Simple Output.
  1815. * putwc_unlocked: (libc)Simple Output.
  1816. * putwchar: (libc)Simple Output.
  1817. * putwchar_unlocked: (libc)Simple Output.
  1818. * pwrite64: (libc)I/O Primitives.
  1819. * pwrite: (libc)I/O Primitives.
  1820. * pwritev2: (libc)Scatter-Gather.
  1821. * pwritev64: (libc)Scatter-Gather.
  1822. * pwritev64v2: (libc)Scatter-Gather.
  1823. * pwritev: (libc)Scatter-Gather.
  1824. * qecvt: (libc)System V Number Conversion.
  1825. * qecvt_r: (libc)System V Number Conversion.
  1826. * qfcvt: (libc)System V Number Conversion.
  1827. * qfcvt_r: (libc)System V Number Conversion.
  1828. * qgcvt: (libc)System V Number Conversion.
  1829. * qsort: (libc)Array Sort Function.
  1830. * raise: (libc)Signaling Yourself.
  1831. * rand: (libc)ISO Random.
  1832. * rand_r: (libc)ISO Random.
  1833. * random: (libc)BSD Random.
  1834. * random_r: (libc)BSD Random.
  1835. * rawmemchr: (libc)Search Functions.
  1836. * read: (libc)I/O Primitives.
  1837. * readdir64: (libc)Reading/Closing Directory.
  1838. * readdir64_r: (libc)Reading/Closing Directory.
  1839. * readdir: (libc)Reading/Closing Directory.
  1840. * readdir_r: (libc)Reading/Closing Directory.
  1841. * readlink: (libc)Symbolic Links.
  1842. * readv: (libc)Scatter-Gather.
  1843. * realloc: (libc)Changing Block Size.
  1844. * reallocarray: (libc)Changing Block Size.
  1845. * realpath: (libc)Symbolic Links.
  1846. * recv: (libc)Receiving Data.
  1847. * recvfrom: (libc)Receiving Datagrams.
  1848. * recvmsg: (libc)Other Socket APIs.
  1849. * regcomp: (libc)POSIX Regexp Compilation.
  1850. * regerror: (libc)Regexp Cleanup.
  1851. * regexec: (libc)Matching POSIX Regexps.
  1852. * regfree: (libc)Regexp Cleanup.
  1853. * register_printf_function: (libc)Registering New Conversions.
  1854. * remainder: (libc)Remainder Functions.
  1855. * remainderf: (libc)Remainder Functions.
  1856. * remainderfN: (libc)Remainder Functions.
  1857. * remainderfNx: (libc)Remainder Functions.
  1858. * remainderl: (libc)Remainder Functions.
  1859. * remove: (libc)Deleting Files.
  1860. * rename: (libc)Renaming Files.
  1861. * renameat: (libc)Renaming Files.
  1862. * rewind: (libc)File Positioning.
  1863. * rewinddir: (libc)Random Access Directory.
  1864. * rindex: (libc)Search Functions.
  1865. * rint: (libc)Rounding Functions.
  1866. * rintf: (libc)Rounding Functions.
  1867. * rintfN: (libc)Rounding Functions.
  1868. * rintfNx: (libc)Rounding Functions.
  1869. * rintl: (libc)Rounding Functions.
  1870. * rmdir: (libc)Deleting Files.
  1871. * rootn: (libc)Exponents and Logarithms.
  1872. * rootnf: (libc)Exponents and Logarithms.
  1873. * rootnfN: (libc)Exponents and Logarithms.
  1874. * rootnfNx: (libc)Exponents and Logarithms.
  1875. * rootnl: (libc)Exponents and Logarithms.
  1876. * round: (libc)Rounding Functions.
  1877. * roundeven: (libc)Rounding Functions.
  1878. * roundevenf: (libc)Rounding Functions.
  1879. * roundevenfN: (libc)Rounding Functions.
  1880. * roundevenfNx: (libc)Rounding Functions.
  1881. * roundevenl: (libc)Rounding Functions.
  1882. * roundf: (libc)Rounding Functions.
  1883. * roundfN: (libc)Rounding Functions.
  1884. * roundfNx: (libc)Rounding Functions.
  1885. * roundl: (libc)Rounding Functions.
  1886. * rpmatch: (libc)Yes-or-No Questions.
  1887. * rsqrt: (libc)Exponents and Logarithms.
  1888. * rsqrtf: (libc)Exponents and Logarithms.
  1889. * rsqrtfN: (libc)Exponents and Logarithms.
  1890. * rsqrtfNx: (libc)Exponents and Logarithms.
  1891. * rsqrtl: (libc)Exponents and Logarithms.
  1892. * sbrk: (libc)Resizing the Data Segment.
  1893. * scalb: (libc)Normalization Functions.
  1894. * scalbf: (libc)Normalization Functions.
  1895. * scalbl: (libc)Normalization Functions.
  1896. * scalbln: (libc)Normalization Functions.
  1897. * scalblnf: (libc)Normalization Functions.
  1898. * scalblnfN: (libc)Normalization Functions.
  1899. * scalblnfNx: (libc)Normalization Functions.
  1900. * scalblnl: (libc)Normalization Functions.
  1901. * scalbn: (libc)Normalization Functions.
  1902. * scalbnf: (libc)Normalization Functions.
  1903. * scalbnfN: (libc)Normalization Functions.
  1904. * scalbnfNx: (libc)Normalization Functions.
  1905. * scalbnl: (libc)Normalization Functions.
  1906. * scandir64: (libc)Scanning Directory Content.
  1907. * scandir: (libc)Scanning Directory Content.
  1908. * scanf: (libc)Formatted Input Functions.
  1909. * sched_get_priority_max: (libc)Basic Scheduling Functions.
  1910. * sched_get_priority_min: (libc)Basic Scheduling Functions.
  1911. * sched_getaffinity: (libc)CPU Affinity.
  1912. * sched_getattr: (libc)Extensible Scheduling.
  1913. * sched_getcpu: (libc)CPU Affinity.
  1914. * sched_getparam: (libc)Basic Scheduling Functions.
  1915. * sched_getscheduler: (libc)Basic Scheduling Functions.
  1916. * sched_rr_get_interval: (libc)Basic Scheduling Functions.
  1917. * sched_setaffinity: (libc)CPU Affinity.
  1918. * sched_setattr: (libc)Extensible Scheduling.
  1919. * sched_setparam: (libc)Basic Scheduling Functions.
  1920. * sched_setscheduler: (libc)Basic Scheduling Functions.
  1921. * sched_yield: (libc)Basic Scheduling Functions.
  1922. * secure_getenv: (libc)Environment Access.
  1923. * seed48: (libc)SVID Random.
  1924. * seed48_r: (libc)SVID Random.
  1925. * seekdir: (libc)Random Access Directory.
  1926. * select: (libc)Waiting for I/O.
  1927. * sem_clockwait: (libc)POSIX Semaphores.
  1928. * sem_close: (libc)POSIX Semaphores.
  1929. * sem_destroy: (libc)POSIX Semaphores.
  1930. * sem_getvalue: (libc)POSIX Semaphores.
  1931. * sem_init: (libc)POSIX Semaphores.
  1932. * sem_open: (libc)POSIX Semaphores.
  1933. * sem_post: (libc)POSIX Semaphores.
  1934. * sem_timedwait: (libc)POSIX Semaphores.
  1935. * sem_trywait: (libc)POSIX Semaphores.
  1936. * sem_unlink: (libc)POSIX Semaphores.
  1937. * sem_wait: (libc)POSIX Semaphores.
  1938. * semctl: (libc)Semaphores.
  1939. * semget: (libc)Semaphores.
  1940. * semop: (libc)Semaphores.
  1941. * semtimedop: (libc)Semaphores.
  1942. * send: (libc)Sending Data.
  1943. * sendmsg: (libc)Other Socket APIs.
  1944. * sendto: (libc)Sending Datagrams.
  1945. * setbuf: (libc)Controlling Buffering.
  1946. * setbuffer: (libc)Controlling Buffering.
  1947. * setcontext: (libc)System V contexts.
  1948. * setdomainname: (libc)Host Identification.
  1949. * setegid: (libc)Setting Groups.
  1950. * setenv: (libc)Environment Access.
  1951. * seteuid: (libc)Setting User ID.
  1952. * setfsent: (libc)fstab.
  1953. * setgid: (libc)Setting Groups.
  1954. * setgrent: (libc)Scanning All Groups.
  1955. * setgroups: (libc)Setting Groups.
  1956. * sethostent: (libc)Host Names.
  1957. * sethostid: (libc)Host Identification.
  1958. * sethostname: (libc)Host Identification.
  1959. * setitimer: (libc)Setting an Alarm.
  1960. * setjmp: (libc)Non-Local Details.
  1961. * setlinebuf: (libc)Controlling Buffering.
  1962. * setlocale: (libc)Setting the Locale.
  1963. * setlogmask: (libc)setlogmask.
  1964. * setmntent: (libc)mtab.
  1965. * setnetent: (libc)Networks Database.
  1966. * setnetgrent: (libc)Lookup Netgroup.
  1967. * setpayload: (libc)FP Bit Twiddling.
  1968. * setpayloadf: (libc)FP Bit Twiddling.
  1969. * setpayloadfN: (libc)FP Bit Twiddling.
  1970. * setpayloadfNx: (libc)FP Bit Twiddling.
  1971. * setpayloadl: (libc)FP Bit Twiddling.
  1972. * setpayloadsig: (libc)FP Bit Twiddling.
  1973. * setpayloadsigf: (libc)FP Bit Twiddling.
  1974. * setpayloadsigfN: (libc)FP Bit Twiddling.
  1975. * setpayloadsigfNx: (libc)FP Bit Twiddling.
  1976. * setpayloadsigl: (libc)FP Bit Twiddling.
  1977. * setpgid: (libc)Process Group Functions.
  1978. * setpgrp: (libc)Process Group Functions.
  1979. * setpriority: (libc)Traditional Scheduling Functions.
  1980. * setprotoent: (libc)Protocols Database.
  1981. * setpwent: (libc)Scanning All Users.
  1982. * setregid: (libc)Setting Groups.
  1983. * setreuid: (libc)Setting User ID.
  1984. * setrlimit64: (libc)Limits on Resources.
  1985. * setrlimit: (libc)Limits on Resources.
  1986. * setservent: (libc)Services Database.
  1987. * setsid: (libc)Process Group Functions.
  1988. * setsockopt: (libc)Socket Option Functions.
  1989. * setstate: (libc)BSD Random.
  1990. * setstate_r: (libc)BSD Random.
  1991. * settimeofday: (libc)Setting and Adjusting the Time.
  1992. * setuid: (libc)Setting User ID.
  1993. * setutent: (libc)Manipulating the Database.
  1994. * setutxent: (libc)XPG Functions.
  1995. * setvbuf: (libc)Controlling Buffering.
  1996. * shm_open: (libc)Memory-mapped I/O.
  1997. * shm_unlink: (libc)Memory-mapped I/O.
  1998. * shutdown: (libc)Closing a Socket.
  1999. * sigabbrev_np: (libc)Signal Messages.
  2000. * sigaction: (libc)Advanced Signal Handling.
  2001. * sigaddset: (libc)Signal Sets.
  2002. * sigaltstack: (libc)Signal Stack.
  2003. * sigblock: (libc)BSD Signal Handling.
  2004. * sigdelset: (libc)Signal Sets.
  2005. * sigdescr_np: (libc)Signal Messages.
  2006. * sigemptyset: (libc)Signal Sets.
  2007. * sigfillset: (libc)Signal Sets.
  2008. * siginterrupt: (libc)BSD Signal Handling.
  2009. * sigismember: (libc)Signal Sets.
  2010. * siglongjmp: (libc)Non-Local Exits and Signals.
  2011. * sigmask: (libc)BSD Signal Handling.
  2012. * signal: (libc)Basic Signal Handling.
  2013. * signbit: (libc)FP Bit Twiddling.
  2014. * significand: (libc)Normalization Functions.
  2015. * significandf: (libc)Normalization Functions.
  2016. * significandl: (libc)Normalization Functions.
  2017. * sigpause: (libc)BSD Signal Handling.
  2018. * sigpending: (libc)Checking for Pending Signals.
  2019. * sigprocmask: (libc)Process Signal Mask.
  2020. * sigsetjmp: (libc)Non-Local Exits and Signals.
  2021. * sigsetmask: (libc)BSD Signal Handling.
  2022. * sigstack: (libc)Signal Stack.
  2023. * sigsuspend: (libc)Sigsuspend.
  2024. * sin: (libc)Trig Functions.
  2025. * sincos: (libc)Trig Functions.
  2026. * sincosf: (libc)Trig Functions.
  2027. * sincosfN: (libc)Trig Functions.
  2028. * sincosfNx: (libc)Trig Functions.
  2029. * sincosl: (libc)Trig Functions.
  2030. * sinf: (libc)Trig Functions.
  2031. * sinfN: (libc)Trig Functions.
  2032. * sinfNx: (libc)Trig Functions.
  2033. * sinh: (libc)Hyperbolic Functions.
  2034. * sinhf: (libc)Hyperbolic Functions.
  2035. * sinhfN: (libc)Hyperbolic Functions.
  2036. * sinhfNx: (libc)Hyperbolic Functions.
  2037. * sinhl: (libc)Hyperbolic Functions.
  2038. * sinl: (libc)Trig Functions.
  2039. * sinpi: (libc)Trig Functions.
  2040. * sinpif: (libc)Trig Functions.
  2041. * sinpifN: (libc)Trig Functions.
  2042. * sinpifNx: (libc)Trig Functions.
  2043. * sinpil: (libc)Trig Functions.
  2044. * sleep: (libc)Sleeping.
  2045. * snprintf: (libc)Formatted Output Functions.
  2046. * socket: (libc)Creating a Socket.
  2047. * socketpair: (libc)Socket Pairs.
  2048. * sprintf: (libc)Formatted Output Functions.
  2049. * sqrt: (libc)Exponents and Logarithms.
  2050. * sqrtf: (libc)Exponents and Logarithms.
  2051. * sqrtfN: (libc)Exponents and Logarithms.
  2052. * sqrtfNx: (libc)Exponents and Logarithms.
  2053. * sqrtl: (libc)Exponents and Logarithms.
  2054. * srand48: (libc)SVID Random.
  2055. * srand48_r: (libc)SVID Random.
  2056. * srand: (libc)ISO Random.
  2057. * srandom: (libc)BSD Random.
  2058. * srandom_r: (libc)BSD Random.
  2059. * sscanf: (libc)Formatted Input Functions.
  2060. * ssignal: (libc)Basic Signal Handling.
  2061. * stat64: (libc)Reading Attributes.
  2062. * stat: (libc)Reading Attributes.
  2063. * stdc_bit_ceil_uc: (libc)Bit Manipulation.
  2064. * stdc_bit_ceil_ui: (libc)Bit Manipulation.
  2065. * stdc_bit_ceil_ul: (libc)Bit Manipulation.
  2066. * stdc_bit_ceil_ull: (libc)Bit Manipulation.
  2067. * stdc_bit_ceil_us: (libc)Bit Manipulation.
  2068. * stdc_bit_floor_uc: (libc)Bit Manipulation.
  2069. * stdc_bit_floor_ui: (libc)Bit Manipulation.
  2070. * stdc_bit_floor_ul: (libc)Bit Manipulation.
  2071. * stdc_bit_floor_ull: (libc)Bit Manipulation.
  2072. * stdc_bit_floor_us: (libc)Bit Manipulation.
  2073. * stdc_bit_width_uc: (libc)Bit Manipulation.
  2074. * stdc_bit_width_ui: (libc)Bit Manipulation.
  2075. * stdc_bit_width_ul: (libc)Bit Manipulation.
  2076. * stdc_bit_width_ull: (libc)Bit Manipulation.
  2077. * stdc_bit_width_us: (libc)Bit Manipulation.
  2078. * stdc_count_ones_uc: (libc)Bit Manipulation.
  2079. * stdc_count_ones_ui: (libc)Bit Manipulation.
  2080. * stdc_count_ones_ul: (libc)Bit Manipulation.
  2081. * stdc_count_ones_ull: (libc)Bit Manipulation.
  2082. * stdc_count_ones_us: (libc)Bit Manipulation.
  2083. * stdc_count_zeros_uc: (libc)Bit Manipulation.
  2084. * stdc_count_zeros_ui: (libc)Bit Manipulation.
  2085. * stdc_count_zeros_ul: (libc)Bit Manipulation.
  2086. * stdc_count_zeros_ull: (libc)Bit Manipulation.
  2087. * stdc_count_zeros_us: (libc)Bit Manipulation.
  2088. * stdc_first_leading_one_uc: (libc)Bit Manipulation.
  2089. * stdc_first_leading_one_ui: (libc)Bit Manipulation.
  2090. * stdc_first_leading_one_ul: (libc)Bit Manipulation.
  2091. * stdc_first_leading_one_ull: (libc)Bit Manipulation.
  2092. * stdc_first_leading_one_us: (libc)Bit Manipulation.
  2093. * stdc_first_leading_zero_uc: (libc)Bit Manipulation.
  2094. * stdc_first_leading_zero_ui: (libc)Bit Manipulation.
  2095. * stdc_first_leading_zero_ul: (libc)Bit Manipulation.
  2096. * stdc_first_leading_zero_ull: (libc)Bit Manipulation.
  2097. * stdc_first_leading_zero_us: (libc)Bit Manipulation.
  2098. * stdc_first_trailing_one_uc: (libc)Bit Manipulation.
  2099. * stdc_first_trailing_one_ui: (libc)Bit Manipulation.
  2100. * stdc_first_trailing_one_ul: (libc)Bit Manipulation.
  2101. * stdc_first_trailing_one_ull: (libc)Bit Manipulation.
  2102. * stdc_first_trailing_one_us: (libc)Bit Manipulation.
  2103. * stdc_first_trailing_zero_uc: (libc)Bit Manipulation.
  2104. * stdc_first_trailing_zero_ui: (libc)Bit Manipulation.
  2105. * stdc_first_trailing_zero_ul: (libc)Bit Manipulation.
  2106. * stdc_first_trailing_zero_ull: (libc)Bit Manipulation.
  2107. * stdc_first_trailing_zero_us: (libc)Bit Manipulation.
  2108. * stdc_has_single_bit_uc: (libc)Bit Manipulation.
  2109. * stdc_has_single_bit_ui: (libc)Bit Manipulation.
  2110. * stdc_has_single_bit_ul: (libc)Bit Manipulation.
  2111. * stdc_has_single_bit_ull: (libc)Bit Manipulation.
  2112. * stdc_has_single_bit_us: (libc)Bit Manipulation.
  2113. * stdc_leading_ones_uc: (libc)Bit Manipulation.
  2114. * stdc_leading_ones_ui: (libc)Bit Manipulation.
  2115. * stdc_leading_ones_ul: (libc)Bit Manipulation.
  2116. * stdc_leading_ones_ull: (libc)Bit Manipulation.
  2117. * stdc_leading_ones_us: (libc)Bit Manipulation.
  2118. * stdc_leading_zeros_uc: (libc)Bit Manipulation.
  2119. * stdc_leading_zeros_ui: (libc)Bit Manipulation.
  2120. * stdc_leading_zeros_ul: (libc)Bit Manipulation.
  2121. * stdc_leading_zeros_ull: (libc)Bit Manipulation.
  2122. * stdc_leading_zeros_us: (libc)Bit Manipulation.
  2123. * stdc_trailing_ones_uc: (libc)Bit Manipulation.
  2124. * stdc_trailing_ones_ui: (libc)Bit Manipulation.
  2125. * stdc_trailing_ones_ul: (libc)Bit Manipulation.
  2126. * stdc_trailing_ones_ull: (libc)Bit Manipulation.
  2127. * stdc_trailing_ones_us: (libc)Bit Manipulation.
  2128. * stdc_trailing_zeros_uc: (libc)Bit Manipulation.
  2129. * stdc_trailing_zeros_ui: (libc)Bit Manipulation.
  2130. * stdc_trailing_zeros_ul: (libc)Bit Manipulation.
  2131. * stdc_trailing_zeros_ull: (libc)Bit Manipulation.
  2132. * stdc_trailing_zeros_us: (libc)Bit Manipulation.
  2133. * stime: (libc)Setting and Adjusting the Time.
  2134. * stpcpy: (libc)Copying Strings and Arrays.
  2135. * stpncpy: (libc)Truncating Strings.
  2136. * strcasecmp: (libc)String/Array Comparison.
  2137. * strcasestr: (libc)Search Functions.
  2138. * strcat: (libc)Concatenating Strings.
  2139. * strchr: (libc)Search Functions.
  2140. * strchrnul: (libc)Search Functions.
  2141. * strcmp: (libc)String/Array Comparison.
  2142. * strcoll: (libc)Collation Functions.
  2143. * strcpy: (libc)Copying Strings and Arrays.
  2144. * strcspn: (libc)Search Functions.
  2145. * strdup: (libc)Copying Strings and Arrays.
  2146. * strdupa: (libc)Copying Strings and Arrays.
  2147. * strerror: (libc)Error Messages.
  2148. * strerror_l: (libc)Error Messages.
  2149. * strerror_r: (libc)Error Messages.
  2150. * strerror_r: (libc)Error Messages.
  2151. * strerrordesc_np: (libc)Error Messages.
  2152. * strerrorname_np: (libc)Error Messages.
  2153. * strfmon: (libc)Formatting Numbers.
  2154. * strfromd: (libc)Printing of Floats.
  2155. * strfromf: (libc)Printing of Floats.
  2156. * strfromfN: (libc)Printing of Floats.
  2157. * strfromfNx: (libc)Printing of Floats.
  2158. * strfroml: (libc)Printing of Floats.
  2159. * strfry: (libc)Shuffling Bytes.
  2160. * strftime: (libc)Formatting Calendar Time.
  2161. * strftime_l: (libc)Formatting Calendar Time.
  2162. * strlcat: (libc)Truncating Strings.
  2163. * strlcpy: (libc)Truncating Strings.
  2164. * strlen: (libc)String Length.
  2165. * strncasecmp: (libc)String/Array Comparison.
  2166. * strncat: (libc)Truncating Strings.
  2167. * strncmp: (libc)String/Array Comparison.
  2168. * strncpy: (libc)Truncating Strings.
  2169. * strndup: (libc)Truncating Strings.
  2170. * strndupa: (libc)Truncating Strings.
  2171. * strnlen: (libc)String Length.
  2172. * strpbrk: (libc)Search Functions.
  2173. * strptime: (libc)Low-Level Time String Parsing.
  2174. * strrchr: (libc)Search Functions.
  2175. * strsep: (libc)Finding Tokens in a String.
  2176. * strsignal: (libc)Signal Messages.
  2177. * strspn: (libc)Search Functions.
  2178. * strstr: (libc)Search Functions.
  2179. * strtod: (libc)Parsing of Floats.
  2180. * strtof: (libc)Parsing of Floats.
  2181. * strtofN: (libc)Parsing of Floats.
  2182. * strtofNx: (libc)Parsing of Floats.
  2183. * strtoimax: (libc)Parsing of Integers.
  2184. * strtok: (libc)Finding Tokens in a String.
  2185. * strtok_r: (libc)Finding Tokens in a String.
  2186. * strtol: (libc)Parsing of Integers.
  2187. * strtold: (libc)Parsing of Floats.
  2188. * strtoll: (libc)Parsing of Integers.
  2189. * strtoq: (libc)Parsing of Integers.
  2190. * strtoul: (libc)Parsing of Integers.
  2191. * strtoull: (libc)Parsing of Integers.
  2192. * strtoumax: (libc)Parsing of Integers.
  2193. * strtouq: (libc)Parsing of Integers.
  2194. * strverscmp: (libc)String/Array Comparison.
  2195. * strxfrm: (libc)Collation Functions.
  2196. * stty: (libc)BSD Terminal Modes.
  2197. * swapcontext: (libc)System V contexts.
  2198. * swprintf: (libc)Formatted Output Functions.
  2199. * swscanf: (libc)Formatted Input Functions.
  2200. * symlink: (libc)Symbolic Links.
  2201. * sync: (libc)Synchronizing I/O.
  2202. * syscall: (libc)System Calls.
  2203. * sysconf: (libc)Sysconf Definition.
  2204. * syslog: (libc)syslog; vsyslog.
  2205. * system: (libc)Running a Command.
  2206. * sysv_signal: (libc)Basic Signal Handling.
  2207. * tan: (libc)Trig Functions.
  2208. * tanf: (libc)Trig Functions.
  2209. * tanfN: (libc)Trig Functions.
  2210. * tanfNx: (libc)Trig Functions.
  2211. * tanh: (libc)Hyperbolic Functions.
  2212. * tanhf: (libc)Hyperbolic Functions.
  2213. * tanhfN: (libc)Hyperbolic Functions.
  2214. * tanhfNx: (libc)Hyperbolic Functions.
  2215. * tanhl: (libc)Hyperbolic Functions.
  2216. * tanl: (libc)Trig Functions.
  2217. * tanpi: (libc)Trig Functions.
  2218. * tanpif: (libc)Trig Functions.
  2219. * tanpifN: (libc)Trig Functions.
  2220. * tanpifNx: (libc)Trig Functions.
  2221. * tanpil: (libc)Trig Functions.
  2222. * tcdrain: (libc)Line Control.
  2223. * tcflow: (libc)Line Control.
  2224. * tcflush: (libc)Line Control.
  2225. * tcgetattr: (libc)Mode Functions.
  2226. * tcgetpgrp: (libc)Terminal Access Functions.
  2227. * tcgetsid: (libc)Terminal Access Functions.
  2228. * tcsendbreak: (libc)Line Control.
  2229. * tcsetattr: (libc)Mode Functions.
  2230. * tcsetpgrp: (libc)Terminal Access Functions.
  2231. * tdelete: (libc)Tree Search Function.
  2232. * tdestroy: (libc)Tree Search Function.
  2233. * telldir: (libc)Random Access Directory.
  2234. * tempnam: (libc)Temporary Files.
  2235. * textdomain: (libc)Locating gettext catalog.
  2236. * tfind: (libc)Tree Search Function.
  2237. * tgamma: (libc)Special Functions.
  2238. * tgammaf: (libc)Special Functions.
  2239. * tgammafN: (libc)Special Functions.
  2240. * tgammafNx: (libc)Special Functions.
  2241. * tgammal: (libc)Special Functions.
  2242. * tgkill: (libc)Signaling Another Process.
  2243. * thrd_create: (libc)ISO C Thread Management.
  2244. * thrd_current: (libc)ISO C Thread Management.
  2245. * thrd_detach: (libc)ISO C Thread Management.
  2246. * thrd_equal: (libc)ISO C Thread Management.
  2247. * thrd_exit: (libc)ISO C Thread Management.
  2248. * thrd_join: (libc)ISO C Thread Management.
  2249. * thrd_sleep: (libc)ISO C Thread Management.
  2250. * thrd_yield: (libc)ISO C Thread Management.
  2251. * time: (libc)Getting the Time.
  2252. * timegm: (libc)Broken-down Time.
  2253. * timelocal: (libc)Broken-down Time.
  2254. * times: (libc)Processor Time.
  2255. * timespec_get: (libc)Getting the Time.
  2256. * timespec_getres: (libc)Getting the Time.
  2257. * tmpfile64: (libc)Temporary Files.
  2258. * tmpfile: (libc)Temporary Files.
  2259. * tmpnam: (libc)Temporary Files.
  2260. * tmpnam_r: (libc)Temporary Files.
  2261. * toascii: (libc)Case Conversion.
  2262. * tolower: (libc)Case Conversion.
  2263. * totalorder: (libc)FP Comparison Functions.
  2264. * totalorderf: (libc)FP Comparison Functions.
  2265. * totalorderfN: (libc)FP Comparison Functions.
  2266. * totalorderfNx: (libc)FP Comparison Functions.
  2267. * totalorderl: (libc)FP Comparison Functions.
  2268. * totalordermag: (libc)FP Comparison Functions.
  2269. * totalordermagf: (libc)FP Comparison Functions.
  2270. * totalordermagfN: (libc)FP Comparison Functions.
  2271. * totalordermagfNx: (libc)FP Comparison Functions.
  2272. * totalordermagl: (libc)FP Comparison Functions.
  2273. * toupper: (libc)Case Conversion.
  2274. * towctrans: (libc)Wide Character Case Conversion.
  2275. * towlower: (libc)Wide Character Case Conversion.
  2276. * towupper: (libc)Wide Character Case Conversion.
  2277. * trunc: (libc)Rounding Functions.
  2278. * truncate64: (libc)File Size.
  2279. * truncate: (libc)File Size.
  2280. * truncf: (libc)Rounding Functions.
  2281. * truncfN: (libc)Rounding Functions.
  2282. * truncfNx: (libc)Rounding Functions.
  2283. * truncl: (libc)Rounding Functions.
  2284. * tsearch: (libc)Tree Search Function.
  2285. * tss_create: (libc)ISO C Thread-local Storage.
  2286. * tss_delete: (libc)ISO C Thread-local Storage.
  2287. * tss_get: (libc)ISO C Thread-local Storage.
  2288. * tss_set: (libc)ISO C Thread-local Storage.
  2289. * ttyname: (libc)Is It a Terminal.
  2290. * ttyname_r: (libc)Is It a Terminal.
  2291. * twalk: (libc)Tree Search Function.
  2292. * twalk_r: (libc)Tree Search Function.
  2293. * tzset: (libc)Time Zone State.
  2294. * uabs: (libc)Absolute Value.
  2295. * ufromfp: (libc)Rounding Functions.
  2296. * ufromfpf: (libc)Rounding Functions.
  2297. * ufromfpfN: (libc)Rounding Functions.
  2298. * ufromfpfNx: (libc)Rounding Functions.
  2299. * ufromfpl: (libc)Rounding Functions.
  2300. * ufromfpx: (libc)Rounding Functions.
  2301. * ufromfpxf: (libc)Rounding Functions.
  2302. * ufromfpxfN: (libc)Rounding Functions.
  2303. * ufromfpxfNx: (libc)Rounding Functions.
  2304. * ufromfpxl: (libc)Rounding Functions.
  2305. * ulabs: (libc)Absolute Value.
  2306. * ulimit: (libc)Limits on Resources.
  2307. * ullabs: (libc)Absolute Value.
  2308. * umask: (libc)Setting Permissions.
  2309. * umaxabs: (libc)Absolute Value.
  2310. * umount2: (libc)Mount-Unmount-Remount.
  2311. * umount: (libc)Mount-Unmount-Remount.
  2312. * uname: (libc)Platform Type.
  2313. * ungetc: (libc)How Unread.
  2314. * ungetwc: (libc)How Unread.
  2315. * unlink: (libc)Deleting Files.
  2316. * unlinkat: (libc)Deleting Files.
  2317. * unlockpt: (libc)Allocation.
  2318. * unsetenv: (libc)Environment Access.
  2319. * updwtmp: (libc)Manipulating the Database.
  2320. * utime: (libc)File Times.
  2321. * utimensat: (libc)File Times.
  2322. * utimes: (libc)File Times.
  2323. * utmpname: (libc)Manipulating the Database.
  2324. * utmpxname: (libc)XPG Functions.
  2325. * va_arg: (libc)Argument Macros.
  2326. * va_copy: (libc)Argument Macros.
  2327. * va_end: (libc)Argument Macros.
  2328. * va_start: (libc)Argument Macros.
  2329. * valloc: (libc)Aligned Memory Blocks.
  2330. * vasprintf: (libc)Variable Arguments Output.
  2331. * vdprintf: (libc)Variable Arguments Output.
  2332. * verr: (libc)Error Messages.
  2333. * verrx: (libc)Error Messages.
  2334. * versionsort64: (libc)Scanning Directory Content.
  2335. * versionsort: (libc)Scanning Directory Content.
  2336. * vfork: (libc)Creating a Process.
  2337. * vfprintf: (libc)Variable Arguments Output.
  2338. * vfscanf: (libc)Variable Arguments Input.
  2339. * vfwprintf: (libc)Variable Arguments Output.
  2340. * vfwscanf: (libc)Variable Arguments Input.
  2341. * vlimit: (libc)Limits on Resources.
  2342. * vprintf: (libc)Variable Arguments Output.
  2343. * vscanf: (libc)Variable Arguments Input.
  2344. * vsnprintf: (libc)Variable Arguments Output.
  2345. * vsprintf: (libc)Variable Arguments Output.
  2346. * vsscanf: (libc)Variable Arguments Input.
  2347. * vswprintf: (libc)Variable Arguments Output.
  2348. * vswscanf: (libc)Variable Arguments Input.
  2349. * vsyslog: (libc)syslog; vsyslog.
  2350. * vwarn: (libc)Error Messages.
  2351. * vwarnx: (libc)Error Messages.
  2352. * vwprintf: (libc)Variable Arguments Output.
  2353. * vwscanf: (libc)Variable Arguments Input.
  2354. * wait3: (libc)BSD Wait Functions.
  2355. * wait4: (libc)Process Completion.
  2356. * wait: (libc)Process Completion.
  2357. * waitpid: (libc)Process Completion.
  2358. * warn: (libc)Error Messages.
  2359. * warnx: (libc)Error Messages.
  2360. * wcpcpy: (libc)Copying Strings and Arrays.
  2361. * wcpncpy: (libc)Truncating Strings.
  2362. * wcrtomb: (libc)Converting a Character.
  2363. * wcscasecmp: (libc)String/Array Comparison.
  2364. * wcscat: (libc)Concatenating Strings.
  2365. * wcschr: (libc)Search Functions.
  2366. * wcschrnul: (libc)Search Functions.
  2367. * wcscmp: (libc)String/Array Comparison.
  2368. * wcscoll: (libc)Collation Functions.
  2369. * wcscpy: (libc)Copying Strings and Arrays.
  2370. * wcscspn: (libc)Search Functions.
  2371. * wcsdup: (libc)Copying Strings and Arrays.
  2372. * wcsftime: (libc)Formatting Calendar Time.
  2373. * wcslcat: (libc)Truncating Strings.
  2374. * wcslcpy: (libc)Truncating Strings.
  2375. * wcslen: (libc)String Length.
  2376. * wcsncasecmp: (libc)String/Array Comparison.
  2377. * wcsncat: (libc)Truncating Strings.
  2378. * wcsncmp: (libc)String/Array Comparison.
  2379. * wcsncpy: (libc)Truncating Strings.
  2380. * wcsnlen: (libc)String Length.
  2381. * wcsnrtombs: (libc)Converting Strings.
  2382. * wcspbrk: (libc)Search Functions.
  2383. * wcsrchr: (libc)Search Functions.
  2384. * wcsrtombs: (libc)Converting Strings.
  2385. * wcsspn: (libc)Search Functions.
  2386. * wcsstr: (libc)Search Functions.
  2387. * wcstod: (libc)Parsing of Floats.
  2388. * wcstof: (libc)Parsing of Floats.
  2389. * wcstofN: (libc)Parsing of Floats.
  2390. * wcstofNx: (libc)Parsing of Floats.
  2391. * wcstoimax: (libc)Parsing of Integers.
  2392. * wcstok: (libc)Finding Tokens in a String.
  2393. * wcstol: (libc)Parsing of Integers.
  2394. * wcstold: (libc)Parsing of Floats.
  2395. * wcstoll: (libc)Parsing of Integers.
  2396. * wcstombs: (libc)Non-reentrant String Conversion.
  2397. * wcstoq: (libc)Parsing of Integers.
  2398. * wcstoul: (libc)Parsing of Integers.
  2399. * wcstoull: (libc)Parsing of Integers.
  2400. * wcstoumax: (libc)Parsing of Integers.
  2401. * wcstouq: (libc)Parsing of Integers.
  2402. * wcswcs: (libc)Search Functions.
  2403. * wcsxfrm: (libc)Collation Functions.
  2404. * wctob: (libc)Converting a Character.
  2405. * wctomb: (libc)Non-reentrant Character Conversion.
  2406. * wctrans: (libc)Wide Character Case Conversion.
  2407. * wctype: (libc)Classification of Wide Characters.
  2408. * wmemchr: (libc)Search Functions.
  2409. * wmemcmp: (libc)String/Array Comparison.
  2410. * wmemcpy: (libc)Copying Strings and Arrays.
  2411. * wmemmove: (libc)Copying Strings and Arrays.
  2412. * wmempcpy: (libc)Copying Strings and Arrays.
  2413. * wmemset: (libc)Copying Strings and Arrays.
  2414. * wordexp: (libc)Calling Wordexp.
  2415. * wordfree: (libc)Calling Wordexp.
  2416. * wprintf: (libc)Formatted Output Functions.
  2417. * write: (libc)I/O Primitives.
  2418. * writev: (libc)Scatter-Gather.
  2419. * wscanf: (libc)Formatted Input Functions.
  2420. * y0: (libc)Special Functions.
  2421. * y0f: (libc)Special Functions.
  2422. * y0fN: (libc)Special Functions.
  2423. * y0fNx: (libc)Special Functions.
  2424. * y0l: (libc)Special Functions.
  2425. * y1: (libc)Special Functions.
  2426. * y1f: (libc)Special Functions.
  2427. * y1fN: (libc)Special Functions.
  2428. * y1fNx: (libc)Special Functions.
  2429. * y1l: (libc)Special Functions.
  2430. * yn: (libc)Special Functions.
  2431. * ynf: (libc)Special Functions.
  2432. * ynfN: (libc)Special Functions.
  2433. * ynfNx: (libc)Special Functions.
  2434. * ynl: (libc)Special Functions.
  2435. END-INFO-DIR-ENTRY
  2436. 
  2437. File: libc.info, Node: Dynamic String Input, Next: Other Input Conversions, Prev: String Input Conversions, Up: Formatted Input
  2438. 12.14.6 Dynamically Allocating String Conversions
  2439. -------------------------------------------------
  2440. A GNU extension to formatted input lets you safely read a string with no
  2441. maximum size. Using this feature, you don't supply a buffer; instead,
  2442. ‘scanf’ allocates a buffer big enough to hold the data and gives you its
  2443. address. To use this feature, write ‘a’ as a flag character, as in
  2444. ‘%as’ or ‘%a[0-9a-z]’.
  2445. The pointer argument you supply for where to store the input should
  2446. have type ‘char **’. The ‘scanf’ function allocates a buffer and stores
  2447. its address in the word that the argument points to. You should free
  2448. the buffer with ‘free’ when you no longer need it.
  2449. Here is an example of using the ‘a’ flag with the ‘%[...]’ conversion
  2450. specification to read a "variable assignment" of the form ‘VARIABLE =
  2451. VALUE’.
  2452. {
  2453. char *variable, *value;
  2454. if (2 > scanf ("%a[a-zA-Z0-9] = %a[^\n]\n",
  2455. &variable, &value))
  2456. {
  2457. invalid_input_error ();
  2458. return 0;
  2459. }
  2460. ...
  2461. }
  2462. 
  2463. File: libc.info, Node: Other Input Conversions, Next: Formatted Input Functions, Prev: Dynamic String Input, Up: Formatted Input
  2464. 12.14.7 Other Input Conversions
  2465. -------------------------------
  2466. This section describes the miscellaneous input conversions.
  2467. The ‘%p’ conversion is used to read a pointer value. It recognizes
  2468. the same syntax used by the ‘%p’ output conversion for ‘printf’ (*note
  2469. Other Output Conversions::); that is, a hexadecimal number just as the
  2470. ‘%x’ conversion accepts. The corresponding argument should be of type
  2471. ‘void **’; that is, the address of a place to store a pointer.
  2472. The resulting pointer value is not guaranteed to be valid if it was
  2473. not originally written during the same program execution that reads it
  2474. in.
  2475. The ‘%n’ conversion produces the number of characters read so far by
  2476. this call. The corresponding argument should be of type ‘int *’, unless
  2477. a type modifier is in effect (*note Numeric Input Conversions::). This
  2478. conversion works in the same way as the ‘%n’ conversion for ‘printf’;
  2479. see *note Other Output Conversions::, for an example.
  2480. The ‘%n’ conversion is the only mechanism for determining the success
  2481. of literal matches or conversions with suppressed assignments. If the
  2482. ‘%n’ follows the locus of a matching failure, then no value is stored
  2483. for it since ‘scanf’ returns before processing the ‘%n’. If you store
  2484. ‘-1’ in that argument slot before calling ‘scanf’, the presence of ‘-1’
  2485. after ‘scanf’ indicates an error occurred before the ‘%n’ was reached.
  2486. Finally, the ‘%%’ conversion matches a literal ‘%’ character in the
  2487. input stream, without using an argument. This conversion does not
  2488. permit any flags, field width, or type modifier to be specified.
  2489. 
  2490. File: libc.info, Node: Formatted Input Functions, Next: Variable Arguments Input, Prev: Other Input Conversions, Up: Formatted Input
  2491. 12.14.8 Formatted Input Functions
  2492. ---------------------------------
  2493. Here are the descriptions of the functions for performing formatted
  2494. input. Prototypes for these functions are in the header file ‘stdio.h’.
  2495. -- Function: int scanf (const char *TEMPLATE, ...)
  2496. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  2497. mem lock corrupt | *Note POSIX Safety Concepts::.
  2498. The ‘scanf’ function reads formatted input from the stream ‘stdin’
  2499. under the control of the template string TEMPLATE. The optional
  2500. arguments are pointers to the places which receive the resulting
  2501. values.
  2502. The return value is normally the number of successful assignments.
  2503. If an end-of-file condition is detected before any matches are
  2504. performed, including matches against whitespace and literal
  2505. characters in the template, then ‘EOF’ is returned.
  2506. -- Function: int wscanf (const wchar_t *TEMPLATE, ...)
  2507. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  2508. mem lock corrupt | *Note POSIX Safety Concepts::.
  2509. The ‘wscanf’ function reads formatted input from the stream ‘stdin’
  2510. under the control of the template string TEMPLATE. The optional
  2511. arguments are pointers to the places which receive the resulting
  2512. values.
  2513. The return value is normally the number of successful assignments.
  2514. If an end-of-file condition is detected before any matches are
  2515. performed, including matches against whitespace and literal
  2516. characters in the template, then ‘WEOF’ is returned.
  2517. -- Function: int fscanf (FILE *STREAM, const char *TEMPLATE, ...)
  2518. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  2519. mem lock corrupt | *Note POSIX Safety Concepts::.
  2520. This function is just like ‘scanf’, except that the input is read
  2521. from the stream STREAM instead of ‘stdin’.
  2522. -- Function: int fwscanf (FILE *STREAM, const wchar_t *TEMPLATE, ...)
  2523. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  2524. mem lock corrupt | *Note POSIX Safety Concepts::.
  2525. This function is just like ‘wscanf’, except that the input is read
  2526. from the stream STREAM instead of ‘stdin’.
  2527. -- Function: int sscanf (const char *S, const char *TEMPLATE, ...)
  2528. Preliminary: | MT-Safe locale | AS-Unsafe heap | AC-Unsafe mem |
  2529. *Note POSIX Safety Concepts::.
  2530. This is like ‘scanf’, except that the characters are taken from the
  2531. null-terminated string S instead of from a stream. Reaching the
  2532. end of the string is treated as an end-of-file condition.
  2533. The behavior of this function is undefined if copying takes place
  2534. between objects that overlap--for example, if S is also given as an
  2535. argument to receive a string read under control of the ‘%s’, ‘%S’,
  2536. or ‘%[’ conversion.
  2537. -- Function: int swscanf (const wchar_t *WS, const wchar_t *TEMPLATE,
  2538. ...)
  2539. Preliminary: | MT-Safe locale | AS-Unsafe heap | AC-Unsafe mem |
  2540. *Note POSIX Safety Concepts::.
  2541. This is like ‘wscanf’, except that the characters are taken from
  2542. the null-terminated string WS instead of from a stream. Reaching
  2543. the end of the string is treated as an end-of-file condition.
  2544. The behavior of this function is undefined if copying takes place
  2545. between objects that overlap--for example, if WS is also given as
  2546. an argument to receive a string read under control of the ‘%s’,
  2547. ‘%S’, or ‘%[’ conversion.
  2548. 
  2549. File: libc.info, Node: Variable Arguments Input, Prev: Formatted Input Functions, Up: Formatted Input
  2550. 12.14.9 Variable Arguments Input Functions
  2551. ------------------------------------------
  2552. The functions ‘vscanf’ and friends are provided so that you can define
  2553. your own variadic ‘scanf’-like functions that make use of the same
  2554. internals as the built-in formatted output functions. These functions
  2555. are analogous to the ‘vprintf’ series of output functions. *Note
  2556. Variable Arguments Output::, for important information on how to use
  2557. them.
  2558. *Portability Note:* The functions listed in this section were
  2559. introduced in ISO C99 and were before available as GNU extensions.
  2560. -- Function: int vscanf (const char *TEMPLATE, va_list AP)
  2561. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  2562. mem lock corrupt | *Note POSIX Safety Concepts::.
  2563. This function is similar to ‘scanf’, but instead of taking a
  2564. variable number of arguments directly, it takes an argument list
  2565. pointer AP of type ‘va_list’ (*note Variadic Functions::).
  2566. -- Function: int vwscanf (const wchar_t *TEMPLATE, va_list AP)
  2567. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  2568. mem lock corrupt | *Note POSIX Safety Concepts::.
  2569. This function is similar to ‘wscanf’, but instead of taking a
  2570. variable number of arguments directly, it takes an argument list
  2571. pointer AP of type ‘va_list’ (*note Variadic Functions::).
  2572. -- Function: int vfscanf (FILE *STREAM, const char *TEMPLATE, va_list
  2573. AP)
  2574. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  2575. mem lock corrupt | *Note POSIX Safety Concepts::.
  2576. This is the equivalent of ‘fscanf’ with the variable argument list
  2577. specified directly as for ‘vscanf’.
  2578. -- Function: int vfwscanf (FILE *STREAM, const wchar_t *TEMPLATE,
  2579. va_list AP)
  2580. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  2581. mem lock corrupt | *Note POSIX Safety Concepts::.
  2582. This is the equivalent of ‘fwscanf’ with the variable argument list
  2583. specified directly as for ‘vwscanf’.
  2584. -- Function: int vsscanf (const char *S, const char *TEMPLATE, va_list
  2585. AP)
  2586. Preliminary: | MT-Safe locale | AS-Unsafe heap | AC-Unsafe mem |
  2587. *Note POSIX Safety Concepts::.
  2588. This is the equivalent of ‘sscanf’ with the variable argument list
  2589. specified directly as for ‘vscanf’.
  2590. -- Function: int vswscanf (const wchar_t *S, const wchar_t *TEMPLATE,
  2591. va_list AP)
  2592. Preliminary: | MT-Safe locale | AS-Unsafe heap | AC-Unsafe mem |
  2593. *Note POSIX Safety Concepts::.
  2594. This is the equivalent of ‘swscanf’ with the variable argument list
  2595. specified directly as for ‘vwscanf’.
  2596. In GNU C, there is a special construct you can use to let the
  2597. compiler know that a function uses a ‘scanf’-style format string. Then
  2598. it can check the number and types of arguments in each call to the
  2599. function, and warn you when they do not match the format string. For
  2600. details, see *note Declaring Attributes of Functions: (gcc)Function
  2601. Attributes.
  2602. 
  2603. File: libc.info, Node: EOF and Errors, Next: Error Recovery, Prev: Formatted Input, Up: I/O on Streams
  2604. 12.15 End-Of-File and Errors
  2605. ============================
  2606. Many of the functions described in this chapter return the value of the
  2607. macro ‘EOF’ to indicate unsuccessful completion of the operation. Since
  2608. ‘EOF’ is used to report both end of file and random errors, it's often
  2609. better to use the ‘feof’ function to check explicitly for end of file
  2610. and ‘ferror’ to check for errors. These functions check indicators that
  2611. are part of the internal state of the stream object, indicators set if
  2612. the appropriate condition was detected by a previous I/O operation on
  2613. that stream.
  2614. The end of file and error conditions are mutually exclusive. For a
  2615. narrow oriented stream, end of file is not considered an error. For
  2616. wide oriented streams, reaching the end of the underlying file can
  2617. result an error if the underlying file ends with an incomplete multibyte
  2618. sequence. This is reported as an error by ‘ferror’, and not as an end
  2619. of file by ‘feof’. End of file on wide oriented streams that does not
  2620. fall into the middle of a multibyte sequence is reported via ‘feof’.
  2621. -- Macro: int EOF
  2622. This macro is an integer value that is returned by a number of
  2623. narrow stream functions to indicate an end-of-file condition, or
  2624. some other error situation. With the GNU C Library, ‘EOF’ is ‘-1’.
  2625. In other libraries, its value may be some other negative number.
  2626. This symbol is declared in ‘stdio.h’.
  2627. -- Macro: int WEOF
  2628. This macro is an integer value that is returned by a number of wide
  2629. stream functions to indicate an end-of-file condition, or some
  2630. other error situation. With the GNU C Library, ‘WEOF’ is ‘-1’. In
  2631. other libraries, its value may be some other negative number.
  2632. This symbol is declared in ‘wchar.h’.
  2633. -- Function: int feof (FILE *STREAM)
  2634. Preliminary: | MT-Safe | AS-Safe | AC-Unsafe lock | *Note POSIX
  2635. Safety Concepts::.
  2636. The ‘feof’ function returns nonzero if and only if the end-of-file
  2637. indicator for the stream STREAM is set.
  2638. This symbol is declared in ‘stdio.h’.
  2639. -- Function: int feof_unlocked (FILE *STREAM)
  2640. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2641. Concepts::.
  2642. The ‘feof_unlocked’ function is equivalent to the ‘feof’ function
  2643. except that it does not implicitly lock the stream.
  2644. This function is a GNU extension.
  2645. This symbol is declared in ‘stdio.h’.
  2646. -- Function: int ferror (FILE *STREAM)
  2647. Preliminary: | MT-Safe | AS-Safe | AC-Unsafe lock | *Note POSIX
  2648. Safety Concepts::.
  2649. The ‘ferror’ function returns nonzero if and only if the error
  2650. indicator for the stream STREAM is set, indicating that an error
  2651. has occurred on a previous operation on the stream.
  2652. This symbol is declared in ‘stdio.h’.
  2653. -- Function: int ferror_unlocked (FILE *STREAM)
  2654. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2655. Concepts::.
  2656. The ‘ferror_unlocked’ function is equivalent to the ‘ferror’
  2657. function except that it does not implicitly lock the stream.
  2658. This function is a GNU extension.
  2659. This symbol is declared in ‘stdio.h’.
  2660. In addition to setting the error indicator associated with the
  2661. stream, the functions that operate on streams also set ‘errno’ in the
  2662. same way as the corresponding low-level functions that operate on file
  2663. descriptors. For example, all of the functions that perform output to a
  2664. stream--such as ‘fputc’, ‘printf’, and ‘fflush’--are implemented in
  2665. terms of ‘write’, and all of the ‘errno’ error conditions defined for
  2666. ‘write’ are meaningful for these functions. For more information about
  2667. the descriptor-level I/O functions, see *note Low-Level I/O::.
  2668. 
  2669. File: libc.info, Node: Error Recovery, Next: Binary Streams, Prev: EOF and Errors, Up: I/O on Streams
  2670. 12.16 Recovering from errors
  2671. ============================
  2672. You may explicitly clear the error and EOF flags with the ‘clearerr’
  2673. function.
  2674. -- Function: void clearerr (FILE *STREAM)
  2675. Preliminary: | MT-Safe | AS-Safe | AC-Unsafe lock | *Note POSIX
  2676. Safety Concepts::.
  2677. This function clears the end-of-file and error indicators for the
  2678. stream STREAM.
  2679. The file positioning functions (*note File Positioning::) also
  2680. clear the end-of-file indicator for the stream.
  2681. -- Function: void clearerr_unlocked (FILE *STREAM)
  2682. Preliminary: | MT-Safe race:stream | AS-Safe | AC-Safe | *Note
  2683. POSIX Safety Concepts::.
  2684. The ‘clearerr_unlocked’ function is equivalent to the ‘clearerr’
  2685. function except that it does not implicitly lock the stream.
  2686. This function is a GNU extension.
  2687. Note that it is _not_ correct to just clear the error flag and retry
  2688. a failed stream operation. After a failed write, any number of
  2689. characters since the last buffer flush may have been committed to the
  2690. file, while some buffered data may have been discarded. Merely retrying
  2691. can thus cause lost or repeated data.
  2692. A failed read may leave the file pointer in an inappropriate position
  2693. for a second try. In both cases, you should seek to a known position
  2694. before retrying.
  2695. Most errors that can happen are not recoverable -- a second try will
  2696. always fail again in the same way. So usually it is best to give up and
  2697. report the error to the user, rather than install complicated recovery
  2698. logic.
  2699. One important exception is ‘EINTR’ (*note Interrupted Primitives::).
  2700. Many stream I/O implementations will treat it as an ordinary error,
  2701. which can be quite inconvenient. You can avoid this hassle by
  2702. installing all signals with the ‘SA_RESTART’ flag.
  2703. For similar reasons, setting nonblocking I/O on a stream's file
  2704. descriptor is not usually advisable.
  2705. 
  2706. File: libc.info, Node: Binary Streams, Next: File Positioning, Prev: Error Recovery, Up: I/O on Streams
  2707. 12.17 Text and Binary Streams
  2708. =============================
  2709. GNU systems and other POSIX-compatible operating systems organize all
  2710. files as uniform sequences of characters. However, some other systems
  2711. make a distinction between files containing text and files containing
  2712. binary data, and the input and output facilities of ISO C provide for
  2713. this distinction. This section tells you how to write programs portable
  2714. to such systems.
  2715. When you open a stream, you can specify either a “text stream” or a
  2716. “binary stream”. You indicate that you want a binary stream by
  2717. specifying the ‘b’ modifier in the OPENTYPE argument to ‘fopen’; see
  2718. *note Opening Streams::. Without this option, ‘fopen’ opens the file as
  2719. a text stream.
  2720. Text and binary streams differ in several ways:
  2721. • The data read from a text stream is divided into “lines” which are
  2722. terminated by newline (‘'\n'’) characters, while a binary stream is
  2723. simply a long series of characters. A text stream might on some
  2724. systems fail to handle lines more than 254 characters long
  2725. (including the terminating newline character).
  2726. • If the system does not use POSIX-style in-band signalling to
  2727. indicate line termination, it can be impossibe to write anything to
  2728. a text stream without adding a line terminator. As a result,
  2729. flushing a text stream (by calling ‘fflush’, for example) may
  2730. produce a logical line terminator even if no ‘'\n'’ character was
  2731. written by the program.
  2732. • Text files may contain lines that embed ‘'\n'’ characters that are
  2733. not treated as line terminators by the system. C programs cannot
  2734. read such text files reliably using the ‘stdio.h’ facilities.
  2735. • On some systems, text files can contain only printing characters,
  2736. horizontal tab characters, and newlines, and so text streams may
  2737. not support other characters. However, binary streams can handle
  2738. any character value.
  2739. • Space characters that are written immediately preceding a newline
  2740. character in a text stream may disappear when the file is read in
  2741. again.
  2742. • More generally, there need not be a one-to-one mapping between
  2743. characters that are read from or written to a text stream, and the
  2744. characters in the actual file.
  2745. Since a binary stream is always more capable and more predictable
  2746. than a text stream, you might wonder what purpose text streams serve.
  2747. Why not simply always use binary streams? The answer is that on these
  2748. operating systems, text and binary streams use different file formats,
  2749. and the only way to read or write "an ordinary file of text" that can
  2750. work with other text-oriented programs is through a text stream.
  2751. In the GNU C Library, and on all POSIX systems, there is no
  2752. difference between text streams and binary streams. When you open a
  2753. stream, you get the same kind of stream regardless of whether you ask
  2754. for binary. This stream can handle any file content, and has none of
  2755. the restrictions that text streams sometimes have.
  2756. 
  2757. File: libc.info, Node: File Positioning, Next: Portable Positioning, Prev: Binary Streams, Up: I/O on Streams
  2758. 12.18 File Positioning
  2759. ======================
  2760. The “file position” of a stream describes where in the file the stream
  2761. is currently reading or writing. I/O on the stream advances the file
  2762. position through the file. On GNU systems, the file position is
  2763. represented as an integer, which counts the number of bytes from the
  2764. beginning of the file. *Note File Position::.
  2765. During I/O to an ordinary disk file, you can change the file position
  2766. whenever you wish, so as to read or write any portion of the file. Some
  2767. other kinds of files may also permit this. Files which support changing
  2768. the file position are sometimes referred to as “random-access” files.
  2769. You can use the functions in this section to examine or modify the
  2770. file position indicator associated with a stream. The symbols listed
  2771. below are declared in the header file ‘stdio.h’.
  2772. -- Function: long int ftell (FILE *STREAM)
  2773. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2774. | *Note POSIX Safety Concepts::.
  2775. This function returns the current file position of the stream
  2776. STREAM.
  2777. This function can fail if the stream doesn't support file
  2778. positioning, or if the file position can't be represented in a
  2779. ‘long int’, and possibly for other reasons as well. If a failure
  2780. occurs, a value of ‘-1’ is returned.
  2781. -- Function: off_t ftello (FILE *STREAM)
  2782. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2783. | *Note POSIX Safety Concepts::.
  2784. The ‘ftello’ function is similar to ‘ftell’, except that it returns
  2785. a value of type ‘off_t’. Systems which support this type use it to
  2786. describe all file positions, unlike the POSIX specification which
  2787. uses a long int. The two are not necessarily the same size.
  2788. Therefore, using ftell can lead to problems if the implementation
  2789. is written on top of a POSIX compliant low-level I/O
  2790. implementation, and using ‘ftello’ is preferable whenever it is
  2791. available.
  2792. If this function fails it returns ‘(off_t) -1’. This can happen
  2793. due to missing support for file positioning or internal errors.
  2794. Otherwise the return value is the current file position.
  2795. The function is an extension defined in the Unix Single
  2796. Specification version 2.
  2797. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ on a
  2798. 32 bit system this function is in fact ‘ftello64’. I.e., the LFS
  2799. interface transparently replaces the old interface.
  2800. -- Function: off64_t ftello64 (FILE *STREAM)
  2801. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2802. | *Note POSIX Safety Concepts::.
  2803. This function is similar to ‘ftello’ with the only difference that
  2804. the return value is of type ‘off64_t’. This also requires that the
  2805. stream STREAM was opened using either ‘fopen64’, ‘freopen64’, or
  2806. ‘tmpfile64’ since otherwise the underlying file operations to
  2807. position the file pointer beyond the 2^31 bytes limit might fail.
  2808. If the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ on a 32
  2809. bits machine this function is available under the name ‘ftello’ and
  2810. so transparently replaces the old interface.
  2811. -- Function: int fseek (FILE *STREAM, long int OFFSET, int WHENCE)
  2812. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2813. | *Note POSIX Safety Concepts::.
  2814. The ‘fseek’ function is used to change the file position of the
  2815. stream STREAM. The value of WHENCE must be one of the constants
  2816. ‘SEEK_SET’, ‘SEEK_CUR’, or ‘SEEK_END’, to indicate whether the
  2817. OFFSET is relative to the beginning of the file, the current file
  2818. position, or the end of the file, respectively.
  2819. This function returns a value of zero if the operation was
  2820. successful, and a nonzero value to indicate failure. A successful
  2821. call also clears the end-of-file indicator of STREAM and discards
  2822. any characters that were "pushed back" by the use of ‘ungetc’.
  2823. ‘fseek’ either flushes any buffered output before setting the file
  2824. position or else remembers it so it will be written later in its
  2825. proper place in the file.
  2826. -- Function: int fseeko (FILE *STREAM, off_t OFFSET, int WHENCE)
  2827. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2828. | *Note POSIX Safety Concepts::.
  2829. This function is similar to ‘fseek’ but it corrects a problem with
  2830. ‘fseek’ in a system with POSIX types. Using a value of type ‘long
  2831. int’ for the offset is not compatible with POSIX. ‘fseeko’ uses the
  2832. correct type ‘off_t’ for the OFFSET parameter.
  2833. For this reason it is a good idea to prefer ‘ftello’ whenever it is
  2834. available since its functionality is (if different at all) closer
  2835. the underlying definition.
  2836. The functionality and return value are the same as for ‘fseek’.
  2837. The function is an extension defined in the Unix Single
  2838. Specification version 2.
  2839. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ on a
  2840. 32 bit system this function is in fact ‘fseeko64’. I.e., the LFS
  2841. interface transparently replaces the old interface.
  2842. -- Function: int fseeko64 (FILE *STREAM, off64_t OFFSET, int WHENCE)
  2843. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2844. | *Note POSIX Safety Concepts::.
  2845. This function is similar to ‘fseeko’ with the only difference that
  2846. the OFFSET parameter is of type ‘off64_t’. This also requires that
  2847. the stream STREAM was opened using either ‘fopen64’, ‘freopen64’,
  2848. or ‘tmpfile64’ since otherwise the underlying file operations to
  2849. position the file pointer beyond the 2^31 bytes limit might fail.
  2850. If the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ on a 32
  2851. bits machine this function is available under the name ‘fseeko’ and
  2852. so transparently replaces the old interface.
  2853. *Portability Note:* In non-POSIX systems, ‘ftell’, ‘ftello’, ‘fseek’
  2854. and ‘fseeko’ might work reliably only on binary streams. *Note Binary
  2855. Streams::.
  2856. The following symbolic constants are defined for use as the WHENCE
  2857. argument to ‘fseek’. They are also used with the ‘lseek’ function
  2858. (*note I/O Primitives::) and to specify offsets for file locks (*note
  2859. Control Operations::).
  2860. -- Macro: int SEEK_SET
  2861. This is an integer constant which, when used as the WHENCE argument
  2862. to the ‘fseek’ or ‘fseeko’ functions, specifies that the offset
  2863. provided is relative to the beginning of the file.
  2864. -- Macro: int SEEK_CUR
  2865. This is an integer constant which, when used as the WHENCE argument
  2866. to the ‘fseek’ or ‘fseeko’ functions, specifies that the offset
  2867. provided is relative to the current file position.
  2868. -- Macro: int SEEK_END
  2869. This is an integer constant which, when used as the WHENCE argument
  2870. to the ‘fseek’ or ‘fseeko’ functions, specifies that the offset
  2871. provided is relative to the end of the file.
  2872. -- Function: void rewind (FILE *STREAM)
  2873. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2874. | *Note POSIX Safety Concepts::.
  2875. The ‘rewind’ function positions the stream STREAM at the beginning
  2876. of the file. It is equivalent to calling ‘fseek’ or ‘fseeko’ on
  2877. the STREAM with an OFFSET argument of ‘0L’ and a WHENCE argument of
  2878. ‘SEEK_SET’, except that the return value is discarded and the error
  2879. indicator for the stream is reset.
  2880. These three aliases for the ‘SEEK_...’ constants exist for the sake
  2881. of compatibility with older BSD systems. They are defined in two
  2882. different header files: ‘fcntl.h’ and ‘sys/file.h’.
  2883. ‘L_SET’
  2884. An alias for ‘SEEK_SET’.
  2885. ‘L_INCR’
  2886. An alias for ‘SEEK_CUR’.
  2887. ‘L_XTND’
  2888. An alias for ‘SEEK_END’.
  2889. 
  2890. File: libc.info, Node: Portable Positioning, Next: Stream Buffering, Prev: File Positioning, Up: I/O on Streams
  2891. 12.19 Portable File-Position Functions
  2892. ======================================
  2893. On GNU systems, the file position is truly a character count. You can
  2894. specify any character count value as an argument to ‘fseek’ or ‘fseeko’
  2895. and get reliable results for any random access file. However, some
  2896. ISO C systems do not represent file positions in this way.
  2897. On some systems where text streams truly differ from binary streams,
  2898. it is impossible to represent the file position of a text stream as a
  2899. count of characters from the beginning of the file. For example, the
  2900. file position on some systems must encode both a record offset within
  2901. the file, and a character offset within the record.
  2902. As a consequence, if you want your programs to be portable to these
  2903. systems, you must observe certain rules:
  2904. • The value returned from ‘ftell’ on a text stream has no predictable
  2905. relationship to the number of characters you have read so far. The
  2906. only thing you can rely on is that you can use it subsequently as
  2907. the OFFSET argument to ‘fseek’ or ‘fseeko’ to move back to the same
  2908. file position.
  2909. • In a call to ‘fseek’ or ‘fseeko’ on a text stream, either the
  2910. OFFSET must be zero, or WHENCE must be ‘SEEK_SET’ and the OFFSET
  2911. must be the result of an earlier call to ‘ftell’ on the same
  2912. stream.
  2913. • The value of the file position indicator of a text stream is
  2914. undefined while there are characters that have been pushed back
  2915. with ‘ungetc’ that haven't been read or discarded. *Note
  2916. Unreading::.
  2917. But even if you observe these rules, you may still have trouble for
  2918. long files, because ‘ftell’ and ‘fseek’ use a ‘long int’ value to
  2919. represent the file position. This type may not have room to encode all
  2920. the file positions in a large file. Using the ‘ftello’ and ‘fseeko’
  2921. functions might help here since the ‘off_t’ type is expected to be able
  2922. to hold all file position values but this still does not help to handle
  2923. additional information which must be associated with a file position.
  2924. So if you do want to support systems with peculiar encodings for the
  2925. file positions, it is better to use the functions ‘fgetpos’ and
  2926. ‘fsetpos’ instead. These functions represent the file position using
  2927. the data type ‘fpos_t’, whose internal representation varies from system
  2928. to system.
  2929. These symbols are declared in the header file ‘stdio.h’.
  2930. -- Data Type: fpos_t
  2931. This is the type of an object that can encode information about the
  2932. file position of a stream, for use by the functions ‘fgetpos’ and
  2933. ‘fsetpos’.
  2934. In the GNU C Library, ‘fpos_t’ is an opaque data structure that
  2935. contains internal data to represent file offset and conversion
  2936. state information. In other systems, it might have a different
  2937. internal representation.
  2938. When compiling with ‘_FILE_OFFSET_BITS == 64’ on a 32 bit machine
  2939. this type is in fact equivalent to ‘fpos64_t’ since the LFS
  2940. interface transparently replaces the old interface.
  2941. -- Data Type: fpos64_t
  2942. This is the type of an object that can encode information about the
  2943. file position of a stream, for use by the functions ‘fgetpos64’ and
  2944. ‘fsetpos64’.
  2945. In the GNU C Library, ‘fpos64_t’ is an opaque data structure that
  2946. contains internal data to represent file offset and conversion
  2947. state information. In other systems, it might have a different
  2948. internal representation.
  2949. -- Function: int fgetpos (FILE *STREAM, fpos_t *POSITION)
  2950. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2951. | *Note POSIX Safety Concepts::.
  2952. This function stores the value of the file position indicator for
  2953. the stream STREAM in the ‘fpos_t’ object pointed to by POSITION.
  2954. If successful, ‘fgetpos’ returns zero; otherwise it returns a
  2955. nonzero value and stores an implementation-defined positive value
  2956. in ‘errno’.
  2957. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ on a
  2958. 32 bit system the function is in fact ‘fgetpos64’. I.e., the LFS
  2959. interface transparently replaces the old interface.
  2960. -- Function: int fgetpos64 (FILE *STREAM, fpos64_t *POSITION)
  2961. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2962. | *Note POSIX Safety Concepts::.
  2963. This function is similar to ‘fgetpos’ but the file position is
  2964. returned in a variable of type ‘fpos64_t’ to which POSITION points.
  2965. If the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ on a 32
  2966. bits machine this function is available under the name ‘fgetpos’
  2967. and so transparently replaces the old interface.
  2968. -- Function: int fsetpos (FILE *STREAM, const fpos_t *POSITION)
  2969. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2970. | *Note POSIX Safety Concepts::.
  2971. This function sets the file position indicator for the stream
  2972. STREAM to the position POSITION, which must have been set by a
  2973. previous call to ‘fgetpos’ on the same stream. If successful,
  2974. ‘fsetpos’ clears the end-of-file indicator on the stream, discards
  2975. any characters that were "pushed back" by the use of ‘ungetc’, and
  2976. returns a value of zero. Otherwise, ‘fsetpos’ returns a nonzero
  2977. value and stores an implementation-defined positive value in
  2978. ‘errno’.
  2979. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ on a
  2980. 32 bit system the function is in fact ‘fsetpos64’. I.e., the LFS
  2981. interface transparently replaces the old interface.
  2982. -- Function: int fsetpos64 (FILE *STREAM, const fpos64_t *POSITION)
  2983. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  2984. | *Note POSIX Safety Concepts::.
  2985. This function is similar to ‘fsetpos’ but the file position used
  2986. for positioning is provided in a variable of type ‘fpos64_t’ to
  2987. which POSITION points.
  2988. If the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ on a 32
  2989. bits machine this function is available under the name ‘fsetpos’
  2990. and so transparently replaces the old interface.
  2991. 
  2992. File: libc.info, Node: Stream Buffering, Next: Other Kinds of Streams, Prev: Portable Positioning, Up: I/O on Streams
  2993. 12.20 Stream Buffering
  2994. ======================
  2995. Characters that are written to a stream are normally accumulated and
  2996. transmitted asynchronously to the file in a block, instead of appearing
  2997. as soon as they are output by the application program. Similarly,
  2998. streams often retrieve input from the host environment in blocks rather
  2999. than on a character-by-character basis. This is called “buffering”.
  3000. If you are writing programs that do interactive input and output
  3001. using streams, you need to understand how buffering works when you
  3002. design the user interface to your program. Otherwise, you might find
  3003. that output (such as progress or prompt messages) doesn't appear when
  3004. you intended it to, or displays some other unexpected behavior.
  3005. This section deals only with controlling when characters are
  3006. transmitted between the stream and the file or device, and _not_ with
  3007. how things like echoing, flow control, and the like are handled on
  3008. specific classes of devices. For information on common control
  3009. operations on terminal devices, see *note Low-Level Terminal
  3010. Interface::.
  3011. You can bypass the stream buffering facilities altogether by using
  3012. the low-level input and output functions that operate on file
  3013. descriptors instead. *Note Low-Level I/O::.
  3014. * Menu:
  3015. * Buffering Concepts:: Terminology is defined here.
  3016. * Flushing Buffers:: How to ensure that output buffers are flushed.
  3017. * Controlling Buffering:: How to specify what kind of buffering to use.
  3018. 
  3019. File: libc.info, Node: Buffering Concepts, Next: Flushing Buffers, Up: Stream Buffering
  3020. 12.20.1 Buffering Concepts
  3021. --------------------------
  3022. There are three different kinds of buffering strategies:
  3023. • Characters written to or read from an “unbuffered” stream are
  3024. transmitted individually to or from the file as soon as possible.
  3025. • Characters written to a “line buffered” stream are transmitted to
  3026. the file in blocks when a newline character is encountered.
  3027. • Characters written to or read from a “fully buffered” stream are
  3028. transmitted to or from the file in blocks of arbitrary size.
  3029. Newly opened streams are normally fully buffered, with one exception:
  3030. a stream connected to an interactive device such as a terminal is
  3031. initially line buffered. *Note Controlling Buffering::, for information
  3032. on how to select a different kind of buffering. Usually the automatic
  3033. selection gives you the most convenient kind of buffering for the file
  3034. or device you open.
  3035. The use of line buffering for interactive devices implies that output
  3036. messages ending in a newline will appear immediately--which is usually
  3037. what you want. Output that doesn't end in a newline might or might not
  3038. show up immediately, so if you want them to appear immediately, you
  3039. should flush buffered output explicitly with ‘fflush’, as described in
  3040. *note Flushing Buffers::.
  3041. 
  3042. File: libc.info, Node: Flushing Buffers, Next: Controlling Buffering, Prev: Buffering Concepts, Up: Stream Buffering
  3043. 12.20.2 Flushing Buffers
  3044. ------------------------
  3045. “Flushing” output on a buffered stream means transmitting all
  3046. accumulated characters to the file. There are many circumstances when
  3047. buffered output on a stream is flushed automatically:
  3048. • When you try to do output and the output buffer is full.
  3049. • When the stream is closed. *Note Closing Streams::.
  3050. • When the program terminates by calling ‘exit’. *Note Normal
  3051. Termination::.
  3052. • When a newline is written, if the stream is line buffered.
  3053. • Whenever an input operation on _any_ stream actually reads data
  3054. from its file.
  3055. If you want to flush the buffered output at another time, call
  3056. ‘fflush’, which is declared in the header file ‘stdio.h’.
  3057. -- Function: int fflush (FILE *STREAM)
  3058. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  3059. | *Note POSIX Safety Concepts::.
  3060. This function causes any buffered output on STREAM to be delivered
  3061. to the file. If STREAM is a null pointer, then ‘fflush’ causes
  3062. buffered output on _all_ open output streams to be flushed.
  3063. This function returns ‘EOF’ if a write error occurs, or zero
  3064. otherwise.
  3065. -- Function: int fflush_unlocked (FILE *STREAM)
  3066. Preliminary: | MT-Safe race:stream | AS-Unsafe corrupt | AC-Unsafe
  3067. corrupt | *Note POSIX Safety Concepts::.
  3068. The ‘fflush_unlocked’ function is equivalent to the ‘fflush’
  3069. function except that it does not implicitly lock the stream.
  3070. The ‘fflush’ function can be used to flush all streams currently
  3071. opened. While this is useful in some situations it does often more than
  3072. necessary since it might be done in situations when terminal input is
  3073. required and the program wants to be sure that all output is visible on
  3074. the terminal. But this means that only line buffered streams have to be
  3075. flushed. Solaris introduced a function especially for this. It was
  3076. always available in the GNU C Library in some form but never officially
  3077. exported.
  3078. -- Function: void _flushlbf (void)
  3079. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  3080. | *Note POSIX Safety Concepts::.
  3081. The ‘_flushlbf’ function flushes all line buffered streams
  3082. currently opened.
  3083. This function is declared in the ‘stdio_ext.h’ header.
  3084. In some situations it might be useful to not flush the output pending
  3085. for a stream but instead simply forget it. If transmission is costly
  3086. and the output is not needed anymore this is valid reasoning. In this
  3087. situation a non-standard function introduced in Solaris and available in
  3088. the GNU C Library can be used.
  3089. -- Function: void __fpurge (FILE *STREAM)
  3090. Preliminary: | MT-Safe race:stream | AS-Unsafe corrupt | AC-Unsafe
  3091. corrupt | *Note POSIX Safety Concepts::.
  3092. The ‘__fpurge’ function causes the buffer of the stream STREAM to
  3093. be emptied. If the stream is currently in read mode all input in
  3094. the buffer is lost. If the stream is in output mode the buffered
  3095. output is not written to the device (or whatever other underlying
  3096. storage) and the buffer is cleared.
  3097. This function is declared in ‘stdio_ext.h’.
  3098. 
  3099. File: libc.info, Node: Controlling Buffering, Prev: Flushing Buffers, Up: Stream Buffering
  3100. 12.20.3 Controlling Which Kind of Buffering
  3101. -------------------------------------------
  3102. After opening a stream (but before any other operations have been
  3103. performed on it), you can explicitly specify what kind of buffering you
  3104. want it to have using the ‘setvbuf’ function.
  3105. The facilities listed in this section are declared in the header file
  3106. ‘stdio.h’.
  3107. -- Function: int setvbuf (FILE *STREAM, char *BUF, int MODE, size_t
  3108. SIZE)
  3109. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  3110. | *Note POSIX Safety Concepts::.
  3111. This function is used to specify that the stream STREAM should have
  3112. the buffering mode MODE, which can be either ‘_IOFBF’ (for full
  3113. buffering), ‘_IOLBF’ (for line buffering), or ‘_IONBF’ (for
  3114. unbuffered input/output).
  3115. If you specify a null pointer as the BUF argument, then ‘setvbuf’
  3116. allocates a buffer itself using ‘malloc’. This buffer will be
  3117. freed when you close the stream.
  3118. Otherwise, BUF should be a character array that can hold at least
  3119. SIZE characters. You should not free the space for this array as
  3120. long as the stream remains open and this array remains its buffer.
  3121. You should usually either allocate it statically, or ‘malloc’
  3122. (*note Unconstrained Allocation::) the buffer. Using an automatic
  3123. array is not a good idea unless you close the file before exiting
  3124. the block that declares the array.
  3125. While the array remains a stream buffer, the stream I/O functions
  3126. will use the buffer for their internal purposes. You shouldn't try
  3127. to access the values in the array directly while the stream is
  3128. using it for buffering.
  3129. The ‘setvbuf’ function returns zero on success, or a nonzero value
  3130. if the value of MODE is not valid or if the request could not be
  3131. honored.
  3132. -- Macro: int _IOFBF
  3133. The value of this macro is an integer constant expression that can
  3134. be used as the MODE argument to the ‘setvbuf’ function to specify
  3135. that the stream should be fully buffered.
  3136. -- Macro: int _IOLBF
  3137. The value of this macro is an integer constant expression that can
  3138. be used as the MODE argument to the ‘setvbuf’ function to specify
  3139. that the stream should be line buffered.
  3140. -- Macro: int _IONBF
  3141. The value of this macro is an integer constant expression that can
  3142. be used as the MODE argument to the ‘setvbuf’ function to specify
  3143. that the stream should be unbuffered.
  3144. -- Macro: int BUFSIZ
  3145. The value of this macro is an integer constant expression that is
  3146. good to use for the SIZE argument to ‘setvbuf’. This value is
  3147. guaranteed to be at least ‘256’.
  3148. The value of ‘BUFSIZ’ is chosen on each system so as to make stream
  3149. I/O efficient. So it is a good idea to use ‘BUFSIZ’ as the size
  3150. for the buffer when you call ‘setvbuf’.
  3151. Actually, you can get an even better value to use for the buffer
  3152. size by means of the ‘fstat’ system call: it is found in the
  3153. ‘st_blksize’ field of the file attributes. *Note Attribute
  3154. Meanings::.
  3155. Sometimes people also use ‘BUFSIZ’ as the allocation size of
  3156. buffers used for related purposes, such as strings used to receive
  3157. a line of input with ‘fgets’ (*note Character Input::). There is
  3158. no particular reason to use ‘BUFSIZ’ for this instead of any other
  3159. integer, except that it might lead to doing I/O in chunks of an
  3160. efficient size.
  3161. -- Function: void setbuf (FILE *STREAM, char *BUF)
  3162. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  3163. | *Note POSIX Safety Concepts::.
  3164. If BUF is a null pointer, the effect of this function is equivalent
  3165. to calling ‘setvbuf’ with a MODE argument of ‘_IONBF’. Otherwise,
  3166. it is equivalent to calling ‘setvbuf’ with BUF, and a MODE of
  3167. ‘_IOFBF’ and a SIZE argument of ‘BUFSIZ’.
  3168. The ‘setbuf’ function is provided for compatibility with old code;
  3169. use ‘setvbuf’ in all new programs.
  3170. -- Function: void setbuffer (FILE *STREAM, char *BUF, size_t SIZE)
  3171. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  3172. | *Note POSIX Safety Concepts::.
  3173. If BUF is a null pointer, this function makes STREAM unbuffered.
  3174. Otherwise, it makes STREAM fully buffered using BUF as the buffer.
  3175. The SIZE argument specifies the length of BUF.
  3176. This function is provided for compatibility with old BSD code. Use
  3177. ‘setvbuf’ instead.
  3178. -- Function: void setlinebuf (FILE *STREAM)
  3179. Preliminary: | MT-Safe | AS-Unsafe corrupt | AC-Unsafe lock corrupt
  3180. | *Note POSIX Safety Concepts::.
  3181. This function makes STREAM be line buffered, and allocates the
  3182. buffer for you.
  3183. This function is provided for compatibility with old BSD code. Use
  3184. ‘setvbuf’ instead.
  3185. It is possible to query whether a given stream is line buffered or
  3186. not using a non-standard function introduced in Solaris and available in
  3187. the GNU C Library.
  3188. -- Function: int __flbf (FILE *STREAM)
  3189. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3190. Concepts::.
  3191. The ‘__flbf’ function will return a nonzero value in case the
  3192. stream STREAM is line buffered. Otherwise the return value is
  3193. zero.
  3194. This function is declared in the ‘stdio_ext.h’ header.
  3195. Two more extensions allow to determine the size of the buffer and how
  3196. much of it is used. These functions were also introduced in Solaris.
  3197. -- Function: size_t __fbufsize (FILE *STREAM)
  3198. Preliminary: | MT-Safe race:stream | AS-Unsafe corrupt | AC-Safe |
  3199. *Note POSIX Safety Concepts::.
  3200. The ‘__fbufsize’ function return the size of the buffer in the
  3201. stream STREAM. This value can be used to optimize the use of the
  3202. stream.
  3203. This function is declared in the ‘stdio_ext.h’ header.
  3204. -- Function: size_t __fpending (FILE *STREAM)
  3205. Preliminary: | MT-Safe race:stream | AS-Unsafe corrupt | AC-Safe |
  3206. *Note POSIX Safety Concepts::.
  3207. The ‘__fpending’ function returns the number of bytes currently in
  3208. the output buffer. For wide-oriented streams the measuring unit is
  3209. wide characters. This function should not be used on buffers in
  3210. read mode or opened read-only.
  3211. This function is declared in the ‘stdio_ext.h’ header.
  3212. 
  3213. File: libc.info, Node: Other Kinds of Streams, Next: Formatted Messages, Prev: Stream Buffering, Up: I/O on Streams
  3214. 12.21 Other Kinds of Streams
  3215. ============================
  3216. The GNU C Library provides ways for you to define additional kinds of
  3217. streams that do not necessarily correspond to an open file.
  3218. One such type of stream takes input from or writes output to a
  3219. string. These kinds of streams are used internally to implement the
  3220. ‘sprintf’ and ‘sscanf’ functions. You can also create such a stream
  3221. explicitly, using the functions described in *note String Streams::.
  3222. More generally, you can define streams that do input/output to
  3223. arbitrary objects using functions supplied by your program. This
  3224. protocol is discussed in *note Custom Streams::.
  3225. *Portability Note:* The facilities described in this section are
  3226. specific to GNU. Other systems or C implementations might or might not
  3227. provide equivalent functionality.
  3228. * Menu:
  3229. * String Streams:: Streams that get data from or put data in
  3230. a string or memory buffer.
  3231. * Custom Streams:: Defining your own streams with an arbitrary
  3232. input data source and/or output data sink.
  3233. 
  3234. File: libc.info, Node: String Streams, Next: Custom Streams, Up: Other Kinds of Streams
  3235. 12.21.1 String Streams
  3236. ----------------------
  3237. The ‘fmemopen’ and ‘open_memstream’ functions allow you to do I/O to a
  3238. string or memory buffer. These facilities are declared in ‘stdio.h’.
  3239. -- Function: FILE * fmemopen (void *BUF, size_t SIZE, const char
  3240. *OPENTYPE)
  3241. Preliminary: | MT-Safe | AS-Unsafe heap lock | AC-Unsafe mem lock |
  3242. *Note POSIX Safety Concepts::.
  3243. This function opens a stream that allows the access specified by
  3244. the OPENTYPE argument, that reads from or writes to the buffer
  3245. specified by the argument BUF. This array must be at least SIZE
  3246. bytes long.
  3247. If you specify a null pointer as the BUF argument, ‘fmemopen’
  3248. dynamically allocates an array SIZE bytes long (as with ‘malloc’;
  3249. *note Unconstrained Allocation::). This is really only useful if
  3250. you are going to write things to the buffer and then read them back
  3251. in again, because you have no way of actually getting a pointer to
  3252. the buffer (for this, try ‘open_memstream’, below). The buffer is
  3253. freed when the stream is closed.
  3254. The argument OPENTYPE is the same as in ‘fopen’ (*note Opening
  3255. Streams::). If the OPENTYPE specifies append mode, then the
  3256. initial file position is set to the first null character in the
  3257. buffer. Otherwise the initial file position is at the beginning of
  3258. the buffer.
  3259. When a stream open for writing is flushed or closed, a null
  3260. character (zero byte) is written at the end of the buffer if it
  3261. fits. You should add an extra byte to the SIZE argument to account
  3262. for this. Attempts to write more than SIZE bytes to the buffer
  3263. result in an error.
  3264. For a stream open for reading, null characters (zero bytes) in the
  3265. buffer do not count as "end of file". Read operations indicate end
  3266. of file only when the file position advances past SIZE bytes. So,
  3267. if you want to read characters from a null-terminated string, you
  3268. should supply the length of the string as the SIZE argument.
  3269. Here is an example of using ‘fmemopen’ to create a stream for reading
  3270. from a string:
  3271. #include <stdio.h>
  3272. #include <string.h>
  3273. static char buffer[] = "foobar";
  3274. int
  3275. main (void)
  3276. {
  3277. int ch;
  3278. FILE *stream;
  3279. stream = fmemopen (buffer, strlen (buffer), "r");
  3280. while ((ch = fgetc (stream)) != EOF)
  3281. printf ("Got %c\n", ch);
  3282. fclose (stream);
  3283. return 0;
  3284. }
  3285. This program produces the following output:
  3286. Got f
  3287. Got o
  3288. Got o
  3289. Got b
  3290. Got a
  3291. Got r
  3292. -- Function: FILE * open_memstream (char **PTR, size_t *SIZELOC)
  3293. Preliminary: | MT-Safe | AS-Unsafe heap | AC-Unsafe mem | *Note
  3294. POSIX Safety Concepts::.
  3295. This function opens a stream for writing to a buffer. The buffer
  3296. is allocated dynamically and grown as necessary, using ‘malloc’.
  3297. After you've closed the stream, this buffer is your responsibility
  3298. to clean up using ‘free’ or ‘realloc’. *Note Unconstrained
  3299. Allocation::.
  3300. When the stream is closed with ‘fclose’ or flushed with ‘fflush’,
  3301. the locations PTR and SIZELOC are updated to contain the pointer to
  3302. the buffer and its size. The values thus stored remain valid only
  3303. as long as no further output on the stream takes place. If you do
  3304. more output, you must flush the stream again to store new values
  3305. before you use them again.
  3306. A null character is written at the end of the buffer when the
  3307. stream is flushed, and at the current location when closed (these
  3308. locations may be different if ‘fseek’ is used). This null
  3309. character is _not_ included in the size value stored at SIZELOC.
  3310. You can move the stream's file position with ‘fseek’ or ‘fseeko’
  3311. (*note File Positioning::). Moving the file position past the end
  3312. of the data already written fills the intervening space with
  3313. zeroes. Note that seeking backwards into existing written data
  3314. will change the effective "end of file" used by ‘fflush’ and
  3315. ‘SEEK_END’ (and where the trailing null character is written, when
  3316. closed). Thus, if you wish to do "random-access" I/O in a
  3317. memstream, it's important to use ‘fseek’ to move the file position
  3318. to the desired data end (using ‘SEEK_POS’) before closing it.
  3319. Here is an example of using ‘open_memstream’:
  3320. #include <stdio.h>
  3321. #include <stdlib.h>
  3322. int
  3323. main (void)
  3324. {
  3325. char *bp;
  3326. size_t size;
  3327. FILE *stream;
  3328. stream = open_memstream (&bp, &size);
  3329. fprintf (stream, "hello");
  3330. fflush (stream);
  3331. printf ("buf = `%s', size = %zu\n", bp, size);
  3332. fprintf (stream, ", world");
  3333. fclose (stream);
  3334. printf ("buf = `%s', size = %zu\n", bp, size);
  3335. free (bp);
  3336. return 0;
  3337. }
  3338. This program produces the following output:
  3339. buf = `hello', size = 5
  3340. buf = `hello, world', size = 12
  3341. 
  3342. File: libc.info, Node: Custom Streams, Prev: String Streams, Up: Other Kinds of Streams
  3343. 12.21.2 Programming Your Own Custom Streams
  3344. -------------------------------------------
  3345. This section describes how you can make a stream that gets input from an
  3346. arbitrary data source or writes output to an arbitrary data sink
  3347. programmed by you. We call these “custom streams”. The functions and
  3348. types described here are all GNU extensions.
  3349. * Menu:
  3350. * Streams and Cookies:: The “cookie” records where to fetch or
  3351. store data that is read or written.
  3352. * Hook Functions:: How you should define the four “hook
  3353. functions” that a custom stream needs.
  3354. 
  3355. File: libc.info, Node: Streams and Cookies, Next: Hook Functions, Up: Custom Streams
  3356. 12.21.2.1 Custom Streams and Cookies
  3357. ....................................
  3358. Inside every custom stream is a special object called the “cookie”.
  3359. This is an object supplied by you which records where to fetch or store
  3360. the data read or written. It is up to you to define a data type to use
  3361. for the cookie. The stream functions in the library never refer
  3362. directly to its contents, and they don't even know what the type is;
  3363. they record its address with type ‘void *’.
  3364. To implement a custom stream, you must specify _how_ to fetch or
  3365. store the data in the specified place. You do this by defining “hook
  3366. functions” to read, write, change "file position", and close the stream.
  3367. All four of these functions will be passed the stream's cookie so they
  3368. can tell where to fetch or store the data. The library functions don't
  3369. know what's inside the cookie, but your functions will know.
  3370. When you create a custom stream, you must specify the cookie pointer,
  3371. and also the four hook functions stored in a structure of type
  3372. ‘cookie_io_functions_t’.
  3373. These facilities are declared in ‘stdio.h’.
  3374. -- Data Type: cookie_io_functions_t
  3375. This is a structure type that holds the functions that define the
  3376. communications protocol between the stream and its cookie. It has
  3377. the following members:
  3378. ‘cookie_read_function_t *read’
  3379. This is the function that reads data from the cookie. If the
  3380. value is a null pointer instead of a function, then read
  3381. operations on this stream always return ‘EOF’.
  3382. ‘cookie_write_function_t *write’
  3383. This is the function that writes data to the cookie. If the
  3384. value is a null pointer instead of a function, then data
  3385. written to the stream is discarded.
  3386. ‘cookie_seek_function_t *seek’
  3387. This is the function that performs the equivalent of file
  3388. positioning on the cookie. If the value is a null pointer
  3389. instead of a function, calls to ‘fseek’ or ‘fseeko’ on this
  3390. stream can only seek to locations within the buffer; any
  3391. attempt to seek outside the buffer will return an ‘ESPIPE’
  3392. error.
  3393. ‘cookie_close_function_t *close’
  3394. This function performs any appropriate cleanup on the cookie
  3395. when closing the stream. If the value is a null pointer
  3396. instead of a function, nothing special is done to close the
  3397. cookie when the stream is closed.
  3398. -- Function: FILE * fopencookie (void *COOKIE, const char *OPENTYPE,
  3399. cookie_io_functions_t IO-FUNCTIONS)
  3400. Preliminary: | MT-Safe | AS-Unsafe heap lock | AC-Unsafe mem lock |
  3401. *Note POSIX Safety Concepts::.
  3402. This function actually creates the stream for communicating with
  3403. the COOKIE using the functions in the IO-FUNCTIONS argument. The
  3404. OPENTYPE argument is interpreted as for ‘fopen’; see *note Opening
  3405. Streams::. (But note that the "truncate on open" option is
  3406. ignored.) The new stream is fully buffered.
  3407. The ‘fopencookie’ function returns the newly created stream, or a
  3408. null pointer in case of an error.
  3409. 
  3410. File: libc.info, Node: Hook Functions, Prev: Streams and Cookies, Up: Custom Streams
  3411. 12.21.2.2 Custom Stream Hook Functions
  3412. ......................................
  3413. Here are more details on how you should define the four hook functions
  3414. that a custom stream needs.
  3415. You should define the function to read data from the cookie as:
  3416. ssize_t READER (void *COOKIE, char *BUFFER, size_t SIZE)
  3417. This is very similar to the ‘read’ function; see *note I/O
  3418. Primitives::. Your function should transfer up to SIZE bytes into the
  3419. BUFFER, and return the number of bytes read, or zero to indicate
  3420. end-of-file. You can return a value of ‘-1’ to indicate an error.
  3421. You should define the function to write data to the cookie as:
  3422. ssize_t WRITER (void *COOKIE, const char *BUFFER, size_t SIZE)
  3423. This is very similar to the ‘write’ function; see *note I/O
  3424. Primitives::. Your function should transfer up to SIZE bytes from the
  3425. buffer, and return the number of bytes written. You can return a value
  3426. of ‘0’ to indicate an error. You must not return any negative value.
  3427. You should define the function to perform seek operations on the
  3428. cookie as:
  3429. int SEEKER (void *COOKIE, off64_t *POSITION, int WHENCE)
  3430. For this function, the POSITION and WHENCE arguments are interpreted
  3431. as for ‘fgetpos’; see *note Portable Positioning::.
  3432. After doing the seek operation, your function should store the
  3433. resulting file position relative to the beginning of the file in
  3434. POSITION. Your function should return a value of ‘0’ on success and
  3435. ‘-1’ to indicate an error.
  3436. You should define the function to do cleanup operations on the cookie
  3437. appropriate for closing the stream as:
  3438. int CLEANER (void *COOKIE)
  3439. Your function should return ‘-1’ to indicate an error, and ‘0’
  3440. otherwise.
  3441. -- Data Type: cookie_read_function_t
  3442. This is the data type that the read function for a custom stream
  3443. should have. If you declare the function as shown above, this is
  3444. the type it will have.
  3445. -- Data Type: cookie_write_function_t
  3446. The data type of the write function for a custom stream.
  3447. -- Data Type: cookie_seek_function_t
  3448. The data type of the seek function for a custom stream.
  3449. -- Data Type: cookie_close_function_t
  3450. The data type of the close function for a custom stream.
  3451. 
  3452. File: libc.info, Node: Formatted Messages, Prev: Other Kinds of Streams, Up: I/O on Streams
  3453. 12.22 Formatted Messages
  3454. ========================
  3455. On systems which are based on System V messages of programs (especially
  3456. the system tools) are printed in a strict form using the ‘fmtmsg’
  3457. function. The uniformity sometimes helps the user to interpret messages
  3458. and the strictness tests of the ‘fmtmsg’ function ensure that the
  3459. programmer follows some minimal requirements.
  3460. * Menu:
  3461. * Printing Formatted Messages:: The ‘fmtmsg’ function.
  3462. * Adding Severity Classes:: Add more severity classes.
  3463. * Example:: How to use ‘fmtmsg’ and ‘addseverity’.
  3464. 
  3465. File: libc.info, Node: Printing Formatted Messages, Next: Adding Severity Classes, Up: Formatted Messages
  3466. 12.22.1 Printing Formatted Messages
  3467. -----------------------------------
  3468. Messages can be printed to standard error and/or to the console. To
  3469. select the destination the programmer can use the following two values,
  3470. bitwise OR combined if wanted, for the CLASSIFICATION parameter of
  3471. ‘fmtmsg’:
  3472. ‘MM_PRINT’
  3473. Display the message in standard error.
  3474. ‘MM_CONSOLE’
  3475. Display the message on the system console.
  3476. The erroneous piece of the system can be signalled by exactly one of
  3477. the following values which also is bitwise ORed with the CLASSIFICATION
  3478. parameter to ‘fmtmsg’:
  3479. ‘MM_HARD’
  3480. The source of the condition is some hardware.
  3481. ‘MM_SOFT’
  3482. The source of the condition is some software.
  3483. ‘MM_FIRM’
  3484. The source of the condition is some firmware.
  3485. A third component of the CLASSIFICATION parameter to ‘fmtmsg’ can
  3486. describe the part of the system which detects the problem. This is done
  3487. by using exactly one of the following values:
  3488. ‘MM_APPL’
  3489. The erroneous condition is detected by the application.
  3490. ‘MM_UTIL’
  3491. The erroneous condition is detected by a utility.
  3492. ‘MM_OPSYS’
  3493. The erroneous condition is detected by the operating system.
  3494. A last component of CLASSIFICATION can signal the results of this
  3495. message. Exactly one of the following values can be used:
  3496. ‘MM_RECOVER’
  3497. It is a recoverable error.
  3498. ‘MM_NRECOV’
  3499. It is a non-recoverable error.
  3500. -- Function: int fmtmsg (long int CLASSIFICATION, const char *LABEL,
  3501. int SEVERITY, const char *TEXT, const char *ACTION, const char
  3502. *TAG)
  3503. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Safe | *Note POSIX
  3504. Safety Concepts::.
  3505. Display a message described by its parameters on the device(s)
  3506. specified in the CLASSIFICATION parameter. The LABEL parameter
  3507. identifies the source of the message. The string should consist of
  3508. two colon separated parts where the first part has not more than 10
  3509. and the second part not more than 14 characters. The TEXT
  3510. parameter describes the condition of the error, the ACTION
  3511. parameter possible steps to recover from the error and the TAG
  3512. parameter is a reference to the online documentation where more
  3513. information can be found. It should contain the LABEL value and a
  3514. unique identification number.
  3515. Each of the parameters can be a special value which means this
  3516. value is to be omitted. The symbolic names for these values are:
  3517. ‘MM_NULLLBL’
  3518. Ignore LABEL parameter.
  3519. ‘MM_NULLSEV’
  3520. Ignore SEVERITY parameter.
  3521. ‘MM_NULLMC’
  3522. Ignore CLASSIFICATION parameter. This implies that nothing is
  3523. actually printed.
  3524. ‘MM_NULLTXT’
  3525. Ignore TEXT parameter.
  3526. ‘MM_NULLACT’
  3527. Ignore ACTION parameter.
  3528. ‘MM_NULLTAG’
  3529. Ignore TAG parameter.
  3530. There is another way certain fields can be omitted from the output
  3531. to standard error. This is described below in the description of
  3532. environment variables influencing the behavior.
  3533. The SEVERITY parameter can have one of the values in the following
  3534. table:
  3535. ‘MM_NOSEV’
  3536. Nothing is printed, this value is the same as ‘MM_NULLSEV’.
  3537. ‘MM_HALT’
  3538. This value is printed as ‘HALT’.
  3539. ‘MM_ERROR’
  3540. This value is printed as ‘ERROR’.
  3541. ‘MM_WARNING’
  3542. This value is printed as ‘WARNING’.
  3543. ‘MM_INFO’
  3544. This value is printed as ‘INFO’.
  3545. The numeric value of these five macros are between ‘0’ and ‘4’.
  3546. Using the environment variable ‘SEV_LEVEL’ or using the
  3547. ‘addseverity’ function one can add more severity levels with their
  3548. corresponding string to print. This is described below (*note
  3549. Adding Severity Classes::).
  3550. If no parameter is ignored the output looks like this:
  3551. LABEL: SEVERITY-STRING: TEXT
  3552. TO FIX: ACTION TAG
  3553. The colons, new line characters and the ‘TO FIX’ string are
  3554. inserted if necessary, i.e., if the corresponding parameter is not
  3555. ignored.
  3556. This function is specified in the X/Open Portability Guide. It is
  3557. also available on all systems derived from System V.
  3558. The function returns the value ‘MM_OK’ if no error occurred. If
  3559. only the printing to standard error failed, it returns ‘MM_NOMSG’.
  3560. If printing to the console fails, it returns ‘MM_NOCON’. If
  3561. nothing is printed ‘MM_NOTOK’ is returned. Among situations where
  3562. all outputs fail this last value is also returned if a parameter
  3563. value is incorrect.
  3564. There are two environment variables which influence the behavior of
  3565. ‘fmtmsg’. The first is ‘MSGVERB’. It is used to control the output
  3566. actually happening on standard error (_not_ the console output). Each
  3567. of the five fields can explicitly be enabled. To do this the user has
  3568. to put the ‘MSGVERB’ variable with a format like the following in the
  3569. environment before calling the ‘fmtmsg’ function the first time:
  3570. MSGVERB=KEYWORD[:KEYWORD[:...]]
  3571. Valid KEYWORDs are ‘label’, ‘severity’, ‘text’, ‘action’, and ‘tag’.
  3572. If the environment variable is not given or is the empty string, a not
  3573. supported keyword is given or the value is somehow else invalid, no part
  3574. of the message is masked out.
  3575. The second environment variable which influences the behavior of
  3576. ‘fmtmsg’ is ‘SEV_LEVEL’. This variable and the change in the behavior
  3577. of ‘fmtmsg’ is not specified in the X/Open Portability Guide. It is
  3578. available in System V systems, though. It can be used to introduce new
  3579. severity levels. By default, only the five severity levels described
  3580. above are available. Any other numeric value would make ‘fmtmsg’ print
  3581. nothing.
  3582. If the user puts ‘SEV_LEVEL’ with a format like
  3583. SEV_LEVEL=[DESCRIPTION[:DESCRIPTION[:...]]]
  3584. in the environment of the process before the first call to ‘fmtmsg’,
  3585. where DESCRIPTION has a value of the form
  3586. SEVERITY-KEYWORD,LEVEL,PRINTSTRING
  3587. The SEVERITY-KEYWORD part is not used by ‘fmtmsg’ but it has to be
  3588. present. The LEVEL part is a string representation of a number. The
  3589. numeric value must be a number greater than 4. This value must be used
  3590. in the SEVERITY parameter of ‘fmtmsg’ to select this class. It is not
  3591. possible to overwrite any of the predefined classes. The PRINTSTRING is
  3592. the string printed when a message of this class is processed by ‘fmtmsg’
  3593. (see above, ‘fmtsmg’ does not print the numeric value but instead the
  3594. string representation).
  3595. 
  3596. File: libc.info, Node: Adding Severity Classes, Next: Example, Prev: Printing Formatted Messages, Up: Formatted Messages
  3597. 12.22.2 Adding Severity Classes
  3598. -------------------------------
  3599. There is another possibility to introduce severity classes besides using
  3600. the environment variable ‘SEV_LEVEL’. This simplifies the task of
  3601. introducing new classes in a running program. One could use the
  3602. ‘setenv’ or ‘putenv’ function to set the environment variable, but this
  3603. is toilsome.
  3604. -- Function: int addseverity (int SEVERITY, const char *STRING)
  3605. Preliminary: | MT-Safe | AS-Unsafe heap lock | AC-Unsafe lock mem |
  3606. *Note POSIX Safety Concepts::.
  3607. This function allows the introduction of new severity classes which
  3608. can be addressed by the SEVERITY parameter of the ‘fmtmsg’
  3609. function. The SEVERITY parameter of ‘addseverity’ must match the
  3610. value for the parameter with the same name of ‘fmtmsg’, and STRING
  3611. is the string printed in the actual messages instead of the numeric
  3612. value.
  3613. If STRING is ‘NULL’ the severity class with the numeric value
  3614. according to SEVERITY is removed.
  3615. It is not possible to overwrite or remove one of the default
  3616. severity classes. All calls to ‘addseverity’ with SEVERITY set to
  3617. one of the values for the default classes will fail.
  3618. The return value is ‘MM_OK’ if the task was successfully performed.
  3619. If the return value is ‘MM_NOTOK’ something went wrong. This could
  3620. mean that no more memory is available or a class is not available
  3621. when it has to be removed.
  3622. This function is not specified in the X/Open Portability Guide
  3623. although the ‘fmtsmg’ function is. It is available on System V
  3624. systems.
  3625. 
  3626. File: libc.info, Node: Example, Prev: Adding Severity Classes, Up: Formatted Messages
  3627. 12.22.3 How to use ‘fmtmsg’ and ‘addseverity’
  3628. ---------------------------------------------
  3629. Here is a simple example program to illustrate the use of both functions
  3630. described in this section.
  3631. #include <fmtmsg.h>
  3632. int
  3633. main (void)
  3634. {
  3635. addseverity (5, "NOTE2");
  3636. fmtmsg (MM_PRINT, "only1field", MM_INFO, "text2", "action2", "tag2");
  3637. fmtmsg (MM_PRINT, "UX:cat", 5, "invalid syntax", "refer to manual",
  3638. "UX:cat:001");
  3639. fmtmsg (MM_PRINT, "label:foo", 6, "text", "action", "tag");
  3640. return 0;
  3641. }
  3642. The second call to ‘fmtmsg’ illustrates a use of this function as it
  3643. usually occurs on System V systems, which heavily use this function. It
  3644. seems worthwhile to give a short explanation here of how this system
  3645. works on System V. The value of the LABEL field (‘UX:cat’) says that the
  3646. error occurred in the Unix program ‘cat’. The explanation of the error
  3647. follows and the value for the ACTION parameter is ‘"refer to manual"’.
  3648. One could be more specific here, if necessary. The TAG field contains,
  3649. as proposed above, the value of the string given for the LABEL
  3650. parameter, and additionally a unique ID (‘001’ in this case). For a GNU
  3651. environment this string could contain a reference to the corresponding
  3652. node in the Info page for the program.
  3653. Running this program without specifying the ‘MSGVERB’ and ‘SEV_LEVEL’
  3654. function produces the following output:
  3655. UX:cat: NOTE2: invalid syntax
  3656. TO FIX: refer to manual UX:cat:001
  3657. We see the different fields of the message and how the extra glue
  3658. (the colons and the ‘TO FIX’ string) is printed. But only one of the
  3659. three calls to ‘fmtmsg’ produced output. The first call does not print
  3660. anything because the LABEL parameter is not in the correct form. The
  3661. string must contain two fields, separated by a colon (*note Printing
  3662. Formatted Messages::). The third ‘fmtmsg’ call produced no output since
  3663. the class with the numeric value ‘6’ is not defined. Although a class
  3664. with numeric value ‘5’ is also not defined by default, the call to
  3665. ‘addseverity’ introduces it and the second call to ‘fmtmsg’ produces the
  3666. above output.
  3667. When we change the environment of the program to contain
  3668. ‘SEV_LEVEL=XXX,6,NOTE’ when running it we get a different result:
  3669. UX:cat: NOTE2: invalid syntax
  3670. TO FIX: refer to manual UX:cat:001
  3671. label:foo: NOTE: text
  3672. TO FIX: action tag
  3673. Now the third call to ‘fmtmsg’ produced some output and we see how
  3674. the string ‘NOTE’ from the environment variable appears in the message.
  3675. Now we can reduce the output by specifying which fields we are
  3676. interested in. If we additionally set the environment variable
  3677. ‘MSGVERB’ to the value ‘severity:label:action’ we get the following
  3678. output:
  3679. UX:cat: NOTE2
  3680. TO FIX: refer to manual
  3681. label:foo: NOTE
  3682. TO FIX: action
  3683. I.e., the output produced by the TEXT and the TAG parameters to ‘fmtmsg’
  3684. vanished. Please also note that now there is no colon after the ‘NOTE’
  3685. and ‘NOTE2’ strings in the output. This is not necessary since there is
  3686. no more output on this line because the text is missing.
  3687. 
  3688. File: libc.info, Node: Low-Level I/O, Next: File System Interface, Prev: I/O on Streams, Up: Top
  3689. 13 Low-Level Input/Output
  3690. *************************
  3691. This chapter describes functions for performing low-level input/output
  3692. operations on file descriptors. These functions include the primitives
  3693. for the higher-level I/O functions described in *note I/O on Streams::,
  3694. as well as functions for performing low-level control operations for
  3695. which there are no equivalents on streams.
  3696. Stream-level I/O is more flexible and usually more convenient;
  3697. therefore, programmers generally use the descriptor-level functions only
  3698. when necessary. These are some of the usual reasons:
  3699. • For reading binary files in large chunks.
  3700. • For reading an entire file into core before parsing it.
  3701. • To perform operations other than data transfer, which can only be
  3702. done with a descriptor. (You can use ‘fileno’ to get the
  3703. descriptor corresponding to a stream.)
  3704. • To pass descriptors to a child process. (The child can create its
  3705. own stream to use a descriptor that it inherits, but cannot inherit
  3706. a stream directly.)
  3707. * Menu:
  3708. * Opening and Closing Files:: How to open and close file
  3709. descriptors.
  3710. * I/O Primitives:: Reading and writing data.
  3711. * File Position Primitive:: Setting a descriptor's file
  3712. position.
  3713. * Descriptors and Streams:: Converting descriptor to stream
  3714. or vice-versa.
  3715. * Stream/Descriptor Precautions:: Precautions needed if you use both
  3716. descriptors and streams.
  3717. * Scatter-Gather:: Fast I/O to discontinuous buffers.
  3718. * Copying File Data:: Copying data between files.
  3719. * Memory-mapped I/O:: Using files like memory.
  3720. * Waiting for I/O:: How to check for input or output
  3721. on multiple file descriptors.
  3722. * Synchronizing I/O:: Making sure all I/O actions completed.
  3723. * Asynchronous I/O:: Perform I/O in parallel.
  3724. * Control Operations:: Various other operations on file
  3725. descriptors.
  3726. * Duplicating Descriptors:: Fcntl commands for duplicating
  3727. file descriptors.
  3728. * Descriptor Flags:: Fcntl commands for manipulating
  3729. flags associated with file
  3730. descriptors.
  3731. * File Status Flags:: Fcntl commands for manipulating
  3732. flags associated with open files.
  3733. * File Locks:: Fcntl commands for implementing
  3734. file locking.
  3735. * Open File Description Locks:: Fcntl commands for implementing
  3736. open file description locking.
  3737. * Open File Description Locks Example:: An example of open file description lock
  3738. usage
  3739. * Interrupt Input:: Getting an asynchronous signal when
  3740. input arrives.
  3741. * IOCTLs:: Generic I/O Control operations.
  3742. * Other Low-Level I/O APIs:: Other low-level-I/O-related functions.
  3743. 
  3744. File: libc.info, Node: Opening and Closing Files, Next: I/O Primitives, Up: Low-Level I/O
  3745. 13.1 Opening and Closing Files
  3746. ==============================
  3747. This section describes the primitives for opening and closing files
  3748. using file descriptors. The ‘open’ and ‘creat’ functions are declared
  3749. in the header file ‘fcntl.h’, while ‘close’ is declared in ‘unistd.h’.
  3750. -- Function: int open (const char *FILENAME, int FLAGS[, mode_t MODE])
  3751. Preliminary: | MT-Safe | AS-Safe | AC-Safe fd | *Note POSIX Safety
  3752. Concepts::.
  3753. The ‘open’ function creates and returns a new file descriptor for
  3754. the file named by FILENAME. Initially, the file position indicator
  3755. for the file is at the beginning of the file. The argument MODE
  3756. (*note Permission Bits::) is used only when a file is created, but
  3757. it doesn't hurt to supply the argument in any case.
  3758. The FLAGS argument controls how the file is to be opened. This is
  3759. a bit mask; you create the value by the bitwise OR of the
  3760. appropriate parameters (using the ‘|’ operator in C). *Note File
  3761. Status Flags::, for the parameters available.
  3762. The normal return value from ‘open’ is a non-negative integer file
  3763. descriptor. In the case of an error, a value of -1 is returned
  3764. instead. In addition to the usual file name errors (*note File
  3765. Name Errors::), the following ‘errno’ error conditions are defined
  3766. for this function:
  3767. ‘EACCES’
  3768. The file exists but is not readable/writable as requested by
  3769. the FLAGS argument, or the file does not exist and the
  3770. directory is unwritable so it cannot be created.
  3771. ‘EEXIST’
  3772. Both ‘O_CREAT’ and ‘O_EXCL’ are set, and the named file
  3773. already exists.
  3774. ‘EINTR’
  3775. The ‘open’ operation was interrupted by a signal. *Note
  3776. Interrupted Primitives::.
  3777. ‘EISDIR’
  3778. The FLAGS argument specified write access, and the file is a
  3779. directory.
  3780. ‘EMFILE’
  3781. The process has too many files open. The maximum number of
  3782. file descriptors is controlled by the ‘RLIMIT_NOFILE’ resource
  3783. limit; *note Limits on Resources::.
  3784. ‘ENFILE’
  3785. The entire system, or perhaps the file system which contains
  3786. the directory, cannot support any additional open files at the
  3787. moment. (This problem cannot happen on GNU/Hurd systems.)
  3788. ‘ENOENT’
  3789. The named file does not exist, and ‘O_CREAT’ is not specified.
  3790. ‘ENOSPC’
  3791. The directory or file system that would contain the new file
  3792. cannot be extended, because there is no disk space left.
  3793. ‘ENXIO’
  3794. ‘O_NONBLOCK’ and ‘O_WRONLY’ are both set in the FLAGS
  3795. argument, the file named by FILENAME is a FIFO (*note Pipes
  3796. and FIFOs::), and no process has the file open for reading.
  3797. ‘EROFS’
  3798. The file resides on a read-only file system and any of
  3799. ‘O_WRONLY’, ‘O_RDWR’, and ‘O_TRUNC’ are set in the FLAGS
  3800. argument, or ‘O_CREAT’ is set and the file does not already
  3801. exist.
  3802. If on a 32 bit machine the sources are translated with
  3803. ‘_FILE_OFFSET_BITS == 64’ the function ‘open’ returns a file
  3804. descriptor opened in the large file mode which enables the file
  3805. handling functions to use files up to 2^63 bytes in size and offset
  3806. from −2^63 to 2^63. This happens transparently for the user since
  3807. all of the low-level file handling functions are equally replaced.
  3808. This function is a cancellation point in multi-threaded programs.
  3809. This is a problem if the thread allocates some resources (like
  3810. memory, file descriptors, semaphores or whatever) at the time
  3811. ‘open’ is called. If the thread gets canceled these resources stay
  3812. allocated until the program ends. To avoid this calls to ‘open’
  3813. should be protected using cancellation handlers.
  3814. The ‘open’ function is the underlying primitive for the ‘fopen’ and
  3815. ‘freopen’ functions, that create streams.
  3816. -- Function: int open64 (const char *FILENAME, int FLAGS[, mode_t
  3817. MODE])
  3818. Preliminary: | MT-Safe | AS-Safe | AC-Safe fd | *Note POSIX Safety
  3819. Concepts::.
  3820. This function is similar to ‘open’. It returns a file descriptor
  3821. which can be used to access the file named by FILENAME. The only
  3822. difference is that on 32 bit systems the file is opened in the
  3823. large file mode. I.e., file length and file offsets can exceed 31
  3824. bits.
  3825. When the sources are translated with ‘_FILE_OFFSET_BITS == 64’ this
  3826. function is actually available under the name ‘open’. I.e., the
  3827. new, extended API using 64 bit file sizes and offsets transparently
  3828. replaces the old API.
  3829. -- Function: int openat (int FILEDES, const char *FILENAME, int FLAGS[,
  3830. mode_t MODE])
  3831. Preliminary: | MT-Safe | AS-Safe | AC-Safe fd | *Note POSIX Safety
  3832. Concepts::.
  3833. This function is the descriptor-relative variant of the ‘open’
  3834. function. *Note Descriptor-Relative Access::.
  3835. Note that the FLAGS argument of ‘openat’ does not accept ‘AT_...’
  3836. flags, only the flags described for the ‘open’ function above.
  3837. The ‘openat’ function can fail for additional reasons:
  3838. ‘EBADF’
  3839. The FILEDES argument is not a valid file descriptor.
  3840. ‘ENOTDIR’
  3841. The descriptor FILEDES is not associated with a directory, and
  3842. FILENAME is a relative file name.
  3843. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ this
  3844. function is in fact ‘openat64’ since the LFS interface
  3845. transparently replaces the normal implementation.
  3846. -- Function: int openat64 (int FILEDES, const char *FILENAME, int
  3847. FLAGS[, mode_t MODE])
  3848. The large-file variant of the ‘openat’, similar to how ‘open64’ is
  3849. the large-file variant of ‘open’.
  3850. When the sources are translated with ‘_FILE_OFFSET_BITS == 64’ this
  3851. function is actually available under the name ‘openat’. I.e., the
  3852. new, extended API using 64 bit file sizes and offsets transparently
  3853. replaces the old API.
  3854. -- Data Type: struct open_how
  3855. The ‘open_how’ structure describes how to open a file using
  3856. ‘openat2’.
  3857. *Portability note:* In the future, additional fields can be added
  3858. to ‘struct open_how’, so that the size of this data type increases.
  3859. Do not use it in places where this matters, such as structure
  3860. fields in installed header files, where such a change could affect
  3861. the application binary interface (ABI).
  3862. The following generic fields are available.
  3863. ‘flags’
  3864. This field specifies the file creation and file status flags
  3865. to use when opening the file. All of the ‘O_*’ flags defined
  3866. for ‘openat’ are valid. The ‘openat2’ is stricter than
  3867. ‘openat’ in rejecting unknown or conflicting values. For
  3868. example, ‘openat2’ rejects a mode that exceeds 07777, whereas
  3869. ‘openat’ silently ignores excess high-order bits.
  3870. ‘mode’
  3871. This field specifies the mode for the new file, similar to
  3872. ‘mode’ argument of ‘openat’. It should be in the range
  3873. 0..07777.
  3874. ‘resolve’
  3875. This is a bitmask of flags that affect the resolution of file
  3876. name components. Unlike ‘O_NOFOLLOW’, it affects all file
  3877. name components, not just the last one. The following flags
  3878. are available.
  3879. ‘RESOLVE_NO_XDEV’
  3880. Disallow traversal of mount points during path resolution
  3881. (including all bind mounts).
  3882. ‘RESOLVE_NO_MAGICLINKS’
  3883. Disallow all *magic-link* resolution during path
  3884. resolution. Magic links are symbolic link-like objects
  3885. that are found in *procfs*; for example the
  3886. ‘/proc/pid/exe’.
  3887. ‘RESOLVE_NO_SYMLINKS’
  3888. Disallow resolution of symbolic links during path
  3889. resolution. This option implies ‘RESOLVE_NO_MAGICLINKS’.
  3890. ‘RESOLVE_BENEATH’
  3891. This rejects absolute pathnames, pathnames containing
  3892. ‘..’ components that would be resolved relative to DFD,
  3893. and symbolic links that resolve to pathnames that would
  3894. be rejected. The rejection occurs even if DFD is the
  3895. root directory.
  3896. ‘RESOLVE_IN_ROOT’
  3897. Treat absolute pathnames as being relative to DFD, treat
  3898. a ‘..’ component as being equivalent to ‘.’ if it is
  3899. resolved relative to DFD, and treat symbolic link
  3900. contents consistently with this.
  3901. -- Function: int openat2 (int DIRFD, const char *PATHNAME, const struct
  3902. open_how *HOW, size_t SIZE)
  3903. | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety Concepts::.
  3904. This function is an extension of the ‘openat’ and provides a
  3905. superset of its functionality. *Note Descriptor-Relative Access::.
  3906. The SIZE argument must equal ‘sizeof *HOW’. For portability to
  3907. future API versions that may extend ‘struct open_how’, ‘*HOW’
  3908. should be fully initialized e.g., by a struct initializer, by
  3909. ‘memset’ to zero, or by having static storage duration.
  3910. On failure, ‘openat2’ returns -1 and sets ‘errno’. It can fail for
  3911. any of the reasons ‘openat’ fails, plus the following reasons:
  3912. ‘E2BIG’
  3913. SIZE is too large for any future extension, ‘*HOW’ contains
  3914. non-zero members that are future extensions not supported by
  3915. this kernel
  3916. ‘EINVAL’
  3917. An unknown flag or invalid value was used on ‘*HOW’; or
  3918. ‘HOW->mode’ is non-zero, but ‘HOW->flags’ does not contain
  3919. ‘O_CREAT’ or ‘O_TMPFILE’, or SIZE is smaller than the ones
  3920. supported by the kernel.
  3921. It can also return all the errors ‘openat’ returns.
  3922. Similar to ‘openat’, ‘openat2’ is a cancellation point.
  3923. Unlike other ‘open’-like functions, this function ignores
  3924. ‘_FILE_OFFSET_BITS’ and always operates in large file mode.
  3925. -- Obsolete function: int creat (const char *FILENAME, mode_t MODE)
  3926. Preliminary: | MT-Safe | AS-Safe | AC-Safe fd | *Note POSIX Safety
  3927. Concepts::.
  3928. This function is obsolete. The call:
  3929. creat (FILENAME, MODE)
  3930. is equivalent to:
  3931. open (FILENAME, O_WRONLY | O_CREAT | O_TRUNC, MODE)
  3932. If on a 32 bit machine the sources are translated with
  3933. ‘_FILE_OFFSET_BITS == 64’ the function ‘creat’ returns a file
  3934. descriptor opened in the large file mode which enables the file
  3935. handling functions to use files up to 2^63 in size and offset from
  3936. −2^63 to 2^63. This happens transparently for the user since all
  3937. of the low-level file handling functions are equally replaced.
  3938. -- Obsolete function: int creat64 (const char *FILENAME, mode_t MODE)
  3939. Preliminary: | MT-Safe | AS-Safe | AC-Safe fd | *Note POSIX Safety
  3940. Concepts::.
  3941. This function is similar to ‘creat’. It returns a file descriptor
  3942. which can be used to access the file named by FILENAME. The only
  3943. difference is that on 32 bit systems the file is opened in the
  3944. large file mode. I.e., file length and file offsets can exceed 31
  3945. bits.
  3946. To use this file descriptor one must not use the normal operations
  3947. but instead the counterparts named ‘*64’, e.g., ‘read64’.
  3948. When the sources are translated with ‘_FILE_OFFSET_BITS == 64’ this
  3949. function is actually available under the name ‘open’. I.e., the
  3950. new, extended API using 64 bit file sizes and offsets transparently
  3951. replaces the old API.
  3952. -- Function: int close (int FILEDES)
  3953. Preliminary: | MT-Safe | AS-Safe | AC-Safe fd | *Note POSIX Safety
  3954. Concepts::.
  3955. The function ‘close’ closes the file descriptor FILEDES. Closing a
  3956. file has the following consequences:
  3957. • The file descriptor is deallocated.
  3958. • Any record locks owned by the process on the file are
  3959. unlocked.
  3960. • When all file descriptors associated with a pipe or FIFO have
  3961. been closed, any unread data is discarded.
  3962. This function is a cancellation point in multi-threaded programs.
  3963. This is a problem if the thread allocates some resources (like
  3964. memory, file descriptors, semaphores or whatever) at the time
  3965. ‘close’ is called. If the thread gets canceled these resources
  3966. stay allocated until the program ends. To avoid this, calls to
  3967. ‘close’ should be protected using cancellation handlers.
  3968. The normal return value from ‘close’ is 0; a value of -1 is
  3969. returned in case of failure. The following ‘errno’ error
  3970. conditions are defined for this function:
  3971. ‘EBADF’
  3972. The FILEDES argument is not a valid file descriptor.
  3973. ‘EINTR’
  3974. The ‘close’ call was interrupted by a signal. *Note
  3975. Interrupted Primitives::. Here is an example of how to handle
  3976. ‘EINTR’ properly:
  3977. TEMP_FAILURE_RETRY (close (desc));
  3978. ‘ENOSPC’
  3979. ‘EIO’
  3980. ‘EDQUOT’
  3981. When the file is accessed by NFS, these errors from ‘write’
  3982. can sometimes not be detected until ‘close’. *Note I/O
  3983. Primitives::, for details on their meaning.
  3984. Please note that there is _no_ separate ‘close64’ function. This
  3985. is not necessary since this function does not determine nor depend
  3986. on the mode of the file. The kernel which performs the ‘close’
  3987. operation knows which mode the descriptor is used for and can
  3988. handle this situation.
  3989. To close a stream, call ‘fclose’ (*note Closing Streams::) instead of
  3990. trying to close its underlying file descriptor with ‘close’. This
  3991. flushes any buffered output and updates the stream object to indicate
  3992. that it is closed.
  3993. -- Function: int close_range (unsigned int LOWFD, unsigned int MAXFD,
  3994. int FLAGS)
  3995. Preliminary: | MT-Safe | AS-Safe | AC-Safe fd | *Note POSIX Safety
  3996. Concepts::.
  3997. The function ‘close_range’ closes the file descriptor from LOWFD to
  3998. MAXFD (inclusive). This function is similar to call ‘close’ in
  3999. specified file descriptor range depending on the FLAGS.
  4000. This is function is only supported on recent Linux versions and the
  4001. GNU C Library does not provide any fallback (the application will
  4002. need to handle possible ‘ENOSYS’).
  4003. The FLAGS add options on how the files are closes. Linux currently
  4004. supports:
  4005. ‘CLOSE_RANGE_UNSHARE’
  4006. Unshare the file descriptor table before closing file
  4007. descriptors.
  4008. ‘CLOSE_RANGE_CLOEXEC’
  4009. Set the ‘FD_CLOEXEC’ bit instead of closing the file
  4010. descriptor.
  4011. The normal return value from ‘close_range’ is 0; a value of -1 is
  4012. returned in case of failure. The following ‘errno’ error
  4013. conditions are defined for this function:
  4014. ‘EINVAL’
  4015. The LOWFD value is larger than MAXFD or an unsupported FLAGS
  4016. is used.
  4017. ‘ENOMEM’
  4018. Either there is not enough memory for the operation, or the
  4019. process is out of address space. It can only happen when
  4020. ‘CLOSE_RANGE_UNSHARED’ flag is used.
  4021. ‘EMFILE’
  4022. The process has too many files open and it can only happens
  4023. when ‘CLOSE_RANGE_UNSHARED’ flag is used. The maximum number
  4024. of file descriptors is controlled by the ‘RLIMIT_NOFILE’
  4025. resource limit; *note Limits on Resources::.
  4026. ‘ENOSYS’
  4027. The kernel does not implement the required functionality.
  4028. -- Function: void closefrom (int LOWFD)
  4029. Preliminary: | MT-Safe | AS-Safe | AC-Safe fd | *Note POSIX Safety
  4030. Concepts::.
  4031. The function ‘closefrom’ closes all file descriptors greater than
  4032. or equal to LOWFD. This function is similar to calling ‘close’ for
  4033. all open file descriptors not less than LOWFD.
  4034. Already closed file descriptors are ignored.
  4035. 
  4036. File: libc.info, Node: I/O Primitives, Next: File Position Primitive, Prev: Opening and Closing Files, Up: Low-Level I/O
  4037. 13.2 Input and Output Primitives
  4038. ================================
  4039. This section describes the functions for performing primitive input and
  4040. output operations on file descriptors: ‘read’, ‘write’, and ‘lseek’.
  4041. These functions are declared in the header file ‘unistd.h’.
  4042. -- Data Type: ssize_t
  4043. This data type is used to represent the sizes of blocks that can be
  4044. read or written in a single operation. It is similar to ‘size_t’,
  4045. but must be a signed type.
  4046. -- Function: ssize_t read (int FILEDES, void *BUFFER, size_t SIZE)
  4047. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4048. Concepts::.
  4049. The ‘read’ function reads up to SIZE bytes from the file with
  4050. descriptor FILEDES, storing the results in the BUFFER. (This is
  4051. not necessarily a character string, and no terminating null
  4052. character is added.)
  4053. The return value is the number of bytes actually read. This might
  4054. be less than SIZE; for example, if there aren't that many bytes
  4055. left in the file or if there aren't that many bytes immediately
  4056. available. The exact behavior depends on what kind of file it is.
  4057. Note that reading less than SIZE bytes is not an error.
  4058. A value of zero indicates end-of-file (except if the value of the
  4059. SIZE argument is also zero). This is not considered an error. If
  4060. you keep calling ‘read’ while at end-of-file, it will keep
  4061. returning zero and doing nothing else.
  4062. If ‘read’ returns at least one character, there is no way you can
  4063. tell whether end-of-file was reached. But if you did reach the
  4064. end, the next read will return zero.
  4065. In case of an error, ‘read’ returns -1. The following ‘errno’
  4066. error conditions are defined for this function:
  4067. ‘EAGAIN’
  4068. Normally, when no input is immediately available, ‘read’ waits
  4069. for some input. But if the ‘O_NONBLOCK’ flag is set for the
  4070. file (*note File Status Flags::), ‘read’ returns immediately
  4071. without reading any data, and reports this error.
  4072. *Compatibility Note:* Most versions of BSD Unix use a
  4073. different error code for this: ‘EWOULDBLOCK’. In the GNU C
  4074. Library, ‘EWOULDBLOCK’ is an alias for ‘EAGAIN’, so it doesn't
  4075. matter which name you use.
  4076. On some systems, reading a large amount of data from a
  4077. character special file can also fail with ‘EAGAIN’ if the
  4078. kernel cannot find enough physical memory to lock down the
  4079. user's pages. This is limited to devices that transfer with
  4080. direct memory access into the user's memory, which means it
  4081. does not include terminals, since they always use separate
  4082. buffers inside the kernel. This problem never happens on
  4083. GNU/Hurd systems.
  4084. Any condition that could result in ‘EAGAIN’ can instead result
  4085. in a successful ‘read’ which returns fewer bytes than
  4086. requested. Calling ‘read’ again immediately would result in
  4087. ‘EAGAIN’.
  4088. ‘EBADF’
  4089. The FILEDES argument is not a valid file descriptor, or is not
  4090. open for reading.
  4091. ‘EINTR’
  4092. ‘read’ was interrupted by a signal while it was waiting for
  4093. input. *Note Interrupted Primitives::. A signal will not
  4094. necessarily cause ‘read’ to return ‘EINTR’; it may instead
  4095. result in a successful ‘read’ which returns fewer bytes than
  4096. requested.
  4097. ‘EIO’
  4098. For many devices, and for disk files, this error code
  4099. indicates a hardware error.
  4100. ‘EIO’ also occurs when a background process tries to read from
  4101. the controlling terminal, and the normal action of stopping
  4102. the process by sending it a ‘SIGTTIN’ signal isn't working.
  4103. This might happen if the signal is being blocked or ignored,
  4104. or because the process group is orphaned. *Note Job
  4105. Control::, for more information about job control, and *note
  4106. Signal Handling::, for information about signals.
  4107. ‘EINVAL’
  4108. In some systems, when reading from a character or block
  4109. device, position and size offsets must be aligned to a
  4110. particular block size. This error indicates that the offsets
  4111. were not properly aligned.
  4112. Please note that there is no function named ‘read64’. This is not
  4113. necessary since this function does not directly modify or handle
  4114. the possibly wide file offset. Since the kernel handles this state
  4115. internally, the ‘read’ function can be used for all cases.
  4116. This function is a cancellation point in multi-threaded programs.
  4117. This is a problem if the thread allocates some resources (like
  4118. memory, file descriptors, semaphores or whatever) at the time
  4119. ‘read’ is called. If the thread gets canceled these resources stay
  4120. allocated until the program ends. To avoid this, calls to ‘read’
  4121. should be protected using cancellation handlers.
  4122. The ‘read’ function is the underlying primitive for all of the
  4123. functions that read from streams, such as ‘fgetc’.
  4124. -- Function: ssize_t pread (int FILEDES, void *BUFFER, size_t SIZE,
  4125. off_t OFFSET)
  4126. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4127. Concepts::.
  4128. The ‘pread’ function is similar to the ‘read’ function. The first
  4129. three arguments are identical, and the return values and error
  4130. codes also correspond.
  4131. The difference is the fourth argument and its handling. The data
  4132. block is not read from the current position of the file descriptor
  4133. ‘filedes’. Instead the data is read from the file starting at
  4134. position OFFSET. The position of the file descriptor itself is not
  4135. affected by the operation. The value is the same as before the
  4136. call.
  4137. When the source file is compiled with ‘_FILE_OFFSET_BITS == 64’ the
  4138. ‘pread’ function is in fact ‘pread64’ and the type ‘off_t’ has 64
  4139. bits, which makes it possible to handle files up to 2^63 bytes in
  4140. length.
  4141. The return value of ‘pread’ describes the number of bytes read. In
  4142. the error case it returns -1 like ‘read’ does and the error codes
  4143. are also the same, with these additions:
  4144. ‘EINVAL’
  4145. The value given for OFFSET is negative and therefore illegal.
  4146. ‘ESPIPE’
  4147. The file descriptor FILEDES is associated with a pipe or a
  4148. FIFO and this device does not allow positioning of the file
  4149. pointer.
  4150. The function is an extension defined in the Unix Single
  4151. Specification version 2.
  4152. -- Function: ssize_t pread64 (int FILEDES, void *BUFFER, size_t SIZE,
  4153. off64_t OFFSET)
  4154. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4155. Concepts::.
  4156. This function is similar to the ‘pread’ function. The difference
  4157. is that the OFFSET parameter is of type ‘off64_t’ instead of
  4158. ‘off_t’ which makes it possible on 32 bit machines to address files
  4159. larger than 2^31 bytes and up to 2^63 bytes. The file descriptor
  4160. ‘filedes’ must be opened using ‘open64’ since otherwise the large
  4161. offsets possible with ‘off64_t’ will lead to errors with a
  4162. descriptor in small file mode.
  4163. When the source file is compiled with ‘_FILE_OFFSET_BITS == 64’ on
  4164. a 32 bit machine this function is actually available under the name
  4165. ‘pread’ and so transparently replaces the 32 bit interface.
  4166. -- Function: ssize_t write (int FILEDES, const void *BUFFER, size_t
  4167. SIZE)
  4168. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4169. Concepts::.
  4170. The ‘write’ function writes up to SIZE bytes from BUFFER to the
  4171. file with descriptor FILEDES. The data in BUFFER is not
  4172. necessarily a character string and a null character is output like
  4173. any other character.
  4174. The return value is the number of bytes actually written. This may
  4175. be SIZE, but can always be smaller. Your program should always
  4176. call ‘write’ in a loop, iterating until all the data is written.
  4177. Once ‘write’ returns, the data is enqueued to be written and can be
  4178. read back right away, but it is not necessarily written out to
  4179. permanent storage immediately. You can use ‘fsync’ when you need
  4180. to be sure your data has been permanently stored before continuing.
  4181. (It is more efficient for the system to batch up consecutive writes
  4182. and do them all at once when convenient. Normally they will always
  4183. be written to disk within a minute or less.) Modern systems
  4184. provide another function ‘fdatasync’ which guarantees integrity
  4185. only for the file data and is therefore faster. You can use the
  4186. ‘O_FSYNC’ open mode to make ‘write’ always store the data to disk
  4187. before returning; *note Operating Modes::.
  4188. In the case of an error, ‘write’ returns -1. The following ‘errno’
  4189. error conditions are defined for this function:
  4190. ‘EAGAIN’
  4191. Normally, ‘write’ blocks until the write operation is
  4192. complete. But if the ‘O_NONBLOCK’ flag is set for the file
  4193. (*note Control Operations::), it returns immediately without
  4194. writing any data and reports this error. An example of a
  4195. situation that might cause the process to block on output is
  4196. writing to a terminal device that supports flow control, where
  4197. output has been suspended by receipt of a STOP character.
  4198. *Compatibility Note:* Most versions of BSD Unix use a
  4199. different error code for this: ‘EWOULDBLOCK’. In the GNU C
  4200. Library, ‘EWOULDBLOCK’ is an alias for ‘EAGAIN’, so it doesn't
  4201. matter which name you use.
  4202. On some systems, writing a large amount of data from a
  4203. character special file can also fail with ‘EAGAIN’ if the
  4204. kernel cannot find enough physical memory to lock down the
  4205. user's pages. This is limited to devices that transfer with
  4206. direct memory access into the user's memory, which means it
  4207. does not include terminals, since they always use separate
  4208. buffers inside the kernel. This problem does not arise on
  4209. GNU/Hurd systems.
  4210. ‘EBADF’
  4211. The FILEDES argument is not a valid file descriptor, or is not
  4212. open for writing.
  4213. ‘EFBIG’
  4214. The size of the file would become larger than the
  4215. implementation can support.
  4216. ‘EINTR’
  4217. The ‘write’ operation was interrupted by a signal while it was
  4218. blocked waiting for completion. A signal will not necessarily
  4219. cause ‘write’ to return ‘EINTR’; it may instead result in a
  4220. successful ‘write’ which writes fewer bytes than requested.
  4221. *Note Interrupted Primitives::.
  4222. ‘EIO’
  4223. For many devices, and for disk files, this error code
  4224. indicates a hardware error.
  4225. ‘ENOSPC’
  4226. The device containing the file is full.
  4227. ‘EPIPE’
  4228. This error is returned when you try to write to a pipe or FIFO
  4229. that isn't open for reading by any process. When this
  4230. happens, a ‘SIGPIPE’ signal is also sent to the process; see
  4231. *note Signal Handling::.
  4232. ‘EINVAL’
  4233. In some systems, when writing to a character or block device,
  4234. position and size offsets must be aligned to a particular
  4235. block size. This error indicates that the offsets were not
  4236. properly aligned.
  4237. Unless you have arranged to prevent ‘EINTR’ failures, you should
  4238. check ‘errno’ after each failing call to ‘write’, and if the error
  4239. was ‘EINTR’, you should simply repeat the call. *Note Interrupted
  4240. Primitives::. The easy way to do this is with the macro
  4241. ‘TEMP_FAILURE_RETRY’, as follows:
  4242. nbytes = TEMP_FAILURE_RETRY (write (desc, buffer, count));
  4243. Please note that there is no function named ‘write64’. This is not
  4244. necessary since this function does not directly modify or handle
  4245. the possibly wide file offset. Since the kernel handles this state
  4246. internally the ‘write’ function can be used for all cases.
  4247. This function is a cancellation point in multi-threaded programs.
  4248. This is a problem if the thread allocates some resources (like
  4249. memory, file descriptors, semaphores or whatever) at the time
  4250. ‘write’ is called. If the thread gets canceled these resources
  4251. stay allocated until the program ends. To avoid this, calls to
  4252. ‘write’ should be protected using cancellation handlers.
  4253. The ‘write’ function is the underlying primitive for all of the
  4254. functions that write to streams, such as ‘fputc’.
  4255. -- Function: ssize_t pwrite (int FILEDES, const void *BUFFER, size_t
  4256. SIZE, off_t OFFSET)
  4257. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4258. Concepts::.
  4259. The ‘pwrite’ function is similar to the ‘write’ function. The
  4260. first three arguments are identical, and the return values and
  4261. error codes also correspond.
  4262. The difference is the fourth argument and its handling. The data
  4263. block is not written to the current position of the file descriptor
  4264. ‘filedes’. Instead the data is written to the file starting at
  4265. position OFFSET. The position of the file descriptor itself is not
  4266. affected by the operation. The value is the same as before the
  4267. call.
  4268. However, on Linux, if a file is opened with ‘O_APPEND’, ‘pwrite’
  4269. appends data to the end of the file, regardless of the value of
  4270. ‘offset’.
  4271. When the source file is compiled with ‘_FILE_OFFSET_BITS == 64’ the
  4272. ‘pwrite’ function is in fact ‘pwrite64’ and the type ‘off_t’ has 64
  4273. bits, which makes it possible to handle files up to 2^63 bytes in
  4274. length.
  4275. The return value of ‘pwrite’ describes the number of written bytes.
  4276. In the error case it returns -1 like ‘write’ does and the error
  4277. codes are also the same, with these additions:
  4278. ‘EINVAL’
  4279. The value given for OFFSET is negative and therefore illegal.
  4280. ‘ESPIPE’
  4281. The file descriptor FILEDES is associated with a pipe or a
  4282. FIFO and this device does not allow positioning of the file
  4283. pointer.
  4284. The function is an extension defined in the Unix Single
  4285. Specification version 2.
  4286. -- Function: ssize_t pwrite64 (int FILEDES, const void *BUFFER, size_t
  4287. SIZE, off64_t OFFSET)
  4288. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4289. Concepts::.
  4290. This function is similar to the ‘pwrite’ function. The difference
  4291. is that the OFFSET parameter is of type ‘off64_t’ instead of
  4292. ‘off_t’ which makes it possible on 32 bit machines to address files
  4293. larger than 2^31 bytes and up to 2^63 bytes. The file descriptor
  4294. ‘filedes’ must be opened using ‘open64’ since otherwise the large
  4295. offsets possible with ‘off64_t’ will lead to errors with a
  4296. descriptor in small file mode.
  4297. When the source file is compiled using ‘_FILE_OFFSET_BITS == 64’ on
  4298. a 32 bit machine this function is actually available under the name
  4299. ‘pwrite’ and so transparently replaces the 32 bit interface.
  4300. 
  4301. File: libc.info, Node: File Position Primitive, Next: Descriptors and Streams, Prev: I/O Primitives, Up: Low-Level I/O
  4302. 13.3 Setting the File Position of a Descriptor
  4303. ==============================================
  4304. Just as you can set the file position of a stream with ‘fseek’, you can
  4305. set the file position of a descriptor with ‘lseek’. This specifies the
  4306. position in the file for the next ‘read’ or ‘write’ operation. *Note
  4307. File Positioning::, for more information on the file position and what
  4308. it means.
  4309. To read the current file position value from a descriptor, use ‘lseek
  4310. (DESC, 0, SEEK_CUR)’.
  4311. -- Function: off_t lseek (int FILEDES, off_t OFFSET, int WHENCE)
  4312. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4313. Concepts::.
  4314. The ‘lseek’ function is used to change the file position of the
  4315. file with descriptor FILEDES.
  4316. The WHENCE argument specifies how the OFFSET should be interpreted,
  4317. in the same way as for the ‘fseek’ function, and it must be one of
  4318. the symbolic constants ‘SEEK_SET’, ‘SEEK_CUR’, or ‘SEEK_END’.
  4319. ‘SEEK_SET’
  4320. Specifies that OFFSET is a count of characters from the
  4321. beginning of the file.
  4322. ‘SEEK_CUR’
  4323. Specifies that OFFSET is a count of characters from the
  4324. current file position. This count may be positive or
  4325. negative.
  4326. ‘SEEK_END’
  4327. Specifies that OFFSET is a count of characters from the end of
  4328. the file. A negative count specifies a position within the
  4329. current extent of the file; a positive count specifies a
  4330. position past the current end. If you set the position past
  4331. the current end, and actually write data, you will extend the
  4332. file with zeros up to that position.
  4333. The return value from ‘lseek’ is normally the resulting file
  4334. position, measured in bytes from the beginning of the file. You
  4335. can use this feature together with ‘SEEK_CUR’ to read the current
  4336. file position.
  4337. If you want to append to the file, setting the file position to the
  4338. current end of file with ‘SEEK_END’ is not sufficient. Another
  4339. process may write more data after you seek but before you write,
  4340. extending the file so the position you write onto clobbers their
  4341. data. Instead, use the ‘O_APPEND’ operating mode; *note Operating
  4342. Modes::.
  4343. You can set the file position past the current end of the file.
  4344. This does not by itself make the file longer; ‘lseek’ never changes
  4345. the file. But subsequent output at that position will extend the
  4346. file. Characters between the previous end of file and the new
  4347. position are filled with zeros. Extending the file in this way can
  4348. create a "hole": the blocks of zeros are not actually allocated on
  4349. disk, so the file takes up less space than it appears to; it is
  4350. then called a "sparse file".
  4351. If the file position cannot be changed, or the operation is in some
  4352. way invalid, ‘lseek’ returns a value of -1. The following ‘errno’
  4353. error conditions are defined for this function:
  4354. ‘EBADF’
  4355. The FILEDES is not a valid file descriptor.
  4356. ‘EINVAL’
  4357. The WHENCE argument value is not valid, or the resulting file
  4358. offset is not valid. A file offset is invalid.
  4359. ‘ESPIPE’
  4360. The FILEDES corresponds to an object that cannot be
  4361. positioned, such as a pipe, FIFO or terminal device. (POSIX.1
  4362. specifies this error only for pipes and FIFOs, but on GNU
  4363. systems, you always get ‘ESPIPE’ if the object is not
  4364. seekable.)
  4365. When the source file is compiled with ‘_FILE_OFFSET_BITS == 64’ the
  4366. ‘lseek’ function is in fact ‘lseek64’ and the type ‘off_t’ has 64
  4367. bits which makes it possible to handle files up to 2^63 bytes in
  4368. length.
  4369. This function is a cancellation point in multi-threaded programs.
  4370. This is a problem if the thread allocates some resources (like
  4371. memory, file descriptors, semaphores or whatever) at the time
  4372. ‘lseek’ is called. If the thread gets canceled these resources
  4373. stay allocated until the program ends. To avoid this calls to
  4374. ‘lseek’ should be protected using cancellation handlers.
  4375. The ‘lseek’ function is the underlying primitive for the ‘fseek’,
  4376. ‘fseeko’, ‘ftell’, ‘ftello’ and ‘rewind’ functions, which operate
  4377. on streams instead of file descriptors.
  4378. -- Function: off64_t lseek64 (int FILEDES, off64_t OFFSET, int WHENCE)
  4379. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4380. Concepts::.
  4381. This function is similar to the ‘lseek’ function. The difference
  4382. is that the OFFSET parameter is of type ‘off64_t’ instead of
  4383. ‘off_t’ which makes it possible on 32 bit machines to address files
  4384. larger than 2^31 bytes and up to 2^63 bytes. The file descriptor
  4385. ‘filedes’ must be opened using ‘open64’ since otherwise the large
  4386. offsets possible with ‘off64_t’ will lead to errors with a
  4387. descriptor in small file mode.
  4388. When the source file is compiled with ‘_FILE_OFFSET_BITS == 64’ on
  4389. a 32 bits machine this function is actually available under the
  4390. name ‘lseek’ and so transparently replaces the 32 bit interface.
  4391. You can have multiple descriptors for the same file if you open the
  4392. file more than once, or if you duplicate a descriptor with ‘dup’.
  4393. Descriptors that come from separate calls to ‘open’ have independent
  4394. file positions; using ‘lseek’ on one descriptor has no effect on the
  4395. other. For example,
  4396. {
  4397. int d1, d2;
  4398. char buf[4];
  4399. d1 = open ("foo", O_RDONLY);
  4400. d2 = open ("foo", O_RDONLY);
  4401. lseek (d1, 1024, SEEK_SET);
  4402. read (d2, buf, 4);
  4403. }
  4404. will read the first four characters of the file ‘foo’. (The
  4405. error-checking code necessary for a real program has been omitted here
  4406. for brevity.)
  4407. By contrast, descriptors made by duplication share a common file
  4408. position with the original descriptor that was duplicated. Anything
  4409. which alters the file position of one of the duplicates, including
  4410. reading or writing data, affects all of them alike. Thus, for example,
  4411. {
  4412. int d1, d2, d3;
  4413. char buf1[4], buf2[4];
  4414. d1 = open ("foo", O_RDONLY);
  4415. d2 = dup (d1);
  4416. d3 = dup (d2);
  4417. lseek (d3, 1024, SEEK_SET);
  4418. read (d1, buf1, 4);
  4419. read (d2, buf2, 4);
  4420. }
  4421. will read four characters starting with the 1024'th character of ‘foo’,
  4422. and then four more characters starting with the 1028'th character.
  4423. -- Data Type: off_t
  4424. This is a signed integer type used to represent file sizes. In the
  4425. GNU C Library, this type is no narrower than ‘int’.
  4426. If the source is compiled with ‘_FILE_OFFSET_BITS == 64’ this type
  4427. is transparently replaced by ‘off64_t’.
  4428. -- Data Type: off64_t
  4429. This type is used similar to ‘off_t’. The difference is that even
  4430. on 32 bit machines, where the ‘off_t’ type would have 32 bits,
  4431. ‘off64_t’ has 64 bits and so is able to address files up to 2^63
  4432. bytes in length.
  4433. When compiling with ‘_FILE_OFFSET_BITS == 64’ this type is
  4434. available under the name ‘off_t’.
  4435. These aliases for the ‘SEEK_...’ constants exist for the sake of
  4436. compatibility with older BSD systems. They are defined in two different
  4437. header files: ‘fcntl.h’ and ‘sys/file.h’.
  4438. ‘L_SET’
  4439. An alias for ‘SEEK_SET’.
  4440. ‘L_INCR’
  4441. An alias for ‘SEEK_CUR’.
  4442. ‘L_XTND’
  4443. An alias for ‘SEEK_END’.
  4444. 
  4445. File: libc.info, Node: Descriptors and Streams, Next: Stream/Descriptor Precautions, Prev: File Position Primitive, Up: Low-Level I/O
  4446. 13.4 Descriptors and Streams
  4447. ============================
  4448. Given an open file descriptor, you can create a stream for it with the
  4449. ‘fdopen’ function. You can get the underlying file descriptor for an
  4450. existing stream with the ‘fileno’ function. These functions are
  4451. declared in the header file ‘stdio.h’.
  4452. -- Function: FILE * fdopen (int FILEDES, const char *OPENTYPE)
  4453. Preliminary: | MT-Safe | AS-Unsafe heap lock | AC-Unsafe mem lock |
  4454. *Note POSIX Safety Concepts::.
  4455. The ‘fdopen’ function returns a new stream for the file descriptor
  4456. FILEDES.
  4457. The OPENTYPE argument is interpreted in the same way as for the
  4458. ‘fopen’ function (*note Opening Streams::), except that the ‘b’
  4459. option is not permitted; this is because GNU systems make no
  4460. distinction between text and binary files. Also, ‘"w"’ and ‘"w+"’
  4461. do not cause truncation of the file; these have an effect only when
  4462. opening a file, and in this case the file has already been opened.
  4463. You must make sure that the OPENTYPE argument matches the actual
  4464. mode of the open file descriptor.
  4465. The return value is the new stream. If the stream cannot be
  4466. created (for example, if the modes for the file indicated by the
  4467. file descriptor do not permit the access specified by the OPENTYPE
  4468. argument), a null pointer is returned instead.
  4469. In some other systems, ‘fdopen’ may fail to detect that the modes
  4470. for file descriptors do not permit the access specified by
  4471. ‘opentype’. The GNU C Library always checks for this.
  4472. For an example showing the use of the ‘fdopen’ function, see *note
  4473. Creating a Pipe::.
  4474. -- Function: int fileno (FILE *STREAM)
  4475. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4476. Concepts::.
  4477. This function returns the file descriptor associated with the
  4478. stream STREAM. If an error is detected (for example, if the STREAM
  4479. is not valid) or if STREAM does not do I/O to a file, ‘fileno’
  4480. returns -1.
  4481. -- Function: int fileno_unlocked (FILE *STREAM)
  4482. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4483. Concepts::.
  4484. The ‘fileno_unlocked’ function is equivalent to the ‘fileno’
  4485. function except that it does not implicitly lock the stream if the
  4486. state is ‘FSETLOCKING_INTERNAL’.
  4487. This function is a GNU extension.
  4488. There are also symbolic constants defined in ‘unistd.h’ for the file
  4489. descriptors belonging to the standard streams ‘stdin’, ‘stdout’, and
  4490. ‘stderr’; see *note Standard Streams::.
  4491. ‘STDIN_FILENO’
  4492. This macro has value ‘0’, which is the file descriptor for standard
  4493. input.
  4494. ‘STDOUT_FILENO’
  4495. This macro has value ‘1’, which is the file descriptor for standard
  4496. output.
  4497. ‘STDERR_FILENO’
  4498. This macro has value ‘2’, which is the file descriptor for standard
  4499. error output.
  4500. 
  4501. File: libc.info, Node: Stream/Descriptor Precautions, Next: Scatter-Gather, Prev: Descriptors and Streams, Up: Low-Level I/O
  4502. 13.5 Dangers of Mixing Streams and Descriptors
  4503. ==============================================
  4504. You can have multiple file descriptors and streams (let's call both
  4505. streams and descriptors "channels" for short) connected to the same
  4506. file, but you must take care to avoid confusion between channels. There
  4507. are two cases to consider: “linked” channels that share a single file
  4508. position value, and “independent” channels that have their own file
  4509. positions.
  4510. It's best to use just one channel in your program for actual data
  4511. transfer to any given file, except when all the access is for input.
  4512. For example, if you open a pipe (something you can only do at the file
  4513. descriptor level), either do all I/O with the descriptor, or construct a
  4514. stream from the descriptor with ‘fdopen’ and then do all I/O with the
  4515. stream.
  4516. * Menu:
  4517. * Linked Channels:: Dealing with channels sharing a file position.
  4518. * Independent Channels:: Dealing with separately opened, unlinked channels.
  4519. * Cleaning Streams:: Cleaning a stream makes it safe to use
  4520. another channel.
  4521. 
  4522. File: libc.info, Node: Linked Channels, Next: Independent Channels, Up: Stream/Descriptor Precautions
  4523. 13.5.1 Linked Channels
  4524. ----------------------
  4525. Channels that come from a single opening share the same file position;
  4526. we call them “linked” channels. Linked channels result when you make a
  4527. stream from a descriptor using ‘fdopen’, when you get a descriptor from
  4528. a stream with ‘fileno’, when you copy a descriptor with ‘dup’ or ‘dup2’,
  4529. and when descriptors are inherited during ‘fork’. For files that don't
  4530. support random access, such as terminals and pipes, _all_ channels are
  4531. effectively linked. On random-access files, all append-type output
  4532. streams are effectively linked to each other.
  4533. If you have been using a stream for I/O (or have just opened the
  4534. stream), and you want to do I/O using another channel (either a stream
  4535. or a descriptor) that is linked to it, you must first “clean up” the
  4536. stream that you have been using. *Note Cleaning Streams::.
  4537. Terminating a process, or executing a new program in the process,
  4538. destroys all the streams in the process. If descriptors linked to these
  4539. streams persist in other processes, their file positions become
  4540. undefined as a result. To prevent this, you must clean up the streams
  4541. before destroying them.
  4542. In addition to cleaning up a stream before doing I/O using another
  4543. linked channel, additional precautions are needed to ensure a
  4544. well-defined file position indicator in some cases. If both the
  4545. following conditions hold, you must set the file position indicator on
  4546. the new channel (a stream) using a function such as ‘fseek’.
  4547. • The new linked channel is a stream that was previously active.
  4548. • The file position indicator was previously set on that channel
  4549. (while it was previously active) with a function such as ‘fseek’.
  4550. POSIX requires such precautions in more cases: if either the old or
  4551. the new linked channel is a stream (whether or not previously active)
  4552. and the file position indicator was previously set on any channel linked
  4553. to those channels with a function such as ‘fseek’ or ‘lseek’.
  4554. 
  4555. File: libc.info, Node: Independent Channels, Next: Cleaning Streams, Prev: Linked Channels, Up: Stream/Descriptor Precautions
  4556. 13.5.2 Independent Channels
  4557. ---------------------------
  4558. When you open channels (streams or descriptors) separately on a seekable
  4559. file, each channel has its own file position. These are called
  4560. “independent channels”.
  4561. The system handles each channel independently. Most of the time,
  4562. this is quite predictable and natural (especially for input): each
  4563. channel can read or write sequentially at its own place in the file.
  4564. However, if some of the channels are streams, you must take these
  4565. precautions:
  4566. • You should clean an output stream after use, before doing anything
  4567. else that might read or write from the same part of the file.
  4568. • You should clean an input stream before reading data that may have
  4569. been modified using an independent channel. Otherwise, you might
  4570. read obsolete data that had been in the stream's buffer.
  4571. If you do output to one channel at the end of the file, this will
  4572. certainly leave the other independent channels positioned somewhere
  4573. before the new end. You cannot reliably set their file positions to the
  4574. new end of file before writing, because the file can always be extended
  4575. by another process between when you set the file position and when you
  4576. write the data. Instead, use an append-type descriptor or stream; they
  4577. always output at the current end of the file. In order to make the
  4578. end-of-file position accurate, you must clean the output channel you
  4579. were using, if it is a stream.
  4580. It's impossible for two channels to have separate file pointers for a
  4581. file that doesn't support random access. Thus, channels for reading or
  4582. writing such files are always linked, never independent. Append-type
  4583. channels are also always linked. For these channels, follow the rules
  4584. for linked channels; see *note Linked Channels::.
  4585. 
  4586. File: libc.info, Node: Cleaning Streams, Prev: Independent Channels, Up: Stream/Descriptor Precautions
  4587. 13.5.3 Cleaning Streams
  4588. -----------------------
  4589. You can use ‘fflush’ to clean a stream in most cases.
  4590. You can skip the ‘fflush’ if you know the stream is already clean. A
  4591. stream is clean whenever its buffer is empty. For example, an
  4592. unbuffered stream is always clean. An input stream that is at
  4593. end-of-file is clean. A line-buffered stream is clean when the last
  4594. character output was a newline. However, a just-opened input stream
  4595. might not be clean, as its input buffer might not be empty.
  4596. There is one case in which cleaning a stream is impossible on most
  4597. systems. This is when the stream is doing input from a file that is not
  4598. random-access. Such streams typically read ahead, and when the file is
  4599. not random access, there is no way to give back the excess data already
  4600. read. When an input stream reads from a random-access file, ‘fflush’
  4601. does clean the stream, but leaves the file pointer at an unpredictable
  4602. place; you must set the file pointer before doing any further I/O.
  4603. Closing an output-only stream also does ‘fflush’, so this is a valid
  4604. way of cleaning an output stream.
  4605. You need not clean a stream before using its descriptor for control
  4606. operations such as setting terminal modes; these operations don't affect
  4607. the file position and are not affected by it. You can use any
  4608. descriptor for these operations, and all channels are affected
  4609. simultaneously. However, text already "output" to a stream but still
  4610. buffered by the stream will be subject to the new terminal modes when
  4611. subsequently flushed. To make sure "past" output is covered by the
  4612. terminal settings that were in effect at the time, flush the output
  4613. streams for that terminal before setting the modes. *Note Terminal
  4614. Modes::.
  4615. 
  4616. File: libc.info, Node: Scatter-Gather, Next: Copying File Data, Prev: Stream/Descriptor Precautions, Up: Low-Level I/O
  4617. 13.6 Fast Scatter-Gather I/O
  4618. ============================
  4619. Some applications may need to read or write data to multiple buffers,
  4620. which are separated in memory. Although this can be done easily enough
  4621. with multiple calls to ‘read’ and ‘write’, it is inefficient because
  4622. there is overhead associated with each kernel call.
  4623. Instead, many platforms provide special high-speed primitives to
  4624. perform these “scatter-gather” operations in a single kernel call. The
  4625. GNU C Library will provide an emulation on any system that lacks these
  4626. primitives, so they are not a portability threat. They are defined in
  4627. ‘sys/uio.h’.
  4628. These functions are controlled with arrays of ‘iovec’ structures,
  4629. which describe the location and size of each buffer.
  4630. -- Data Type: struct iovec
  4631. The ‘iovec’ structure describes a buffer. It contains two fields:
  4632. ‘void *iov_base’
  4633. Contains the address of a buffer.
  4634. ‘size_t iov_len’
  4635. Contains the length of the buffer.
  4636. -- Function: ssize_t readv (int FILEDES, const struct iovec *VECTOR,
  4637. int COUNT)
  4638. Preliminary: | MT-Safe | AS-Unsafe heap | AC-Unsafe mem | *Note
  4639. POSIX Safety Concepts::.
  4640. The ‘readv’ function reads data from FILEDES and scatters it into
  4641. the buffers described in VECTOR, which is taken to be COUNT
  4642. structures long. As each buffer is filled, data is sent to the
  4643. next.
  4644. Note that ‘readv’ is not guaranteed to fill all the buffers. It
  4645. may stop at any point, for the same reasons ‘read’ would.
  4646. The return value is a count of bytes (_not_ buffers) read, 0
  4647. indicating end-of-file, or -1 indicating an error. The possible
  4648. errors are the same as in ‘read’.
  4649. -- Function: ssize_t writev (int FILEDES, const struct iovec *VECTOR,
  4650. int COUNT)
  4651. Preliminary: | MT-Safe | AS-Unsafe heap | AC-Unsafe mem | *Note
  4652. POSIX Safety Concepts::.
  4653. The ‘writev’ function gathers data from the buffers described in
  4654. VECTOR, which is taken to be COUNT structures long, and writes them
  4655. to ‘filedes’. As each buffer is written, it moves on to the next.
  4656. Like ‘readv’, ‘writev’ may stop midstream under the same conditions
  4657. ‘write’ would.
  4658. The return value is a count of bytes written, or -1 indicating an
  4659. error. The possible errors are the same as in ‘write’.
  4660. -- Function: ssize_t preadv (int FD, const struct iovec *IOV, int
  4661. IOVCNT, off_t OFFSET)
  4662. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4663. Concepts::.
  4664. This function is similar to the ‘readv’ function, with the
  4665. difference it adds an extra OFFSET parameter of type ‘off_t’
  4666. similar to ‘pread’. The data is read from the file starting at
  4667. position OFFSET. The position of the file descriptor itself is not
  4668. affected by the operation. The value is the same as before the
  4669. call.
  4670. When the source file is compiled with ‘_FILE_OFFSET_BITS == 64’ the
  4671. ‘preadv’ function is in fact ‘preadv64’ and the type ‘off_t’ has 64
  4672. bits, which makes it possible to handle files up to 2^63 bytes in
  4673. length.
  4674. The return value is a count of bytes (_not_ buffers) read, 0
  4675. indicating end-of-file, or -1 indicating an error. The possible
  4676. errors are the same as in ‘readv’ and ‘pread’.
  4677. -- Function: ssize_t preadv64 (int FD, const struct iovec *IOV, int
  4678. IOVCNT, off64_t OFFSET)
  4679. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4680. Concepts::.
  4681. This function is similar to the ‘preadv’ function with the
  4682. difference is that the OFFSET parameter is of type ‘off64_t’
  4683. instead of ‘off_t’. It makes it possible on 32 bit machines to
  4684. address files larger than 2^31 bytes and up to 2^63 bytes. The
  4685. file descriptor ‘filedes’ must be opened using ‘open64’ since
  4686. otherwise the large offsets possible with ‘off64_t’ will lead to
  4687. errors with a descriptor in small file mode.
  4688. When the source file is compiled using ‘_FILE_OFFSET_BITS == 64’ on
  4689. a 32 bit machine this function is actually available under the name
  4690. ‘preadv’ and so transparently replaces the 32 bit interface.
  4691. -- Function: ssize_t pwritev (int FD, const struct iovec *IOV, int
  4692. IOVCNT, off_t OFFSET)
  4693. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4694. Concepts::.
  4695. This function is similar to the ‘writev’ function, with the
  4696. difference it adds an extra OFFSET parameter of type ‘off_t’
  4697. similar to ‘pwrite’. The data is written to the file starting at
  4698. position OFFSET. The position of the file descriptor itself is not
  4699. affected by the operation. The value is the same as before the
  4700. call.
  4701. However, on Linux, if a file is opened with ‘O_APPEND’, ‘pwrite’
  4702. appends data to the end of the file, regardless of the value of
  4703. ‘offset’.
  4704. When the source file is compiled with ‘_FILE_OFFSET_BITS == 64’ the
  4705. ‘pwritev’ function is in fact ‘pwritev64’ and the type ‘off_t’ has
  4706. 64 bits, which makes it possible to handle files up to 2^63 bytes
  4707. in length.
  4708. The return value is a count of bytes (_not_ buffers) written, 0
  4709. indicating end-of-file, or -1 indicating an error. The possible
  4710. errors are the same as in ‘writev’ and ‘pwrite’.
  4711. -- Function: ssize_t pwritev64 (int FD, const struct iovec *IOV, int
  4712. IOVCNT, off64_t OFFSET)
  4713. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4714. Concepts::.
  4715. This function is similar to the ‘pwritev’ function with the
  4716. difference is that the OFFSET parameter is of type ‘off64_t’
  4717. instead of ‘off_t’. It makes it possible on 32 bit machines to
  4718. address files larger than 2^31 bytes and up to 2^63 bytes. The
  4719. file descriptor ‘filedes’ must be opened using ‘open64’ since
  4720. otherwise the large offsets possible with ‘off64_t’ will lead to
  4721. errors with a descriptor in small file mode.
  4722. When the source file is compiled using ‘_FILE_OFFSET_BITS == 64’ on
  4723. a 32 bit machine this function is actually available under the name
  4724. ‘pwritev’ and so transparently replaces the 32 bit interface.
  4725. -- Function: ssize_t preadv2 (int FD, const struct iovec *IOV, int
  4726. IOVCNT, off_t OFFSET, int FLAGS)
  4727. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4728. Concepts::.
  4729. This function is similar to the ‘preadv’ function, with the
  4730. difference it adds an extra FLAGS parameter of type ‘int’.
  4731. Additionally, if OFFSET is -1, the current file position is used
  4732. and updated (like the ‘readv’ function).
  4733. The supported FLAGS are dependent of the underlying system. For
  4734. Linux it supports:
  4735. ‘RWF_HIPRI’
  4736. High priority request. This adds a flag that tells the file
  4737. system that this is a high priority request for which it is
  4738. worth to poll the hardware. The flag is purely advisory and
  4739. can be ignored if not supported. The FD must be opened using
  4740. ‘O_DIRECT’.
  4741. ‘RWF_DSYNC’
  4742. Per-IO synchronization as if the file was opened with
  4743. ‘O_DSYNC’ flag.
  4744. ‘RWF_SYNC’
  4745. Per-IO synchronization as if the file was opened with ‘O_SYNC’
  4746. flag.
  4747. ‘RWF_NOWAIT’
  4748. Use nonblocking mode for this operation; that is, this call to
  4749. ‘preadv2’ will fail and set ‘errno’ to ‘EAGAIN’ if the
  4750. operation would block.
  4751. ‘RWF_APPEND’
  4752. Per-IO synchronization as if the file was opened with
  4753. ‘O_APPEND’ flag.
  4754. ‘RWF_NOAPPEND’
  4755. This flag allows an offset to be honored, even if the file was
  4756. opened with ‘O_APPEND’ flag.
  4757. ‘RWF_ATOMIC’
  4758. Indicate that the write is to be issued with torn-write
  4759. prevention. The input buffer should follow some contraints:
  4760. the total length should be power-of-2 in size and also sizes
  4761. between ‘atomic_write_unit_min’ and ‘atomic_write_unit_max’,
  4762. the ‘struct iovec’ count should be up to
  4763. ‘atomic_write_segments_max’, and the offset should be
  4764. naturally-aligned with regard to total write length.
  4765. The ‘atomic_*’ values can be obtained with ‘statx’ along with
  4766. ‘STATX_WRITE_ATOMIC’ flag.
  4767. ‘RWF_DONTCACHE’
  4768. Use uncached buffered IO. If the file system does not support
  4769. it, the call will fail and set ‘errno’ to ‘EOPNOTSUPP’.
  4770. This is a Linux-specific extension.
  4771. When the source file is compiled with ‘_FILE_OFFSET_BITS == 64’ the
  4772. ‘preadv2’ function is in fact ‘preadv64v2’ and the type ‘off_t’ has
  4773. 64 bits, which makes it possible to handle files up to 2^63 bytes
  4774. in length.
  4775. The return value is a count of bytes (_not_ buffers) read, 0
  4776. indicating end-of-file, or -1 indicating an error. The possible
  4777. errors are the same as in ‘preadv’ with the addition of:
  4778. ‘EOPNOTSUPP’
  4779. An unsupported FLAGS was used.
  4780. -- Function: ssize_t preadv64v2 (int FD, const struct iovec *IOV, int
  4781. IOVCNT, off64_t OFFSET, int FLAGS)
  4782. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4783. Concepts::.
  4784. This function is similar to the ‘preadv2’ function with the
  4785. difference is that the OFFSET parameter is of type ‘off64_t’
  4786. instead of ‘off_t’. It makes it possible on 32 bit machines to
  4787. address files larger than 2^31 bytes and up to 2^63 bytes. The
  4788. file descriptor ‘filedes’ must be opened using ‘open64’ since
  4789. otherwise the large offsets possible with ‘off64_t’ will lead to
  4790. errors with a descriptor in small file mode.
  4791. When the source file is compiled using ‘_FILE_OFFSET_BITS == 64’ on
  4792. a 32 bit machine this function is actually available under the name
  4793. ‘preadv2’ and so transparently replaces the 32 bit interface.
  4794. -- Function: ssize_t pwritev2 (int FD, const struct iovec *IOV, int
  4795. IOVCNT, off_t OFFSET, int FLAGS)
  4796. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4797. Concepts::.
  4798. This function is similar to the ‘pwritev’ function, with the
  4799. difference it adds an extra FLAGS parameter of type ‘int’.
  4800. Additionally, if OFFSET is -1, the current file position should is
  4801. used and updated (like the ‘writev’ function).
  4802. The supported FLAGS are dependent of the underlying system. For
  4803. Linux, the supported flags are the same as those for ‘preadv2’.
  4804. When the source file is compiled with ‘_FILE_OFFSET_BITS == 64’ the
  4805. ‘pwritev2’ function is in fact ‘pwritev64v2’ and the type ‘off_t’
  4806. has 64 bits, which makes it possible to handle files up to 2^63
  4807. bytes in length.
  4808. The return value is a count of bytes (_not_ buffers) write, 0
  4809. indicating end-of-file, or -1 indicating an error. The possible
  4810. errors are the same as in ‘preadv2’.
  4811. -- Function: ssize_t pwritev64v2 (int FD, const struct iovec *IOV, int
  4812. IOVCNT, off64_t OFFSET, int FLAGS)
  4813. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4814. Concepts::.
  4815. This function is similar to the ‘pwritev2’ function with the
  4816. difference is that the OFFSET parameter is of type ‘off64_t’
  4817. instead of ‘off_t’. It makes it possible on 32 bit machines to
  4818. address files larger than 2^31 bytes and up to 2^63 bytes. The
  4819. file descriptor ‘filedes’ must be opened using ‘open64’ since
  4820. otherwise the large offsets possible with ‘off64_t’ will lead to
  4821. errors with a descriptor in small file mode.
  4822. When the source file is compiled using ‘_FILE_OFFSET_BITS == 64’ on
  4823. a 32 bit machine this function is actually available under the name
  4824. ‘pwritev2’ and so transparently replaces the 32 bit interface.
  4825. 
  4826. File: libc.info, Node: Copying File Data, Next: Memory-mapped I/O, Prev: Scatter-Gather, Up: Low-Level I/O
  4827. 13.7 Copying data between two files
  4828. ===================================
  4829. A special function is provided to copy data between two files on the
  4830. same file system. The system can optimize such copy operations. This
  4831. is particularly important on network file systems, where the data would
  4832. otherwise have to be transferred twice over the network.
  4833. Note that this function only copies file data, but not metadata such
  4834. as file permissions or extended attributes.
  4835. -- Function: ssize_t copy_file_range (int INPUTFD, off64_t *INPUTPOS,
  4836. int OUTPUTFD, off64_t *OUTPUTPOS, ssize_t LENGTH, unsigned int
  4837. FLAGS)
  4838. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4839. Concepts::.
  4840. This function copies up to LENGTH bytes from the file descriptor
  4841. INPUTFD to the file descriptor OUTPUTFD.
  4842. The function can operate on both the current file position (like
  4843. ‘read’ and ‘write’) and an explicit offset (like ‘pread’ and
  4844. ‘pwrite’). If the INPUTPOS pointer is null, the file position of
  4845. INPUTFD is used as the starting point of the copy operation, and
  4846. the file position is advanced during it. If INPUTPOS is not null,
  4847. then ‘*INPUTPOS’ is used as the starting point of the copy
  4848. operation, and ‘*INPUTPOS’ is incremented by the number of copied
  4849. bytes, but the file position remains unchanged. Similar rules
  4850. apply to OUTPUTFD and OUTPUTPOS for the output file position.
  4851. The FLAGS argument is currently reserved and must be zero.
  4852. The ‘copy_file_range’ function returns the number of bytes copied.
  4853. This can be less than the specified LENGTH in case the input file
  4854. contains fewer remaining bytes than LENGTH, or if a read or write
  4855. failure occurs. The return value is zero if the end of the input
  4856. file is encountered immediately.
  4857. If no bytes can be copied, to report an error, ‘copy_file_range’
  4858. returns the value -1 and sets ‘errno’. The table below lists some
  4859. of the error conditions for this function.
  4860. ‘ENOSYS’
  4861. The kernel does not implement the required functionality.
  4862. ‘EISDIR’
  4863. At least one of the descriptors INPUTFD or OUTPUTFD refers to
  4864. a directory.
  4865. ‘EINVAL’
  4866. At least one of the descriptors INPUTFD or OUTPUTFD refers to
  4867. a non-regular, non-directory file (such as a socket or a
  4868. FIFO).
  4869. The input or output positions before are after the copy
  4870. operations are outside of an implementation-defined limit.
  4871. The FLAGS argument is not zero.
  4872. ‘EFBIG’
  4873. The new file size would exceed the process file size limit.
  4874. *Note Limits on Resources::.
  4875. The input or output positions before are after the copy
  4876. operations are outside of an implementation-defined limit.
  4877. This can happen if the file was not opened with large file
  4878. support (LFS) on 32-bit machines, and the copy operation would
  4879. create a file which is larger than what ‘off_t’ could
  4880. represent.
  4881. ‘EBADF’
  4882. The argument INPUTFD is not a valid file descriptor open for
  4883. reading.
  4884. The argument OUTPUTFD is not a valid file descriptor open for
  4885. writing, or OUTPUTFD has been opened with ‘O_APPEND’.
  4886. In addition, ‘copy_file_range’ can fail with the error codes which
  4887. are used by ‘read’, ‘pread’, ‘write’, and ‘pwrite’.
  4888. The ‘copy_file_range’ function is a cancellation point. In case of
  4889. cancellation, the input location (the file position or the value at
  4890. ‘*INPUTPOS’) is indeterminate.
  4891. 
  4892. File: libc.info, Node: Memory-mapped I/O, Next: Waiting for I/O, Prev: Copying File Data, Up: Low-Level I/O
  4893. 13.8 Memory-mapped I/O
  4894. ======================
  4895. On modern operating systems, it is possible to “mmap” (pronounced
  4896. "em-map") a file to a region of memory. When this is done, the file can
  4897. be accessed just like an array in the program.
  4898. This is more efficient than ‘read’ or ‘write’, as only the regions of
  4899. the file that a program actually accesses are loaded. Accesses to
  4900. not-yet-loaded parts of the mmapped region are handled in the same way
  4901. as swapped out pages.
  4902. Since mmapped pages can be stored back to their file when physical
  4903. memory is low, it is possible to mmap files orders of magnitude larger
  4904. than both the physical memory _and_ swap space. The only limit is
  4905. address space. The theoretical limit is 4GB on a 32-bit machine -
  4906. however, the actual limit will be smaller since some areas will be
  4907. reserved for other purposes. If the LFS interface is used the file size
  4908. on 32-bit systems is not limited to 2GB (offsets are signed which
  4909. reduces the addressable area of 4GB by half); the full 64-bit are
  4910. available.
  4911. Memory mapping only works on entire pages of memory. Thus, addresses
  4912. for mapping must be page-aligned, and length values will be rounded up.
  4913. To determine the default size of a page the machine uses one should use:
  4914. size_t page_size = (size_t) sysconf (_SC_PAGESIZE);
  4915. On some systems, mappings can use larger page sizes for certain
  4916. files, and applications can request larger page sizes for anonymous
  4917. mappings as well (see the ‘MAP_HUGETLB’ flag below).
  4918. The following functions are declared in ‘sys/mman.h’:
  4919. -- Function: void * mmap (void *ADDRESS, size_t LENGTH, int PROTECT,
  4920. int FLAGS, int FILEDES, off_t OFFSET)
  4921. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4922. Concepts::.
  4923. The ‘mmap’ function creates a new mapping, connected to bytes
  4924. (OFFSET) to (OFFSET + LENGTH - 1) in the file open on FILEDES. A
  4925. new reference for the file specified by FILEDES is created, which
  4926. is not removed by closing the file.
  4927. ADDRESS gives a preferred starting address for the mapping. ‘NULL’
  4928. expresses no preference. Any previous mapping at that address is
  4929. automatically removed. The address you give may still be changed,
  4930. unless you use the ‘MAP_FIXED’ flag.
  4931. PROTECT contains flags that control what kind of access is
  4932. permitted. They include ‘PROT_READ’, ‘PROT_WRITE’, and
  4933. ‘PROT_EXEC’. The special flag ‘PROT_NONE’ reserves a region of
  4934. address space for future use. The ‘mprotect’ function can be used
  4935. to change the protection flags. *Note Memory Protection::.
  4936. The FLAGS parameter contains flags that control the nature of the
  4937. map. One of ‘MAP_SHARED’, ‘MAP_SHARED_VALIDATE’, or ‘MAP_PRIVATE’
  4938. must be specified. Additional flags may be bitwise OR'd to further
  4939. define the mapping.
  4940. Note that, aside from ‘MAP_PRIVATE’ and ‘MAP_SHARED’, not all flags
  4941. are supported on all versions of all operating systems. Consult
  4942. the kernel-specific documentation for details. The flags include:
  4943. ‘MAP_PRIVATE’
  4944. This specifies that writes to the region should never be
  4945. written back to the attached file. Instead, a copy is made
  4946. for the process, and the region will be swapped normally if
  4947. memory runs low. No other process will see the changes.
  4948. Since private mappings effectively revert to ordinary memory
  4949. when written to, you must have enough virtual memory for a
  4950. copy of the entire mmapped region if you use this mode with
  4951. ‘PROT_WRITE’.
  4952. ‘MAP_SHARED’
  4953. This specifies that writes to the region will be written back
  4954. to the file. Changes made will be shared immediately with
  4955. other processes mmaping the same file.
  4956. Note that actual writing may take place at any time. You need
  4957. to use ‘msync’, described below, if it is important that other
  4958. processes using conventional I/O get a consistent view of the
  4959. file.
  4960. ‘MAP_SHARED_VALIDATE’
  4961. Similar to ‘MAP_SHARED’ except that additional flags will be
  4962. validated by the kernel, and the call will fail if an
  4963. unrecognized flag is provided. With ‘MAP_SHARED’ using a flag
  4964. on a kernel that doesn't support it causes the flag to be
  4965. ignored. ‘MAP_SHARED_VALIDATE’ should be used when the
  4966. behavior of all flags is required.
  4967. ‘MAP_FIXED’
  4968. This forces the system to use the exact mapping address
  4969. specified in ADDRESS and fail if it can't. Note that if the
  4970. new mapping would overlap an existing mapping, the overlapping
  4971. portion of the existing map is unmapped.
  4972. ‘MAP_ANONYMOUS’
  4973. ‘MAP_ANON’
  4974. This flag tells the system to create an anonymous mapping, not
  4975. connected to a file. FILEDES and OFFSET are ignored, and the
  4976. region is initialized with zeros.
  4977. Anonymous maps are used as the basic primitive to extend the
  4978. heap on some systems. They are also useful to share data
  4979. between multiple tasks without creating a file.
  4980. On some systems using private anonymous mmaps is more
  4981. efficient than using ‘malloc’ for large blocks. This is not
  4982. an issue with the GNU C Library, as the included ‘malloc’
  4983. automatically uses ‘mmap’ where appropriate.
  4984. ‘MAP_HUGETLB’
  4985. This requests that the system uses an alternative page size
  4986. which is larger than the default page size for the mapping.
  4987. For some workloads, increasing the page size for large
  4988. mappings improves performance because the system needs to
  4989. handle far fewer pages. For other workloads which require
  4990. frequent transfer of pages between storage or different nodes,
  4991. the decreased page granularity may cause performance problems
  4992. due to the increased page size and larger transfers.
  4993. In order to create the mapping, the system needs physically
  4994. contiguous memory of the size of the increased page size. As
  4995. a result, ‘MAP_HUGETLB’ mappings are affected by memory
  4996. fragmentation, and their creation can fail even if plenty of
  4997. memory is available in the system.
  4998. Not all file systems support mappings with an increased page
  4999. size.
  5000. The ‘MAP_HUGETLB’ flag is specific to Linux.
  5001. ‘MAP_32BIT’
  5002. Require addresses that can be accessed with a signed 32 bit
  5003. pointer, i.e., within the first 2 GiB. Ignored if MAP_FIXED is
  5004. specified.
  5005. ‘MAP_DENYWRITE’
  5006. ‘MAP_EXECUTABLE’
  5007. ‘MAP_FILE’
  5008. Provided for compatibility. Ignored by the Linux kernel.
  5009. ‘MAP_FIXED_NOREPLACE’
  5010. Similar to ‘MAP_FIXED’ except the call will fail with ‘EEXIST’
  5011. if the new mapping would overwrite an existing mapping. To
  5012. test for support for this flag, specify MAP_FIXED_NOREPLACE
  5013. without MAP_FIXED, and (if the call was successful) check the
  5014. actual address returned. If it does not match the address
  5015. passed, then this flag is not supported.
  5016. ‘MAP_GROWSDOWN’
  5017. This flag is used to make stacks, and is typically only needed
  5018. inside the program loader to set up the main stack for the
  5019. running process. The mapping is created according to the
  5020. other flags, except an additional page just prior to the
  5021. mapping is marked as a "guard page". If a write is attempted
  5022. inside this guard page, that page is mapped, the mapping is
  5023. extended, and a new guard page is created. Thus, the mapping
  5024. continues to grow towards lower addresses until it encounters
  5025. some other mapping.
  5026. Note that accessing memory beyond the guard page will not
  5027. trigger this feature. In gcc, use ‘-fstack-clash-protection’
  5028. to ensure the guard page is always touched.
  5029. ‘MAP_LOCKED’
  5030. A hint that requests that mapped pages are locked in memory
  5031. (i.e. not paged out). Note that this is a request and not a
  5032. requirement; use ‘mlock’ if locking is required.
  5033. ‘MAP_POPULATE’
  5034. ‘MAP_NONBLOCK’
  5035. ‘MAP_POPULATE’ is a hint that requests that the kernel
  5036. read-ahead a file-backed mapping, causing pages to be mapped
  5037. before they're needed. ‘MAP_NONBLOCK’ is a hint that requests
  5038. that the kernel _not_ attempt such except for pages are
  5039. already in memory. Note that neither of these hints affects
  5040. future paging activity, use ‘mlock’ if such needs to be
  5041. controlled.
  5042. ‘MAP_NORESERVE’
  5043. Asks the kernel to not reserve physical backing (i.e. space
  5044. in a swap device) for a mapping. This would be useful for,
  5045. for example, a very large but sparsely used mapping which need
  5046. not be limited in total length by available RAM, but with very
  5047. few mapped pages. Note that writes to such a mapping may
  5048. cause a ‘SIGSEGV’ if the system is unable to map a page due to
  5049. lack of resources.
  5050. On Linux, this flag's behavior may be overwridden by
  5051. ‘/proc/sys/vm/overcommit_memory’ as documented in the proc(5)
  5052. man page.
  5053. ‘MAP_STACK’
  5054. Ensures that the resulting mapping is suitable for use as a
  5055. program stack. For example, the use of huge pages might be
  5056. precluded.
  5057. ‘MAP_SYNC’
  5058. This is a special flag for DAX devices, which tells the kernel
  5059. to write dirty metadata out whenever dirty data is written
  5060. out. Unlike most other flags, this one will fail unless
  5061. ‘MAP_SHARED_VALIDATE’ is also given.
  5062. ‘MAP_DROPPABLE’
  5063. Request the page to be never written out to swap, it will be
  5064. zeroed under memory pressure (so kernel can just drop the
  5065. page), it is inherited by fork, it is not counted against
  5066. ‘mlock’ budget, and if there is not enough memory to service a
  5067. page fault there is no fatal error (so no signal is sent).
  5068. The ‘MAP_DROPPABLE’ flag is specific to Linux.
  5069. ‘mmap’ returns the address of the new mapping, or ‘MAP_FAILED’ for
  5070. an error.
  5071. Possible errors include:
  5072. ‘EACCES’
  5073. FILEDES was not open for the type of access specified in
  5074. PROTECT.
  5075. ‘EAGAIN’
  5076. The system has temporarily run out of resources.
  5077. ‘EBADF’
  5078. The FD passed is invalid, and a valid file descriptor is
  5079. required (i.e. MAP_ANONYMOUS was not specified).
  5080. ‘EEXIST’
  5081. ‘MAP_FIXED_NOREPLACE’ was specified and an existing mapping
  5082. was found overlapping the requested address range.
  5083. ‘EINVAL’
  5084. Either ADDRESS was unusable (because it is not a multiple of
  5085. the applicable page size), or inconsistent FLAGS were given.
  5086. If ‘MAP_HUGETLB’ was specified, the file or system does not
  5087. support large page sizes.
  5088. ‘ENODEV’
  5089. This file is of a type that doesn't support mapping, the
  5090. process has exceeded its data space limit, or the map request
  5091. would exceed the process's virtual address space.
  5092. ‘ENOMEM’
  5093. There is not enough memory for the operation, the process is
  5094. out of address space, or there are too many mappings. On
  5095. Linux, the maximum number of mappings can be controlled via
  5096. ‘/proc/sys/vm/max_map_count’ or, if your OS supports it, via
  5097. the ‘vm.max_map_count’ ‘sysctl’ setting.
  5098. ‘ENOEXEC’
  5099. The file is on a filesystem that doesn't support mapping.
  5100. ‘EPERM’
  5101. ‘PROT_EXEC’ was requested but the file is on a filesystem that
  5102. was mounted with execution denied, a file seal prevented the
  5103. mapping, or the caller set MAP_HUDETLB but does not have the
  5104. required priviledges.
  5105. ‘EOVERFLOW’
  5106. Either the offset into the file plus the length of the mapping
  5107. causes internal page counts to overflow, or the offset
  5108. requested exceeds the length of the file.
  5109. -- Function: void * mmap64 (void *ADDRESS, size_t LENGTH, int PROTECT,
  5110. int FLAGS, int FILEDES, off64_t OFFSET)
  5111. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5112. Concepts::.
  5113. The ‘mmap64’ function is equivalent to the ‘mmap’ function but the
  5114. OFFSET parameter is of type ‘off64_t’. On 32-bit systems this
  5115. allows the file associated with the FILEDES descriptor to be larger
  5116. than 2GB. FILEDES must be a descriptor returned from a call to
  5117. ‘open64’ or ‘fopen64’ and ‘freopen64’ where the descriptor is
  5118. retrieved with ‘fileno’.
  5119. When the sources are translated with ‘_FILE_OFFSET_BITS == 64’ this
  5120. function is actually available under the name ‘mmap’. I.e., the
  5121. new, extended API using 64 bit file sizes and offsets transparently
  5122. replaces the old API.
  5123. -- Function: int munmap (void *ADDR, size_t LENGTH)
  5124. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5125. Concepts::.
  5126. ‘munmap’ removes any memory maps from (ADDR) to (ADDR + LENGTH).
  5127. LENGTH should be the length of the mapping.
  5128. It is safe to unmap multiple mappings in one command, or include
  5129. unmapped space in the range. It is also possible to unmap only
  5130. part of an existing mapping. However, only entire pages can be
  5131. removed. If LENGTH is not an even number of pages, it will be
  5132. rounded up.
  5133. It returns 0 for success and -1 for an error.
  5134. One error is possible:
  5135. ‘EINVAL’
  5136. The memory range given was outside the user mmap range or
  5137. wasn't page aligned.
  5138. -- Function: int msync (void *ADDRESS, size_t LENGTH, int FLAGS)
  5139. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5140. Concepts::.
  5141. When using shared mappings, the kernel can write the file at any
  5142. time before the mapping is removed. To be certain data has
  5143. actually been written to the file and will be accessible to
  5144. non-memory-mapped I/O, it is necessary to use this function.
  5145. It operates on the region ADDRESS to (ADDRESS + LENGTH). It may be
  5146. used on part of a mapping or multiple mappings, however the region
  5147. given should not contain any unmapped space.
  5148. FLAGS can contain some options:
  5149. ‘MS_SYNC’
  5150. This flag makes sure the data is actually written _to disk_.
  5151. Normally ‘msync’ only makes sure that accesses to a file with
  5152. conventional I/O reflect the recent changes.
  5153. ‘MS_ASYNC’
  5154. This tells ‘msync’ to begin the synchronization, but not to
  5155. wait for it to complete.
  5156. ‘msync’ returns 0 for success and -1 for error. Errors include:
  5157. ‘EINVAL’
  5158. An invalid region was given, or the FLAGS were invalid.
  5159. ‘EFAULT’
  5160. There is no existing mapping in at least part of the given
  5161. region.
  5162. -- Function: void * mremap (void *ADDRESS, size_t LENGTH, size_t
  5163. NEW_LENGTH, int FLAG, ... /* void *NEW_ADDRESS */)
  5164. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5165. Concepts::.
  5166. This function can be used to change the size of an existing memory
  5167. area. ADDRESS and LENGTH must cover a region entirely mapped in
  5168. the same ‘mmap’ statement. A new mapping with the same
  5169. characteristics will be returned with the length NEW_LENGTH.
  5170. Possible flags are
  5171. ‘MREMAP_MAYMOVE’
  5172. If it is given in FLAGS, the system may remove the existing
  5173. mapping and create a new one of the desired length in another
  5174. location.
  5175. ‘MREMAP_FIXED’
  5176. If it is given in FLAGS, ‘mremap’ accepts a fifth argument,
  5177. ‘void *new_address’, which specifies a page-aligned address to
  5178. which the mapping must be moved. Any previous mapping at the
  5179. address range specified by NEW_ADDRESS and NEW_SIZE is
  5180. unmapped.
  5181. ‘MREMAP_FIXED’ must be used together with ‘MREMAP_MAYMOVE’.
  5182. ‘MREMAP_DONTUNMAP’
  5183. If it is given in FLAGS, ‘mremap’ accepts a fifth argument,
  5184. ‘void *new_address’, which specifies a page-aligned address.
  5185. Any previous mapping at the address range specified by
  5186. NEW_ADDRESS and NEW_SIZE is unmapped. If NEW_ADDRESS is
  5187. ‘NULL’, the kernel chooses the page-aligned address at which
  5188. to create the mapping. Otherwise, the kernel takes it as a
  5189. hint about where to place the mapping. The mapping at the
  5190. address range specified by OLD_ADDRESS and OLD_SIZE isn't
  5191. unmapped.
  5192. ‘MREMAP_DONTUNMAP’ must be used together with
  5193. ‘MREMAP_MAYMOVE’. OLD_SIZE must be the same as NEW_SIZE.
  5194. This flag bit is Linux-specific.
  5195. The address of the resulting mapping is returned, or ‘MAP_FAILED’.
  5196. Possible error codes include:
  5197. ‘EFAULT’
  5198. There is no existing mapping in at least part of the original
  5199. region, or the region covers two or more distinct mappings.
  5200. ‘EINVAL’
  5201. Any arguments are inappropriate, including unknown FLAGS
  5202. values.
  5203. ‘EAGAIN’
  5204. The region has pages locked, and if extended it would exceed
  5205. the process's resource limit for locked pages. *Note Limits
  5206. on Resources::.
  5207. ‘ENOMEM’
  5208. The region is private writable, and insufficient virtual
  5209. memory is available to extend it. Also, this error will occur
  5210. if ‘MREMAP_MAYMOVE’ is not given and the extension would
  5211. collide with another mapped region.
  5212. This function is only available on a few systems. Except for
  5213. performing optional optimizations one should not rely on this function.
  5214. Not all file descriptors may be mapped. Sockets, pipes, and most
  5215. devices only allow sequential access and do not fit into the mapping
  5216. abstraction. In addition, some regular files may not be mmapable, and
  5217. older kernels may not support mapping at all. Thus, programs using
  5218. ‘mmap’ should have a fallback method to use should it fail. *Note
  5219. (standards)Mmap::.
  5220. -- Function: int madvise (void *ADDR, size_t LENGTH, int ADVICE)
  5221. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5222. Concepts::.
  5223. This function can be used to provide the system with ADVICE about
  5224. the intended usage patterns of the memory region starting at ADDR
  5225. and extending LENGTH bytes.
  5226. The valid BSD values for ADVICE are:
  5227. ‘MADV_NORMAL’
  5228. The region should receive no further special treatment.
  5229. ‘MADV_RANDOM’
  5230. The region will be accessed via random page references. The
  5231. kernel should page-in the minimal number of pages for each
  5232. page fault.
  5233. ‘MADV_SEQUENTIAL’
  5234. The region will be accessed via sequential page references.
  5235. This may cause the kernel to aggressively read-ahead,
  5236. expecting further sequential references after any page fault
  5237. within this region.
  5238. ‘MADV_WILLNEED’
  5239. The region will be needed. The pages within this region may
  5240. be pre-faulted in by the kernel.
  5241. ‘MADV_DONTNEED’
  5242. The region is no longer needed. The kernel may free these
  5243. pages, causing any changes to the pages to be lost, as well as
  5244. swapped out pages to be discarded.
  5245. ‘MADV_HUGEPAGE’
  5246. Indicate that it is beneficial to increase the page size for
  5247. this mapping. This can improve performance for larger
  5248. mappings because the system needs to handle far fewer pages.
  5249. However, if parts of the mapping are frequently transferred
  5250. between storage or different nodes, performance may suffer
  5251. because individual transfers can become substantially larger
  5252. due to the increased page size.
  5253. This flag is specific to Linux.
  5254. ‘MADV_NOHUGEPAGE’
  5255. Undo the effect of a previous ‘MADV_HUGEPAGE’ advice. This
  5256. flag is specific to Linux.
  5257. The POSIX names are slightly different, but with the same meanings:
  5258. ‘POSIX_MADV_NORMAL’
  5259. This corresponds with BSD's ‘MADV_NORMAL’.
  5260. ‘POSIX_MADV_RANDOM’
  5261. This corresponds with BSD's ‘MADV_RANDOM’.
  5262. ‘POSIX_MADV_SEQUENTIAL’
  5263. This corresponds with BSD's ‘MADV_SEQUENTIAL’.
  5264. ‘POSIX_MADV_WILLNEED’
  5265. This corresponds with BSD's ‘MADV_WILLNEED’.
  5266. ‘POSIX_MADV_DONTNEED’
  5267. This corresponds with BSD's ‘MADV_DONTNEED’.
  5268. ‘madvise’ returns 0 for success and -1 for error. Errors include:
  5269. ‘EINVAL’
  5270. An invalid region was given, or the ADVICE was invalid.
  5271. ‘EFAULT’
  5272. There is no existing mapping in at least part of the given
  5273. region.
  5274. -- Function: int shm_open (const char *NAME, int OFLAG, mode_t MODE)
  5275. Preliminary: | MT-Safe locale | AS-Unsafe init heap lock |
  5276. AC-Unsafe lock mem fd | *Note POSIX Safety Concepts::.
  5277. This function returns a file descriptor that can be used to
  5278. allocate shared memory via mmap. Unrelated processes can use same
  5279. NAME to create or open existing shared memory objects.
  5280. A NAME argument specifies the shared memory object to be opened.
  5281. In the GNU C Library it must be a string smaller than ‘NAME_MAX’
  5282. bytes starting with an optional slash but containing no other
  5283. slashes.
  5284. The semantics of OFLAG and MODE arguments is same as in ‘open’.
  5285. ‘shm_open’ returns the file descriptor on success or -1 on error.
  5286. On failure ‘errno’ is set.
  5287. -- Function: int shm_unlink (const char *NAME)
  5288. Preliminary: | MT-Safe locale | AS-Unsafe init heap lock |
  5289. AC-Unsafe lock mem fd | *Note POSIX Safety Concepts::.
  5290. This function is the inverse of ‘shm_open’ and removes the object
  5291. with the given NAME previously created by ‘shm_open’.
  5292. ‘shm_unlink’ returns 0 on success or -1 on error. On failure
  5293. ‘errno’ is set.
  5294. -- Function: int memfd_create (const char *NAME, unsigned int FLAGS)
  5295. Preliminary: | MT-Safe | AS-Safe | AC-Safe fd | *Note POSIX Safety
  5296. Concepts::.
  5297. The ‘memfd_create’ function returns a file descriptor which can be
  5298. used to create memory mappings using the ‘mmap’ function. It is
  5299. similar to the ‘shm_open’ function in the sense that these mappings
  5300. are not backed by actual files. However, the descriptor returned
  5301. by ‘memfd_create’ does not correspond to a named object; the NAME
  5302. argument is used for debugging purposes only (e.g., will appear in
  5303. ‘/proc’), and separate invocations of ‘memfd_create’ with the same
  5304. NAME will not return descriptors for the same region of memory.
  5305. The descriptor can also be used to create alias mappings within the
  5306. same process.
  5307. The descriptor initially refers to a zero-length file. Before
  5308. mappings can be created which are backed by memory, the file size
  5309. needs to be increased with the ‘ftruncate’ function. *Note File
  5310. Size::.
  5311. The FLAGS argument can be a combination of the following flags:
  5312. ‘MFD_CLOEXEC’
  5313. The descriptor is created with the ‘O_CLOEXEC’ flag.
  5314. ‘MFD_ALLOW_SEALING’
  5315. The descriptor supports the addition of seals using the
  5316. ‘fcntl’ function.
  5317. ‘MFD_HUGETLB’
  5318. This requests that mappings created using the returned file
  5319. descriptor use a larger page size. See ‘MAP_HUGETLB’ above
  5320. for details.
  5321. This flag is incompatible with ‘MFD_ALLOW_SEALING’.
  5322. ‘memfd_create’ returns a file descriptor on success, and -1 on
  5323. failure.
  5324. The following ‘errno’ error conditions are defined for this
  5325. function:
  5326. ‘EINVAL’
  5327. An invalid combination is specified in FLAGS, or NAME is too
  5328. long.
  5329. ‘EFAULT’
  5330. The NAME argument does not point to a string.
  5331. ‘EMFILE’
  5332. The operation would exceed the file descriptor limit for this
  5333. process.
  5334. ‘ENFILE’
  5335. The operation would exceed the system-wide file descriptor
  5336. limit.
  5337. ‘ENOMEM’
  5338. There is not enough memory for the operation.
  5339. 
  5340. File: libc.info, Node: Waiting for I/O, Next: Synchronizing I/O, Prev: Memory-mapped I/O, Up: Low-Level I/O
  5341. 13.9 Waiting for Input or Output
  5342. ================================
  5343. Sometimes a program needs to accept input on multiple input channels
  5344. whenever input arrives. For example, some workstations may have devices
  5345. such as a digitizing tablet, function button box, or dial box that are
  5346. connected via normal asynchronous serial interfaces; good user interface
  5347. style requires responding immediately to input on any device. Another
  5348. example is a program that acts as a server to several other processes
  5349. via pipes or sockets.
  5350. You cannot normally use ‘read’ for this purpose, because this blocks
  5351. the program until input is available on one particular file descriptor;
  5352. input on other channels won't wake it up. You could set nonblocking
  5353. mode and poll each file descriptor in turn, but this is very
  5354. inefficient.
  5355. A better solution is to use the ‘select’ function. This blocks the
  5356. program until input or output is ready on a specified set of file
  5357. descriptors, or until a timer expires, whichever comes first. This
  5358. facility is declared in the header file ‘sys/select.h’.
  5359. In the case of a server socket (*note Listening::), we say that
  5360. "input" is available when there are pending connections that could be
  5361. accepted (*note Accepting Connections::). ‘accept’ for server sockets
  5362. blocks and interacts with ‘select’ just as ‘read’ does for normal input.
  5363. The file descriptor sets for the ‘select’ function are specified as
  5364. ‘fd_set’ objects. Here is the description of the data type and some
  5365. macros for manipulating these objects.
  5366. -- Data Type: fd_set
  5367. The ‘fd_set’ data type represents file descriptor sets for the
  5368. ‘select’ function. It is actually a bit array.
  5369. -- Macro: int FD_SETSIZE
  5370. The value of this macro is the maximum number of file descriptors
  5371. that a ‘fd_set’ object can hold information about. On systems with
  5372. a fixed maximum number, ‘FD_SETSIZE’ is at least that number. On
  5373. some systems, including GNU, there is no absolute limit on the
  5374. number of descriptors open, but this macro still has a constant
  5375. value which controls the number of bits in an ‘fd_set’; if you get
  5376. a file descriptor with a value as high as ‘FD_SETSIZE’, you cannot
  5377. put that descriptor into an ‘fd_set’.
  5378. -- Macro: void FD_ZERO (fd_set *SET)
  5379. Preliminary: | MT-Safe race:set | AS-Safe | AC-Safe | *Note POSIX
  5380. Safety Concepts::.
  5381. This macro initializes the file descriptor set SET to be the empty
  5382. set.
  5383. -- Macro: void FD_SET (int FILEDES, fd_set *SET)
  5384. Preliminary: | MT-Safe race:set | AS-Safe | AC-Safe | *Note POSIX
  5385. Safety Concepts::.
  5386. This macro adds FILEDES to the file descriptor set SET.
  5387. The FILEDES parameter must not have side effects since it is
  5388. evaluated more than once.
  5389. -- Macro: void FD_CLR (int FILEDES, fd_set *SET)
  5390. Preliminary: | MT-Safe race:set | AS-Safe | AC-Safe | *Note POSIX
  5391. Safety Concepts::.
  5392. This macro removes FILEDES from the file descriptor set SET.
  5393. The FILEDES parameter must not have side effects since it is
  5394. evaluated more than once.
  5395. -- Macro: int FD_ISSET (int FILEDES, const fd_set *SET)
  5396. Preliminary: | MT-Safe race:set | AS-Safe | AC-Safe | *Note POSIX
  5397. Safety Concepts::.
  5398. This macro returns a nonzero value (true) if FILEDES is a member of
  5399. the file descriptor set SET, and zero (false) otherwise.
  5400. The FILEDES parameter must not have side effects since it is
  5401. evaluated more than once.
  5402. Next, here is the description of the ‘select’ function itself.
  5403. -- Function: int select (int NFDS, fd_set *READ-FDS, fd_set *WRITE-FDS,
  5404. fd_set *EXCEPT-FDS, struct timeval *TIMEOUT)
  5405. Preliminary: | MT-Safe race:read-fds race:write-fds race:except-fds
  5406. | AS-Safe | AC-Safe | *Note POSIX Safety Concepts::.
  5407. The ‘select’ function blocks the calling process until there is
  5408. activity on any of the specified sets of file descriptors, or until
  5409. the timeout period has expired.
  5410. The file descriptors specified by the READ-FDS argument are checked
  5411. to see if they are ready for reading; the WRITE-FDS file
  5412. descriptors are checked to see if they are ready for writing; and
  5413. the EXCEPT-FDS file descriptors are checked for exceptional
  5414. conditions. You can pass a null pointer for any of these arguments
  5415. if you are not interested in checking for that kind of condition.
  5416. A file descriptor is considered ready for reading if a ‘read’ call
  5417. will not block. This usually includes the read offset being at the
  5418. end of the file or there is an error to report. A server socket is
  5419. considered ready for reading if there is a pending connection which
  5420. can be accepted with ‘accept’; *note Accepting Connections::. A
  5421. client socket is ready for writing when its connection is fully
  5422. established; *note Connecting::.
  5423. "Exceptional conditions" does not mean errors--errors are reported
  5424. immediately when an erroneous system call is executed, and do not
  5425. constitute a state of the descriptor. Rather, they include
  5426. conditions such as the presence of an urgent message on a socket.
  5427. (*Note Sockets::, for information on urgent messages.)
  5428. The ‘select’ function checks only the first NFDS file descriptors.
  5429. The usual thing is to pass ‘FD_SETSIZE’ as the value of this
  5430. argument.
  5431. The TIMEOUT specifies the maximum time to wait. If you pass a null
  5432. pointer for this argument, it means to block indefinitely until one
  5433. of the file descriptors is ready. Otherwise, you should provide
  5434. the time in ‘struct timeval’ format; see *note Time Types::.
  5435. Specify zero as the time (a ‘struct timeval’ containing all zeros)
  5436. if you want to find out which descriptors are ready without waiting
  5437. if none are ready.
  5438. The normal return value from ‘select’ is the total number of ready
  5439. file descriptors in all of the sets. Each of the argument sets is
  5440. overwritten with information about the descriptors that are ready
  5441. for the corresponding operation. Thus, to see if a particular
  5442. descriptor DESC has input, use ‘FD_ISSET (DESC, READ-FDS)’ after
  5443. ‘select’ returns.
  5444. If ‘select’ returns because the timeout period expires, it returns
  5445. a value of zero.
  5446. Any signal will cause ‘select’ to return immediately. So if your
  5447. program uses signals, you can't rely on ‘select’ to keep waiting
  5448. for the full time specified. If you want to be sure of waiting for
  5449. a particular amount of time, you must check for ‘EINTR’ and repeat
  5450. the ‘select’ with a newly calculated timeout based on the current
  5451. time. See the example below. See also *note Interrupted
  5452. Primitives::.
  5453. If an error occurs, ‘select’ returns ‘-1’ and does not modify the
  5454. argument file descriptor sets. The following ‘errno’ error
  5455. conditions are defined for this function:
  5456. ‘EBADF’
  5457. One of the file descriptor sets specified an invalid file
  5458. descriptor.
  5459. ‘EINTR’
  5460. The operation was interrupted by a signal. *Note Interrupted
  5461. Primitives::.
  5462. ‘EINVAL’
  5463. The TIMEOUT argument is invalid; one of the components is
  5464. negative or too large.
  5465. Here is an example showing how you can use ‘select’ to establish a
  5466. timeout period for reading from a file descriptor. The ‘input_timeout’
  5467. function blocks the calling process until input is available on the file
  5468. descriptor, or until the timeout period expires.
  5469. #define _GNU_SOURCE 1
  5470. #include <errno.h>
  5471. #include <stdio.h>
  5472. #include <unistd.h>
  5473. #include <sys/types.h>
  5474. #include <sys/select.h>
  5475. int
  5476. input_timeout (int filedes, unsigned int seconds)
  5477. {
  5478. fd_set set;
  5479. struct timeval timeout;
  5480. /* Initialize the file descriptor set. */
  5481. FD_ZERO (&set);
  5482. FD_SET (filedes, &set);
  5483. /* Initialize the timeout data structure. */
  5484. timeout.tv_sec = seconds;
  5485. timeout.tv_usec = 0;
  5486. /* ‘select’ returns 0 if timeout, 1 if input available, -1 if error. */
  5487. return TEMP_FAILURE_RETRY (select (FD_SETSIZE,
  5488. &set, NULL, NULL,
  5489. &timeout));
  5490. }
  5491. int
  5492. main (void)
  5493. {
  5494. fprintf (stderr, "select returned %d.\n",
  5495. input_timeout (STDIN_FILENO, 5));
  5496. return 0;
  5497. }
  5498. There is another example showing the use of ‘select’ to multiplex
  5499. input from multiple sockets in *note Server Example::.
  5500. For an alternate interface to this functionality, see ‘poll’ (*note
  5501. Other Low-Level I/O APIs::).
  5502. 
  5503. File: libc.info, Node: Synchronizing I/O, Next: Asynchronous I/O, Prev: Waiting for I/O, Up: Low-Level I/O
  5504. 13.10 Synchronizing I/O operations
  5505. ==================================
  5506. In most modern operating systems, the normal I/O operations are not
  5507. executed synchronously. I.e., even if a ‘write’ system call returns,
  5508. this does not mean the data is actually written to the media, e.g., the
  5509. disk.
  5510. In situations where synchronization points are necessary, you can use
  5511. special functions which ensure that all operations finish before they
  5512. return.
  5513. -- Function: void sync (void)
  5514. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5515. Concepts::.
  5516. A call to this function will not return as long as there is data
  5517. which has not been written to the device. All dirty buffers in the
  5518. kernel will be written and so an overall consistent system can be
  5519. achieved (if no other process in parallel writes data).
  5520. A prototype for ‘sync’ can be found in ‘unistd.h’.
  5521. Programs more often want to ensure that data written to a given file
  5522. is committed, rather than all data in the system. For this, ‘sync’ is
  5523. overkill.
  5524. -- Function: int fsync (int FILDES)
  5525. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5526. Concepts::.
  5527. The ‘fsync’ function can be used to make sure all data associated
  5528. with the open file FILDES is written to the device associated with
  5529. the descriptor. The function call does not return unless all
  5530. actions have finished.
  5531. A prototype for ‘fsync’ can be found in ‘unistd.h’.
  5532. This function is a cancellation point in multi-threaded programs.
  5533. This is a problem if the thread allocates some resources (like
  5534. memory, file descriptors, semaphores or whatever) at the time
  5535. ‘fsync’ is called. If the thread gets canceled these resources
  5536. stay allocated until the program ends. To avoid this, calls to
  5537. ‘fsync’ should be protected using cancellation handlers.
  5538. The return value of the function is zero if no error occurred.
  5539. Otherwise it is -1 and the global variable ‘errno’ is set to the
  5540. following values:
  5541. ‘EBADF’
  5542. The descriptor FILDES is not valid.
  5543. ‘EINVAL’
  5544. No synchronization is possible since the system does not
  5545. implement this.
  5546. Sometimes it is not even necessary to write all data associated with
  5547. a file descriptor. E.g., in database files which do not change in size
  5548. it is enough to write all the file content data to the device.
  5549. Meta-information, like the modification time etc., are not that
  5550. important and leaving such information uncommitted does not prevent a
  5551. successful recovery of the file in case of a problem.
  5552. -- Function: int fdatasync (int FILDES)
  5553. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5554. Concepts::.
  5555. When a call to the ‘fdatasync’ function returns, it is ensured that
  5556. all of the file data is written to the device. For all pending I/O
  5557. operations, the parts guaranteeing data integrity finished.
  5558. Not all systems implement the ‘fdatasync’ operation. On systems
  5559. missing this functionality ‘fdatasync’ is emulated by a call to
  5560. ‘fsync’ since the performed actions are a superset of those
  5561. required by ‘fdatasync’.
  5562. The prototype for ‘fdatasync’ is in ‘unistd.h’.
  5563. The return value of the function is zero if no error occurred.
  5564. Otherwise it is -1 and the global variable ‘errno’ is set to the
  5565. following values:
  5566. ‘EBADF’
  5567. The descriptor FILDES is not valid.
  5568. ‘EINVAL’
  5569. No synchronization is possible since the system does not
  5570. implement this.
  5571. 
  5572. File: libc.info, Node: Asynchronous I/O, Next: Control Operations, Prev: Synchronizing I/O, Up: Low-Level I/O
  5573. 13.11 Perform I/O Operations in Parallel
  5574. ========================================
  5575. The POSIX.1b standard defines a new set of I/O operations which can
  5576. significantly reduce the time an application spends waiting for I/O. The
  5577. new functions allow a program to initiate one or more I/O operations and
  5578. then immediately resume normal work while the I/O operations are
  5579. executed in parallel. This functionality is available if the ‘unistd.h’
  5580. file defines the symbol ‘_POSIX_ASYNCHRONOUS_IO’.
  5581. These functions are part of the library with realtime functions named
  5582. ‘librt’. They are not actually part of the ‘libc’ binary. The
  5583. implementation of these functions can be done using support in the
  5584. kernel (if available) or using an implementation based on threads at
  5585. userlevel. In the latter case it might be necessary to link
  5586. applications with the thread library ‘libpthread’ in addition to
  5587. ‘librt’.
  5588. All AIO operations operate on files which were opened previously.
  5589. There might be arbitrarily many operations running for one file. The
  5590. asynchronous I/O operations are controlled using a data structure named
  5591. ‘struct aiocb’ (“AIO control block”). It is defined in ‘aio.h’ as
  5592. follows.
  5593. -- Data Type: struct aiocb
  5594. The POSIX.1b standard mandates that the ‘struct aiocb’ structure
  5595. contains at least the members described in the following table.
  5596. There might be more elements which are used by the implementation,
  5597. but depending upon these elements is not portable and is highly
  5598. deprecated.
  5599. ‘int aio_fildes’
  5600. This element specifies the file descriptor to be used for the
  5601. operation. It must be a legal descriptor, otherwise the
  5602. operation will fail.
  5603. The device on which the file is opened must allow the seek
  5604. operation. I.e., it is not possible to use any of the AIO
  5605. operations on devices like terminals where an ‘lseek’ call
  5606. would lead to an error.
  5607. ‘off_t aio_offset’
  5608. This element specifies the offset in the file at which the
  5609. operation (input or output) is performed. Since the
  5610. operations are carried out in arbitrary order and more than
  5611. one operation for one file descriptor can be started, one
  5612. cannot expect a current read/write position of the file
  5613. descriptor.
  5614. ‘volatile void *aio_buf’
  5615. This is a pointer to the buffer with the data to be written or
  5616. the place where the read data is stored.
  5617. ‘size_t aio_nbytes’
  5618. This element specifies the length of the buffer pointed to by
  5619. ‘aio_buf’.
  5620. ‘int aio_reqprio’
  5621. If the platform has defined ‘_POSIX_PRIORITIZED_IO’ and
  5622. ‘_POSIX_PRIORITY_SCHEDULING’, the AIO requests are processed
  5623. based on the current scheduling priority. The ‘aio_reqprio’
  5624. element can then be used to lower the priority of the AIO
  5625. operation.
  5626. ‘struct sigevent aio_sigevent’
  5627. This element specifies how the calling process is notified
  5628. once the operation terminates. If the ‘sigev_notify’ element
  5629. is ‘SIGEV_NONE’, no notification is sent. If it is
  5630. ‘SIGEV_SIGNAL’, the signal determined by ‘sigev_signo’ is
  5631. sent. Otherwise, ‘sigev_notify’ must be ‘SIGEV_THREAD’. In
  5632. this case, a thread is created which starts executing the
  5633. function pointed to by ‘sigev_notify_function’.
  5634. ‘int aio_lio_opcode’
  5635. This element is only used by the ‘lio_listio’ and
  5636. ‘lio_listio64’ functions. Since these functions allow an
  5637. arbitrary number of operations to start at once, and each
  5638. operation can be input or output (or nothing), the information
  5639. must be stored in the control block. The possible values are:
  5640. ‘LIO_READ’
  5641. Start a read operation. Read from the file at position
  5642. ‘aio_offset’ and store the next ‘aio_nbytes’ bytes in the
  5643. buffer pointed to by ‘aio_buf’.
  5644. ‘LIO_WRITE’
  5645. Start a write operation. Write ‘aio_nbytes’ bytes
  5646. starting at ‘aio_buf’ into the file starting at position
  5647. ‘aio_offset’.
  5648. ‘LIO_NOP’
  5649. Do nothing for this control block. This value is useful
  5650. sometimes when an array of ‘struct aiocb’ values contains
  5651. holes, i.e., some of the values must not be handled
  5652. although the whole array is presented to the ‘lio_listio’
  5653. function.
  5654. When the sources are compiled using ‘_FILE_OFFSET_BITS == 64’ on a
  5655. 32 bit machine, this type is in fact ‘struct aiocb64’, since the
  5656. LFS interface transparently replaces the ‘struct aiocb’ definition.
  5657. For use with the AIO functions defined in the LFS, there is a similar
  5658. type defined which replaces the types of the appropriate members with
  5659. larger types but otherwise is equivalent to ‘struct aiocb’.
  5660. Particularly, all member names are the same.
  5661. -- Data Type: struct aiocb64
  5662. ‘int aio_fildes’
  5663. This element specifies the file descriptor which is used for
  5664. the operation. It must be a legal descriptor since otherwise
  5665. the operation fails for obvious reasons.
  5666. The device on which the file is opened must allow the seek
  5667. operation. I.e., it is not possible to use any of the AIO
  5668. operations on devices like terminals where an ‘lseek’ call
  5669. would lead to an error.
  5670. ‘off64_t aio_offset’
  5671. This element specifies at which offset in the file the
  5672. operation (input or output) is performed. Since the operation
  5673. are carried in arbitrary order and more than one operation for
  5674. one file descriptor can be started, one cannot expect a
  5675. current read/write position of the file descriptor.
  5676. ‘volatile void *aio_buf’
  5677. This is a pointer to the buffer with the data to be written or
  5678. the place where the read data is stored.
  5679. ‘size_t aio_nbytes’
  5680. This element specifies the length of the buffer pointed to by
  5681. ‘aio_buf’.
  5682. ‘int aio_reqprio’
  5683. If for the platform ‘_POSIX_PRIORITIZED_IO’ and
  5684. ‘_POSIX_PRIORITY_SCHEDULING’ are defined the AIO requests are
  5685. processed based on the current scheduling priority. The
  5686. ‘aio_reqprio’ element can then be used to lower the priority
  5687. of the AIO operation.
  5688. ‘struct sigevent aio_sigevent’
  5689. This element specifies how the calling process is notified
  5690. once the operation terminates. If the ‘sigev_notify’ element
  5691. is ‘SIGEV_NONE’ no notification is sent. If it is
  5692. ‘SIGEV_SIGNAL’, the signal determined by ‘sigev_signo’ is
  5693. sent. Otherwise, ‘sigev_notify’ must be ‘SIGEV_THREAD’ in
  5694. which case a thread is created which starts executing the
  5695. function pointed to by ‘sigev_notify_function’.
  5696. ‘int aio_lio_opcode’
  5697. This element is only used by the ‘lio_listio’ and
  5698. ‘lio_listio64’ functions. Since these functions allow an
  5699. arbitrary number of operations to start at once, and since
  5700. each operation can be input or output (or nothing), the
  5701. information must be stored in the control block. See the
  5702. description of ‘struct aiocb’ for a description of the
  5703. possible values.
  5704. When the sources are compiled using ‘_FILE_OFFSET_BITS == 64’ on a
  5705. 32 bit machine, this type is available under the name ‘struct
  5706. aiocb64’, since the LFS transparently replaces the old interface.
  5707. * Menu:
  5708. * Asynchronous Reads/Writes:: Asynchronous Read and Write Operations.
  5709. * Status of AIO Operations:: Getting the Status of AIO Operations.
  5710. * Synchronizing AIO Operations:: Getting into a consistent state.
  5711. * Cancel AIO Operations:: Cancellation of AIO Operations.
  5712. * Configuration of AIO:: How to optimize the AIO implementation.
  5713. 
  5714. File: libc.info, Node: Asynchronous Reads/Writes, Next: Status of AIO Operations, Up: Asynchronous I/O
  5715. 13.11.1 Asynchronous Read and Write Operations
  5716. ----------------------------------------------
  5717. -- Function: int aio_read (struct aiocb *AIOCBP)
  5718. Preliminary: | MT-Safe | AS-Unsafe lock heap | AC-Unsafe lock mem |
  5719. *Note POSIX Safety Concepts::.
  5720. This function initiates an asynchronous read operation. It
  5721. immediately returns after the operation was enqueued or when an
  5722. error was encountered.
  5723. The first ‘aiocbp->aio_nbytes’ bytes of the file for which
  5724. ‘aiocbp->aio_fildes’ is a descriptor are written to the buffer
  5725. starting at ‘aiocbp->aio_buf’. Reading starts at the absolute
  5726. position ‘aiocbp->aio_offset’ in the file.
  5727. If prioritized I/O is supported by the platform the
  5728. ‘aiocbp->aio_reqprio’ value is used to adjust the priority before
  5729. the request is actually enqueued.
  5730. The calling process is notified about the termination of the read
  5731. request according to the ‘aiocbp->aio_sigevent’ value.
  5732. When ‘aio_read’ returns, the return value is zero if no error
  5733. occurred that can be found before the process is enqueued. If such
  5734. an early error is found, the function returns -1 and sets ‘errno’
  5735. to one of the following values:
  5736. ‘EAGAIN’
  5737. The request was not enqueued due to (temporarily) exceeded
  5738. resource limitations.
  5739. ‘ENOSYS’
  5740. The ‘aio_read’ function is not implemented.
  5741. ‘EBADF’
  5742. The ‘aiocbp->aio_fildes’ descriptor is not valid. This
  5743. condition need not be recognized before enqueueing the request
  5744. and so this error might also be signaled asynchronously.
  5745. ‘EINVAL’
  5746. The ‘aiocbp->aio_offset’ or ‘aiocbp->aio_reqpiro’ value is
  5747. invalid. This condition need not be recognized before
  5748. enqueueing the request and so this error might also be
  5749. signaled asynchronously.
  5750. If ‘aio_read’ returns zero, the current status of the request can
  5751. be queried using ‘aio_error’ and ‘aio_return’ functions. As long
  5752. as the value returned by ‘aio_error’ is ‘EINPROGRESS’ the operation
  5753. has not yet completed. If ‘aio_error’ returns zero, the operation
  5754. successfully terminated, otherwise the value is to be interpreted
  5755. as an error code. If the function terminated, the result of the
  5756. operation can be obtained using a call to ‘aio_return’. The
  5757. returned value is the same as an equivalent call to ‘read’ would
  5758. have returned. Possible error codes returned by ‘aio_error’ are:
  5759. ‘EBADF’
  5760. The ‘aiocbp->aio_fildes’ descriptor is not valid.
  5761. ‘ECANCELED’
  5762. The operation was canceled before the operation was finished
  5763. (*note Cancel AIO Operations::)
  5764. ‘EINVAL’
  5765. The ‘aiocbp->aio_offset’ value is invalid.
  5766. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ this
  5767. function is in fact ‘aio_read64’ since the LFS interface
  5768. transparently replaces the normal implementation.
  5769. -- Function: int aio_read64 (struct aiocb64 *AIOCBP)
  5770. Preliminary: | MT-Safe | AS-Unsafe lock heap | AC-Unsafe lock mem |
  5771. *Note POSIX Safety Concepts::.
  5772. This function is similar to the ‘aio_read’ function. The only
  5773. difference is that on 32 bit machines, the file descriptor should
  5774. be opened in the large file mode. Internally, ‘aio_read64’ uses
  5775. functionality equivalent to ‘lseek64’ (*note File Position
  5776. Primitive::) to position the file descriptor correctly for the
  5777. reading, as opposed to the ‘lseek’ functionality used in
  5778. ‘aio_read’.
  5779. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’, this
  5780. function is available under the name ‘aio_read’ and so
  5781. transparently replaces the interface for small files on 32 bit
  5782. machines.
  5783. To write data asynchronously to a file, there exists an equivalent
  5784. pair of functions with a very similar interface.
  5785. -- Function: int aio_write (struct aiocb *AIOCBP)
  5786. Preliminary: | MT-Safe | AS-Unsafe lock heap | AC-Unsafe lock mem |
  5787. *Note POSIX Safety Concepts::.
  5788. This function initiates an asynchronous write operation. The
  5789. function call immediately returns after the operation was enqueued
  5790. or if before this happens an error was encountered.
  5791. The first ‘aiocbp->aio_nbytes’ bytes from the buffer starting at
  5792. ‘aiocbp->aio_buf’ are written to the file for which
  5793. ‘aiocbp->aio_fildes’ is a descriptor, starting at the absolute
  5794. position ‘aiocbp->aio_offset’ in the file.
  5795. If prioritized I/O is supported by the platform, the
  5796. ‘aiocbp->aio_reqprio’ value is used to adjust the priority before
  5797. the request is actually enqueued.
  5798. The calling process is notified about the termination of the read
  5799. request according to the ‘aiocbp->aio_sigevent’ value.
  5800. When ‘aio_write’ returns, the return value is zero if no error
  5801. occurred that can be found before the process is enqueued. If such
  5802. an early error is found the function returns -1 and sets ‘errno’ to
  5803. one of the following values.
  5804. ‘EAGAIN’
  5805. The request was not enqueued due to (temporarily) exceeded
  5806. resource limitations.
  5807. ‘ENOSYS’
  5808. The ‘aio_write’ function is not implemented.
  5809. ‘EBADF’
  5810. The ‘aiocbp->aio_fildes’ descriptor is not valid. This
  5811. condition may not be recognized before enqueueing the request,
  5812. and so this error might also be signaled asynchronously.
  5813. ‘EINVAL’
  5814. The ‘aiocbp->aio_offset’ or ‘aiocbp->aio_reqprio’ value is
  5815. invalid. This condition may not be recognized before
  5816. enqueueing the request and so this error might also be
  5817. signaled asynchronously.
  5818. In the case ‘aio_write’ returns zero, the current status of the
  5819. request can be queried using the ‘aio_error’ and ‘aio_return’
  5820. functions. As long as the value returned by ‘aio_error’ is
  5821. ‘EINPROGRESS’ the operation has not yet completed. If ‘aio_error’
  5822. returns zero, the operation successfully terminated, otherwise the
  5823. value is to be interpreted as an error code. If the function
  5824. terminated, the result of the operation can be obtained using a
  5825. call to ‘aio_return’. The returned value is the same as an
  5826. equivalent call to ‘read’ would have returned. Possible error
  5827. codes returned by ‘aio_error’ are:
  5828. ‘EBADF’
  5829. The ‘aiocbp->aio_fildes’ descriptor is not valid.
  5830. ‘ECANCELED’
  5831. The operation was canceled before the operation was finished.
  5832. (*note Cancel AIO Operations::)
  5833. ‘EINVAL’
  5834. The ‘aiocbp->aio_offset’ value is invalid.
  5835. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’, this
  5836. function is in fact ‘aio_write64’ since the LFS interface
  5837. transparently replaces the normal implementation.
  5838. -- Function: int aio_write64 (struct aiocb64 *AIOCBP)
  5839. Preliminary: | MT-Safe | AS-Unsafe lock heap | AC-Unsafe lock mem |
  5840. *Note POSIX Safety Concepts::.
  5841. This function is similar to the ‘aio_write’ function. The only
  5842. difference is that on 32 bit machines the file descriptor should be
  5843. opened in the large file mode. Internally ‘aio_write64’ uses
  5844. functionality equivalent to ‘lseek64’ (*note File Position
  5845. Primitive::) to position the file descriptor correctly for the
  5846. writing, as opposed to the ‘lseek’ functionality used in
  5847. ‘aio_write’.
  5848. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’, this
  5849. function is available under the name ‘aio_write’ and so
  5850. transparently replaces the interface for small files on 32 bit
  5851. machines.
  5852. Besides these functions with the more or less traditional interface,
  5853. POSIX.1b also defines a function which can initiate more than one
  5854. operation at a time, and which can handle freely mixed read and write
  5855. operations. It is therefore similar to a combination of ‘readv’ and
  5856. ‘writev’.
  5857. -- Function: int lio_listio (int MODE, struct aiocb *const LIST[], int
  5858. NENT, struct sigevent *SIG)
  5859. Preliminary: | MT-Safe | AS-Unsafe lock heap | AC-Unsafe lock mem |
  5860. *Note POSIX Safety Concepts::.
  5861. The ‘lio_listio’ function can be used to enqueue an arbitrary
  5862. number of read and write requests at one time. The requests can
  5863. all be meant for the same file, all for different files or every
  5864. solution in between.
  5865. ‘lio_listio’ gets the NENT requests from the array pointed to by
  5866. LIST. The operation to be performed is determined by the
  5867. ‘aio_lio_opcode’ member in each element of LIST. If this field is
  5868. ‘LIO_READ’ a read operation is enqueued, similar to a call of
  5869. ‘aio_read’ for this element of the array (except that the way the
  5870. termination is signalled is different, as we will see below). If
  5871. the ‘aio_lio_opcode’ member is ‘LIO_WRITE’ a write operation is
  5872. enqueued. Otherwise the ‘aio_lio_opcode’ must be ‘LIO_NOP’ in
  5873. which case this element of LIST is simply ignored. This
  5874. "operation" is useful in situations where one has a fixed array of
  5875. ‘struct aiocb’ elements from which only a few need to be handled at
  5876. a time. Another situation is where the ‘lio_listio’ call was
  5877. canceled before all requests are processed (*note Cancel AIO
  5878. Operations::) and the remaining requests have to be reissued.
  5879. The other members of each element of the array pointed to by ‘list’
  5880. must have values suitable for the operation as described in the
  5881. documentation for ‘aio_read’ and ‘aio_write’ above.
  5882. The MODE argument determines how ‘lio_listio’ behaves after having
  5883. enqueued all the requests. If MODE is ‘LIO_WAIT’ it waits until
  5884. all requests terminated. Otherwise MODE must be ‘LIO_NOWAIT’ and
  5885. in this case the function returns immediately after having enqueued
  5886. all the requests. In this case the caller gets a notification of
  5887. the termination of all requests according to the SIG parameter. If
  5888. SIG is ‘NULL’ no notification is sent. Otherwise a signal is sent
  5889. or a thread is started, just as described in the description for
  5890. ‘aio_read’ or ‘aio_write’.
  5891. If MODE is ‘LIO_WAIT’, the return value of ‘lio_listio’ is 0 when
  5892. all requests completed successfully. Otherwise the function
  5893. returns -1 and ‘errno’ is set accordingly. To find out which
  5894. request or requests failed one has to use the ‘aio_error’ function
  5895. on all the elements of the array LIST.
  5896. In case MODE is ‘LIO_NOWAIT’, the function returns 0 if all
  5897. requests were enqueued correctly. The current state of the
  5898. requests can be found using ‘aio_error’ and ‘aio_return’ as
  5899. described above. If ‘lio_listio’ returns -1 in this mode, the
  5900. global variable ‘errno’ is set accordingly. If a request did not
  5901. yet terminate, a call to ‘aio_error’ returns ‘EINPROGRESS’. If the
  5902. value is different, the request is finished and the error value (or
  5903. 0) is returned and the result of the operation can be retrieved
  5904. using ‘aio_return’.
  5905. Possible values for ‘errno’ are:
  5906. ‘EAGAIN’
  5907. The resources necessary to queue all the requests are not
  5908. available at the moment. The error status for each element of
  5909. LIST must be checked to determine which request failed.
  5910. Another reason could be that the system wide limit of AIO
  5911. requests is exceeded. This cannot be the case for the
  5912. implementation on GNU systems since no arbitrary limits exist.
  5913. ‘EINVAL’
  5914. The MODE parameter is invalid or NENT is larger than
  5915. ‘AIO_LISTIO_MAX’.
  5916. ‘EIO’
  5917. One or more of the request's I/O operations failed. The error
  5918. status of each request should be checked to determine which
  5919. one failed.
  5920. ‘ENOSYS’
  5921. The ‘lio_listio’ function is not supported.
  5922. If the MODE parameter is ‘LIO_NOWAIT’ and the caller cancels a
  5923. request, the error status for this request returned by ‘aio_error’
  5924. is ‘ECANCELED’.
  5925. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’, this
  5926. function is in fact ‘lio_listio64’ since the LFS interface
  5927. transparently replaces the normal implementation.
  5928. -- Function: int lio_listio64 (int MODE, struct aiocb64 *const LIST[],
  5929. int NENT, struct sigevent *SIG)
  5930. Preliminary: | MT-Safe | AS-Unsafe lock heap | AC-Unsafe lock mem |
  5931. *Note POSIX Safety Concepts::.
  5932. This function is similar to the ‘lio_listio’ function. The only
  5933. difference is that on 32 bit machines, the file descriptor should
  5934. be opened in the large file mode. Internally, ‘lio_listio64’ uses
  5935. functionality equivalent to ‘lseek64’ (*note File Position
  5936. Primitive::) to position the file descriptor correctly for the
  5937. reading or writing, as opposed to the ‘lseek’ functionality used in
  5938. ‘lio_listio’.
  5939. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’, this
  5940. function is available under the name ‘lio_listio’ and so
  5941. transparently replaces the interface for small files on 32 bit
  5942. machines.
  5943. 
  5944. File: libc.info, Node: Status of AIO Operations, Next: Synchronizing AIO Operations, Prev: Asynchronous Reads/Writes, Up: Asynchronous I/O
  5945. 13.11.2 Getting the Status of AIO Operations
  5946. --------------------------------------------
  5947. As already described in the documentation of the functions in the last
  5948. section, it must be possible to get information about the status of an
  5949. I/O request. When the operation is performed truly asynchronously (as
  5950. with ‘aio_read’ and ‘aio_write’ and with ‘lio_listio’ when the mode is
  5951. ‘LIO_NOWAIT’), one sometimes needs to know whether a specific request
  5952. already terminated and if so, what the result was. The following two
  5953. functions allow you to get this kind of information.
  5954. -- Function: int aio_error (const struct aiocb *AIOCBP)
  5955. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5956. Concepts::.
  5957. This function determines the error state of the request described
  5958. by the ‘struct aiocb’ variable pointed to by AIOCBP. If the
  5959. request has not yet terminated the value returned is always
  5960. ‘EINPROGRESS’. Once the request has terminated the value
  5961. ‘aio_error’ returns is either 0 if the request completed
  5962. successfully or it returns the value which would be stored in the
  5963. ‘errno’ variable if the request would have been done using ‘read’,
  5964. ‘write’, or ‘fsync’.
  5965. The function can return ‘ENOSYS’ if it is not implemented. It
  5966. could also return ‘EINVAL’ if the AIOCBP parameter does not refer
  5967. to an asynchronous operation whose return status is not yet known.
  5968. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ this
  5969. function is in fact ‘aio_error64’ since the LFS interface
  5970. transparently replaces the normal implementation.
  5971. -- Function: int aio_error64 (const struct aiocb64 *AIOCBP)
  5972. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5973. Concepts::.
  5974. This function is similar to ‘aio_error’ with the only difference
  5975. that the argument is a reference to a variable of type ‘struct
  5976. aiocb64’.
  5977. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ this
  5978. function is available under the name ‘aio_error’ and so
  5979. transparently replaces the interface for small files on 32 bit
  5980. machines.
  5981. -- Function: ssize_t aio_return (struct aiocb *AIOCBP)
  5982. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5983. Concepts::.
  5984. This function can be used to retrieve the return status of the
  5985. operation carried out by the request described in the variable
  5986. pointed to by AIOCBP. As long as the error status of this request
  5987. as returned by ‘aio_error’ is ‘EINPROGRESS’ the return value of
  5988. this function is undefined.
  5989. Once the request is finished this function can be used exactly once
  5990. to retrieve the return value. Following calls might lead to
  5991. undefined behavior. The return value itself is the value which
  5992. would have been returned by the ‘read’, ‘write’, or ‘fsync’ call.
  5993. The function can return ‘ENOSYS’ if it is not implemented. It
  5994. could also return ‘EINVAL’ if the AIOCBP parameter does not refer
  5995. to an asynchronous operation whose return status is not yet known.
  5996. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ this
  5997. function is in fact ‘aio_return64’ since the LFS interface
  5998. transparently replaces the normal implementation.
  5999. -- Function: ssize_t aio_return64 (struct aiocb64 *AIOCBP)
  6000. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  6001. Concepts::.
  6002. This function is similar to ‘aio_return’ with the only difference
  6003. that the argument is a reference to a variable of type ‘struct
  6004. aiocb64’.
  6005. When the sources are compiled with ‘_FILE_OFFSET_BITS == 64’ this
  6006. function is available under the name ‘aio_return’ and so
  6007. transparently replaces the interface for small files on 32 bit
  6008. machines.