libc.info-1 298 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261
  1. This is libc.info, produced by makeinfo version 6.5 from libc.texinfo.
  2. This is ‘The GNU C Library Reference Manual’, for version 2.33 (GNU).
  3. Copyright © 1993–2021 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. * BC_BASE_MAX: (libc)Utility Limits.
  25. * BC_DIM_MAX: (libc)Utility Limits.
  26. * BC_SCALE_MAX: (libc)Utility Limits.
  27. * BC_STRING_MAX: (libc)Utility Limits.
  28. * BRKINT: (libc)Input Modes.
  29. * BUFSIZ: (libc)Controlling Buffering.
  30. * CCTS_OFLOW: (libc)Control Modes.
  31. * CHAR_BIT: (libc)Width of Type.
  32. * CHILD_MAX: (libc)General Limits.
  33. * CIGNORE: (libc)Control Modes.
  34. * CLK_TCK: (libc)Processor Time.
  35. * CLOCAL: (libc)Control Modes.
  36. * CLOCKS_PER_SEC: (libc)CPU Time.
  37. * CLOCK_MONOTONIC: (libc)Getting the Time.
  38. * CLOCK_REALTIME: (libc)Getting the Time.
  39. * COLL_WEIGHTS_MAX: (libc)Utility Limits.
  40. * CPU_CLR: (libc)CPU Affinity.
  41. * CPU_FEATURE_USABLE: (libc)X86.
  42. * CPU_ISSET: (libc)CPU Affinity.
  43. * CPU_SET: (libc)CPU Affinity.
  44. * CPU_SETSIZE: (libc)CPU Affinity.
  45. * CPU_ZERO: (libc)CPU Affinity.
  46. * CREAD: (libc)Control Modes.
  47. * CRTS_IFLOW: (libc)Control Modes.
  48. * CS5: (libc)Control Modes.
  49. * CS6: (libc)Control Modes.
  50. * CS7: (libc)Control Modes.
  51. * CS8: (libc)Control Modes.
  52. * CSIZE: (libc)Control Modes.
  53. * CSTOPB: (libc)Control Modes.
  54. * DTTOIF: (libc)Directory Entries.
  55. * E2BIG: (libc)Error Codes.
  56. * EACCES: (libc)Error Codes.
  57. * EADDRINUSE: (libc)Error Codes.
  58. * EADDRNOTAVAIL: (libc)Error Codes.
  59. * EADV: (libc)Error Codes.
  60. * EAFNOSUPPORT: (libc)Error Codes.
  61. * EAGAIN: (libc)Error Codes.
  62. * EALREADY: (libc)Error Codes.
  63. * EAUTH: (libc)Error Codes.
  64. * EBACKGROUND: (libc)Error Codes.
  65. * EBADE: (libc)Error Codes.
  66. * EBADF: (libc)Error Codes.
  67. * EBADFD: (libc)Error Codes.
  68. * EBADMSG: (libc)Error Codes.
  69. * EBADR: (libc)Error Codes.
  70. * EBADRPC: (libc)Error Codes.
  71. * EBADRQC: (libc)Error Codes.
  72. * EBADSLT: (libc)Error Codes.
  73. * EBFONT: (libc)Error Codes.
  74. * EBUSY: (libc)Error Codes.
  75. * ECANCELED: (libc)Error Codes.
  76. * ECHILD: (libc)Error Codes.
  77. * ECHO: (libc)Local Modes.
  78. * ECHOCTL: (libc)Local Modes.
  79. * ECHOE: (libc)Local Modes.
  80. * ECHOK: (libc)Local Modes.
  81. * ECHOKE: (libc)Local Modes.
  82. * ECHONL: (libc)Local Modes.
  83. * ECHOPRT: (libc)Local Modes.
  84. * ECHRNG: (libc)Error Codes.
  85. * ECOMM: (libc)Error Codes.
  86. * ECONNABORTED: (libc)Error Codes.
  87. * ECONNREFUSED: (libc)Error Codes.
  88. * ECONNRESET: (libc)Error Codes.
  89. * ED: (libc)Error Codes.
  90. * EDEADLK: (libc)Error Codes.
  91. * EDEADLOCK: (libc)Error Codes.
  92. * EDESTADDRREQ: (libc)Error Codes.
  93. * EDIED: (libc)Error Codes.
  94. * EDOM: (libc)Error Codes.
  95. * EDOTDOT: (libc)Error Codes.
  96. * EDQUOT: (libc)Error Codes.
  97. * EEXIST: (libc)Error Codes.
  98. * EFAULT: (libc)Error Codes.
  99. * EFBIG: (libc)Error Codes.
  100. * EFTYPE: (libc)Error Codes.
  101. * EGRATUITOUS: (libc)Error Codes.
  102. * EGREGIOUS: (libc)Error Codes.
  103. * EHOSTDOWN: (libc)Error Codes.
  104. * EHOSTUNREACH: (libc)Error Codes.
  105. * EHWPOISON: (libc)Error Codes.
  106. * EIDRM: (libc)Error Codes.
  107. * EIEIO: (libc)Error Codes.
  108. * EILSEQ: (libc)Error Codes.
  109. * EINPROGRESS: (libc)Error Codes.
  110. * EINTR: (libc)Error Codes.
  111. * EINVAL: (libc)Error Codes.
  112. * EIO: (libc)Error Codes.
  113. * EISCONN: (libc)Error Codes.
  114. * EISDIR: (libc)Error Codes.
  115. * EISNAM: (libc)Error Codes.
  116. * EKEYEXPIRED: (libc)Error Codes.
  117. * EKEYREJECTED: (libc)Error Codes.
  118. * EKEYREVOKED: (libc)Error Codes.
  119. * EL2HLT: (libc)Error Codes.
  120. * EL2NSYNC: (libc)Error Codes.
  121. * EL3HLT: (libc)Error Codes.
  122. * EL3RST: (libc)Error Codes.
  123. * ELIBACC: (libc)Error Codes.
  124. * ELIBBAD: (libc)Error Codes.
  125. * ELIBEXEC: (libc)Error Codes.
  126. * ELIBMAX: (libc)Error Codes.
  127. * ELIBSCN: (libc)Error Codes.
  128. * ELNRNG: (libc)Error Codes.
  129. * ELOOP: (libc)Error Codes.
  130. * EMEDIUMTYPE: (libc)Error Codes.
  131. * EMFILE: (libc)Error Codes.
  132. * EMLINK: (libc)Error Codes.
  133. * EMSGSIZE: (libc)Error Codes.
  134. * EMULTIHOP: (libc)Error Codes.
  135. * ENAMETOOLONG: (libc)Error Codes.
  136. * ENAVAIL: (libc)Error Codes.
  137. * ENEEDAUTH: (libc)Error Codes.
  138. * ENETDOWN: (libc)Error Codes.
  139. * ENETRESET: (libc)Error Codes.
  140. * ENETUNREACH: (libc)Error Codes.
  141. * ENFILE: (libc)Error Codes.
  142. * ENOANO: (libc)Error Codes.
  143. * ENOBUFS: (libc)Error Codes.
  144. * ENOCSI: (libc)Error Codes.
  145. * ENODATA: (libc)Error Codes.
  146. * ENODEV: (libc)Error Codes.
  147. * ENOENT: (libc)Error Codes.
  148. * ENOEXEC: (libc)Error Codes.
  149. * ENOKEY: (libc)Error Codes.
  150. * ENOLCK: (libc)Error Codes.
  151. * ENOLINK: (libc)Error Codes.
  152. * ENOMEDIUM: (libc)Error Codes.
  153. * ENOMEM: (libc)Error Codes.
  154. * ENOMSG: (libc)Error Codes.
  155. * ENONET: (libc)Error Codes.
  156. * ENOPKG: (libc)Error Codes.
  157. * ENOPROTOOPT: (libc)Error Codes.
  158. * ENOSPC: (libc)Error Codes.
  159. * ENOSR: (libc)Error Codes.
  160. * ENOSTR: (libc)Error Codes.
  161. * ENOSYS: (libc)Error Codes.
  162. * ENOTBLK: (libc)Error Codes.
  163. * ENOTCONN: (libc)Error Codes.
  164. * ENOTDIR: (libc)Error Codes.
  165. * ENOTEMPTY: (libc)Error Codes.
  166. * ENOTNAM: (libc)Error Codes.
  167. * ENOTRECOVERABLE: (libc)Error Codes.
  168. * ENOTSOCK: (libc)Error Codes.
  169. * ENOTSUP: (libc)Error Codes.
  170. * ENOTTY: (libc)Error Codes.
  171. * ENOTUNIQ: (libc)Error Codes.
  172. * ENXIO: (libc)Error Codes.
  173. * EOF: (libc)EOF and Errors.
  174. * EOPNOTSUPP: (libc)Error Codes.
  175. * EOVERFLOW: (libc)Error Codes.
  176. * EOWNERDEAD: (libc)Error Codes.
  177. * EPERM: (libc)Error Codes.
  178. * EPFNOSUPPORT: (libc)Error Codes.
  179. * EPIPE: (libc)Error Codes.
  180. * EPROCLIM: (libc)Error Codes.
  181. * EPROCUNAVAIL: (libc)Error Codes.
  182. * EPROGMISMATCH: (libc)Error Codes.
  183. * EPROGUNAVAIL: (libc)Error Codes.
  184. * EPROTO: (libc)Error Codes.
  185. * EPROTONOSUPPORT: (libc)Error Codes.
  186. * EPROTOTYPE: (libc)Error Codes.
  187. * EQUIV_CLASS_MAX: (libc)Utility Limits.
  188. * ERANGE: (libc)Error Codes.
  189. * EREMCHG: (libc)Error Codes.
  190. * EREMOTE: (libc)Error Codes.
  191. * EREMOTEIO: (libc)Error Codes.
  192. * ERESTART: (libc)Error Codes.
  193. * ERFKILL: (libc)Error Codes.
  194. * EROFS: (libc)Error Codes.
  195. * ERPCMISMATCH: (libc)Error Codes.
  196. * ESHUTDOWN: (libc)Error Codes.
  197. * ESOCKTNOSUPPORT: (libc)Error Codes.
  198. * ESPIPE: (libc)Error Codes.
  199. * ESRCH: (libc)Error Codes.
  200. * ESRMNT: (libc)Error Codes.
  201. * ESTALE: (libc)Error Codes.
  202. * ESTRPIPE: (libc)Error Codes.
  203. * ETIME: (libc)Error Codes.
  204. * ETIMEDOUT: (libc)Error Codes.
  205. * ETOOMANYREFS: (libc)Error Codes.
  206. * ETXTBSY: (libc)Error Codes.
  207. * EUCLEAN: (libc)Error Codes.
  208. * EUNATCH: (libc)Error Codes.
  209. * EUSERS: (libc)Error Codes.
  210. * EWOULDBLOCK: (libc)Error Codes.
  211. * EXDEV: (libc)Error Codes.
  212. * EXFULL: (libc)Error Codes.
  213. * EXIT_FAILURE: (libc)Exit Status.
  214. * EXIT_SUCCESS: (libc)Exit Status.
  215. * EXPR_NEST_MAX: (libc)Utility Limits.
  216. * FD_CLOEXEC: (libc)Descriptor Flags.
  217. * FD_CLR: (libc)Waiting for I/O.
  218. * FD_ISSET: (libc)Waiting for I/O.
  219. * FD_SET: (libc)Waiting for I/O.
  220. * FD_SETSIZE: (libc)Waiting for I/O.
  221. * FD_ZERO: (libc)Waiting for I/O.
  222. * FE_SNANS_ALWAYS_SIGNAL: (libc)Infinity and NaN.
  223. * FILENAME_MAX: (libc)Limits for Files.
  224. * FLUSHO: (libc)Local Modes.
  225. * FOPEN_MAX: (libc)Opening Streams.
  226. * FP_ILOGB0: (libc)Exponents and Logarithms.
  227. * FP_ILOGBNAN: (libc)Exponents and Logarithms.
  228. * FP_LLOGB0: (libc)Exponents and Logarithms.
  229. * FP_LLOGBNAN: (libc)Exponents and Logarithms.
  230. * F_DUPFD: (libc)Duplicating Descriptors.
  231. * F_GETFD: (libc)Descriptor Flags.
  232. * F_GETFL: (libc)Getting File Status Flags.
  233. * F_GETLK: (libc)File Locks.
  234. * F_GETOWN: (libc)Interrupt Input.
  235. * F_OFD_GETLK: (libc)Open File Description Locks.
  236. * F_OFD_SETLK: (libc)Open File Description Locks.
  237. * F_OFD_SETLKW: (libc)Open File Description Locks.
  238. * F_OK: (libc)Testing File Access.
  239. * F_SETFD: (libc)Descriptor Flags.
  240. * F_SETFL: (libc)Getting File Status Flags.
  241. * F_SETLK: (libc)File Locks.
  242. * F_SETLKW: (libc)File Locks.
  243. * F_SETOWN: (libc)Interrupt Input.
  244. * HAS_CPU_FEATURE: (libc)X86.
  245. * HUGE_VAL: (libc)Math Error Reporting.
  246. * HUGE_VALF: (libc)Math Error Reporting.
  247. * HUGE_VALL: (libc)Math Error Reporting.
  248. * HUGE_VAL_FN: (libc)Math Error Reporting.
  249. * HUGE_VAL_FNx: (libc)Math Error Reporting.
  250. * HUPCL: (libc)Control Modes.
  251. * I: (libc)Complex Numbers.
  252. * ICANON: (libc)Local Modes.
  253. * ICRNL: (libc)Input Modes.
  254. * IEXTEN: (libc)Local Modes.
  255. * IFNAMSIZ: (libc)Interface Naming.
  256. * IFTODT: (libc)Directory Entries.
  257. * IGNBRK: (libc)Input Modes.
  258. * IGNCR: (libc)Input Modes.
  259. * IGNPAR: (libc)Input Modes.
  260. * IMAXBEL: (libc)Input Modes.
  261. * INADDR_ANY: (libc)Host Address Data Type.
  262. * INADDR_BROADCAST: (libc)Host Address Data Type.
  263. * INADDR_LOOPBACK: (libc)Host Address Data Type.
  264. * INADDR_NONE: (libc)Host Address Data Type.
  265. * INFINITY: (libc)Infinity and NaN.
  266. * INLCR: (libc)Input Modes.
  267. * INPCK: (libc)Input Modes.
  268. * IPPORT_RESERVED: (libc)Ports.
  269. * IPPORT_USERRESERVED: (libc)Ports.
  270. * ISIG: (libc)Local Modes.
  271. * ISTRIP: (libc)Input Modes.
  272. * IXANY: (libc)Input Modes.
  273. * IXOFF: (libc)Input Modes.
  274. * IXON: (libc)Input Modes.
  275. * LINE_MAX: (libc)Utility Limits.
  276. * LINK_MAX: (libc)Limits for Files.
  277. * L_ctermid: (libc)Identifying the Terminal.
  278. * L_cuserid: (libc)Who Logged In.
  279. * L_tmpnam: (libc)Temporary Files.
  280. * MAXNAMLEN: (libc)Limits for Files.
  281. * MAXSYMLINKS: (libc)Symbolic Links.
  282. * MAX_CANON: (libc)Limits for Files.
  283. * MAX_INPUT: (libc)Limits for Files.
  284. * MB_CUR_MAX: (libc)Selecting the Conversion.
  285. * MB_LEN_MAX: (libc)Selecting the Conversion.
  286. * MDMBUF: (libc)Control Modes.
  287. * MSG_DONTROUTE: (libc)Socket Data Options.
  288. * MSG_OOB: (libc)Socket Data Options.
  289. * MSG_PEEK: (libc)Socket Data Options.
  290. * NAME_MAX: (libc)Limits for Files.
  291. * NAN: (libc)Infinity and NaN.
  292. * NCCS: (libc)Mode Data Types.
  293. * NGROUPS_MAX: (libc)General Limits.
  294. * NOFLSH: (libc)Local Modes.
  295. * NOKERNINFO: (libc)Local Modes.
  296. * NSIG: (libc)Standard Signals.
  297. * NULL: (libc)Null Pointer Constant.
  298. * ONLCR: (libc)Output Modes.
  299. * ONOEOT: (libc)Output Modes.
  300. * OPEN_MAX: (libc)General Limits.
  301. * OPOST: (libc)Output Modes.
  302. * OXTABS: (libc)Output Modes.
  303. * O_ACCMODE: (libc)Access Modes.
  304. * O_APPEND: (libc)Operating Modes.
  305. * O_ASYNC: (libc)Operating Modes.
  306. * O_CREAT: (libc)Open-time Flags.
  307. * O_DIRECTORY: (libc)Open-time Flags.
  308. * O_EXCL: (libc)Open-time Flags.
  309. * O_EXEC: (libc)Access Modes.
  310. * O_EXLOCK: (libc)Open-time Flags.
  311. * O_FSYNC: (libc)Operating Modes.
  312. * O_IGNORE_CTTY: (libc)Open-time Flags.
  313. * O_NDELAY: (libc)Operating Modes.
  314. * O_NOATIME: (libc)Operating Modes.
  315. * O_NOCTTY: (libc)Open-time Flags.
  316. * O_NOFOLLOW: (libc)Open-time Flags.
  317. * O_NOLINK: (libc)Open-time Flags.
  318. * O_NONBLOCK: (libc)Open-time Flags.
  319. * O_NONBLOCK: (libc)Operating Modes.
  320. * O_NOTRANS: (libc)Open-time Flags.
  321. * O_PATH: (libc)Access Modes.
  322. * O_RDONLY: (libc)Access Modes.
  323. * O_RDWR: (libc)Access Modes.
  324. * O_READ: (libc)Access Modes.
  325. * O_SHLOCK: (libc)Open-time Flags.
  326. * O_SYNC: (libc)Operating Modes.
  327. * O_TMPFILE: (libc)Open-time Flags.
  328. * O_TRUNC: (libc)Open-time Flags.
  329. * O_WRITE: (libc)Access Modes.
  330. * O_WRONLY: (libc)Access Modes.
  331. * PARENB: (libc)Control Modes.
  332. * PARMRK: (libc)Input Modes.
  333. * PARODD: (libc)Control Modes.
  334. * PATH_MAX: (libc)Limits for Files.
  335. * PA_FLAG_MASK: (libc)Parsing a Template String.
  336. * PENDIN: (libc)Local Modes.
  337. * PF_FILE: (libc)Local Namespace Details.
  338. * PF_INET6: (libc)Internet Namespace.
  339. * PF_INET: (libc)Internet Namespace.
  340. * PF_LOCAL: (libc)Local Namespace Details.
  341. * PF_UNIX: (libc)Local Namespace Details.
  342. * PIPE_BUF: (libc)Limits for Files.
  343. * PTHREAD_ATTR_NO_SIGMASK_NP: (libc)Initial Thread Signal Mask.
  344. * P_tmpdir: (libc)Temporary Files.
  345. * RAND_MAX: (libc)ISO Random.
  346. * RE_DUP_MAX: (libc)General Limits.
  347. * RLIM_INFINITY: (libc)Limits on Resources.
  348. * R_OK: (libc)Testing File Access.
  349. * SA_NOCLDSTOP: (libc)Flags for Sigaction.
  350. * SA_ONSTACK: (libc)Flags for Sigaction.
  351. * SA_RESTART: (libc)Flags for Sigaction.
  352. * SEEK_CUR: (libc)File Positioning.
  353. * SEEK_END: (libc)File Positioning.
  354. * SEEK_SET: (libc)File Positioning.
  355. * SIGABRT: (libc)Program Error Signals.
  356. * SIGALRM: (libc)Alarm Signals.
  357. * SIGBUS: (libc)Program Error Signals.
  358. * SIGCHLD: (libc)Job Control Signals.
  359. * SIGCLD: (libc)Job Control Signals.
  360. * SIGCONT: (libc)Job Control Signals.
  361. * SIGEMT: (libc)Program Error Signals.
  362. * SIGFPE: (libc)Program Error Signals.
  363. * SIGHUP: (libc)Termination Signals.
  364. * SIGILL: (libc)Program Error Signals.
  365. * SIGINFO: (libc)Miscellaneous Signals.
  366. * SIGINT: (libc)Termination Signals.
  367. * SIGIO: (libc)Asynchronous I/O Signals.
  368. * SIGIOT: (libc)Program Error Signals.
  369. * SIGKILL: (libc)Termination Signals.
  370. * SIGLOST: (libc)Operation Error Signals.
  371. * SIGPIPE: (libc)Operation Error Signals.
  372. * SIGPOLL: (libc)Asynchronous I/O Signals.
  373. * SIGPROF: (libc)Alarm Signals.
  374. * SIGQUIT: (libc)Termination Signals.
  375. * SIGSEGV: (libc)Program Error Signals.
  376. * SIGSTOP: (libc)Job Control Signals.
  377. * SIGSYS: (libc)Program Error Signals.
  378. * SIGTERM: (libc)Termination Signals.
  379. * SIGTRAP: (libc)Program Error Signals.
  380. * SIGTSTP: (libc)Job Control Signals.
  381. * SIGTTIN: (libc)Job Control Signals.
  382. * SIGTTOU: (libc)Job Control Signals.
  383. * SIGURG: (libc)Asynchronous I/O Signals.
  384. * SIGUSR1: (libc)Miscellaneous Signals.
  385. * SIGUSR2: (libc)Miscellaneous Signals.
  386. * SIGVTALRM: (libc)Alarm Signals.
  387. * SIGWINCH: (libc)Miscellaneous Signals.
  388. * SIGXCPU: (libc)Operation Error Signals.
  389. * SIGXFSZ: (libc)Operation Error Signals.
  390. * SIG_ERR: (libc)Basic Signal Handling.
  391. * SNAN: (libc)Infinity and NaN.
  392. * SNANF: (libc)Infinity and NaN.
  393. * SNANFN: (libc)Infinity and NaN.
  394. * SNANFNx: (libc)Infinity and NaN.
  395. * SNANL: (libc)Infinity and NaN.
  396. * SOCK_DGRAM: (libc)Communication Styles.
  397. * SOCK_RAW: (libc)Communication Styles.
  398. * SOCK_RDM: (libc)Communication Styles.
  399. * SOCK_SEQPACKET: (libc)Communication Styles.
  400. * SOCK_STREAM: (libc)Communication Styles.
  401. * SOL_SOCKET: (libc)Socket-Level Options.
  402. * SSIZE_MAX: (libc)General Limits.
  403. * STREAM_MAX: (libc)General Limits.
  404. * SUN_LEN: (libc)Local Namespace Details.
  405. * S_IFMT: (libc)Testing File Type.
  406. * S_ISBLK: (libc)Testing File Type.
  407. * S_ISCHR: (libc)Testing File Type.
  408. * S_ISDIR: (libc)Testing File Type.
  409. * S_ISFIFO: (libc)Testing File Type.
  410. * S_ISLNK: (libc)Testing File Type.
  411. * S_ISREG: (libc)Testing File Type.
  412. * S_ISSOCK: (libc)Testing File Type.
  413. * S_TYPEISMQ: (libc)Testing File Type.
  414. * S_TYPEISSEM: (libc)Testing File Type.
  415. * S_TYPEISSHM: (libc)Testing File Type.
  416. * TMP_MAX: (libc)Temporary Files.
  417. * TOSTOP: (libc)Local Modes.
  418. * TZNAME_MAX: (libc)General Limits.
  419. * VDISCARD: (libc)Other Special.
  420. * VDSUSP: (libc)Signal Characters.
  421. * VEOF: (libc)Editing Characters.
  422. * VEOL2: (libc)Editing Characters.
  423. * VEOL: (libc)Editing Characters.
  424. * VERASE: (libc)Editing Characters.
  425. * VINTR: (libc)Signal Characters.
  426. * VKILL: (libc)Editing Characters.
  427. * VLNEXT: (libc)Other Special.
  428. * VMIN: (libc)Noncanonical Input.
  429. * VQUIT: (libc)Signal Characters.
  430. * VREPRINT: (libc)Editing Characters.
  431. * VSTART: (libc)Start/Stop Characters.
  432. * VSTATUS: (libc)Other Special.
  433. * VSTOP: (libc)Start/Stop Characters.
  434. * VSUSP: (libc)Signal Characters.
  435. * VTIME: (libc)Noncanonical Input.
  436. * VWERASE: (libc)Editing Characters.
  437. * WCHAR_MAX: (libc)Extended Char Intro.
  438. * WCHAR_MIN: (libc)Extended Char Intro.
  439. * WCOREDUMP: (libc)Process Completion Status.
  440. * WEOF: (libc)EOF and Errors.
  441. * WEOF: (libc)Extended Char Intro.
  442. * WEXITSTATUS: (libc)Process Completion Status.
  443. * WIFEXITED: (libc)Process Completion Status.
  444. * WIFSIGNALED: (libc)Process Completion Status.
  445. * WIFSTOPPED: (libc)Process Completion Status.
  446. * WSTOPSIG: (libc)Process Completion Status.
  447. * WTERMSIG: (libc)Process Completion Status.
  448. * W_OK: (libc)Testing File Access.
  449. * X_OK: (libc)Testing File Access.
  450. * _Complex_I: (libc)Complex Numbers.
  451. * _Exit: (libc)Termination Internals.
  452. * _IOFBF: (libc)Controlling Buffering.
  453. * _IOLBF: (libc)Controlling Buffering.
  454. * _IONBF: (libc)Controlling Buffering.
  455. * _Imaginary_I: (libc)Complex Numbers.
  456. * _PATH_UTMP: (libc)Manipulating the Database.
  457. * _PATH_WTMP: (libc)Manipulating the Database.
  458. * _POSIX2_C_DEV: (libc)System Options.
  459. * _POSIX2_C_VERSION: (libc)Version Supported.
  460. * _POSIX2_FORT_DEV: (libc)System Options.
  461. * _POSIX2_FORT_RUN: (libc)System Options.
  462. * _POSIX2_LOCALEDEF: (libc)System Options.
  463. * _POSIX2_SW_DEV: (libc)System Options.
  464. * _POSIX_CHOWN_RESTRICTED: (libc)Options for Files.
  465. * _POSIX_JOB_CONTROL: (libc)System Options.
  466. * _POSIX_NO_TRUNC: (libc)Options for Files.
  467. * _POSIX_SAVED_IDS: (libc)System Options.
  468. * _POSIX_VDISABLE: (libc)Options for Files.
  469. * _POSIX_VERSION: (libc)Version Supported.
  470. * __fbufsize: (libc)Controlling Buffering.
  471. * __flbf: (libc)Controlling Buffering.
  472. * __fpending: (libc)Controlling Buffering.
  473. * __fpurge: (libc)Flushing Buffers.
  474. * __freadable: (libc)Opening Streams.
  475. * __freading: (libc)Opening Streams.
  476. * __fsetlocking: (libc)Streams and Threads.
  477. * __fwritable: (libc)Opening Streams.
  478. * __fwriting: (libc)Opening Streams.
  479. * __gconv_end_fct: (libc)glibc iconv Implementation.
  480. * __gconv_fct: (libc)glibc iconv Implementation.
  481. * __gconv_init_fct: (libc)glibc iconv Implementation.
  482. * __ppc_get_timebase: (libc)PowerPC.
  483. * __ppc_get_timebase_freq: (libc)PowerPC.
  484. * __ppc_mdoio: (libc)PowerPC.
  485. * __ppc_mdoom: (libc)PowerPC.
  486. * __ppc_set_ppr_low: (libc)PowerPC.
  487. * __ppc_set_ppr_med: (libc)PowerPC.
  488. * __ppc_set_ppr_med_high: (libc)PowerPC.
  489. * __ppc_set_ppr_med_low: (libc)PowerPC.
  490. * __ppc_set_ppr_very_low: (libc)PowerPC.
  491. * __ppc_yield: (libc)PowerPC.
  492. * __riscv_flush_icache: (libc)RISC-V.
  493. * __va_copy: (libc)Argument Macros.
  494. * __x86_get_cpuid_feature_leaf: (libc)X86.
  495. * _exit: (libc)Termination Internals.
  496. * _flushlbf: (libc)Flushing Buffers.
  497. * _tolower: (libc)Case Conversion.
  498. * _toupper: (libc)Case Conversion.
  499. * a64l: (libc)Encode Binary Data.
  500. * abort: (libc)Aborting a Program.
  501. * abs: (libc)Absolute Value.
  502. * accept: (libc)Accepting Connections.
  503. * access: (libc)Testing File Access.
  504. * acos: (libc)Inverse Trig Functions.
  505. * acosf: (libc)Inverse Trig Functions.
  506. * acosfN: (libc)Inverse Trig Functions.
  507. * acosfNx: (libc)Inverse Trig Functions.
  508. * acosh: (libc)Hyperbolic Functions.
  509. * acoshf: (libc)Hyperbolic Functions.
  510. * acoshfN: (libc)Hyperbolic Functions.
  511. * acoshfNx: (libc)Hyperbolic Functions.
  512. * acoshl: (libc)Hyperbolic Functions.
  513. * acosl: (libc)Inverse Trig Functions.
  514. * addmntent: (libc)mtab.
  515. * addseverity: (libc)Adding Severity Classes.
  516. * adjtime: (libc)Setting and Adjusting the Time.
  517. * adjtimex: (libc)Setting and Adjusting the Time.
  518. * aio_cancel64: (libc)Cancel AIO Operations.
  519. * aio_cancel: (libc)Cancel AIO Operations.
  520. * aio_error64: (libc)Status of AIO Operations.
  521. * aio_error: (libc)Status of AIO Operations.
  522. * aio_fsync64: (libc)Synchronizing AIO Operations.
  523. * aio_fsync: (libc)Synchronizing AIO Operations.
  524. * aio_init: (libc)Configuration of AIO.
  525. * aio_read64: (libc)Asynchronous Reads/Writes.
  526. * aio_read: (libc)Asynchronous Reads/Writes.
  527. * aio_return64: (libc)Status of AIO Operations.
  528. * aio_return: (libc)Status of AIO Operations.
  529. * aio_suspend64: (libc)Synchronizing AIO Operations.
  530. * aio_suspend: (libc)Synchronizing AIO Operations.
  531. * aio_write64: (libc)Asynchronous Reads/Writes.
  532. * aio_write: (libc)Asynchronous Reads/Writes.
  533. * alarm: (libc)Setting an Alarm.
  534. * aligned_alloc: (libc)Aligned Memory Blocks.
  535. * alloca: (libc)Variable Size Automatic.
  536. * alphasort64: (libc)Scanning Directory Content.
  537. * alphasort: (libc)Scanning Directory Content.
  538. * argp_error: (libc)Argp Helper Functions.
  539. * argp_failure: (libc)Argp Helper Functions.
  540. * argp_help: (libc)Argp Help.
  541. * argp_parse: (libc)Argp.
  542. * argp_state_help: (libc)Argp Helper Functions.
  543. * argp_usage: (libc)Argp Helper Functions.
  544. * argz_add: (libc)Argz Functions.
  545. * argz_add_sep: (libc)Argz Functions.
  546. * argz_append: (libc)Argz Functions.
  547. * argz_count: (libc)Argz Functions.
  548. * argz_create: (libc)Argz Functions.
  549. * argz_create_sep: (libc)Argz Functions.
  550. * argz_delete: (libc)Argz Functions.
  551. * argz_extract: (libc)Argz Functions.
  552. * argz_insert: (libc)Argz Functions.
  553. * argz_next: (libc)Argz Functions.
  554. * argz_replace: (libc)Argz Functions.
  555. * argz_stringify: (libc)Argz Functions.
  556. * asctime: (libc)Formatting Calendar Time.
  557. * asctime_r: (libc)Formatting Calendar Time.
  558. * asin: (libc)Inverse Trig Functions.
  559. * asinf: (libc)Inverse Trig Functions.
  560. * asinfN: (libc)Inverse Trig Functions.
  561. * asinfNx: (libc)Inverse Trig Functions.
  562. * asinh: (libc)Hyperbolic Functions.
  563. * asinhf: (libc)Hyperbolic Functions.
  564. * asinhfN: (libc)Hyperbolic Functions.
  565. * asinhfNx: (libc)Hyperbolic Functions.
  566. * asinhl: (libc)Hyperbolic Functions.
  567. * asinl: (libc)Inverse Trig Functions.
  568. * asprintf: (libc)Dynamic Output.
  569. * assert: (libc)Consistency Checking.
  570. * assert_perror: (libc)Consistency Checking.
  571. * atan2: (libc)Inverse Trig Functions.
  572. * atan2f: (libc)Inverse Trig Functions.
  573. * atan2fN: (libc)Inverse Trig Functions.
  574. * atan2fNx: (libc)Inverse Trig Functions.
  575. * atan2l: (libc)Inverse Trig Functions.
  576. * atan: (libc)Inverse Trig Functions.
  577. * atanf: (libc)Inverse Trig Functions.
  578. * atanfN: (libc)Inverse Trig Functions.
  579. * atanfNx: (libc)Inverse Trig Functions.
  580. * atanh: (libc)Hyperbolic Functions.
  581. * atanhf: (libc)Hyperbolic Functions.
  582. * atanhfN: (libc)Hyperbolic Functions.
  583. * atanhfNx: (libc)Hyperbolic Functions.
  584. * atanhl: (libc)Hyperbolic Functions.
  585. * atanl: (libc)Inverse Trig Functions.
  586. * atexit: (libc)Cleanups on Exit.
  587. * atof: (libc)Parsing of Floats.
  588. * atoi: (libc)Parsing of Integers.
  589. * atol: (libc)Parsing of Integers.
  590. * atoll: (libc)Parsing of Integers.
  591. * backtrace: (libc)Backtraces.
  592. * backtrace_symbols: (libc)Backtraces.
  593. * backtrace_symbols_fd: (libc)Backtraces.
  594. * basename: (libc)Finding Tokens in a String.
  595. * basename: (libc)Finding Tokens in a String.
  596. * bcmp: (libc)String/Array Comparison.
  597. * bcopy: (libc)Copying Strings and Arrays.
  598. * bind: (libc)Setting Address.
  599. * bind_textdomain_codeset: (libc)Charset conversion in gettext.
  600. * bindtextdomain: (libc)Locating gettext catalog.
  601. * brk: (libc)Resizing the Data Segment.
  602. * bsearch: (libc)Array Search Function.
  603. * btowc: (libc)Converting a Character.
  604. * bzero: (libc)Copying Strings and Arrays.
  605. * cabs: (libc)Absolute Value.
  606. * cabsf: (libc)Absolute Value.
  607. * cabsfN: (libc)Absolute Value.
  608. * cabsfNx: (libc)Absolute Value.
  609. * cabsl: (libc)Absolute Value.
  610. * cacos: (libc)Inverse Trig Functions.
  611. * cacosf: (libc)Inverse Trig Functions.
  612. * cacosfN: (libc)Inverse Trig Functions.
  613. * cacosfNx: (libc)Inverse Trig Functions.
  614. * cacosh: (libc)Hyperbolic Functions.
  615. * cacoshf: (libc)Hyperbolic Functions.
  616. * cacoshfN: (libc)Hyperbolic Functions.
  617. * cacoshfNx: (libc)Hyperbolic Functions.
  618. * cacoshl: (libc)Hyperbolic Functions.
  619. * cacosl: (libc)Inverse Trig Functions.
  620. * call_once: (libc)Call Once.
  621. * calloc: (libc)Allocating Cleared Space.
  622. * canonicalize: (libc)FP Bit Twiddling.
  623. * canonicalize_file_name: (libc)Symbolic Links.
  624. * canonicalizef: (libc)FP Bit Twiddling.
  625. * canonicalizefN: (libc)FP Bit Twiddling.
  626. * canonicalizefNx: (libc)FP Bit Twiddling.
  627. * canonicalizel: (libc)FP Bit Twiddling.
  628. * carg: (libc)Operations on Complex.
  629. * cargf: (libc)Operations on Complex.
  630. * cargfN: (libc)Operations on Complex.
  631. * cargfNx: (libc)Operations on Complex.
  632. * cargl: (libc)Operations on Complex.
  633. * casin: (libc)Inverse Trig Functions.
  634. * casinf: (libc)Inverse Trig Functions.
  635. * casinfN: (libc)Inverse Trig Functions.
  636. * casinfNx: (libc)Inverse Trig Functions.
  637. * casinh: (libc)Hyperbolic Functions.
  638. * casinhf: (libc)Hyperbolic Functions.
  639. * casinhfN: (libc)Hyperbolic Functions.
  640. * casinhfNx: (libc)Hyperbolic Functions.
  641. * casinhl: (libc)Hyperbolic Functions.
  642. * casinl: (libc)Inverse Trig Functions.
  643. * catan: (libc)Inverse Trig Functions.
  644. * catanf: (libc)Inverse Trig Functions.
  645. * catanfN: (libc)Inverse Trig Functions.
  646. * catanfNx: (libc)Inverse Trig Functions.
  647. * catanh: (libc)Hyperbolic Functions.
  648. * catanhf: (libc)Hyperbolic Functions.
  649. * catanhfN: (libc)Hyperbolic Functions.
  650. * catanhfNx: (libc)Hyperbolic Functions.
  651. * catanhl: (libc)Hyperbolic Functions.
  652. * catanl: (libc)Inverse Trig Functions.
  653. * catclose: (libc)The catgets Functions.
  654. * catgets: (libc)The catgets Functions.
  655. * catopen: (libc)The catgets Functions.
  656. * cbrt: (libc)Exponents and Logarithms.
  657. * cbrtf: (libc)Exponents and Logarithms.
  658. * cbrtfN: (libc)Exponents and Logarithms.
  659. * cbrtfNx: (libc)Exponents and Logarithms.
  660. * cbrtl: (libc)Exponents and Logarithms.
  661. * ccos: (libc)Trig Functions.
  662. * ccosf: (libc)Trig Functions.
  663. * ccosfN: (libc)Trig Functions.
  664. * ccosfNx: (libc)Trig Functions.
  665. * ccosh: (libc)Hyperbolic Functions.
  666. * ccoshf: (libc)Hyperbolic Functions.
  667. * ccoshfN: (libc)Hyperbolic Functions.
  668. * ccoshfNx: (libc)Hyperbolic Functions.
  669. * ccoshl: (libc)Hyperbolic Functions.
  670. * ccosl: (libc)Trig Functions.
  671. * ceil: (libc)Rounding Functions.
  672. * ceilf: (libc)Rounding Functions.
  673. * ceilfN: (libc)Rounding Functions.
  674. * ceilfNx: (libc)Rounding Functions.
  675. * ceill: (libc)Rounding Functions.
  676. * cexp: (libc)Exponents and Logarithms.
  677. * cexpf: (libc)Exponents and Logarithms.
  678. * cexpfN: (libc)Exponents and Logarithms.
  679. * cexpfNx: (libc)Exponents and Logarithms.
  680. * cexpl: (libc)Exponents and Logarithms.
  681. * cfgetispeed: (libc)Line Speed.
  682. * cfgetospeed: (libc)Line Speed.
  683. * cfmakeraw: (libc)Noncanonical Input.
  684. * cfsetispeed: (libc)Line Speed.
  685. * cfsetospeed: (libc)Line Speed.
  686. * cfsetspeed: (libc)Line Speed.
  687. * chdir: (libc)Working Directory.
  688. * chmod: (libc)Setting Permissions.
  689. * chown: (libc)File Owner.
  690. * cimag: (libc)Operations on Complex.
  691. * cimagf: (libc)Operations on Complex.
  692. * cimagfN: (libc)Operations on Complex.
  693. * cimagfNx: (libc)Operations on Complex.
  694. * cimagl: (libc)Operations on Complex.
  695. * clearenv: (libc)Environment Access.
  696. * clearerr: (libc)Error Recovery.
  697. * clearerr_unlocked: (libc)Error Recovery.
  698. * clock: (libc)CPU Time.
  699. * clock_getres: (libc)Getting the Time.
  700. * clock_gettime: (libc)Getting the Time.
  701. * clock_settime: (libc)Setting and Adjusting the Time.
  702. * clog10: (libc)Exponents and Logarithms.
  703. * clog10f: (libc)Exponents and Logarithms.
  704. * clog10fN: (libc)Exponents and Logarithms.
  705. * clog10fNx: (libc)Exponents and Logarithms.
  706. * clog10l: (libc)Exponents and Logarithms.
  707. * clog: (libc)Exponents and Logarithms.
  708. * clogf: (libc)Exponents and Logarithms.
  709. * clogfN: (libc)Exponents and Logarithms.
  710. * clogfNx: (libc)Exponents and Logarithms.
  711. * clogl: (libc)Exponents and Logarithms.
  712. * close: (libc)Opening and Closing Files.
  713. * closedir: (libc)Reading/Closing Directory.
  714. * closelog: (libc)closelog.
  715. * cnd_broadcast: (libc)ISO C Condition Variables.
  716. * cnd_destroy: (libc)ISO C Condition Variables.
  717. * cnd_init: (libc)ISO C Condition Variables.
  718. * cnd_signal: (libc)ISO C Condition Variables.
  719. * cnd_timedwait: (libc)ISO C Condition Variables.
  720. * cnd_wait: (libc)ISO C Condition Variables.
  721. * confstr: (libc)String Parameters.
  722. * conj: (libc)Operations on Complex.
  723. * conjf: (libc)Operations on Complex.
  724. * conjfN: (libc)Operations on Complex.
  725. * conjfNx: (libc)Operations on Complex.
  726. * conjl: (libc)Operations on Complex.
  727. * connect: (libc)Connecting.
  728. * copy_file_range: (libc)Copying File Data.
  729. * copysign: (libc)FP Bit Twiddling.
  730. * copysignf: (libc)FP Bit Twiddling.
  731. * copysignfN: (libc)FP Bit Twiddling.
  732. * copysignfNx: (libc)FP Bit Twiddling.
  733. * copysignl: (libc)FP Bit Twiddling.
  734. * cos: (libc)Trig Functions.
  735. * cosf: (libc)Trig Functions.
  736. * cosfN: (libc)Trig Functions.
  737. * cosfNx: (libc)Trig Functions.
  738. * cosh: (libc)Hyperbolic Functions.
  739. * coshf: (libc)Hyperbolic Functions.
  740. * coshfN: (libc)Hyperbolic Functions.
  741. * coshfNx: (libc)Hyperbolic Functions.
  742. * coshl: (libc)Hyperbolic Functions.
  743. * cosl: (libc)Trig Functions.
  744. * cpow: (libc)Exponents and Logarithms.
  745. * cpowf: (libc)Exponents and Logarithms.
  746. * cpowfN: (libc)Exponents and Logarithms.
  747. * cpowfNx: (libc)Exponents and Logarithms.
  748. * cpowl: (libc)Exponents and Logarithms.
  749. * cproj: (libc)Operations on Complex.
  750. * cprojf: (libc)Operations on Complex.
  751. * cprojfN: (libc)Operations on Complex.
  752. * cprojfNx: (libc)Operations on Complex.
  753. * cprojl: (libc)Operations on Complex.
  754. * creal: (libc)Operations on Complex.
  755. * crealf: (libc)Operations on Complex.
  756. * crealfN: (libc)Operations on Complex.
  757. * crealfNx: (libc)Operations on Complex.
  758. * creall: (libc)Operations on Complex.
  759. * creat64: (libc)Opening and Closing Files.
  760. * creat: (libc)Opening and Closing Files.
  761. * crypt: (libc)Passphrase Storage.
  762. * crypt_r: (libc)Passphrase Storage.
  763. * csin: (libc)Trig Functions.
  764. * csinf: (libc)Trig Functions.
  765. * csinfN: (libc)Trig Functions.
  766. * csinfNx: (libc)Trig Functions.
  767. * csinh: (libc)Hyperbolic Functions.
  768. * csinhf: (libc)Hyperbolic Functions.
  769. * csinhfN: (libc)Hyperbolic Functions.
  770. * csinhfNx: (libc)Hyperbolic Functions.
  771. * csinhl: (libc)Hyperbolic Functions.
  772. * csinl: (libc)Trig Functions.
  773. * csqrt: (libc)Exponents and Logarithms.
  774. * csqrtf: (libc)Exponents and Logarithms.
  775. * csqrtfN: (libc)Exponents and Logarithms.
  776. * csqrtfNx: (libc)Exponents and Logarithms.
  777. * csqrtl: (libc)Exponents and Logarithms.
  778. * ctan: (libc)Trig Functions.
  779. * ctanf: (libc)Trig Functions.
  780. * ctanfN: (libc)Trig Functions.
  781. * ctanfNx: (libc)Trig Functions.
  782. * ctanh: (libc)Hyperbolic Functions.
  783. * ctanhf: (libc)Hyperbolic Functions.
  784. * ctanhfN: (libc)Hyperbolic Functions.
  785. * ctanhfNx: (libc)Hyperbolic Functions.
  786. * ctanhl: (libc)Hyperbolic Functions.
  787. * ctanl: (libc)Trig Functions.
  788. * ctermid: (libc)Identifying the Terminal.
  789. * ctime: (libc)Formatting Calendar Time.
  790. * ctime_r: (libc)Formatting Calendar Time.
  791. * cuserid: (libc)Who Logged In.
  792. * daddl: (libc)Misc FP Arithmetic.
  793. * dcgettext: (libc)Translation with gettext.
  794. * dcngettext: (libc)Advanced gettext functions.
  795. * ddivl: (libc)Misc FP Arithmetic.
  796. * dgettext: (libc)Translation with gettext.
  797. * difftime: (libc)Calculating Elapsed Time.
  798. * dirfd: (libc)Opening a Directory.
  799. * dirname: (libc)Finding Tokens in a String.
  800. * div: (libc)Integer Division.
  801. * dmull: (libc)Misc FP Arithmetic.
  802. * dngettext: (libc)Advanced gettext functions.
  803. * drand48: (libc)SVID Random.
  804. * drand48_r: (libc)SVID Random.
  805. * drem: (libc)Remainder Functions.
  806. * dremf: (libc)Remainder Functions.
  807. * dreml: (libc)Remainder Functions.
  808. * dsubl: (libc)Misc FP Arithmetic.
  809. * dup2: (libc)Duplicating Descriptors.
  810. * dup: (libc)Duplicating Descriptors.
  811. * ecvt: (libc)System V Number Conversion.
  812. * ecvt_r: (libc)System V Number Conversion.
  813. * endfsent: (libc)fstab.
  814. * endgrent: (libc)Scanning All Groups.
  815. * endhostent: (libc)Host Names.
  816. * endmntent: (libc)mtab.
  817. * endnetent: (libc)Networks Database.
  818. * endnetgrent: (libc)Lookup Netgroup.
  819. * endprotoent: (libc)Protocols Database.
  820. * endpwent: (libc)Scanning All Users.
  821. * endservent: (libc)Services Database.
  822. * endutent: (libc)Manipulating the Database.
  823. * endutxent: (libc)XPG Functions.
  824. * envz_add: (libc)Envz Functions.
  825. * envz_entry: (libc)Envz Functions.
  826. * envz_get: (libc)Envz Functions.
  827. * envz_merge: (libc)Envz Functions.
  828. * envz_remove: (libc)Envz Functions.
  829. * envz_strip: (libc)Envz Functions.
  830. * erand48: (libc)SVID Random.
  831. * erand48_r: (libc)SVID Random.
  832. * erf: (libc)Special Functions.
  833. * erfc: (libc)Special Functions.
  834. * erfcf: (libc)Special Functions.
  835. * erfcfN: (libc)Special Functions.
  836. * erfcfNx: (libc)Special Functions.
  837. * erfcl: (libc)Special Functions.
  838. * erff: (libc)Special Functions.
  839. * erffN: (libc)Special Functions.
  840. * erffNx: (libc)Special Functions.
  841. * erfl: (libc)Special Functions.
  842. * err: (libc)Error Messages.
  843. * errno: (libc)Checking for Errors.
  844. * error: (libc)Error Messages.
  845. * error_at_line: (libc)Error Messages.
  846. * errx: (libc)Error Messages.
  847. * execl: (libc)Executing a File.
  848. * execle: (libc)Executing a File.
  849. * execlp: (libc)Executing a File.
  850. * execv: (libc)Executing a File.
  851. * execve: (libc)Executing a File.
  852. * execvp: (libc)Executing a File.
  853. * exit: (libc)Normal Termination.
  854. * exp10: (libc)Exponents and Logarithms.
  855. * exp10f: (libc)Exponents and Logarithms.
  856. * exp10fN: (libc)Exponents and Logarithms.
  857. * exp10fNx: (libc)Exponents and Logarithms.
  858. * exp10l: (libc)Exponents and Logarithms.
  859. * exp2: (libc)Exponents and Logarithms.
  860. * exp2f: (libc)Exponents and Logarithms.
  861. * exp2fN: (libc)Exponents and Logarithms.
  862. * exp2fNx: (libc)Exponents and Logarithms.
  863. * exp2l: (libc)Exponents and Logarithms.
  864. * exp: (libc)Exponents and Logarithms.
  865. * expf: (libc)Exponents and Logarithms.
  866. * expfN: (libc)Exponents and Logarithms.
  867. * expfNx: (libc)Exponents and Logarithms.
  868. * expl: (libc)Exponents and Logarithms.
  869. * explicit_bzero: (libc)Erasing Sensitive Data.
  870. * expm1: (libc)Exponents and Logarithms.
  871. * expm1f: (libc)Exponents and Logarithms.
  872. * expm1fN: (libc)Exponents and Logarithms.
  873. * expm1fNx: (libc)Exponents and Logarithms.
  874. * expm1l: (libc)Exponents and Logarithms.
  875. * fMaddfN: (libc)Misc FP Arithmetic.
  876. * fMaddfNx: (libc)Misc FP Arithmetic.
  877. * fMdivfN: (libc)Misc FP Arithmetic.
  878. * fMdivfNx: (libc)Misc FP Arithmetic.
  879. * fMmulfN: (libc)Misc FP Arithmetic.
  880. * fMmulfNx: (libc)Misc FP Arithmetic.
  881. * fMsubfN: (libc)Misc FP Arithmetic.
  882. * fMsubfNx: (libc)Misc FP Arithmetic.
  883. * fMxaddfN: (libc)Misc FP Arithmetic.
  884. * fMxaddfNx: (libc)Misc FP Arithmetic.
  885. * fMxdivfN: (libc)Misc FP Arithmetic.
  886. * fMxdivfNx: (libc)Misc FP Arithmetic.
  887. * fMxmulfN: (libc)Misc FP Arithmetic.
  888. * fMxmulfNx: (libc)Misc FP Arithmetic.
  889. * fMxsubfN: (libc)Misc FP Arithmetic.
  890. * fMxsubfNx: (libc)Misc FP Arithmetic.
  891. * fabs: (libc)Absolute Value.
  892. * fabsf: (libc)Absolute Value.
  893. * fabsfN: (libc)Absolute Value.
  894. * fabsfNx: (libc)Absolute Value.
  895. * fabsl: (libc)Absolute Value.
  896. * fadd: (libc)Misc FP Arithmetic.
  897. * faddl: (libc)Misc FP Arithmetic.
  898. * fchdir: (libc)Working Directory.
  899. * fchmod: (libc)Setting Permissions.
  900. * fchown: (libc)File Owner.
  901. * fclose: (libc)Closing Streams.
  902. * fcloseall: (libc)Closing Streams.
  903. * fcntl: (libc)Control Operations.
  904. * fcvt: (libc)System V Number Conversion.
  905. * fcvt_r: (libc)System V Number Conversion.
  906. * fdatasync: (libc)Synchronizing I/O.
  907. * fdim: (libc)Misc FP Arithmetic.
  908. * fdimf: (libc)Misc FP Arithmetic.
  909. * fdimfN: (libc)Misc FP Arithmetic.
  910. * fdimfNx: (libc)Misc FP Arithmetic.
  911. * fdiml: (libc)Misc FP Arithmetic.
  912. * fdiv: (libc)Misc FP Arithmetic.
  913. * fdivl: (libc)Misc FP Arithmetic.
  914. * fdopen: (libc)Descriptors and Streams.
  915. * fdopendir: (libc)Opening a Directory.
  916. * feclearexcept: (libc)Status bit operations.
  917. * fedisableexcept: (libc)Control Functions.
  918. * feenableexcept: (libc)Control Functions.
  919. * fegetenv: (libc)Control Functions.
  920. * fegetexcept: (libc)Control Functions.
  921. * fegetexceptflag: (libc)Status bit operations.
  922. * fegetmode: (libc)Control Functions.
  923. * fegetround: (libc)Rounding.
  924. * feholdexcept: (libc)Control Functions.
  925. * feof: (libc)EOF and Errors.
  926. * feof_unlocked: (libc)EOF and Errors.
  927. * feraiseexcept: (libc)Status bit operations.
  928. * ferror: (libc)EOF and Errors.
  929. * ferror_unlocked: (libc)EOF and Errors.
  930. * fesetenv: (libc)Control Functions.
  931. * fesetexcept: (libc)Status bit operations.
  932. * fesetexceptflag: (libc)Status bit operations.
  933. * fesetmode: (libc)Control Functions.
  934. * fesetround: (libc)Rounding.
  935. * fetestexcept: (libc)Status bit operations.
  936. * fetestexceptflag: (libc)Status bit operations.
  937. * feupdateenv: (libc)Control Functions.
  938. * fexecve: (libc)Executing a File.
  939. * fflush: (libc)Flushing Buffers.
  940. * fflush_unlocked: (libc)Flushing Buffers.
  941. * fgetc: (libc)Character Input.
  942. * fgetc_unlocked: (libc)Character Input.
  943. * fgetgrent: (libc)Scanning All Groups.
  944. * fgetgrent_r: (libc)Scanning All Groups.
  945. * fgetpos64: (libc)Portable Positioning.
  946. * fgetpos: (libc)Portable Positioning.
  947. * fgetpwent: (libc)Scanning All Users.
  948. * fgetpwent_r: (libc)Scanning All Users.
  949. * fgets: (libc)Line Input.
  950. * fgets_unlocked: (libc)Line Input.
  951. * fgetwc: (libc)Character Input.
  952. * fgetwc_unlocked: (libc)Character Input.
  953. * fgetws: (libc)Line Input.
  954. * fgetws_unlocked: (libc)Line Input.
  955. * fileno: (libc)Descriptors and Streams.
  956. * fileno_unlocked: (libc)Descriptors and Streams.
  957. * finite: (libc)Floating Point Classes.
  958. * finitef: (libc)Floating Point Classes.
  959. * finitel: (libc)Floating Point Classes.
  960. * flockfile: (libc)Streams and Threads.
  961. * floor: (libc)Rounding Functions.
  962. * floorf: (libc)Rounding Functions.
  963. * floorfN: (libc)Rounding Functions.
  964. * floorfNx: (libc)Rounding Functions.
  965. * floorl: (libc)Rounding Functions.
  966. * fma: (libc)Misc FP Arithmetic.
  967. * fmaf: (libc)Misc FP Arithmetic.
  968. * fmafN: (libc)Misc FP Arithmetic.
  969. * fmafNx: (libc)Misc FP Arithmetic.
  970. * fmal: (libc)Misc FP Arithmetic.
  971. * fmax: (libc)Misc FP Arithmetic.
  972. * fmaxf: (libc)Misc FP Arithmetic.
  973. * fmaxfN: (libc)Misc FP Arithmetic.
  974. * fmaxfNx: (libc)Misc FP Arithmetic.
  975. * fmaxl: (libc)Misc FP Arithmetic.
  976. * fmaxmag: (libc)Misc FP Arithmetic.
  977. * fmaxmagf: (libc)Misc FP Arithmetic.
  978. * fmaxmagfN: (libc)Misc FP Arithmetic.
  979. * fmaxmagfNx: (libc)Misc FP Arithmetic.
  980. * fmaxmagl: (libc)Misc FP Arithmetic.
  981. * fmemopen: (libc)String Streams.
  982. * fmin: (libc)Misc FP Arithmetic.
  983. * fminf: (libc)Misc FP Arithmetic.
  984. * fminfN: (libc)Misc FP Arithmetic.
  985. * fminfNx: (libc)Misc FP Arithmetic.
  986. * fminl: (libc)Misc FP Arithmetic.
  987. * fminmag: (libc)Misc FP Arithmetic.
  988. * fminmagf: (libc)Misc FP Arithmetic.
  989. * fminmagfN: (libc)Misc FP Arithmetic.
  990. * fminmagfNx: (libc)Misc FP Arithmetic.
  991. * fminmagl: (libc)Misc FP Arithmetic.
  992. * fmod: (libc)Remainder Functions.
  993. * fmodf: (libc)Remainder Functions.
  994. * fmodfN: (libc)Remainder Functions.
  995. * fmodfNx: (libc)Remainder Functions.
  996. * fmodl: (libc)Remainder Functions.
  997. * fmtmsg: (libc)Printing Formatted Messages.
  998. * fmul: (libc)Misc FP Arithmetic.
  999. * fmull: (libc)Misc FP Arithmetic.
  1000. * fnmatch: (libc)Wildcard Matching.
  1001. * fopen64: (libc)Opening Streams.
  1002. * fopen: (libc)Opening Streams.
  1003. * fopencookie: (libc)Streams and Cookies.
  1004. * fork: (libc)Creating a Process.
  1005. * forkpty: (libc)Pseudo-Terminal Pairs.
  1006. * fpathconf: (libc)Pathconf.
  1007. * fpclassify: (libc)Floating Point Classes.
  1008. * fprintf: (libc)Formatted Output Functions.
  1009. * fputc: (libc)Simple Output.
  1010. * fputc_unlocked: (libc)Simple Output.
  1011. * fputs: (libc)Simple Output.
  1012. * fputs_unlocked: (libc)Simple Output.
  1013. * fputwc: (libc)Simple Output.
  1014. * fputwc_unlocked: (libc)Simple Output.
  1015. * fputws: (libc)Simple Output.
  1016. * fputws_unlocked: (libc)Simple Output.
  1017. * fread: (libc)Block Input/Output.
  1018. * fread_unlocked: (libc)Block Input/Output.
  1019. * free: (libc)Freeing after Malloc.
  1020. * freopen64: (libc)Opening Streams.
  1021. * freopen: (libc)Opening Streams.
  1022. * frexp: (libc)Normalization Functions.
  1023. * frexpf: (libc)Normalization Functions.
  1024. * frexpfN: (libc)Normalization Functions.
  1025. * frexpfNx: (libc)Normalization Functions.
  1026. * frexpl: (libc)Normalization Functions.
  1027. * fromfp: (libc)Rounding Functions.
  1028. * fromfpf: (libc)Rounding Functions.
  1029. * fromfpfN: (libc)Rounding Functions.
  1030. * fromfpfNx: (libc)Rounding Functions.
  1031. * fromfpl: (libc)Rounding Functions.
  1032. * fromfpx: (libc)Rounding Functions.
  1033. * fromfpxf: (libc)Rounding Functions.
  1034. * fromfpxfN: (libc)Rounding Functions.
  1035. * fromfpxfNx: (libc)Rounding Functions.
  1036. * fromfpxl: (libc)Rounding Functions.
  1037. * fscanf: (libc)Formatted Input Functions.
  1038. * fseek: (libc)File Positioning.
  1039. * fseeko64: (libc)File Positioning.
  1040. * fseeko: (libc)File Positioning.
  1041. * fsetpos64: (libc)Portable Positioning.
  1042. * fsetpos: (libc)Portable Positioning.
  1043. * fstat64: (libc)Reading Attributes.
  1044. * fstat: (libc)Reading Attributes.
  1045. * fsub: (libc)Misc FP Arithmetic.
  1046. * fsubl: (libc)Misc FP Arithmetic.
  1047. * fsync: (libc)Synchronizing I/O.
  1048. * ftell: (libc)File Positioning.
  1049. * ftello64: (libc)File Positioning.
  1050. * ftello: (libc)File Positioning.
  1051. * ftruncate64: (libc)File Size.
  1052. * ftruncate: (libc)File Size.
  1053. * ftrylockfile: (libc)Streams and Threads.
  1054. * ftw64: (libc)Working with Directory Trees.
  1055. * ftw: (libc)Working with Directory Trees.
  1056. * funlockfile: (libc)Streams and Threads.
  1057. * futimes: (libc)File Times.
  1058. * fwide: (libc)Streams and I18N.
  1059. * fwprintf: (libc)Formatted Output Functions.
  1060. * fwrite: (libc)Block Input/Output.
  1061. * fwrite_unlocked: (libc)Block Input/Output.
  1062. * fwscanf: (libc)Formatted Input Functions.
  1063. * gamma: (libc)Special Functions.
  1064. * gammaf: (libc)Special Functions.
  1065. * gammal: (libc)Special Functions.
  1066. * gcvt: (libc)System V Number Conversion.
  1067. * get_avphys_pages: (libc)Query Memory Parameters.
  1068. * get_current_dir_name: (libc)Working Directory.
  1069. * get_nprocs: (libc)Processor Resources.
  1070. * get_nprocs_conf: (libc)Processor Resources.
  1071. * get_phys_pages: (libc)Query Memory Parameters.
  1072. * getauxval: (libc)Auxiliary Vector.
  1073. * getc: (libc)Character Input.
  1074. * getc_unlocked: (libc)Character Input.
  1075. * getchar: (libc)Character Input.
  1076. * getchar_unlocked: (libc)Character Input.
  1077. * getcontext: (libc)System V contexts.
  1078. * getcpu: (libc)CPU Affinity.
  1079. * getcwd: (libc)Working Directory.
  1080. * getdate: (libc)General Time String Parsing.
  1081. * getdate_r: (libc)General Time String Parsing.
  1082. * getdelim: (libc)Line Input.
  1083. * getdents64: (libc)Low-level Directory Access.
  1084. * getdomainnname: (libc)Host Identification.
  1085. * getegid: (libc)Reading Persona.
  1086. * getentropy: (libc)Unpredictable Bytes.
  1087. * getenv: (libc)Environment Access.
  1088. * geteuid: (libc)Reading Persona.
  1089. * getfsent: (libc)fstab.
  1090. * getfsfile: (libc)fstab.
  1091. * getfsspec: (libc)fstab.
  1092. * getgid: (libc)Reading Persona.
  1093. * getgrent: (libc)Scanning All Groups.
  1094. * getgrent_r: (libc)Scanning All Groups.
  1095. * getgrgid: (libc)Lookup Group.
  1096. * getgrgid_r: (libc)Lookup Group.
  1097. * getgrnam: (libc)Lookup Group.
  1098. * getgrnam_r: (libc)Lookup Group.
  1099. * getgrouplist: (libc)Setting Groups.
  1100. * getgroups: (libc)Reading Persona.
  1101. * gethostbyaddr: (libc)Host Names.
  1102. * gethostbyaddr_r: (libc)Host Names.
  1103. * gethostbyname2: (libc)Host Names.
  1104. * gethostbyname2_r: (libc)Host Names.
  1105. * gethostbyname: (libc)Host Names.
  1106. * gethostbyname_r: (libc)Host Names.
  1107. * gethostent: (libc)Host Names.
  1108. * gethostid: (libc)Host Identification.
  1109. * gethostname: (libc)Host Identification.
  1110. * getitimer: (libc)Setting an Alarm.
  1111. * getline: (libc)Line Input.
  1112. * getloadavg: (libc)Processor Resources.
  1113. * getlogin: (libc)Who Logged In.
  1114. * getmntent: (libc)mtab.
  1115. * getmntent_r: (libc)mtab.
  1116. * getnetbyaddr: (libc)Networks Database.
  1117. * getnetbyname: (libc)Networks Database.
  1118. * getnetent: (libc)Networks Database.
  1119. * getnetgrent: (libc)Lookup Netgroup.
  1120. * getnetgrent_r: (libc)Lookup Netgroup.
  1121. * getopt: (libc)Using Getopt.
  1122. * getopt_long: (libc)Getopt Long Options.
  1123. * getopt_long_only: (libc)Getopt Long Options.
  1124. * getpagesize: (libc)Query Memory Parameters.
  1125. * getpass: (libc)getpass.
  1126. * getpayload: (libc)FP Bit Twiddling.
  1127. * getpayloadf: (libc)FP Bit Twiddling.
  1128. * getpayloadfN: (libc)FP Bit Twiddling.
  1129. * getpayloadfNx: (libc)FP Bit Twiddling.
  1130. * getpayloadl: (libc)FP Bit Twiddling.
  1131. * getpeername: (libc)Who is Connected.
  1132. * getpgid: (libc)Process Group Functions.
  1133. * getpgrp: (libc)Process Group Functions.
  1134. * getpid: (libc)Process Identification.
  1135. * getppid: (libc)Process Identification.
  1136. * getpriority: (libc)Traditional Scheduling Functions.
  1137. * getprotobyname: (libc)Protocols Database.
  1138. * getprotobynumber: (libc)Protocols Database.
  1139. * getprotoent: (libc)Protocols Database.
  1140. * getpt: (libc)Allocation.
  1141. * getpwent: (libc)Scanning All Users.
  1142. * getpwent_r: (libc)Scanning All Users.
  1143. * getpwnam: (libc)Lookup User.
  1144. * getpwnam_r: (libc)Lookup User.
  1145. * getpwuid: (libc)Lookup User.
  1146. * getpwuid_r: (libc)Lookup User.
  1147. * getrandom: (libc)Unpredictable Bytes.
  1148. * getrlimit64: (libc)Limits on Resources.
  1149. * getrlimit: (libc)Limits on Resources.
  1150. * getrusage: (libc)Resource Usage.
  1151. * gets: (libc)Line Input.
  1152. * getservbyname: (libc)Services Database.
  1153. * getservbyport: (libc)Services Database.
  1154. * getservent: (libc)Services Database.
  1155. * getsid: (libc)Process Group Functions.
  1156. * getsockname: (libc)Reading Address.
  1157. * getsockopt: (libc)Socket Option Functions.
  1158. * getsubopt: (libc)Suboptions.
  1159. * gettext: (libc)Translation with gettext.
  1160. * gettid: (libc)Process Identification.
  1161. * gettimeofday: (libc)Getting the Time.
  1162. * getuid: (libc)Reading Persona.
  1163. * getumask: (libc)Setting Permissions.
  1164. * getutent: (libc)Manipulating the Database.
  1165. * getutent_r: (libc)Manipulating the Database.
  1166. * getutid: (libc)Manipulating the Database.
  1167. * getutid_r: (libc)Manipulating the Database.
  1168. * getutline: (libc)Manipulating the Database.
  1169. * getutline_r: (libc)Manipulating the Database.
  1170. * getutmp: (libc)XPG Functions.
  1171. * getutmpx: (libc)XPG Functions.
  1172. * getutxent: (libc)XPG Functions.
  1173. * getutxid: (libc)XPG Functions.
  1174. * getutxline: (libc)XPG Functions.
  1175. * getw: (libc)Character Input.
  1176. * getwc: (libc)Character Input.
  1177. * getwc_unlocked: (libc)Character Input.
  1178. * getwchar: (libc)Character Input.
  1179. * getwchar_unlocked: (libc)Character Input.
  1180. * getwd: (libc)Working Directory.
  1181. * glob64: (libc)Calling Glob.
  1182. * glob: (libc)Calling Glob.
  1183. * globfree64: (libc)More Flags for Globbing.
  1184. * globfree: (libc)More Flags for Globbing.
  1185. * gmtime: (libc)Broken-down Time.
  1186. * gmtime_r: (libc)Broken-down Time.
  1187. * grantpt: (libc)Allocation.
  1188. * gsignal: (libc)Signaling Yourself.
  1189. * gtty: (libc)BSD Terminal Modes.
  1190. * hasmntopt: (libc)mtab.
  1191. * hcreate: (libc)Hash Search Function.
  1192. * hcreate_r: (libc)Hash Search Function.
  1193. * hdestroy: (libc)Hash Search Function.
  1194. * hdestroy_r: (libc)Hash Search Function.
  1195. * hsearch: (libc)Hash Search Function.
  1196. * hsearch_r: (libc)Hash Search Function.
  1197. * htonl: (libc)Byte Order.
  1198. * htons: (libc)Byte Order.
  1199. * hypot: (libc)Exponents and Logarithms.
  1200. * hypotf: (libc)Exponents and Logarithms.
  1201. * hypotfN: (libc)Exponents and Logarithms.
  1202. * hypotfNx: (libc)Exponents and Logarithms.
  1203. * hypotl: (libc)Exponents and Logarithms.
  1204. * iconv: (libc)Generic Conversion Interface.
  1205. * iconv_close: (libc)Generic Conversion Interface.
  1206. * iconv_open: (libc)Generic Conversion Interface.
  1207. * if_freenameindex: (libc)Interface Naming.
  1208. * if_indextoname: (libc)Interface Naming.
  1209. * if_nameindex: (libc)Interface Naming.
  1210. * if_nametoindex: (libc)Interface Naming.
  1211. * ilogb: (libc)Exponents and Logarithms.
  1212. * ilogbf: (libc)Exponents and Logarithms.
  1213. * ilogbfN: (libc)Exponents and Logarithms.
  1214. * ilogbfNx: (libc)Exponents and Logarithms.
  1215. * ilogbl: (libc)Exponents and Logarithms.
  1216. * imaxabs: (libc)Absolute Value.
  1217. * imaxdiv: (libc)Integer Division.
  1218. * in6addr_any: (libc)Host Address Data Type.
  1219. * in6addr_loopback: (libc)Host Address Data Type.
  1220. * index: (libc)Search Functions.
  1221. * inet_addr: (libc)Host Address Functions.
  1222. * inet_aton: (libc)Host Address Functions.
  1223. * inet_lnaof: (libc)Host Address Functions.
  1224. * inet_makeaddr: (libc)Host Address Functions.
  1225. * inet_netof: (libc)Host Address Functions.
  1226. * inet_network: (libc)Host Address Functions.
  1227. * inet_ntoa: (libc)Host Address Functions.
  1228. * inet_ntop: (libc)Host Address Functions.
  1229. * inet_pton: (libc)Host Address Functions.
  1230. * initgroups: (libc)Setting Groups.
  1231. * initstate: (libc)BSD Random.
  1232. * initstate_r: (libc)BSD Random.
  1233. * innetgr: (libc)Netgroup Membership.
  1234. * ioctl: (libc)IOCTLs.
  1235. * isalnum: (libc)Classification of Characters.
  1236. * isalpha: (libc)Classification of Characters.
  1237. * isascii: (libc)Classification of Characters.
  1238. * isatty: (libc)Is It a Terminal.
  1239. * isblank: (libc)Classification of Characters.
  1240. * iscanonical: (libc)Floating Point Classes.
  1241. * iscntrl: (libc)Classification of Characters.
  1242. * isdigit: (libc)Classification of Characters.
  1243. * iseqsig: (libc)FP Comparison Functions.
  1244. * isfinite: (libc)Floating Point Classes.
  1245. * isgraph: (libc)Classification of Characters.
  1246. * isgreater: (libc)FP Comparison Functions.
  1247. * isgreaterequal: (libc)FP Comparison Functions.
  1248. * isinf: (libc)Floating Point Classes.
  1249. * isinff: (libc)Floating Point Classes.
  1250. * isinfl: (libc)Floating Point Classes.
  1251. * isless: (libc)FP Comparison Functions.
  1252. * islessequal: (libc)FP Comparison Functions.
  1253. * islessgreater: (libc)FP Comparison Functions.
  1254. * islower: (libc)Classification of Characters.
  1255. * isnan: (libc)Floating Point Classes.
  1256. * isnan: (libc)Floating Point Classes.
  1257. * isnanf: (libc)Floating Point Classes.
  1258. * isnanl: (libc)Floating Point Classes.
  1259. * isnormal: (libc)Floating Point Classes.
  1260. * isprint: (libc)Classification of Characters.
  1261. * ispunct: (libc)Classification of Characters.
  1262. * issignaling: (libc)Floating Point Classes.
  1263. * isspace: (libc)Classification of Characters.
  1264. * issubnormal: (libc)Floating Point Classes.
  1265. * isunordered: (libc)FP Comparison Functions.
  1266. * isupper: (libc)Classification of Characters.
  1267. * iswalnum: (libc)Classification of Wide Characters.
  1268. * iswalpha: (libc)Classification of Wide Characters.
  1269. * iswblank: (libc)Classification of Wide Characters.
  1270. * iswcntrl: (libc)Classification of Wide Characters.
  1271. * iswctype: (libc)Classification of Wide Characters.
  1272. * iswdigit: (libc)Classification of Wide Characters.
  1273. * iswgraph: (libc)Classification of Wide Characters.
  1274. * iswlower: (libc)Classification of Wide Characters.
  1275. * iswprint: (libc)Classification of Wide Characters.
  1276. * iswpunct: (libc)Classification of Wide Characters.
  1277. * iswspace: (libc)Classification of Wide Characters.
  1278. * iswupper: (libc)Classification of Wide Characters.
  1279. * iswxdigit: (libc)Classification of Wide Characters.
  1280. * isxdigit: (libc)Classification of Characters.
  1281. * iszero: (libc)Floating Point Classes.
  1282. * j0: (libc)Special Functions.
  1283. * j0f: (libc)Special Functions.
  1284. * j0fN: (libc)Special Functions.
  1285. * j0fNx: (libc)Special Functions.
  1286. * j0l: (libc)Special Functions.
  1287. * j1: (libc)Special Functions.
  1288. * j1f: (libc)Special Functions.
  1289. * j1fN: (libc)Special Functions.
  1290. * j1fNx: (libc)Special Functions.
  1291. * j1l: (libc)Special Functions.
  1292. * jn: (libc)Special Functions.
  1293. * jnf: (libc)Special Functions.
  1294. * jnfN: (libc)Special Functions.
  1295. * jnfNx: (libc)Special Functions.
  1296. * jnl: (libc)Special Functions.
  1297. * jrand48: (libc)SVID Random.
  1298. * jrand48_r: (libc)SVID Random.
  1299. * kill: (libc)Signaling Another Process.
  1300. * killpg: (libc)Signaling Another Process.
  1301. * l64a: (libc)Encode Binary Data.
  1302. * labs: (libc)Absolute Value.
  1303. * lcong48: (libc)SVID Random.
  1304. * lcong48_r: (libc)SVID Random.
  1305. * ldexp: (libc)Normalization Functions.
  1306. * ldexpf: (libc)Normalization Functions.
  1307. * ldexpfN: (libc)Normalization Functions.
  1308. * ldexpfNx: (libc)Normalization Functions.
  1309. * ldexpl: (libc)Normalization Functions.
  1310. * ldiv: (libc)Integer Division.
  1311. * lfind: (libc)Array Search Function.
  1312. * lgamma: (libc)Special Functions.
  1313. * lgamma_r: (libc)Special Functions.
  1314. * lgammaf: (libc)Special Functions.
  1315. * lgammafN: (libc)Special Functions.
  1316. * lgammafN_r: (libc)Special Functions.
  1317. * lgammafNx: (libc)Special Functions.
  1318. * lgammafNx_r: (libc)Special Functions.
  1319. * lgammaf_r: (libc)Special Functions.
  1320. * lgammal: (libc)Special Functions.
  1321. * lgammal_r: (libc)Special Functions.
  1322. * link: (libc)Hard Links.
  1323. * linkat: (libc)Hard Links.
  1324. * lio_listio64: (libc)Asynchronous Reads/Writes.
  1325. * lio_listio: (libc)Asynchronous Reads/Writes.
  1326. * listen: (libc)Listening.
  1327. * llabs: (libc)Absolute Value.
  1328. * lldiv: (libc)Integer Division.
  1329. * llogb: (libc)Exponents and Logarithms.
  1330. * llogbf: (libc)Exponents and Logarithms.
  1331. * llogbfN: (libc)Exponents and Logarithms.
  1332. * llogbfNx: (libc)Exponents and Logarithms.
  1333. * llogbl: (libc)Exponents and Logarithms.
  1334. * llrint: (libc)Rounding Functions.
  1335. * llrintf: (libc)Rounding Functions.
  1336. * llrintfN: (libc)Rounding Functions.
  1337. * llrintfNx: (libc)Rounding Functions.
  1338. * llrintl: (libc)Rounding Functions.
  1339. * llround: (libc)Rounding Functions.
  1340. * llroundf: (libc)Rounding Functions.
  1341. * llroundfN: (libc)Rounding Functions.
  1342. * llroundfNx: (libc)Rounding Functions.
  1343. * llroundl: (libc)Rounding Functions.
  1344. * localeconv: (libc)The Lame Way to Locale Data.
  1345. * localtime: (libc)Broken-down Time.
  1346. * localtime_r: (libc)Broken-down Time.
  1347. * log10: (libc)Exponents and Logarithms.
  1348. * log10f: (libc)Exponents and Logarithms.
  1349. * log10fN: (libc)Exponents and Logarithms.
  1350. * log10fNx: (libc)Exponents and Logarithms.
  1351. * log10l: (libc)Exponents and Logarithms.
  1352. * log1p: (libc)Exponents and Logarithms.
  1353. * log1pf: (libc)Exponents and Logarithms.
  1354. * log1pfN: (libc)Exponents and Logarithms.
  1355. * log1pfNx: (libc)Exponents and Logarithms.
  1356. * log1pl: (libc)Exponents and Logarithms.
  1357. * log2: (libc)Exponents and Logarithms.
  1358. * log2f: (libc)Exponents and Logarithms.
  1359. * log2fN: (libc)Exponents and Logarithms.
  1360. * log2fNx: (libc)Exponents and Logarithms.
  1361. * log2l: (libc)Exponents and Logarithms.
  1362. * log: (libc)Exponents and Logarithms.
  1363. * logb: (libc)Exponents and Logarithms.
  1364. * logbf: (libc)Exponents and Logarithms.
  1365. * logbfN: (libc)Exponents and Logarithms.
  1366. * logbfNx: (libc)Exponents and Logarithms.
  1367. * logbl: (libc)Exponents and Logarithms.
  1368. * logf: (libc)Exponents and Logarithms.
  1369. * logfN: (libc)Exponents and Logarithms.
  1370. * logfNx: (libc)Exponents and Logarithms.
  1371. * login: (libc)Logging In and Out.
  1372. * login_tty: (libc)Logging In and Out.
  1373. * logl: (libc)Exponents and Logarithms.
  1374. * logout: (libc)Logging In and Out.
  1375. * logwtmp: (libc)Logging In and Out.
  1376. * longjmp: (libc)Non-Local Details.
  1377. * lrand48: (libc)SVID Random.
  1378. * lrand48_r: (libc)SVID Random.
  1379. * lrint: (libc)Rounding Functions.
  1380. * lrintf: (libc)Rounding Functions.
  1381. * lrintfN: (libc)Rounding Functions.
  1382. * lrintfNx: (libc)Rounding Functions.
  1383. * lrintl: (libc)Rounding Functions.
  1384. * lround: (libc)Rounding Functions.
  1385. * lroundf: (libc)Rounding Functions.
  1386. * lroundfN: (libc)Rounding Functions.
  1387. * lroundfNx: (libc)Rounding Functions.
  1388. * lroundl: (libc)Rounding Functions.
  1389. * lsearch: (libc)Array Search Function.
  1390. * lseek64: (libc)File Position Primitive.
  1391. * lseek: (libc)File Position Primitive.
  1392. * lstat64: (libc)Reading Attributes.
  1393. * lstat: (libc)Reading Attributes.
  1394. * lutimes: (libc)File Times.
  1395. * madvise: (libc)Memory-mapped I/O.
  1396. * makecontext: (libc)System V contexts.
  1397. * mallinfo2: (libc)Statistics of Malloc.
  1398. * malloc: (libc)Basic Allocation.
  1399. * mallopt: (libc)Malloc Tunable Parameters.
  1400. * mblen: (libc)Non-reentrant Character Conversion.
  1401. * mbrlen: (libc)Converting a Character.
  1402. * mbrtowc: (libc)Converting a Character.
  1403. * mbsinit: (libc)Keeping the state.
  1404. * mbsnrtowcs: (libc)Converting Strings.
  1405. * mbsrtowcs: (libc)Converting Strings.
  1406. * mbstowcs: (libc)Non-reentrant String Conversion.
  1407. * mbtowc: (libc)Non-reentrant Character Conversion.
  1408. * mcheck: (libc)Heap Consistency Checking.
  1409. * memalign: (libc)Aligned Memory Blocks.
  1410. * memccpy: (libc)Copying Strings and Arrays.
  1411. * memchr: (libc)Search Functions.
  1412. * memcmp: (libc)String/Array Comparison.
  1413. * memcpy: (libc)Copying Strings and Arrays.
  1414. * memfd_create: (libc)Memory-mapped I/O.
  1415. * memfrob: (libc)Obfuscating Data.
  1416. * memmem: (libc)Search Functions.
  1417. * memmove: (libc)Copying Strings and Arrays.
  1418. * mempcpy: (libc)Copying Strings and Arrays.
  1419. * memrchr: (libc)Search Functions.
  1420. * memset: (libc)Copying Strings and Arrays.
  1421. * mkdir: (libc)Creating Directories.
  1422. * mkdtemp: (libc)Temporary Files.
  1423. * mkfifo: (libc)FIFO Special Files.
  1424. * mknod: (libc)Making Special Files.
  1425. * mkstemp: (libc)Temporary Files.
  1426. * mktemp: (libc)Temporary Files.
  1427. * mktime: (libc)Broken-down Time.
  1428. * mlock2: (libc)Page Lock Functions.
  1429. * mlock: (libc)Page Lock Functions.
  1430. * mlockall: (libc)Page Lock Functions.
  1431. * mmap64: (libc)Memory-mapped I/O.
  1432. * mmap: (libc)Memory-mapped I/O.
  1433. * modf: (libc)Rounding Functions.
  1434. * modff: (libc)Rounding Functions.
  1435. * modffN: (libc)Rounding Functions.
  1436. * modffNx: (libc)Rounding Functions.
  1437. * modfl: (libc)Rounding Functions.
  1438. * mount: (libc)Mount-Unmount-Remount.
  1439. * mprobe: (libc)Heap Consistency Checking.
  1440. * mprotect: (libc)Memory Protection.
  1441. * mrand48: (libc)SVID Random.
  1442. * mrand48_r: (libc)SVID Random.
  1443. * mremap: (libc)Memory-mapped I/O.
  1444. * msync: (libc)Memory-mapped I/O.
  1445. * mtrace: (libc)Tracing malloc.
  1446. * mtx_destroy: (libc)ISO C Mutexes.
  1447. * mtx_init: (libc)ISO C Mutexes.
  1448. * mtx_lock: (libc)ISO C Mutexes.
  1449. * mtx_timedlock: (libc)ISO C Mutexes.
  1450. * mtx_trylock: (libc)ISO C Mutexes.
  1451. * mtx_unlock: (libc)ISO C Mutexes.
  1452. * munlock: (libc)Page Lock Functions.
  1453. * munlockall: (libc)Page Lock Functions.
  1454. * munmap: (libc)Memory-mapped I/O.
  1455. * muntrace: (libc)Tracing malloc.
  1456. * nan: (libc)FP Bit Twiddling.
  1457. * nanf: (libc)FP Bit Twiddling.
  1458. * nanfN: (libc)FP Bit Twiddling.
  1459. * nanfNx: (libc)FP Bit Twiddling.
  1460. * nanl: (libc)FP Bit Twiddling.
  1461. * nanosleep: (libc)Sleeping.
  1462. * nearbyint: (libc)Rounding Functions.
  1463. * nearbyintf: (libc)Rounding Functions.
  1464. * nearbyintfN: (libc)Rounding Functions.
  1465. * nearbyintfNx: (libc)Rounding Functions.
  1466. * nearbyintl: (libc)Rounding Functions.
  1467. * nextafter: (libc)FP Bit Twiddling.
  1468. * nextafterf: (libc)FP Bit Twiddling.
  1469. * nextafterfN: (libc)FP Bit Twiddling.
  1470. * nextafterfNx: (libc)FP Bit Twiddling.
  1471. * nextafterl: (libc)FP Bit Twiddling.
  1472. * nextdown: (libc)FP Bit Twiddling.
  1473. * nextdownf: (libc)FP Bit Twiddling.
  1474. * nextdownfN: (libc)FP Bit Twiddling.
  1475. * nextdownfNx: (libc)FP Bit Twiddling.
  1476. * nextdownl: (libc)FP Bit Twiddling.
  1477. * nexttoward: (libc)FP Bit Twiddling.
  1478. * nexttowardf: (libc)FP Bit Twiddling.
  1479. * nexttowardl: (libc)FP Bit Twiddling.
  1480. * nextup: (libc)FP Bit Twiddling.
  1481. * nextupf: (libc)FP Bit Twiddling.
  1482. * nextupfN: (libc)FP Bit Twiddling.
  1483. * nextupfNx: (libc)FP Bit Twiddling.
  1484. * nextupl: (libc)FP Bit Twiddling.
  1485. * nftw64: (libc)Working with Directory Trees.
  1486. * nftw: (libc)Working with Directory Trees.
  1487. * ngettext: (libc)Advanced gettext functions.
  1488. * nice: (libc)Traditional Scheduling Functions.
  1489. * nl_langinfo: (libc)The Elegant and Fast Way.
  1490. * nrand48: (libc)SVID Random.
  1491. * nrand48_r: (libc)SVID Random.
  1492. * ntohl: (libc)Byte Order.
  1493. * ntohs: (libc)Byte Order.
  1494. * ntp_adjtime: (libc)Setting and Adjusting the Time.
  1495. * ntp_gettime: (libc)Setting and Adjusting the Time.
  1496. * obstack_1grow: (libc)Growing Objects.
  1497. * obstack_1grow_fast: (libc)Extra Fast Growing.
  1498. * obstack_alignment_mask: (libc)Obstacks Data Alignment.
  1499. * obstack_alloc: (libc)Allocation in an Obstack.
  1500. * obstack_base: (libc)Status of an Obstack.
  1501. * obstack_blank: (libc)Growing Objects.
  1502. * obstack_blank_fast: (libc)Extra Fast Growing.
  1503. * obstack_chunk_size: (libc)Obstack Chunks.
  1504. * obstack_copy0: (libc)Allocation in an Obstack.
  1505. * obstack_copy: (libc)Allocation in an Obstack.
  1506. * obstack_finish: (libc)Growing Objects.
  1507. * obstack_free: (libc)Freeing Obstack Objects.
  1508. * obstack_grow0: (libc)Growing Objects.
  1509. * obstack_grow: (libc)Growing Objects.
  1510. * obstack_init: (libc)Preparing for Obstacks.
  1511. * obstack_int_grow: (libc)Growing Objects.
  1512. * obstack_int_grow_fast: (libc)Extra Fast Growing.
  1513. * obstack_next_free: (libc)Status of an Obstack.
  1514. * obstack_object_size: (libc)Growing Objects.
  1515. * obstack_object_size: (libc)Status of an Obstack.
  1516. * obstack_printf: (libc)Dynamic Output.
  1517. * obstack_ptr_grow: (libc)Growing Objects.
  1518. * obstack_ptr_grow_fast: (libc)Extra Fast Growing.
  1519. * obstack_room: (libc)Extra Fast Growing.
  1520. * obstack_vprintf: (libc)Variable Arguments Output.
  1521. * offsetof: (libc)Structure Measurement.
  1522. * on_exit: (libc)Cleanups on Exit.
  1523. * open64: (libc)Opening and Closing Files.
  1524. * open: (libc)Opening and Closing Files.
  1525. * open_memstream: (libc)String Streams.
  1526. * opendir: (libc)Opening a Directory.
  1527. * openlog: (libc)openlog.
  1528. * openpty: (libc)Pseudo-Terminal Pairs.
  1529. * parse_printf_format: (libc)Parsing a Template String.
  1530. * pathconf: (libc)Pathconf.
  1531. * pause: (libc)Using Pause.
  1532. * pclose: (libc)Pipe to a Subprocess.
  1533. * perror: (libc)Error Messages.
  1534. * pipe: (libc)Creating a Pipe.
  1535. * pkey_alloc: (libc)Memory Protection.
  1536. * pkey_free: (libc)Memory Protection.
  1537. * pkey_get: (libc)Memory Protection.
  1538. * pkey_mprotect: (libc)Memory Protection.
  1539. * pkey_set: (libc)Memory Protection.
  1540. * popen: (libc)Pipe to a Subprocess.
  1541. * posix_fallocate64: (libc)Storage Allocation.
  1542. * posix_fallocate: (libc)Storage Allocation.
  1543. * posix_memalign: (libc)Aligned Memory Blocks.
  1544. * pow: (libc)Exponents and Logarithms.
  1545. * powf: (libc)Exponents and Logarithms.
  1546. * powfN: (libc)Exponents and Logarithms.
  1547. * powfNx: (libc)Exponents and Logarithms.
  1548. * powl: (libc)Exponents and Logarithms.
  1549. * pread64: (libc)I/O Primitives.
  1550. * pread: (libc)I/O Primitives.
  1551. * preadv2: (libc)Scatter-Gather.
  1552. * preadv64: (libc)Scatter-Gather.
  1553. * preadv64v2: (libc)Scatter-Gather.
  1554. * preadv: (libc)Scatter-Gather.
  1555. * printf: (libc)Formatted Output Functions.
  1556. * printf_size: (libc)Predefined Printf Handlers.
  1557. * printf_size_info: (libc)Predefined Printf Handlers.
  1558. * psignal: (libc)Signal Messages.
  1559. * pthread_attr_getsigmask_np: (libc)Initial Thread Signal Mask.
  1560. * pthread_attr_setsigmask_np: (libc)Initial Thread Signal Mask.
  1561. * pthread_clockjoin_np: (libc)Waiting with Explicit Clocks.
  1562. * pthread_cond_clockwait: (libc)Waiting with Explicit Clocks.
  1563. * pthread_getattr_default_np: (libc)Default Thread Attributes.
  1564. * pthread_getspecific: (libc)Thread-specific Data.
  1565. * pthread_key_create: (libc)Thread-specific Data.
  1566. * pthread_key_delete: (libc)Thread-specific Data.
  1567. * pthread_rwlock_clockrdlock: (libc)Waiting with Explicit Clocks.
  1568. * pthread_rwlock_clockwrlock: (libc)Waiting with Explicit Clocks.
  1569. * pthread_setattr_default_np: (libc)Default Thread Attributes.
  1570. * pthread_setspecific: (libc)Thread-specific Data.
  1571. * pthread_timedjoin_np: (libc)Waiting with Explicit Clocks.
  1572. * pthread_tryjoin_np: (libc)Waiting with Explicit Clocks.
  1573. * ptsname: (libc)Allocation.
  1574. * ptsname_r: (libc)Allocation.
  1575. * putc: (libc)Simple Output.
  1576. * putc_unlocked: (libc)Simple Output.
  1577. * putchar: (libc)Simple Output.
  1578. * putchar_unlocked: (libc)Simple Output.
  1579. * putenv: (libc)Environment Access.
  1580. * putpwent: (libc)Writing a User Entry.
  1581. * puts: (libc)Simple Output.
  1582. * pututline: (libc)Manipulating the Database.
  1583. * pututxline: (libc)XPG Functions.
  1584. * putw: (libc)Simple Output.
  1585. * putwc: (libc)Simple Output.
  1586. * putwc_unlocked: (libc)Simple Output.
  1587. * putwchar: (libc)Simple Output.
  1588. * putwchar_unlocked: (libc)Simple Output.
  1589. * pwrite64: (libc)I/O Primitives.
  1590. * pwrite: (libc)I/O Primitives.
  1591. * pwritev2: (libc)Scatter-Gather.
  1592. * pwritev64: (libc)Scatter-Gather.
  1593. * pwritev64v2: (libc)Scatter-Gather.
  1594. * pwritev: (libc)Scatter-Gather.
  1595. * qecvt: (libc)System V Number Conversion.
  1596. * qecvt_r: (libc)System V Number Conversion.
  1597. * qfcvt: (libc)System V Number Conversion.
  1598. * qfcvt_r: (libc)System V Number Conversion.
  1599. * qgcvt: (libc)System V Number Conversion.
  1600. * qsort: (libc)Array Sort Function.
  1601. * raise: (libc)Signaling Yourself.
  1602. * rand: (libc)ISO Random.
  1603. * rand_r: (libc)ISO Random.
  1604. * random: (libc)BSD Random.
  1605. * random_r: (libc)BSD Random.
  1606. * rawmemchr: (libc)Search Functions.
  1607. * read: (libc)I/O Primitives.
  1608. * readdir64: (libc)Reading/Closing Directory.
  1609. * readdir64_r: (libc)Reading/Closing Directory.
  1610. * readdir: (libc)Reading/Closing Directory.
  1611. * readdir_r: (libc)Reading/Closing Directory.
  1612. * readlink: (libc)Symbolic Links.
  1613. * readv: (libc)Scatter-Gather.
  1614. * realloc: (libc)Changing Block Size.
  1615. * reallocarray: (libc)Changing Block Size.
  1616. * realpath: (libc)Symbolic Links.
  1617. * recv: (libc)Receiving Data.
  1618. * recvfrom: (libc)Receiving Datagrams.
  1619. * recvmsg: (libc)Receiving Datagrams.
  1620. * regcomp: (libc)POSIX Regexp Compilation.
  1621. * regerror: (libc)Regexp Cleanup.
  1622. * regexec: (libc)Matching POSIX Regexps.
  1623. * regfree: (libc)Regexp Cleanup.
  1624. * register_printf_function: (libc)Registering New Conversions.
  1625. * remainder: (libc)Remainder Functions.
  1626. * remainderf: (libc)Remainder Functions.
  1627. * remainderfN: (libc)Remainder Functions.
  1628. * remainderfNx: (libc)Remainder Functions.
  1629. * remainderl: (libc)Remainder Functions.
  1630. * remove: (libc)Deleting Files.
  1631. * rename: (libc)Renaming Files.
  1632. * rewind: (libc)File Positioning.
  1633. * rewinddir: (libc)Random Access Directory.
  1634. * rindex: (libc)Search Functions.
  1635. * rint: (libc)Rounding Functions.
  1636. * rintf: (libc)Rounding Functions.
  1637. * rintfN: (libc)Rounding Functions.
  1638. * rintfNx: (libc)Rounding Functions.
  1639. * rintl: (libc)Rounding Functions.
  1640. * rmdir: (libc)Deleting Files.
  1641. * round: (libc)Rounding Functions.
  1642. * roundeven: (libc)Rounding Functions.
  1643. * roundevenf: (libc)Rounding Functions.
  1644. * roundevenfN: (libc)Rounding Functions.
  1645. * roundevenfNx: (libc)Rounding Functions.
  1646. * roundevenl: (libc)Rounding Functions.
  1647. * roundf: (libc)Rounding Functions.
  1648. * roundfN: (libc)Rounding Functions.
  1649. * roundfNx: (libc)Rounding Functions.
  1650. * roundl: (libc)Rounding Functions.
  1651. * rpmatch: (libc)Yes-or-No Questions.
  1652. * sbrk: (libc)Resizing the Data Segment.
  1653. * scalb: (libc)Normalization Functions.
  1654. * scalbf: (libc)Normalization Functions.
  1655. * scalbl: (libc)Normalization Functions.
  1656. * scalbln: (libc)Normalization Functions.
  1657. * scalblnf: (libc)Normalization Functions.
  1658. * scalblnfN: (libc)Normalization Functions.
  1659. * scalblnfNx: (libc)Normalization Functions.
  1660. * scalblnl: (libc)Normalization Functions.
  1661. * scalbn: (libc)Normalization Functions.
  1662. * scalbnf: (libc)Normalization Functions.
  1663. * scalbnfN: (libc)Normalization Functions.
  1664. * scalbnfNx: (libc)Normalization Functions.
  1665. * scalbnl: (libc)Normalization Functions.
  1666. * scandir64: (libc)Scanning Directory Content.
  1667. * scandir: (libc)Scanning Directory Content.
  1668. * scanf: (libc)Formatted Input Functions.
  1669. * sched_get_priority_max: (libc)Basic Scheduling Functions.
  1670. * sched_get_priority_min: (libc)Basic Scheduling Functions.
  1671. * sched_getaffinity: (libc)CPU Affinity.
  1672. * sched_getparam: (libc)Basic Scheduling Functions.
  1673. * sched_getscheduler: (libc)Basic Scheduling Functions.
  1674. * sched_rr_get_interval: (libc)Basic Scheduling Functions.
  1675. * sched_setaffinity: (libc)CPU Affinity.
  1676. * sched_setparam: (libc)Basic Scheduling Functions.
  1677. * sched_setscheduler: (libc)Basic Scheduling Functions.
  1678. * sched_yield: (libc)Basic Scheduling Functions.
  1679. * secure_getenv: (libc)Environment Access.
  1680. * seed48: (libc)SVID Random.
  1681. * seed48_r: (libc)SVID Random.
  1682. * seekdir: (libc)Random Access Directory.
  1683. * select: (libc)Waiting for I/O.
  1684. * sem_clockwait: (libc)Waiting with Explicit Clocks.
  1685. * sem_close: (libc)Semaphores.
  1686. * sem_destroy: (libc)Semaphores.
  1687. * sem_getvalue: (libc)Semaphores.
  1688. * sem_init: (libc)Semaphores.
  1689. * sem_open: (libc)Semaphores.
  1690. * sem_post: (libc)Semaphores.
  1691. * sem_timedwait: (libc)Semaphores.
  1692. * sem_trywait: (libc)Semaphores.
  1693. * sem_unlink: (libc)Semaphores.
  1694. * sem_wait: (libc)Semaphores.
  1695. * semctl: (libc)Semaphores.
  1696. * semget: (libc)Semaphores.
  1697. * semop: (libc)Semaphores.
  1698. * semtimedop: (libc)Semaphores.
  1699. * send: (libc)Sending Data.
  1700. * sendmsg: (libc)Receiving Datagrams.
  1701. * sendto: (libc)Sending Datagrams.
  1702. * setbuf: (libc)Controlling Buffering.
  1703. * setbuffer: (libc)Controlling Buffering.
  1704. * setcontext: (libc)System V contexts.
  1705. * setdomainname: (libc)Host Identification.
  1706. * setegid: (libc)Setting Groups.
  1707. * setenv: (libc)Environment Access.
  1708. * seteuid: (libc)Setting User ID.
  1709. * setfsent: (libc)fstab.
  1710. * setgid: (libc)Setting Groups.
  1711. * setgrent: (libc)Scanning All Groups.
  1712. * setgroups: (libc)Setting Groups.
  1713. * sethostent: (libc)Host Names.
  1714. * sethostid: (libc)Host Identification.
  1715. * sethostname: (libc)Host Identification.
  1716. * setitimer: (libc)Setting an Alarm.
  1717. * setjmp: (libc)Non-Local Details.
  1718. * setlinebuf: (libc)Controlling Buffering.
  1719. * setlocale: (libc)Setting the Locale.
  1720. * setlogmask: (libc)setlogmask.
  1721. * setmntent: (libc)mtab.
  1722. * setnetent: (libc)Networks Database.
  1723. * setnetgrent: (libc)Lookup Netgroup.
  1724. * setpayload: (libc)FP Bit Twiddling.
  1725. * setpayloadf: (libc)FP Bit Twiddling.
  1726. * setpayloadfN: (libc)FP Bit Twiddling.
  1727. * setpayloadfNx: (libc)FP Bit Twiddling.
  1728. * setpayloadl: (libc)FP Bit Twiddling.
  1729. * setpayloadsig: (libc)FP Bit Twiddling.
  1730. * setpayloadsigf: (libc)FP Bit Twiddling.
  1731. * setpayloadsigfN: (libc)FP Bit Twiddling.
  1732. * setpayloadsigfNx: (libc)FP Bit Twiddling.
  1733. * setpayloadsigl: (libc)FP Bit Twiddling.
  1734. * setpgid: (libc)Process Group Functions.
  1735. * setpgrp: (libc)Process Group Functions.
  1736. * setpriority: (libc)Traditional Scheduling Functions.
  1737. * setprotoent: (libc)Protocols Database.
  1738. * setpwent: (libc)Scanning All Users.
  1739. * setregid: (libc)Setting Groups.
  1740. * setreuid: (libc)Setting User ID.
  1741. * setrlimit64: (libc)Limits on Resources.
  1742. * setrlimit: (libc)Limits on Resources.
  1743. * setservent: (libc)Services Database.
  1744. * setsid: (libc)Process Group Functions.
  1745. * setsockopt: (libc)Socket Option Functions.
  1746. * setstate: (libc)BSD Random.
  1747. * setstate_r: (libc)BSD Random.
  1748. * settimeofday: (libc)Setting and Adjusting the Time.
  1749. * setuid: (libc)Setting User ID.
  1750. * setutent: (libc)Manipulating the Database.
  1751. * setutxent: (libc)XPG Functions.
  1752. * setvbuf: (libc)Controlling Buffering.
  1753. * shm_open: (libc)Memory-mapped I/O.
  1754. * shm_unlink: (libc)Memory-mapped I/O.
  1755. * shutdown: (libc)Closing a Socket.
  1756. * sigabbrev_np: (libc)Signal Messages.
  1757. * sigaction: (libc)Advanced Signal Handling.
  1758. * sigaddset: (libc)Signal Sets.
  1759. * sigaltstack: (libc)Signal Stack.
  1760. * sigblock: (libc)BSD Signal Handling.
  1761. * sigdelset: (libc)Signal Sets.
  1762. * sigdescr_np: (libc)Signal Messages.
  1763. * sigemptyset: (libc)Signal Sets.
  1764. * sigfillset: (libc)Signal Sets.
  1765. * siginterrupt: (libc)BSD Signal Handling.
  1766. * sigismember: (libc)Signal Sets.
  1767. * siglongjmp: (libc)Non-Local Exits and Signals.
  1768. * sigmask: (libc)BSD Signal Handling.
  1769. * signal: (libc)Basic Signal Handling.
  1770. * signbit: (libc)FP Bit Twiddling.
  1771. * significand: (libc)Normalization Functions.
  1772. * significandf: (libc)Normalization Functions.
  1773. * significandl: (libc)Normalization Functions.
  1774. * sigpause: (libc)BSD Signal Handling.
  1775. * sigpending: (libc)Checking for Pending Signals.
  1776. * sigprocmask: (libc)Process Signal Mask.
  1777. * sigsetjmp: (libc)Non-Local Exits and Signals.
  1778. * sigsetmask: (libc)BSD Signal Handling.
  1779. * sigstack: (libc)Signal Stack.
  1780. * sigsuspend: (libc)Sigsuspend.
  1781. * sin: (libc)Trig Functions.
  1782. * sincos: (libc)Trig Functions.
  1783. * sincosf: (libc)Trig Functions.
  1784. * sincosfN: (libc)Trig Functions.
  1785. * sincosfNx: (libc)Trig Functions.
  1786. * sincosl: (libc)Trig Functions.
  1787. * sinf: (libc)Trig Functions.
  1788. * sinfN: (libc)Trig Functions.
  1789. * sinfNx: (libc)Trig Functions.
  1790. * sinh: (libc)Hyperbolic Functions.
  1791. * sinhf: (libc)Hyperbolic Functions.
  1792. * sinhfN: (libc)Hyperbolic Functions.
  1793. * sinhfNx: (libc)Hyperbolic Functions.
  1794. * sinhl: (libc)Hyperbolic Functions.
  1795. * sinl: (libc)Trig Functions.
  1796. * sleep: (libc)Sleeping.
  1797. * snprintf: (libc)Formatted Output Functions.
  1798. * socket: (libc)Creating a Socket.
  1799. * socketpair: (libc)Socket Pairs.
  1800. * sprintf: (libc)Formatted Output Functions.
  1801. * sqrt: (libc)Exponents and Logarithms.
  1802. * sqrtf: (libc)Exponents and Logarithms.
  1803. * sqrtfN: (libc)Exponents and Logarithms.
  1804. * sqrtfNx: (libc)Exponents and Logarithms.
  1805. * sqrtl: (libc)Exponents and Logarithms.
  1806. * srand48: (libc)SVID Random.
  1807. * srand48_r: (libc)SVID Random.
  1808. * srand: (libc)ISO Random.
  1809. * srandom: (libc)BSD Random.
  1810. * srandom_r: (libc)BSD Random.
  1811. * sscanf: (libc)Formatted Input Functions.
  1812. * ssignal: (libc)Basic Signal Handling.
  1813. * stat64: (libc)Reading Attributes.
  1814. * stat: (libc)Reading Attributes.
  1815. * stime: (libc)Setting and Adjusting the Time.
  1816. * stpcpy: (libc)Copying Strings and Arrays.
  1817. * stpncpy: (libc)Truncating Strings.
  1818. * strcasecmp: (libc)String/Array Comparison.
  1819. * strcasestr: (libc)Search Functions.
  1820. * strcat: (libc)Concatenating Strings.
  1821. * strchr: (libc)Search Functions.
  1822. * strchrnul: (libc)Search Functions.
  1823. * strcmp: (libc)String/Array Comparison.
  1824. * strcoll: (libc)Collation Functions.
  1825. * strcpy: (libc)Copying Strings and Arrays.
  1826. * strcspn: (libc)Search Functions.
  1827. * strdup: (libc)Copying Strings and Arrays.
  1828. * strdupa: (libc)Copying Strings and Arrays.
  1829. * strerror: (libc)Error Messages.
  1830. * strerror_r: (libc)Error Messages.
  1831. * strerrordesc_np: (libc)Error Messages.
  1832. * strerrorname_np: (libc)Error Messages.
  1833. * strfmon: (libc)Formatting Numbers.
  1834. * strfromd: (libc)Printing of Floats.
  1835. * strfromf: (libc)Printing of Floats.
  1836. * strfromfN: (libc)Printing of Floats.
  1837. * strfromfNx: (libc)Printing of Floats.
  1838. * strfroml: (libc)Printing of Floats.
  1839. * strfry: (libc)Shuffling Bytes.
  1840. * strftime: (libc)Formatting Calendar Time.
  1841. * strlen: (libc)String Length.
  1842. * strncasecmp: (libc)String/Array Comparison.
  1843. * strncat: (libc)Truncating Strings.
  1844. * strncmp: (libc)String/Array Comparison.
  1845. * strncpy: (libc)Truncating Strings.
  1846. * strndup: (libc)Truncating Strings.
  1847. * strndupa: (libc)Truncating Strings.
  1848. * strnlen: (libc)String Length.
  1849. * strpbrk: (libc)Search Functions.
  1850. * strptime: (libc)Low-Level Time String Parsing.
  1851. * strrchr: (libc)Search Functions.
  1852. * strsep: (libc)Finding Tokens in a String.
  1853. * strsignal: (libc)Signal Messages.
  1854. * strspn: (libc)Search Functions.
  1855. * strstr: (libc)Search Functions.
  1856. * strtod: (libc)Parsing of Floats.
  1857. * strtof: (libc)Parsing of Floats.
  1858. * strtofN: (libc)Parsing of Floats.
  1859. * strtofNx: (libc)Parsing of Floats.
  1860. * strtoimax: (libc)Parsing of Integers.
  1861. * strtok: (libc)Finding Tokens in a String.
  1862. * strtok_r: (libc)Finding Tokens in a String.
  1863. * strtol: (libc)Parsing of Integers.
  1864. * strtold: (libc)Parsing of Floats.
  1865. * strtoll: (libc)Parsing of Integers.
  1866. * strtoq: (libc)Parsing of Integers.
  1867. * strtoul: (libc)Parsing of Integers.
  1868. * strtoull: (libc)Parsing of Integers.
  1869. * strtoumax: (libc)Parsing of Integers.
  1870. * strtouq: (libc)Parsing of Integers.
  1871. * strverscmp: (libc)String/Array Comparison.
  1872. * strxfrm: (libc)Collation Functions.
  1873. * stty: (libc)BSD Terminal Modes.
  1874. * swapcontext: (libc)System V contexts.
  1875. * swprintf: (libc)Formatted Output Functions.
  1876. * swscanf: (libc)Formatted Input Functions.
  1877. * symlink: (libc)Symbolic Links.
  1878. * sync: (libc)Synchronizing I/O.
  1879. * syscall: (libc)System Calls.
  1880. * sysconf: (libc)Sysconf Definition.
  1881. * syslog: (libc)syslog; vsyslog.
  1882. * system: (libc)Running a Command.
  1883. * sysv_signal: (libc)Basic Signal Handling.
  1884. * tan: (libc)Trig Functions.
  1885. * tanf: (libc)Trig Functions.
  1886. * tanfN: (libc)Trig Functions.
  1887. * tanfNx: (libc)Trig Functions.
  1888. * tanh: (libc)Hyperbolic Functions.
  1889. * tanhf: (libc)Hyperbolic Functions.
  1890. * tanhfN: (libc)Hyperbolic Functions.
  1891. * tanhfNx: (libc)Hyperbolic Functions.
  1892. * tanhl: (libc)Hyperbolic Functions.
  1893. * tanl: (libc)Trig Functions.
  1894. * tcdrain: (libc)Line Control.
  1895. * tcflow: (libc)Line Control.
  1896. * tcflush: (libc)Line Control.
  1897. * tcgetattr: (libc)Mode Functions.
  1898. * tcgetpgrp: (libc)Terminal Access Functions.
  1899. * tcgetsid: (libc)Terminal Access Functions.
  1900. * tcsendbreak: (libc)Line Control.
  1901. * tcsetattr: (libc)Mode Functions.
  1902. * tcsetpgrp: (libc)Terminal Access Functions.
  1903. * tdelete: (libc)Tree Search Function.
  1904. * tdestroy: (libc)Tree Search Function.
  1905. * telldir: (libc)Random Access Directory.
  1906. * tempnam: (libc)Temporary Files.
  1907. * textdomain: (libc)Locating gettext catalog.
  1908. * tfind: (libc)Tree Search Function.
  1909. * tgamma: (libc)Special Functions.
  1910. * tgammaf: (libc)Special Functions.
  1911. * tgammafN: (libc)Special Functions.
  1912. * tgammafNx: (libc)Special Functions.
  1913. * tgammal: (libc)Special Functions.
  1914. * tgkill: (libc)Signaling Another Process.
  1915. * thrd_create: (libc)ISO C Thread Management.
  1916. * thrd_current: (libc)ISO C Thread Management.
  1917. * thrd_detach: (libc)ISO C Thread Management.
  1918. * thrd_equal: (libc)ISO C Thread Management.
  1919. * thrd_exit: (libc)ISO C Thread Management.
  1920. * thrd_join: (libc)ISO C Thread Management.
  1921. * thrd_sleep: (libc)ISO C Thread Management.
  1922. * thrd_yield: (libc)ISO C Thread Management.
  1923. * time: (libc)Getting the Time.
  1924. * timegm: (libc)Broken-down Time.
  1925. * timelocal: (libc)Broken-down Time.
  1926. * times: (libc)Processor Time.
  1927. * tmpfile64: (libc)Temporary Files.
  1928. * tmpfile: (libc)Temporary Files.
  1929. * tmpnam: (libc)Temporary Files.
  1930. * tmpnam_r: (libc)Temporary Files.
  1931. * toascii: (libc)Case Conversion.
  1932. * tolower: (libc)Case Conversion.
  1933. * totalorder: (libc)FP Comparison Functions.
  1934. * totalorderf: (libc)FP Comparison Functions.
  1935. * totalorderfN: (libc)FP Comparison Functions.
  1936. * totalorderfNx: (libc)FP Comparison Functions.
  1937. * totalorderl: (libc)FP Comparison Functions.
  1938. * totalordermag: (libc)FP Comparison Functions.
  1939. * totalordermagf: (libc)FP Comparison Functions.
  1940. * totalordermagfN: (libc)FP Comparison Functions.
  1941. * totalordermagfNx: (libc)FP Comparison Functions.
  1942. * totalordermagl: (libc)FP Comparison Functions.
  1943. * toupper: (libc)Case Conversion.
  1944. * towctrans: (libc)Wide Character Case Conversion.
  1945. * towlower: (libc)Wide Character Case Conversion.
  1946. * towupper: (libc)Wide Character Case Conversion.
  1947. * trunc: (libc)Rounding Functions.
  1948. * truncate64: (libc)File Size.
  1949. * truncate: (libc)File Size.
  1950. * truncf: (libc)Rounding Functions.
  1951. * truncfN: (libc)Rounding Functions.
  1952. * truncfNx: (libc)Rounding Functions.
  1953. * truncl: (libc)Rounding Functions.
  1954. * tsearch: (libc)Tree Search Function.
  1955. * tss_create: (libc)ISO C Thread-local Storage.
  1956. * tss_delete: (libc)ISO C Thread-local Storage.
  1957. * tss_get: (libc)ISO C Thread-local Storage.
  1958. * tss_set: (libc)ISO C Thread-local Storage.
  1959. * ttyname: (libc)Is It a Terminal.
  1960. * ttyname_r: (libc)Is It a Terminal.
  1961. * twalk: (libc)Tree Search Function.
  1962. * twalk_r: (libc)Tree Search Function.
  1963. * tzset: (libc)Time Zone Functions.
  1964. * ufromfp: (libc)Rounding Functions.
  1965. * ufromfpf: (libc)Rounding Functions.
  1966. * ufromfpfN: (libc)Rounding Functions.
  1967. * ufromfpfNx: (libc)Rounding Functions.
  1968. * ufromfpl: (libc)Rounding Functions.
  1969. * ufromfpx: (libc)Rounding Functions.
  1970. * ufromfpxf: (libc)Rounding Functions.
  1971. * ufromfpxfN: (libc)Rounding Functions.
  1972. * ufromfpxfNx: (libc)Rounding Functions.
  1973. * ufromfpxl: (libc)Rounding Functions.
  1974. * ulimit: (libc)Limits on Resources.
  1975. * umask: (libc)Setting Permissions.
  1976. * umount2: (libc)Mount-Unmount-Remount.
  1977. * umount: (libc)Mount-Unmount-Remount.
  1978. * uname: (libc)Platform Type.
  1979. * ungetc: (libc)How Unread.
  1980. * ungetwc: (libc)How Unread.
  1981. * unlink: (libc)Deleting Files.
  1982. * unlockpt: (libc)Allocation.
  1983. * unsetenv: (libc)Environment Access.
  1984. * updwtmp: (libc)Manipulating the Database.
  1985. * utime: (libc)File Times.
  1986. * utimes: (libc)File Times.
  1987. * utmpname: (libc)Manipulating the Database.
  1988. * utmpxname: (libc)XPG Functions.
  1989. * va_arg: (libc)Argument Macros.
  1990. * va_copy: (libc)Argument Macros.
  1991. * va_end: (libc)Argument Macros.
  1992. * va_start: (libc)Argument Macros.
  1993. * valloc: (libc)Aligned Memory Blocks.
  1994. * vasprintf: (libc)Variable Arguments Output.
  1995. * verr: (libc)Error Messages.
  1996. * verrx: (libc)Error Messages.
  1997. * versionsort64: (libc)Scanning Directory Content.
  1998. * versionsort: (libc)Scanning Directory Content.
  1999. * vfork: (libc)Creating a Process.
  2000. * vfprintf: (libc)Variable Arguments Output.
  2001. * vfscanf: (libc)Variable Arguments Input.
  2002. * vfwprintf: (libc)Variable Arguments Output.
  2003. * vfwscanf: (libc)Variable Arguments Input.
  2004. * vlimit: (libc)Limits on Resources.
  2005. * vprintf: (libc)Variable Arguments Output.
  2006. * vscanf: (libc)Variable Arguments Input.
  2007. * vsnprintf: (libc)Variable Arguments Output.
  2008. * vsprintf: (libc)Variable Arguments Output.
  2009. * vsscanf: (libc)Variable Arguments Input.
  2010. * vswprintf: (libc)Variable Arguments Output.
  2011. * vswscanf: (libc)Variable Arguments Input.
  2012. * vsyslog: (libc)syslog; vsyslog.
  2013. * vwarn: (libc)Error Messages.
  2014. * vwarnx: (libc)Error Messages.
  2015. * vwprintf: (libc)Variable Arguments Output.
  2016. * vwscanf: (libc)Variable Arguments Input.
  2017. * wait3: (libc)BSD Wait Functions.
  2018. * wait4: (libc)Process Completion.
  2019. * wait: (libc)Process Completion.
  2020. * waitpid: (libc)Process Completion.
  2021. * warn: (libc)Error Messages.
  2022. * warnx: (libc)Error Messages.
  2023. * wcpcpy: (libc)Copying Strings and Arrays.
  2024. * wcpncpy: (libc)Truncating Strings.
  2025. * wcrtomb: (libc)Converting a Character.
  2026. * wcscasecmp: (libc)String/Array Comparison.
  2027. * wcscat: (libc)Concatenating Strings.
  2028. * wcschr: (libc)Search Functions.
  2029. * wcschrnul: (libc)Search Functions.
  2030. * wcscmp: (libc)String/Array Comparison.
  2031. * wcscoll: (libc)Collation Functions.
  2032. * wcscpy: (libc)Copying Strings and Arrays.
  2033. * wcscspn: (libc)Search Functions.
  2034. * wcsdup: (libc)Copying Strings and Arrays.
  2035. * wcsftime: (libc)Formatting Calendar Time.
  2036. * wcslen: (libc)String Length.
  2037. * wcsncasecmp: (libc)String/Array Comparison.
  2038. * wcsncat: (libc)Truncating Strings.
  2039. * wcsncmp: (libc)String/Array Comparison.
  2040. * wcsncpy: (libc)Truncating Strings.
  2041. * wcsnlen: (libc)String Length.
  2042. * wcsnrtombs: (libc)Converting Strings.
  2043. * wcspbrk: (libc)Search Functions.
  2044. * wcsrchr: (libc)Search Functions.
  2045. * wcsrtombs: (libc)Converting Strings.
  2046. * wcsspn: (libc)Search Functions.
  2047. * wcsstr: (libc)Search Functions.
  2048. * wcstod: (libc)Parsing of Floats.
  2049. * wcstof: (libc)Parsing of Floats.
  2050. * wcstofN: (libc)Parsing of Floats.
  2051. * wcstofNx: (libc)Parsing of Floats.
  2052. * wcstoimax: (libc)Parsing of Integers.
  2053. * wcstok: (libc)Finding Tokens in a String.
  2054. * wcstol: (libc)Parsing of Integers.
  2055. * wcstold: (libc)Parsing of Floats.
  2056. * wcstoll: (libc)Parsing of Integers.
  2057. * wcstombs: (libc)Non-reentrant String Conversion.
  2058. * wcstoq: (libc)Parsing of Integers.
  2059. * wcstoul: (libc)Parsing of Integers.
  2060. * wcstoull: (libc)Parsing of Integers.
  2061. * wcstoumax: (libc)Parsing of Integers.
  2062. * wcstouq: (libc)Parsing of Integers.
  2063. * wcswcs: (libc)Search Functions.
  2064. * wcsxfrm: (libc)Collation Functions.
  2065. * wctob: (libc)Converting a Character.
  2066. * wctomb: (libc)Non-reentrant Character Conversion.
  2067. * wctrans: (libc)Wide Character Case Conversion.
  2068. * wctype: (libc)Classification of Wide Characters.
  2069. * wmemchr: (libc)Search Functions.
  2070. * wmemcmp: (libc)String/Array Comparison.
  2071. * wmemcpy: (libc)Copying Strings and Arrays.
  2072. * wmemmove: (libc)Copying Strings and Arrays.
  2073. * wmempcpy: (libc)Copying Strings and Arrays.
  2074. * wmemset: (libc)Copying Strings and Arrays.
  2075. * wordexp: (libc)Calling Wordexp.
  2076. * wordfree: (libc)Calling Wordexp.
  2077. * wprintf: (libc)Formatted Output Functions.
  2078. * write: (libc)I/O Primitives.
  2079. * writev: (libc)Scatter-Gather.
  2080. * wscanf: (libc)Formatted Input Functions.
  2081. * y0: (libc)Special Functions.
  2082. * y0f: (libc)Special Functions.
  2083. * y0fN: (libc)Special Functions.
  2084. * y0fNx: (libc)Special Functions.
  2085. * y0l: (libc)Special Functions.
  2086. * y1: (libc)Special Functions.
  2087. * y1f: (libc)Special Functions.
  2088. * y1fN: (libc)Special Functions.
  2089. * y1fNx: (libc)Special Functions.
  2090. * y1l: (libc)Special Functions.
  2091. * yn: (libc)Special Functions.
  2092. * ynf: (libc)Special Functions.
  2093. * ynfN: (libc)Special Functions.
  2094. * ynfNx: (libc)Special Functions.
  2095. * ynl: (libc)Special Functions.
  2096. END-INFO-DIR-ENTRY
  2097. 
  2098. File: libc.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
  2099. Main Menu
  2100. *********
  2101. This is ‘The GNU C Library Reference Manual’, for version 2.33 (GNU).
  2102. Copyright © 1993–2021 Free Software Foundation, Inc.
  2103. Permission is granted to copy, distribute and/or modify this document
  2104. under the terms of the GNU Free Documentation License, Version 1.3 or
  2105. any later version published by the Free Software Foundation; with the
  2106. Invariant Sections being “Free Software Needs Free Documentation” and
  2107. “GNU Lesser General Public License”, the Front-Cover texts being “A GNU
  2108. Manual”, and with the Back-Cover Texts as in (a) below. A copy of the
  2109. license is included in the section entitled "GNU Free Documentation
  2110. License".
  2111. (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and
  2112. modify this GNU manual. Buying copies from the FSF supports it in
  2113. developing GNU and promoting software freedom.”
  2114. * Menu:
  2115. * Introduction:: Purpose of the GNU C Library.
  2116. * Error Reporting:: How library functions report errors.
  2117. * Memory:: Allocating virtual memory and controlling
  2118. paging.
  2119. * Character Handling:: Character testing and conversion functions.
  2120. * String and Array Utilities:: Utilities for copying and comparing strings
  2121. and arrays.
  2122. * Character Set Handling:: Support for extended character sets.
  2123. * Locales:: The country and language can affect the
  2124. behavior of library functions.
  2125. * Message Translation:: How to make the program speak the user’s
  2126. language.
  2127. * Searching and Sorting:: General searching and sorting functions.
  2128. * Pattern Matching:: Matching shell “globs” and regular
  2129. expressions.
  2130. * I/O Overview:: Introduction to the I/O facilities.
  2131. * I/O on Streams:: High-level, portable I/O facilities.
  2132. * Low-Level I/O:: Low-level, less portable I/O.
  2133. * File System Interface:: Functions for manipulating files.
  2134. * Pipes and FIFOs:: A simple interprocess communication
  2135. mechanism.
  2136. * Sockets:: A more complicated IPC mechanism, with
  2137. networking support.
  2138. * Low-Level Terminal Interface:: How to change the characteristics of a
  2139. terminal device.
  2140. * Syslog:: System logging and messaging.
  2141. * Mathematics:: Math functions, useful constants, random
  2142. numbers.
  2143. * Arithmetic:: Low level arithmetic functions.
  2144. * Date and Time:: Functions for getting the date and time and
  2145. formatting them nicely.
  2146. * Resource Usage And Limitation:: Functions for examining resource usage and
  2147. getting and setting limits.
  2148. * Non-Local Exits:: Jumping out of nested function calls.
  2149. * Signal Handling:: How to send, block, and handle signals.
  2150. * Program Basics:: Writing the beginning and end of your
  2151. program.
  2152. * Processes:: How to create processes and run other
  2153. programs.
  2154. * Inter-Process Communication:: All about inter-process communication.
  2155. * Job Control:: All about process groups and sessions.
  2156. * Name Service Switch:: Accessing system databases.
  2157. * Users and Groups:: How users are identified and classified.
  2158. * System Management:: Controlling the system and getting
  2159. information about it.
  2160. * System Configuration:: Parameters describing operating system
  2161. limits.
  2162. * Cryptographic Functions:: Passphrase storage and strongly
  2163. unpredictable bytes..
  2164. * Debugging Support:: Functions to help debugging applications.
  2165. * Threads:: Functions, constants, and data types for
  2166. working with threads.
  2167. * Internal Probes:: Probes to monitor libc internal behavior.
  2168. * Tunables:: Tunable switches to alter libc internal
  2169. behavior.
  2170. Appendices
  2171. * Language Features:: C language features provided by the library.
  2172. * Library Summary:: A summary showing the syntax, header file,
  2173. and derivation of each library feature.
  2174. * Installation:: How to install the GNU C Library.
  2175. * Maintenance:: How to enhance and port the GNU C Library.
  2176. * Platform:: Describe all platform-specific facilities
  2177. provided.
  2178. * Contributors:: Who wrote what parts of the GNU C Library.
  2179. * Free Manuals:: Free Software Needs Free Documentation.
  2180. * Copying:: The GNU Lesser General Public License says
  2181. how you can copy and share the GNU C Library.
  2182. * Documentation License:: This manual is under the GNU Free
  2183. Documentation License.
  2184. Indices
  2185. * Concept Index:: Index of concepts and names.
  2186. * Type Index:: Index of types and type qualifiers.
  2187. * Function Index:: Index of functions and function-like macros.
  2188. * Variable Index:: Index of variables and variable-like macros.
  2189. * File Index:: Index of programs and files.
  2190. — The Detailed Node Listing —
  2191. Introduction
  2192. * Getting Started:: What this manual is for and how to use it.
  2193. * Standards and Portability:: Standards and sources upon which the GNU
  2194. C library is based.
  2195. * Using the Library:: Some practical uses for the library.
  2196. * Roadmap to the Manual:: Overview of the remaining chapters in
  2197. this manual.
  2198. Standards and Portability
  2199. * ISO C:: The international standard for the C
  2200. programming language.
  2201. * POSIX:: The ISO/IEC 9945 (aka IEEE 1003) standards
  2202. for operating systems.
  2203. * Berkeley Unix:: BSD and SunOS.
  2204. * SVID:: The System V Interface Description.
  2205. * XPG:: The X/Open Portability Guide.
  2206. POSIX
  2207. * POSIX Safety Concepts:: Safety concepts from POSIX.
  2208. * Unsafe Features:: Features that make functions unsafe.
  2209. * Conditionally Safe Features:: Features that make functions unsafe
  2210. in the absence of workarounds.
  2211. * Other Safety Remarks:: Additional safety features and remarks.
  2212. Using the Library
  2213. * Header Files:: How to include the header files in your
  2214. programs.
  2215. * Macro Definitions:: Some functions in the library may really
  2216. be implemented as macros.
  2217. * Reserved Names:: The C standard reserves some names for
  2218. the library, and some for users.
  2219. * Feature Test Macros:: How to control what names are defined.
  2220. Error Reporting
  2221. * Checking for Errors:: How errors are reported by library functions.
  2222. * Error Codes:: Error code macros; all of these expand
  2223. into integer constant values.
  2224. * Error Messages:: Mapping error codes onto error messages.
  2225. Memory
  2226. * Memory Concepts:: An introduction to concepts and terminology.
  2227. * Memory Allocation:: Allocating storage for your program data
  2228. * Resizing the Data Segment:: ‘brk’, ‘sbrk’
  2229. * Memory Protection:: Controlling access to memory regions.
  2230. * Locking Pages:: Preventing page faults
  2231. Memory Allocation
  2232. * Memory Allocation and C:: How to get different kinds of allocation in C.
  2233. * The GNU Allocator:: An overview of the GNU ‘malloc’
  2234. implementation.
  2235. * Unconstrained Allocation:: The ‘malloc’ facility allows fully general
  2236. dynamic allocation.
  2237. * Allocation Debugging:: Finding memory leaks and not freed memory.
  2238. * Replacing malloc:: Using your own ‘malloc’-style allocator.
  2239. * Obstacks:: Obstacks are less general than malloc
  2240. but more efficient and convenient.
  2241. * Variable Size Automatic:: Allocation of variable-sized blocks
  2242. of automatic storage that are freed when the
  2243. calling function returns.
  2244. Unconstrained Allocation
  2245. * Basic Allocation:: Simple use of ‘malloc’.
  2246. * Malloc Examples:: Examples of ‘malloc’. ‘xmalloc’.
  2247. * Freeing after Malloc:: Use ‘free’ to free a block you
  2248. got with ‘malloc’.
  2249. * Changing Block Size:: Use ‘realloc’ to make a block
  2250. bigger or smaller.
  2251. * Allocating Cleared Space:: Use ‘calloc’ to allocate a
  2252. block and clear it.
  2253. * Aligned Memory Blocks:: Allocating specially aligned memory.
  2254. * Malloc Tunable Parameters:: Use ‘mallopt’ to adjust allocation
  2255. parameters.
  2256. * Heap Consistency Checking:: Automatic checking for errors.
  2257. * Hooks for Malloc:: You can use these hooks for debugging
  2258. programs that use ‘malloc’.
  2259. * Statistics of Malloc:: Getting information about how much
  2260. memory your program is using.
  2261. * Summary of Malloc:: Summary of ‘malloc’ and related functions.
  2262. Allocation Debugging
  2263. * Tracing malloc:: How to install the tracing functionality.
  2264. * Using the Memory Debugger:: Example programs excerpts.
  2265. * Tips for the Memory Debugger:: Some more or less clever ideas.
  2266. * Interpreting the traces:: What do all these lines mean?
  2267. Obstacks
  2268. * Creating Obstacks:: How to declare an obstack in your program.
  2269. * Preparing for Obstacks:: Preparations needed before you can
  2270. use obstacks.
  2271. * Allocation in an Obstack:: Allocating objects in an obstack.
  2272. * Freeing Obstack Objects:: Freeing objects in an obstack.
  2273. * Obstack Functions:: The obstack functions are both
  2274. functions and macros.
  2275. * Growing Objects:: Making an object bigger by stages.
  2276. * Extra Fast Growing:: Extra-high-efficiency (though more
  2277. complicated) growing objects.
  2278. * Status of an Obstack:: Inquiries about the status of an obstack.
  2279. * Obstacks Data Alignment:: Controlling alignment of objects in obstacks.
  2280. * Obstack Chunks:: How obstacks obtain and release chunks;
  2281. efficiency considerations.
  2282. * Summary of Obstacks::
  2283. Variable Size Automatic
  2284. * Alloca Example:: Example of using ‘alloca’.
  2285. * Advantages of Alloca:: Reasons to use ‘alloca’.
  2286. * Disadvantages of Alloca:: Reasons to avoid ‘alloca’.
  2287. * GNU C Variable-Size Arrays:: Only in GNU C, here is an alternative
  2288. method of allocating dynamically and
  2289. freeing automatically.
  2290. Locking Pages
  2291. * Why Lock Pages:: Reasons to read this section.
  2292. * Locked Memory Details:: Everything you need to know locked
  2293. memory
  2294. * Page Lock Functions:: Here’s how to do it.
  2295. Character Handling
  2296. * Classification of Characters:: Testing whether characters are
  2297. letters, digits, punctuation, etc.
  2298. * Case Conversion:: Case mapping, and the like.
  2299. * Classification of Wide Characters:: Character class determination for
  2300. wide characters.
  2301. * Using Wide Char Classes:: Notes on using the wide character
  2302. classes.
  2303. * Wide Character Case Conversion:: Mapping of wide characters.
  2304. String and Array Utilities
  2305. * Representation of Strings:: Introduction to basic concepts.
  2306. * String/Array Conventions:: Whether to use a string function or an
  2307. arbitrary array function.
  2308. * String Length:: Determining the length of a string.
  2309. * Copying Strings and Arrays:: Functions to copy strings and arrays.
  2310. * Concatenating Strings:: Functions to concatenate strings while copying.
  2311. * Truncating Strings:: Functions to truncate strings while copying.
  2312. * String/Array Comparison:: Functions for byte-wise and character-wise
  2313. comparison.
  2314. * Collation Functions:: Functions for collating strings.
  2315. * Search Functions:: Searching for a specific element or substring.
  2316. * Finding Tokens in a String:: Splitting a string into tokens by looking
  2317. for delimiters.
  2318. * Erasing Sensitive Data:: Clearing memory which contains sensitive
  2319. data, after it’s no longer needed.
  2320. * Shuffling Bytes:: Or how to flash-cook a string.
  2321. * Obfuscating Data:: Reversibly obscuring data from casual view.
  2322. * Encode Binary Data:: Encoding and Decoding of Binary Data.
  2323. * Argz and Envz Vectors:: Null-separated string vectors.
  2324. Argz and Envz Vectors
  2325. * Argz Functions:: Operations on argz vectors.
  2326. * Envz Functions:: Additional operations on environment vectors.
  2327. Character Set Handling
  2328. * Extended Char Intro:: Introduction to Extended Characters.
  2329. * Charset Function Overview:: Overview about Character Handling
  2330. Functions.
  2331. * Restartable multibyte conversion:: Restartable multibyte conversion
  2332. Functions.
  2333. * Non-reentrant Conversion:: Non-reentrant Conversion Function.
  2334. * Generic Charset Conversion:: Generic Charset Conversion.
  2335. Restartable multibyte conversion
  2336. * Selecting the Conversion:: Selecting the conversion and its properties.
  2337. * Keeping the state:: Representing the state of the conversion.
  2338. * Converting a Character:: Converting Single Characters.
  2339. * Converting Strings:: Converting Multibyte and Wide Character
  2340. Strings.
  2341. * Multibyte Conversion Example:: A Complete Multibyte Conversion Example.
  2342. Non-reentrant Conversion
  2343. * Non-reentrant Character Conversion:: Non-reentrant Conversion of Single
  2344. Characters.
  2345. * Non-reentrant String Conversion:: Non-reentrant Conversion of Strings.
  2346. * Shift State:: States in Non-reentrant Functions.
  2347. Generic Charset Conversion
  2348. * Generic Conversion Interface:: Generic Character Set Conversion Interface.
  2349. * iconv Examples:: A complete ‘iconv’ example.
  2350. * Other iconv Implementations:: Some Details about other ‘iconv’
  2351. Implementations.
  2352. * glibc iconv Implementation:: The ‘iconv’ Implementation in the GNU C
  2353. library.
  2354. Locales
  2355. * Effects of Locale:: Actions affected by the choice of
  2356. locale.
  2357. * Choosing Locale:: How the user specifies a locale.
  2358. * Locale Categories:: Different purposes for which you can
  2359. select a locale.
  2360. * Setting the Locale:: How a program specifies the locale
  2361. with library functions.
  2362. * Standard Locales:: Locale names available on all systems.
  2363. * Locale Names:: Format of system-specific locale names.
  2364. * Locale Information:: How to access the information for the locale.
  2365. * Formatting Numbers:: A dedicated function to format numbers.
  2366. * Yes-or-No Questions:: Check a Response against the locale.
  2367. Locale Information
  2368. * The Lame Way to Locale Data:: ISO C’s ‘localeconv’.
  2369. * The Elegant and Fast Way:: X/Open’s ‘nl_langinfo’.
  2370. The Lame Way to Locale Data
  2371. * General Numeric:: Parameters for formatting numbers and
  2372. currency amounts.
  2373. * Currency Symbol:: How to print the symbol that identifies an
  2374. amount of money (e.g. ‘$’).
  2375. * Sign of Money Amount:: How to print the (positive or negative) sign
  2376. for a monetary amount, if one exists.
  2377. Message Translation
  2378. * Message catalogs a la X/Open:: The ‘catgets’ family of functions.
  2379. * The Uniforum approach:: The ‘gettext’ family of functions.
  2380. Message catalogs a la X/Open
  2381. * The catgets Functions:: The ‘catgets’ function family.
  2382. * The message catalog files:: Format of the message catalog files.
  2383. * The gencat program:: How to generate message catalogs files which
  2384. can be used by the functions.
  2385. * Common Usage:: How to use the ‘catgets’ interface.
  2386. The Uniforum approach
  2387. * Message catalogs with gettext:: The ‘gettext’ family of functions.
  2388. * Helper programs for gettext:: Programs to handle message catalogs
  2389. for ‘gettext’.
  2390. Message catalogs with gettext
  2391. * Translation with gettext:: What has to be done to translate a message.
  2392. * Locating gettext catalog:: How to determine which catalog to be used.
  2393. * Advanced gettext functions:: Additional functions for more complicated
  2394. situations.
  2395. * Charset conversion in gettext:: How to specify the output character set
  2396. ‘gettext’ uses.
  2397. * GUI program problems:: How to use ‘gettext’ in GUI programs.
  2398. * Using gettextized software:: The possibilities of the user to influence
  2399. the way ‘gettext’ works.
  2400. Searching and Sorting
  2401. * Comparison Functions:: Defining how to compare two objects.
  2402. Since the sort and search facilities
  2403. are general, you have to specify the
  2404. ordering.
  2405. * Array Search Function:: The ‘bsearch’ function.
  2406. * Array Sort Function:: The ‘qsort’ function.
  2407. * Search/Sort Example:: An example program.
  2408. * Hash Search Function:: The ‘hsearch’ function.
  2409. * Tree Search Function:: The ‘tsearch’ function.
  2410. Pattern Matching
  2411. * Wildcard Matching:: Matching a wildcard pattern against a single string.
  2412. * Globbing:: Finding the files that match a wildcard pattern.
  2413. * Regular Expressions:: Matching regular expressions against strings.
  2414. * Word Expansion:: Expanding shell variables, nested commands,
  2415. arithmetic, and wildcards.
  2416. This is what the shell does with shell commands.
  2417. Globbing
  2418. * Calling Glob:: Basic use of ‘glob’.
  2419. * Flags for Globbing:: Flags that enable various options in ‘glob’.
  2420. * More Flags for Globbing:: GNU specific extensions to ‘glob’.
  2421. Regular Expressions
  2422. * POSIX Regexp Compilation:: Using ‘regcomp’ to prepare to match.
  2423. * Flags for POSIX Regexps:: Syntax variations for ‘regcomp’.
  2424. * Matching POSIX Regexps:: Using ‘regexec’ to match the compiled
  2425. pattern that you get from ‘regcomp’.
  2426. * Regexp Subexpressions:: Finding which parts of the string were matched.
  2427. * Subexpression Complications:: Find points of which parts were matched.
  2428. * Regexp Cleanup:: Freeing storage; reporting errors.
  2429. Word Expansion
  2430. * Expansion Stages:: What word expansion does to a string.
  2431. * Calling Wordexp:: How to call ‘wordexp’.
  2432. * Flags for Wordexp:: Options you can enable in ‘wordexp’.
  2433. * Wordexp Example:: A sample program that does word expansion.
  2434. * Tilde Expansion:: Details of how tilde expansion works.
  2435. * Variable Substitution:: Different types of variable substitution.
  2436. I/O Overview
  2437. * I/O Concepts:: Some basic information and terminology.
  2438. * File Names:: How to refer to a file.
  2439. I/O Concepts
  2440. * Streams and File Descriptors:: The GNU C Library provides two ways
  2441. to access the contents of files.
  2442. * File Position:: The number of bytes from the
  2443. beginning of the file.
  2444. File Names
  2445. * Directories:: Directories contain entries for files.
  2446. * File Name Resolution:: A file name specifies how to look up a file.
  2447. * File Name Errors:: Error conditions relating to file names.
  2448. * File Name Portability:: File name portability and syntax issues.
  2449. I/O on Streams
  2450. * Streams:: About the data type representing a stream.
  2451. * Standard Streams:: Streams to the standard input and output
  2452. devices are created for you.
  2453. * Opening Streams:: How to create a stream to talk to a file.
  2454. * Closing Streams:: Close a stream when you are finished with it.
  2455. * Streams and Threads:: Issues with streams in threaded programs.
  2456. * Streams and I18N:: Streams in internationalized applications.
  2457. * Simple Output:: Unformatted output by characters and lines.
  2458. * Character Input:: Unformatted input by characters and words.
  2459. * Line Input:: Reading a line or a record from a stream.
  2460. * Unreading:: Peeking ahead/pushing back input just read.
  2461. * Block Input/Output:: Input and output operations on blocks of data.
  2462. * Formatted Output:: ‘printf’ and related functions.
  2463. * Customizing Printf:: You can define new conversion specifiers for
  2464. ‘printf’ and friends.
  2465. * Formatted Input:: ‘scanf’ and related functions.
  2466. * EOF and Errors:: How you can tell if an I/O error happens.
  2467. * Error Recovery:: What you can do about errors.
  2468. * Binary Streams:: Some systems distinguish between text files
  2469. and binary files.
  2470. * File Positioning:: About random-access streams.
  2471. * Portable Positioning:: Random access on peculiar ISO C systems.
  2472. * Stream Buffering:: How to control buffering of streams.
  2473. * Other Kinds of Streams:: Streams that do not necessarily correspond
  2474. to an open file.
  2475. * Formatted Messages:: Print strictly formatted messages.
  2476. Unreading
  2477. * Unreading Idea:: An explanation of unreading with pictures.
  2478. * How Unread:: How to call ‘ungetc’ to do unreading.
  2479. Formatted Output
  2480. * Formatted Output Basics:: Some examples to get you started.
  2481. * Output Conversion Syntax:: General syntax of conversion
  2482. specifications.
  2483. * Table of Output Conversions:: Summary of output conversions and
  2484. what they do.
  2485. * Integer Conversions:: Details about formatting of integers.
  2486. * Floating-Point Conversions:: Details about formatting of
  2487. floating-point numbers.
  2488. * Other Output Conversions:: Details about formatting of strings,
  2489. characters, pointers, and the like.
  2490. * Formatted Output Functions:: Descriptions of the actual functions.
  2491. * Dynamic Output:: Functions that allocate memory for the output.
  2492. * Variable Arguments Output:: ‘vprintf’ and friends.
  2493. * Parsing a Template String:: What kinds of args does a given template
  2494. call for?
  2495. * Example of Parsing:: Sample program using ‘parse_printf_format’.
  2496. Customizing Printf
  2497. * Registering New Conversions:: Using ‘register_printf_function’
  2498. to register a new output conversion.
  2499. * Conversion Specifier Options:: The handler must be able to get
  2500. the options specified in the
  2501. template when it is called.
  2502. * Defining the Output Handler:: Defining the handler and arginfo
  2503. functions that are passed as arguments
  2504. to ‘register_printf_function’.
  2505. * Printf Extension Example:: How to define a ‘printf’
  2506. handler function.
  2507. * Predefined Printf Handlers:: Predefined ‘printf’ handlers.
  2508. Formatted Input
  2509. * Formatted Input Basics:: Some basics to get you started.
  2510. * Input Conversion Syntax:: Syntax of conversion specifications.
  2511. * Table of Input Conversions:: Summary of input conversions and what they do.
  2512. * Numeric Input Conversions:: Details of conversions for reading numbers.
  2513. * String Input Conversions:: Details of conversions for reading strings.
  2514. * Dynamic String Input:: String conversions that ‘malloc’ the buffer.
  2515. * Other Input Conversions:: Details of miscellaneous other conversions.
  2516. * Formatted Input Functions:: Descriptions of the actual functions.
  2517. * Variable Arguments Input:: ‘vscanf’ and friends.
  2518. Stream Buffering
  2519. * Buffering Concepts:: Terminology is defined here.
  2520. * Flushing Buffers:: How to ensure that output buffers are flushed.
  2521. * Controlling Buffering:: How to specify what kind of buffering to use.
  2522. Other Kinds of Streams
  2523. * String Streams:: Streams that get data from or put data in
  2524. a string or memory buffer.
  2525. * Custom Streams:: Defining your own streams with an arbitrary
  2526. input data source and/or output data sink.
  2527. Custom Streams
  2528. * Streams and Cookies:: The “cookie” records where to fetch or
  2529. store data that is read or written.
  2530. * Hook Functions:: How you should define the four “hook
  2531. functions” that a custom stream needs.
  2532. Formatted Messages
  2533. * Printing Formatted Messages:: The ‘fmtmsg’ function.
  2534. * Adding Severity Classes:: Add more severity classes.
  2535. * Example:: How to use ‘fmtmsg’ and ‘addseverity’.
  2536. Low-Level I/O
  2537. * Opening and Closing Files:: How to open and close file
  2538. descriptors.
  2539. * I/O Primitives:: Reading and writing data.
  2540. * File Position Primitive:: Setting a descriptor’s file
  2541. position.
  2542. * Descriptors and Streams:: Converting descriptor to stream
  2543. or vice-versa.
  2544. * Stream/Descriptor Precautions:: Precautions needed if you use both
  2545. descriptors and streams.
  2546. * Scatter-Gather:: Fast I/O to discontinuous buffers.
  2547. * Copying File Data:: Copying data between files.
  2548. * Memory-mapped I/O:: Using files like memory.
  2549. * Waiting for I/O:: How to check for input or output
  2550. on multiple file descriptors.
  2551. * Synchronizing I/O:: Making sure all I/O actions completed.
  2552. * Asynchronous I/O:: Perform I/O in parallel.
  2553. * Control Operations:: Various other operations on file
  2554. descriptors.
  2555. * Duplicating Descriptors:: Fcntl commands for duplicating
  2556. file descriptors.
  2557. * Descriptor Flags:: Fcntl commands for manipulating
  2558. flags associated with file
  2559. descriptors.
  2560. * File Status Flags:: Fcntl commands for manipulating
  2561. flags associated with open files.
  2562. * File Locks:: Fcntl commands for implementing
  2563. file locking.
  2564. * Open File Description Locks:: Fcntl commands for implementing
  2565. open file description locking.
  2566. * Open File Description Locks Example:: An example of open file description lock
  2567. usage
  2568. * Interrupt Input:: Getting an asynchronous signal when
  2569. input arrives.
  2570. * IOCTLs:: Generic I/O Control operations.
  2571. Stream/Descriptor Precautions
  2572. * Linked Channels:: Dealing with channels sharing a file position.
  2573. * Independent Channels:: Dealing with separately opened, unlinked channels.
  2574. * Cleaning Streams:: Cleaning a stream makes it safe to use
  2575. another channel.
  2576. Asynchronous I/O
  2577. * Asynchronous Reads/Writes:: Asynchronous Read and Write Operations.
  2578. * Status of AIO Operations:: Getting the Status of AIO Operations.
  2579. * Synchronizing AIO Operations:: Getting into a consistent state.
  2580. * Cancel AIO Operations:: Cancellation of AIO Operations.
  2581. * Configuration of AIO:: How to optimize the AIO implementation.
  2582. File Status Flags
  2583. * Access Modes:: Whether the descriptor can read or write.
  2584. * Open-time Flags:: Details of ‘open’.
  2585. * Operating Modes:: Special modes to control I/O operations.
  2586. * Getting File Status Flags:: Fetching and changing these flags.
  2587. File System Interface
  2588. * Working Directory:: This is used to resolve relative
  2589. file names.
  2590. * Accessing Directories:: Finding out what files a directory
  2591. contains.
  2592. * Working with Directory Trees:: Apply actions to all files or a selectable
  2593. subset of a directory hierarchy.
  2594. * Hard Links:: Adding alternate names to a file.
  2595. * Symbolic Links:: A file that “points to” a file name.
  2596. * Deleting Files:: How to delete a file, and what that means.
  2597. * Renaming Files:: Changing a file’s name.
  2598. * Creating Directories:: A system call just for creating a directory.
  2599. * File Attributes:: Attributes of individual files.
  2600. * Making Special Files:: How to create special files.
  2601. * Temporary Files:: Naming and creating temporary files.
  2602. Accessing Directories
  2603. * Directory Entries:: Format of one directory entry.
  2604. * Opening a Directory:: How to open a directory stream.
  2605. * Reading/Closing Directory:: How to read directory entries from the stream.
  2606. * Simple Directory Lister:: A very simple directory listing program.
  2607. * Random Access Directory:: Rereading part of the directory
  2608. already read with the same stream.
  2609. * Scanning Directory Content:: Get entries for user selected subset of
  2610. contents in given directory.
  2611. * Simple Directory Lister Mark II:: Revised version of the program.
  2612. * Low-level Directory Access:: AS-Safe functions for directory access.
  2613. File Attributes
  2614. * Attribute Meanings:: The names of the file attributes,
  2615. and what their values mean.
  2616. * Reading Attributes:: How to read the attributes of a file.
  2617. * Testing File Type:: Distinguishing ordinary files,
  2618. directories, links...
  2619. * File Owner:: How ownership for new files is determined,
  2620. and how to change it.
  2621. * Permission Bits:: How information about a file’s access
  2622. mode is stored.
  2623. * Access Permission:: How the system decides who can access a file.
  2624. * Setting Permissions:: How permissions for new files are assigned,
  2625. and how to change them.
  2626. * Testing File Access:: How to find out if your process can
  2627. access a file.
  2628. * File Times:: About the time attributes of a file.
  2629. * File Size:: Manually changing the size of a file.
  2630. * Storage Allocation:: Allocate backing storage for files.
  2631. Pipes and FIFOs
  2632. * Creating a Pipe:: Making a pipe with the ‘pipe’ function.
  2633. * Pipe to a Subprocess:: Using a pipe to communicate with a
  2634. child process.
  2635. * FIFO Special Files:: Making a FIFO special file.
  2636. * Pipe Atomicity:: When pipe (or FIFO) I/O is atomic.
  2637. Sockets
  2638. * Socket Concepts:: Basic concepts you need to know about.
  2639. * Communication Styles::Stream communication, datagrams and other styles.
  2640. * Socket Addresses:: How socket names (“addresses”) work.
  2641. * Interface Naming:: Identifying specific network interfaces.
  2642. * Local Namespace:: Details about the local namespace.
  2643. * Internet Namespace:: Details about the Internet namespace.
  2644. * Misc Namespaces:: Other namespaces not documented fully here.
  2645. * Open/Close Sockets:: Creating sockets and destroying them.
  2646. * Connections:: Operations on sockets with connection state.
  2647. * Datagrams:: Operations on datagram sockets.
  2648. * Inetd:: Inetd is a daemon that starts servers on request.
  2649. The most convenient way to write a server
  2650. is to make it work with Inetd.
  2651. * Socket Options:: Miscellaneous low-level socket options.
  2652. * Networks Database:: Accessing the database of network names.
  2653. Socket Addresses
  2654. * Address Formats:: About ‘struct sockaddr’.
  2655. * Setting Address:: Binding an address to a socket.
  2656. * Reading Address:: Reading the address of a socket.
  2657. Local Namespace
  2658. * Concepts: Local Namespace Concepts. What you need to understand.
  2659. * Details: Local Namespace Details. Address format, symbolic names, etc.
  2660. * Example: Local Socket Example. Example of creating a socket.
  2661. Internet Namespace
  2662. * Internet Address Formats:: How socket addresses are specified in the
  2663. Internet namespace.
  2664. * Host Addresses:: All about host addresses of Internet host.
  2665. * Ports:: Internet port numbers.
  2666. * Services Database:: Ports may have symbolic names.
  2667. * Byte Order:: Different hosts may use different byte
  2668. ordering conventions; you need to
  2669. canonicalize host address and port number.
  2670. * Protocols Database:: Referring to protocols by name.
  2671. * Inet Example:: Putting it all together.
  2672. Host Addresses
  2673. * Abstract Host Addresses:: What a host number consists of.
  2674. * Data type: Host Address Data Type. Data type for a host number.
  2675. * Functions: Host Address Functions. Functions to operate on them.
  2676. * Names: Host Names. Translating host names to host numbers.
  2677. Open/Close Sockets
  2678. * Creating a Socket:: How to open a socket.
  2679. * Closing a Socket:: How to close a socket.
  2680. * Socket Pairs:: These are created like pipes.
  2681. Connections
  2682. * Connecting:: What the client program must do.
  2683. * Listening:: How a server program waits for requests.
  2684. * Accepting Connections:: What the server does when it gets a request.
  2685. * Who is Connected:: Getting the address of the
  2686. other side of a connection.
  2687. * Transferring Data:: How to send and receive data.
  2688. * Byte Stream Example:: An example program: a client for communicating
  2689. over a byte stream socket in the Internet namespace.
  2690. * Server Example:: A corresponding server program.
  2691. * Out-of-Band Data:: This is an advanced feature.
  2692. Transferring Data
  2693. * Sending Data:: Sending data with ‘send’.
  2694. * Receiving Data:: Reading data with ‘recv’.
  2695. * Socket Data Options:: Using ‘send’ and ‘recv’.
  2696. Datagrams
  2697. * Sending Datagrams:: Sending packets on a datagram socket.
  2698. * Receiving Datagrams:: Receiving packets on a datagram socket.
  2699. * Datagram Example:: An example program: packets sent over a
  2700. datagram socket in the local namespace.
  2701. * Example Receiver:: Another program, that receives those packets.
  2702. Inetd
  2703. * Inetd Servers::
  2704. * Configuring Inetd::
  2705. Socket Options
  2706. * Socket Option Functions:: The basic functions for setting and getting
  2707. socket options.
  2708. * Socket-Level Options:: Details of the options at the socket level.
  2709. Low-Level Terminal Interface
  2710. * Is It a Terminal:: How to determine if a file is a terminal
  2711. device, and what its name is.
  2712. * I/O Queues:: About flow control and typeahead.
  2713. * Canonical or Not:: Two basic styles of input processing.
  2714. * Terminal Modes:: How to examine and modify flags controlling
  2715. details of terminal I/O: echoing,
  2716. signals, editing. Posix.
  2717. * BSD Terminal Modes:: BSD compatible terminal mode setting
  2718. * Line Control:: Sending break sequences, clearing
  2719. terminal buffers ...
  2720. * Noncanon Example:: How to read single characters without echo.
  2721. * getpass:: Prompting the user for a passphrase.
  2722. * Pseudo-Terminals:: How to open a pseudo-terminal.
  2723. Terminal Modes
  2724. * Mode Data Types:: The data type ‘struct termios’ and
  2725. related types.
  2726. * Mode Functions:: Functions to read and set the terminal
  2727. attributes.
  2728. * Setting Modes:: The right way to set terminal attributes
  2729. reliably.
  2730. * Input Modes:: Flags controlling low-level input handling.
  2731. * Output Modes:: Flags controlling low-level output handling.
  2732. * Control Modes:: Flags controlling serial port behavior.
  2733. * Local Modes:: Flags controlling high-level input handling.
  2734. * Line Speed:: How to read and set the terminal line speed.
  2735. * Special Characters:: Characters that have special effects,
  2736. and how to change them.
  2737. * Noncanonical Input:: Controlling how long to wait for input.
  2738. Special Characters
  2739. * Editing Characters:: Special characters that terminate lines and
  2740. delete text, and other editing functions.
  2741. * Signal Characters:: Special characters that send or raise signals
  2742. to or for certain classes of processes.
  2743. * Start/Stop Characters:: Special characters that suspend or resume
  2744. suspended output.
  2745. * Other Special:: Other special characters for BSD systems:
  2746. they can discard output, and print status.
  2747. Pseudo-Terminals
  2748. * Allocation:: Allocating a pseudo terminal.
  2749. * Pseudo-Terminal Pairs:: How to open both sides of a
  2750. pseudo-terminal in a single operation.
  2751. Syslog
  2752. * Overview of Syslog:: Overview of a system’s Syslog facility
  2753. * Submitting Syslog Messages:: Functions to submit messages to Syslog
  2754. Submitting Syslog Messages
  2755. * openlog:: Open connection to Syslog
  2756. * syslog; vsyslog:: Submit message to Syslog
  2757. * closelog:: Close connection to Syslog
  2758. * setlogmask:: Cause certain messages to be ignored
  2759. * Syslog Example:: Example of all of the above
  2760. Mathematics
  2761. * Mathematical Constants:: Precise numeric values for often-used
  2762. constants.
  2763. * Trig Functions:: Sine, cosine, tangent, and friends.
  2764. * Inverse Trig Functions:: Arcsine, arccosine, etc.
  2765. * Exponents and Logarithms:: Also pow and sqrt.
  2766. * Hyperbolic Functions:: sinh, cosh, tanh, etc.
  2767. * Special Functions:: Bessel, gamma, erf.
  2768. * Errors in Math Functions:: Known Maximum Errors in Math Functions.
  2769. * Pseudo-Random Numbers:: Functions for generating pseudo-random
  2770. numbers.
  2771. * FP Function Optimizations:: Fast code or small code.
  2772. Pseudo-Random Numbers
  2773. * ISO Random:: ‘rand’ and friends.
  2774. * BSD Random:: ‘random’ and friends.
  2775. * SVID Random:: ‘drand48’ and friends.
  2776. Arithmetic
  2777. * Integers:: Basic integer types and concepts
  2778. * Integer Division:: Integer division with guaranteed rounding.
  2779. * Floating Point Numbers:: Basic concepts. IEEE 754.
  2780. * Floating Point Classes:: The five kinds of floating-point number.
  2781. * Floating Point Errors:: When something goes wrong in a calculation.
  2782. * Rounding:: Controlling how results are rounded.
  2783. * Control Functions:: Saving and restoring the FPU’s state.
  2784. * Arithmetic Functions:: Fundamental operations provided by the library.
  2785. * Complex Numbers:: The types. Writing complex constants.
  2786. * Operations on Complex:: Projection, conjugation, decomposition.
  2787. * Parsing of Numbers:: Converting strings to numbers.
  2788. * Printing of Floats:: Converting floating-point numbers to strings.
  2789. * System V Number Conversion:: An archaic way to convert numbers to strings.
  2790. Floating Point Errors
  2791. * FP Exceptions:: IEEE 754 math exceptions and how to detect them.
  2792. * Infinity and NaN:: Special values returned by calculations.
  2793. * Status bit operations:: Checking for exceptions after the fact.
  2794. * Math Error Reporting:: How the math functions report errors.
  2795. Arithmetic Functions
  2796. * Absolute Value:: Absolute values of integers and floats.
  2797. * Normalization Functions:: Extracting exponents and putting them back.
  2798. * Rounding Functions:: Rounding floats to integers.
  2799. * Remainder Functions:: Remainders on division, precisely defined.
  2800. * FP Bit Twiddling:: Sign bit adjustment. Adding epsilon.
  2801. * FP Comparison Functions:: Comparisons without risk of exceptions.
  2802. * Misc FP Arithmetic:: Max, min, positive difference, multiply-add.
  2803. Parsing of Numbers
  2804. * Parsing of Integers:: Functions for conversion of integer values.
  2805. * Parsing of Floats:: Functions for conversion of floating-point
  2806. values.
  2807. Date and Time
  2808. * Time Basics:: Concepts and definitions.
  2809. * Time Types:: Data types to represent time.
  2810. * Calculating Elapsed Time:: How to calculate the length of an interval.
  2811. * Processor And CPU Time:: Time a program has spent executing.
  2812. * Calendar Time:: Manipulation of “real” dates and times.
  2813. * Setting an Alarm:: Sending a signal after a specified time.
  2814. * Sleeping:: Waiting for a period of time.
  2815. Processor And CPU Time
  2816. * CPU Time:: The ‘clock’ function.
  2817. * Processor Time:: The ‘times’ function.
  2818. Calendar Time
  2819. * Getting the Time:: Functions for finding out what time it is.
  2820. * Setting and Adjusting the Time::
  2821. Functions for setting and adjusting
  2822. the system clock.
  2823. * Broken-down Time:: Facilities for manipulating local time.
  2824. * Formatting Calendar Time:: Converting times to strings.
  2825. * Parsing Date and Time:: Convert textual time and date information back
  2826. into broken-down time values.
  2827. * TZ Variable:: How users specify the time zone.
  2828. * Time Zone Functions:: Functions to examine or specify the time zone.
  2829. * Time Functions Example:: An example program showing use of some of
  2830. the time functions.
  2831. Parsing Date and Time
  2832. * Low-Level Time String Parsing:: Interpret string according to given format.
  2833. * General Time String Parsing:: User-friendly function to parse data and
  2834. time strings.
  2835. Resource Usage And Limitation
  2836. * Resource Usage:: Measuring various resources used.
  2837. * Limits on Resources:: Specifying limits on resource usage.
  2838. * Priority:: Reading or setting process run priority.
  2839. * Memory Resources:: Querying memory available resources.
  2840. * Processor Resources:: Learn about the processors available.
  2841. Priority
  2842. * Absolute Priority:: The first tier of priority. Posix
  2843. * Realtime Scheduling:: Scheduling among the process nobility
  2844. * Basic Scheduling Functions:: Get/set scheduling policy, priority
  2845. * Traditional Scheduling:: Scheduling among the vulgar masses
  2846. * CPU Affinity:: Limiting execution to certain CPUs
  2847. Traditional Scheduling
  2848. * Traditional Scheduling Intro::
  2849. * Traditional Scheduling Functions::
  2850. Memory Resources
  2851. * Memory Subsystem:: Overview about traditional Unix memory handling.
  2852. * Query Memory Parameters:: How to get information about the memory
  2853. subsystem?
  2854. Non-Local Exits
  2855. * Intro: Non-Local Intro. When and how to use these facilities.
  2856. * Details: Non-Local Details. Functions for non-local exits.
  2857. * Non-Local Exits and Signals:: Portability issues.
  2858. * System V contexts:: Complete context control a la System V.
  2859. Signal Handling
  2860. * Concepts of Signals:: Introduction to the signal facilities.
  2861. * Standard Signals:: Particular kinds of signals with
  2862. standard names and meanings.
  2863. * Signal Actions:: Specifying what happens when a
  2864. particular signal is delivered.
  2865. * Defining Handlers:: How to write a signal handler function.
  2866. * Interrupted Primitives:: Signal handlers affect use of ‘open’,
  2867. ‘read’, ‘write’ and other functions.
  2868. * Generating Signals:: How to send a signal to a process.
  2869. * Blocking Signals:: Making the system hold signals temporarily.
  2870. * Waiting for a Signal:: Suspending your program until a signal
  2871. arrives.
  2872. * Signal Stack:: Using a Separate Signal Stack.
  2873. * BSD Signal Handling:: Additional functions for backward
  2874. compatibility with BSD.
  2875. Concepts of Signals
  2876. * Kinds of Signals:: Some examples of what can cause a signal.
  2877. * Signal Generation:: Concepts of why and how signals occur.
  2878. * Delivery of Signal:: Concepts of what a signal does to the
  2879. process.
  2880. Standard Signals
  2881. * Program Error Signals:: Used to report serious program errors.
  2882. * Termination Signals:: Used to interrupt and/or terminate the
  2883. program.
  2884. * Alarm Signals:: Used to indicate expiration of timers.
  2885. * Asynchronous I/O Signals:: Used to indicate input is available.
  2886. * Job Control Signals:: Signals used to support job control.
  2887. * Operation Error Signals:: Used to report operational system errors.
  2888. * Miscellaneous Signals:: Miscellaneous Signals.
  2889. * Signal Messages:: Printing a message describing a signal.
  2890. Signal Actions
  2891. * Basic Signal Handling:: The simple ‘signal’ function.
  2892. * Advanced Signal Handling:: The more powerful ‘sigaction’ function.
  2893. * Signal and Sigaction:: How those two functions interact.
  2894. * Sigaction Function Example:: An example of using the sigaction function.
  2895. * Flags for Sigaction:: Specifying options for signal handling.
  2896. * Initial Signal Actions:: How programs inherit signal actions.
  2897. Defining Handlers
  2898. * Handler Returns:: Handlers that return normally, and what
  2899. this means.
  2900. * Termination in Handler:: How handler functions terminate a program.
  2901. * Longjmp in Handler:: Nonlocal transfer of control out of a
  2902. signal handler.
  2903. * Signals in Handler:: What happens when signals arrive while
  2904. the handler is already occupied.
  2905. * Merged Signals:: When a second signal arrives before the
  2906. first is handled.
  2907. * Nonreentrancy:: Do not call any functions unless you know they
  2908. are reentrant with respect to signals.
  2909. * Atomic Data Access:: A single handler can run in the middle of
  2910. reading or writing a single object.
  2911. Atomic Data Access
  2912. * Non-atomic Example:: A program illustrating interrupted access.
  2913. * Types: Atomic Types. Data types that guarantee no interruption.
  2914. * Usage: Atomic Usage. Proving that interruption is harmless.
  2915. Generating Signals
  2916. * Signaling Yourself:: A process can send a signal to itself.
  2917. * Signaling Another Process:: Send a signal to another process.
  2918. * Permission for kill:: Permission for using ‘kill’.
  2919. * Kill Example:: Using ‘kill’ for Communication.
  2920. Blocking Signals
  2921. * Why Block:: The purpose of blocking signals.
  2922. * Signal Sets:: How to specify which signals to
  2923. block.
  2924. * Process Signal Mask:: Blocking delivery of signals to your
  2925. process during normal execution.
  2926. * Testing for Delivery:: Blocking to Test for Delivery of
  2927. a Signal.
  2928. * Blocking for Handler:: Blocking additional signals while a
  2929. handler is being run.
  2930. * Checking for Pending Signals:: Checking for Pending Signals
  2931. * Remembering a Signal:: How you can get almost the same
  2932. effect as blocking a signal, by
  2933. handling it and setting a flag
  2934. to be tested later.
  2935. Waiting for a Signal
  2936. * Using Pause:: The simple way, using ‘pause’.
  2937. * Pause Problems:: Why the simple way is often not very good.
  2938. * Sigsuspend:: Reliably waiting for a specific signal.
  2939. Program Basics
  2940. * Program Arguments:: Parsing your program’s command-line arguments
  2941. * Environment Variables:: Less direct parameters affecting your program
  2942. * Auxiliary Vector:: Least direct parameters affecting your program
  2943. * System Calls:: Requesting service from the system
  2944. * Program Termination:: Telling the system you’re done; return status
  2945. Program Arguments
  2946. * Argument Syntax:: By convention, options start with a hyphen.
  2947. * Parsing Program Arguments:: Ways to parse program options and arguments.
  2948. Parsing Program Arguments
  2949. * Getopt:: Parsing program options using ‘getopt’.
  2950. * Argp:: Parsing program options using ‘argp_parse’.
  2951. * Suboptions:: Some programs need more detailed options.
  2952. * Suboptions Example:: This shows how it could be done for ‘mount’.
  2953. Environment Variables
  2954. * Environment Access:: How to get and set the values of
  2955. environment variables.
  2956. * Standard Environment:: These environment variables have
  2957. standard interpretations.
  2958. Program Termination
  2959. * Normal Termination:: If a program calls ‘exit’, a
  2960. process terminates normally.
  2961. * Exit Status:: The ‘exit status’ provides information
  2962. about why the process terminated.
  2963. * Cleanups on Exit:: A process can run its own cleanup
  2964. functions upon normal termination.
  2965. * Aborting a Program:: The ‘abort’ function causes
  2966. abnormal program termination.
  2967. * Termination Internals:: What happens when a process terminates.
  2968. Processes
  2969. * Running a Command:: The easy way to run another program.
  2970. * Process Creation Concepts:: An overview of the hard way to do it.
  2971. * Process Identification:: How to get the process ID of a process.
  2972. * Creating a Process:: How to fork a child process.
  2973. * Executing a File:: How to make a process execute another program.
  2974. * Process Completion:: How to tell when a child process has completed.
  2975. * Process Completion Status:: How to interpret the status value
  2976. returned from a child process.
  2977. * BSD Wait Functions:: More functions, for backward compatibility.
  2978. * Process Creation Example:: A complete example program.
  2979. Inter-Process Communication
  2980. * Semaphores:: Support for creating and managing semaphores
  2981. Job Control
  2982. * Concepts of Job Control:: Jobs can be controlled by a shell.
  2983. * Controlling Terminal:: How a process gets its controlling terminal.
  2984. * Access to the Terminal:: How processes share the controlling terminal.
  2985. * Orphaned Process Groups:: Jobs left after the user logs out.
  2986. * Implementing a Shell:: What a shell must do to implement job control.
  2987. * Functions for Job Control:: Functions to control process groups.
  2988. Implementing a Shell
  2989. * Data Structures:: Introduction to the sample shell.
  2990. * Initializing the Shell:: What the shell must do to take
  2991. responsibility for job control.
  2992. * Launching Jobs:: Creating jobs to execute commands.
  2993. * Foreground and Background:: Putting a job in foreground of background.
  2994. * Stopped and Terminated Jobs:: Reporting job status.
  2995. * Continuing Stopped Jobs:: How to continue a stopped job in
  2996. the foreground or background.
  2997. * Missing Pieces:: Other parts of the shell.
  2998. Functions for Job Control
  2999. * Identifying the Terminal:: Determining the controlling terminal’s name.
  3000. * Process Group Functions:: Functions for manipulating process groups.
  3001. * Terminal Access Functions:: Functions for controlling terminal access.
  3002. Name Service Switch
  3003. * NSS Basics:: What is this NSS good for.
  3004. * NSS Configuration File:: Configuring NSS.
  3005. * NSS Module Internals:: How does it work internally.
  3006. * Extending NSS:: What to do to add services or databases.
  3007. NSS Configuration File
  3008. * Services in the NSS configuration:: Service names in the NSS configuration.
  3009. * Actions in the NSS configuration:: React appropriately to the lookup result.
  3010. * Notes on NSS Configuration File:: Things to take care about while
  3011. configuring NSS.
  3012. NSS Module Internals
  3013. * NSS Module Names:: Construction of the interface function of
  3014. the NSS modules.
  3015. * NSS Modules Interface:: Programming interface in the NSS module
  3016. functions.
  3017. Extending NSS
  3018. * Adding another Service to NSS:: What is to do to add a new service.
  3019. * NSS Module Function Internals:: Guidelines for writing new NSS
  3020. service functions.
  3021. Users and Groups
  3022. * User and Group IDs:: Each user has a unique numeric ID;
  3023. likewise for groups.
  3024. * Process Persona:: The user IDs and group IDs of a process.
  3025. * Why Change Persona:: Why a program might need to change
  3026. its user and/or group IDs.
  3027. * How Change Persona:: Changing the user and group IDs.
  3028. * Reading Persona:: How to examine the user and group IDs.
  3029. * Setting User ID:: Functions for setting the user ID.
  3030. * Setting Groups:: Functions for setting the group IDs.
  3031. * Enable/Disable Setuid:: Turning setuid access on and off.
  3032. * Setuid Program Example:: The pertinent parts of one sample program.
  3033. * Tips for Setuid:: How to avoid granting unlimited access.
  3034. * Who Logged In:: Getting the name of the user who logged in,
  3035. or of the real user ID of the current process.
  3036. * User Accounting Database:: Keeping information about users and various
  3037. actions in databases.
  3038. * User Database:: Functions and data structures for
  3039. accessing the user database.
  3040. * Group Database:: Functions and data structures for
  3041. accessing the group database.
  3042. * Database Example:: Example program showing the use of database
  3043. inquiry functions.
  3044. * Netgroup Database:: Functions for accessing the netgroup database.
  3045. User Accounting Database
  3046. * Manipulating the Database:: Scanning and modifying the user
  3047. accounting database.
  3048. * XPG Functions:: A standardized way for doing the same thing.
  3049. * Logging In and Out:: Functions from BSD that modify the user
  3050. accounting database.
  3051. User Database
  3052. * User Data Structure:: What each user record contains.
  3053. * Lookup User:: How to look for a particular user.
  3054. * Scanning All Users:: Scanning the list of all users, one by one.
  3055. * Writing a User Entry:: How a program can rewrite a user’s record.
  3056. Group Database
  3057. * Group Data Structure:: What each group record contains.
  3058. * Lookup Group:: How to look for a particular group.
  3059. * Scanning All Groups:: Scanning the list of all groups.
  3060. Netgroup Database
  3061. * Netgroup Data:: Data in the Netgroup database and where
  3062. it comes from.
  3063. * Lookup Netgroup:: How to look for a particular netgroup.
  3064. * Netgroup Membership:: How to test for netgroup membership.
  3065. System Management
  3066. * Host Identification:: Determining the name of the machine.
  3067. * Platform Type:: Determining operating system and basic
  3068. machine type
  3069. * Filesystem Handling:: Controlling/querying mounts
  3070. Filesystem Handling
  3071. * Mount Information:: What is or could be mounted?
  3072. * Mount-Unmount-Remount:: Controlling what is mounted and how
  3073. Mount Information
  3074. * fstab:: The ‘fstab’ file
  3075. * mtab:: The ‘mtab’ file
  3076. * Other Mount Information:: Other (non-libc) sources of mount information
  3077. System Configuration
  3078. * General Limits:: Constants and functions that describe
  3079. various process-related limits that have
  3080. one uniform value for any given machine.
  3081. * System Options:: Optional POSIX features.
  3082. * Version Supported:: Version numbers of POSIX.1 and POSIX.2.
  3083. * Sysconf:: Getting specific configuration values
  3084. of general limits and system options.
  3085. * Minimums:: Minimum values for general limits.
  3086. * Limits for Files:: Size limitations that pertain to individual files.
  3087. These can vary between file systems
  3088. or even from file to file.
  3089. * Options for Files:: Optional features that some files may support.
  3090. * File Minimums:: Minimum values for file limits.
  3091. * Pathconf:: Getting the limit values for a particular file.
  3092. * Utility Limits:: Capacity limits of some POSIX.2 utility programs.
  3093. * Utility Minimums:: Minimum allowable values of those limits.
  3094. * String Parameters:: Getting the default search path.
  3095. Sysconf
  3096. * Sysconf Definition:: Detailed specifications of ‘sysconf’.
  3097. * Constants for Sysconf:: The list of parameters ‘sysconf’ can read.
  3098. * Examples of Sysconf:: How to use ‘sysconf’ and the parameter
  3099. macros properly together.
  3100. Cryptographic Functions
  3101. * Passphrase Storage:: One-way hashing for passphrases.
  3102. * Unpredictable Bytes:: Randomness for cryptographic purposes.
  3103. Debugging Support
  3104. * Backtraces:: Obtaining and printing a back trace of the
  3105. current stack.
  3106. Threads
  3107. * ISO C Threads:: Threads based on the ISO C specification.
  3108. * POSIX Threads:: Threads based on the POSIX specification.
  3109. ISO C Threads
  3110. * ISO C Threads Return Values:: Symbolic constants that represent a
  3111. function’s return value.
  3112. * ISO C Thread Management:: Support for basic threading.
  3113. * Call Once:: Single-call functions and macros.
  3114. * ISO C Mutexes:: A low-level mechanism for mutual exclusion.
  3115. * ISO C Condition Variables:: High-level objects for thread synchronization.
  3116. * ISO C Thread-local Storage:: Functions to support thread-local storage.
  3117. POSIX Threads
  3118. * Thread-specific Data:: Support for creating and
  3119. managing thread-specific data
  3120. * Non-POSIX Extensions:: Additional functions to extend
  3121. POSIX Thread functionality
  3122. Non-POSIX Extensions
  3123. * Default Thread Attributes:: Setting default attributes for
  3124. threads in a process.
  3125. * Initial Thread Signal Mask:: Setting the initial mask of threads.
  3126. * Waiting with Explicit Clocks:: Functions for waiting with an
  3127. explicit clock specification.
  3128. * Single-Threaded:: Detecting single-threaded execution.
  3129. Internal Probes
  3130. * Memory Allocation Probes:: Probes in the memory allocation subsystem
  3131. * Mathematical Function Probes:: Probes in mathematical functions
  3132. * Non-local Goto Probes:: Probes in setjmp and longjmp
  3133. Tunables
  3134. * Tunable names:: The structure of a tunable name
  3135. * Memory Allocation Tunables:: Tunables in the memory allocation subsystem
  3136. * Dynamic Linking Tunables:: Tunables in the dynamic linking subsystem
  3137. * Elision Tunables:: Tunables in elision subsystem
  3138. * POSIX Thread Tunables:: Tunables in the POSIX thread subsystem
  3139. * Hardware Capability Tunables:: Tunables that modify the hardware
  3140. capabilities seen by the GNU C Library
  3141. * Memory Related Tunables:: Tunables that control the use of memory by
  3142. the GNU C Library.
  3143. Language Features
  3144. * Consistency Checking:: Using ‘assert’ to abort if
  3145. something “impossible” happens.
  3146. * Variadic Functions:: Defining functions with varying numbers
  3147. of args.
  3148. * Null Pointer Constant:: The macro ‘NULL’.
  3149. * Important Data Types:: Data types for object sizes.
  3150. * Data Type Measurements:: Parameters of data type representations.
  3151. Variadic Functions
  3152. * Why Variadic:: Reasons for making functions take
  3153. variable arguments.
  3154. * How Variadic:: How to define and call variadic functions.
  3155. * Variadic Example:: A complete example.
  3156. How Variadic
  3157. * Variadic Prototypes:: How to make a prototype for a function
  3158. with variable arguments.
  3159. * Receiving Arguments:: Steps you must follow to access the
  3160. optional argument values.
  3161. * How Many Arguments:: How to decide whether there are more arguments.
  3162. * Calling Variadics:: Things you need to know about calling
  3163. variable arguments functions.
  3164. * Argument Macros:: Detailed specification of the macros
  3165. for accessing variable arguments.
  3166. Data Type Measurements
  3167. * Width of Type:: How many bits does an integer type hold?
  3168. * Range of Type:: What are the largest and smallest values
  3169. that an integer type can hold?
  3170. * Floating Type Macros:: Parameters that measure the floating point types.
  3171. * Structure Measurement:: Getting measurements on structure types.
  3172. Floating Type Macros
  3173. * Floating Point Concepts:: Definitions of terminology.
  3174. * Floating Point Parameters:: Details of specific macros.
  3175. * IEEE Floating Point:: The measurements for one common
  3176. representation.
  3177. Installation
  3178. * Configuring and compiling:: How to compile and test GNU libc.
  3179. * Running make install:: How to install it once you’ve got it
  3180. compiled.
  3181. * Tools for Compilation:: You’ll need these first.
  3182. * Linux:: Specific advice for GNU/Linux systems.
  3183. * Reporting Bugs:: So they’ll get fixed.
  3184. Maintenance
  3185. * Source Layout:: How to add new functions or header files
  3186. to the GNU C Library.
  3187. * Symbol handling:: How to handle symbols in the GNU C Library.
  3188. * Porting:: How to port the GNU C Library to
  3189. a new machine or operating system.
  3190. Source Layout
  3191. * Platform: Adding Platform-specific. Adding platform-specific
  3192. features.
  3193. Symbol handling
  3194. * 64-bit time symbol handling :: How to handle 64-bit time related
  3195. symbols in the GNU C Library.
  3196. Porting
  3197. * Hierarchy Conventions:: The layout of the ‘sysdeps’ hierarchy.
  3198. * Porting to Unix:: Porting the library to an average
  3199. Unix-like system.
  3200. Platform
  3201. * PowerPC:: Facilities Specific to the PowerPC Architecture
  3202. * RISC-V:: Facilities Specific to the RISC-V Architecture
  3203. * X86:: Facilities Specific to the X86 Architecture
  3204. 
  3205. File: libc.info, Node: Introduction, Next: Error Reporting, Prev: Top, Up: Top
  3206. 1 Introduction
  3207. **************
  3208. The C language provides no built-in facilities for performing such
  3209. common operations as input/output, memory management, string
  3210. manipulation, and the like. Instead, these facilities are defined in a
  3211. standard “library”, which you compile and link with your programs.
  3212. The GNU C Library, described in this document, defines all of the
  3213. library functions that are specified by the ISO C standard, as well as
  3214. additional features specific to POSIX and other derivatives of the Unix
  3215. operating system, and extensions specific to GNU systems.
  3216. The purpose of this manual is to tell you how to use the facilities
  3217. of the GNU C Library. We have mentioned which features belong to which
  3218. standards to help you identify things that are potentially non-portable
  3219. to other systems. But the emphasis in this manual is not on strict
  3220. portability.
  3221. * Menu:
  3222. * Getting Started:: What this manual is for and how to use it.
  3223. * Standards and Portability:: Standards and sources upon which the GNU
  3224. C library is based.
  3225. * Using the Library:: Some practical uses for the library.
  3226. * Roadmap to the Manual:: Overview of the remaining chapters in
  3227. this manual.
  3228. 
  3229. File: libc.info, Node: Getting Started, Next: Standards and Portability, Up: Introduction
  3230. 1.1 Getting Started
  3231. ===================
  3232. This manual is written with the assumption that you are at least
  3233. somewhat familiar with the C programming language and basic programming
  3234. concepts. Specifically, familiarity with ISO standard C (*note ISO
  3235. C::), rather than “traditional” pre-ISO C dialects, is assumed.
  3236. The GNU C Library includes several “header files”, each of which
  3237. provides definitions and declarations for a group of related facilities;
  3238. this information is used by the C compiler when processing your program.
  3239. For example, the header file ‘stdio.h’ declares facilities for
  3240. performing input and output, and the header file ‘string.h’ declares
  3241. string processing utilities. The organization of this manual generally
  3242. follows the same division as the header files.
  3243. If you are reading this manual for the first time, you should read
  3244. all of the introductory material and skim the remaining chapters. There
  3245. are a _lot_ of functions in the GNU C Library and it’s not realistic to
  3246. expect that you will be able to remember exactly _how_ to use each and
  3247. every one of them. It’s more important to become generally familiar
  3248. with the kinds of facilities that the library provides, so that when you
  3249. are writing your programs you can recognize _when_ to make use of
  3250. library functions, and _where_ in this manual you can find more specific
  3251. information about them.
  3252. 
  3253. File: libc.info, Node: Standards and Portability, Next: Using the Library, Prev: Getting Started, Up: Introduction
  3254. 1.2 Standards and Portability
  3255. =============================
  3256. This section discusses the various standards and other sources that the
  3257. GNU C Library is based upon. These sources include the ISO C and POSIX
  3258. standards, and the System V and Berkeley Unix implementations.
  3259. The primary focus of this manual is to tell you how to make effective
  3260. use of the GNU C Library facilities. But if you are concerned about
  3261. making your programs compatible with these standards, or portable to
  3262. operating systems other than GNU, this can affect how you use the
  3263. library. This section gives you an overview of these standards, so that
  3264. you will know what they are when they are mentioned in other parts of
  3265. the manual.
  3266. *Note Library Summary::, for an alphabetical list of the functions
  3267. and other symbols provided by the library. This list also states which
  3268. standards each function or symbol comes from.
  3269. * Menu:
  3270. * ISO C:: The international standard for the C
  3271. programming language.
  3272. * POSIX:: The ISO/IEC 9945 (aka IEEE 1003) standards
  3273. for operating systems.
  3274. * Berkeley Unix:: BSD and SunOS.
  3275. * SVID:: The System V Interface Description.
  3276. * XPG:: The X/Open Portability Guide.
  3277. 
  3278. File: libc.info, Node: ISO C, Next: POSIX, Up: Standards and Portability
  3279. 1.2.1 ISO C
  3280. -----------
  3281. The GNU C Library is compatible with the C standard adopted by the
  3282. American National Standards Institute (ANSI): ‘American National
  3283. Standard X3.159-1989—“ANSI C”’ and later by the International
  3284. Standardization Organization (ISO): ‘ISO/IEC 9899:1990, “Programming
  3285. languages—C”’. We here refer to the standard as ISO C since this is the
  3286. more general standard in respect of ratification. The header files and
  3287. library facilities that make up the GNU C Library are a superset of
  3288. those specified by the ISO C standard.
  3289. If you are concerned about strict adherence to the ISO C standard,
  3290. you should use the ‘-ansi’ option when you compile your programs with
  3291. the GNU C compiler. This tells the compiler to define _only_ ISO
  3292. standard features from the library header files, unless you explicitly
  3293. ask for additional features. *Note Feature Test Macros::, for
  3294. information on how to do this.
  3295. Being able to restrict the library to include only ISO C features is
  3296. important because ISO C puts limitations on what names can be defined by
  3297. the library implementation, and the GNU extensions don’t fit these
  3298. limitations. *Note Reserved Names::, for more information about these
  3299. restrictions.
  3300. This manual does not attempt to give you complete details on the
  3301. differences between ISO C and older dialects. It gives advice on how to
  3302. write programs to work portably under multiple C dialects, but does not
  3303. aim for completeness.
  3304. 
  3305. File: libc.info, Node: POSIX, Next: Berkeley Unix, Prev: ISO C, Up: Standards and Portability
  3306. 1.2.2 POSIX (The Portable Operating System Interface)
  3307. -----------------------------------------------------
  3308. The GNU C Library is also compatible with the ISO “POSIX” family of
  3309. standards, known more formally as the “Portable Operating System
  3310. Interface for Computer Environments” (ISO/IEC 9945). They were also
  3311. published as ANSI/IEEE Std 1003. POSIX is derived mostly from various
  3312. versions of the Unix operating system.
  3313. The library facilities specified by the POSIX standards are a
  3314. superset of those required by ISO C; POSIX specifies additional features
  3315. for ISO C functions, as well as specifying new additional functions. In
  3316. general, the additional requirements and functionality defined by the
  3317. POSIX standards are aimed at providing lower-level support for a
  3318. particular kind of operating system environment, rather than general
  3319. programming language support which can run in many diverse operating
  3320. system environments.
  3321. The GNU C Library implements all of the functions specified in
  3322. ‘ISO/IEC 9945-1:1996, the POSIX System Application Program Interface’,
  3323. commonly referred to as POSIX.1. The primary extensions to the ISO C
  3324. facilities specified by this standard include file system interface
  3325. primitives (*note File System Interface::), device-specific terminal
  3326. control functions (*note Low-Level Terminal Interface::), and process
  3327. control functions (*note Processes::).
  3328. Some facilities from ‘ISO/IEC 9945-2:1993, the POSIX Shell and
  3329. Utilities standard’ (POSIX.2) are also implemented in the GNU C Library.
  3330. These include utilities for dealing with regular expressions and other
  3331. pattern matching facilities (*note Pattern Matching::).
  3332. * Menu:
  3333. * POSIX Safety Concepts:: Safety concepts from POSIX.
  3334. * Unsafe Features:: Features that make functions unsafe.
  3335. * Conditionally Safe Features:: Features that make functions unsafe
  3336. in the absence of workarounds.
  3337. * Other Safety Remarks:: Additional safety features and remarks.
  3338. 
  3339. File: libc.info, Node: POSIX Safety Concepts, Next: Unsafe Features, Up: POSIX
  3340. 1.2.2.1 POSIX Safety Concepts
  3341. .............................
  3342. This manual documents various safety properties of GNU C Library
  3343. functions, in lines that follow their prototypes and look like:
  3344. Preliminary: | MT-Safe | AS-Safe | AC-Safe |
  3345. The properties are assessed according to the criteria set forth in
  3346. the POSIX standard for such safety contexts as Thread-, Async-Signal-
  3347. and Async-Cancel- -Safety. Intuitive definitions of these properties,
  3348. attempting to capture the meaning of the standard definitions, follow.
  3349. • ‘MT-Safe’ or Thread-Safe functions are safe to call in the presence
  3350. of other threads. MT, in MT-Safe, stands for Multi Thread.
  3351. Being MT-Safe does not imply a function is atomic, nor that it uses
  3352. any of the memory synchronization mechanisms POSIX exposes to
  3353. users. It is even possible that calling MT-Safe functions in
  3354. sequence does not yield an MT-Safe combination. For example,
  3355. having a thread call two MT-Safe functions one right after the
  3356. other does not guarantee behavior equivalent to atomic execution of
  3357. a combination of both functions, since concurrent calls in other
  3358. threads may interfere in a destructive way.
  3359. Whole-program optimizations that could inline functions across
  3360. library interfaces may expose unsafe reordering, and so performing
  3361. inlining across the GNU C Library interface is not recommended.
  3362. The documented MT-Safety status is not guaranteed under
  3363. whole-program optimization. However, functions defined in
  3364. user-visible headers are designed to be safe for inlining.
  3365. • ‘AS-Safe’ or Async-Signal-Safe functions are safe to call from
  3366. asynchronous signal handlers. AS, in AS-Safe, stands for
  3367. Asynchronous Signal.
  3368. Many functions that are AS-Safe may set ‘errno’, or modify the
  3369. floating-point environment, because their doing so does not make
  3370. them unsuitable for use in signal handlers. However, programs
  3371. could misbehave should asynchronous signal handlers modify this
  3372. thread-local state, and the signal handling machinery cannot be
  3373. counted on to preserve it. Therefore, signal handlers that call
  3374. functions that may set ‘errno’ or modify the floating-point
  3375. environment _must_ save their original values, and restore them
  3376. before returning.
  3377. • ‘AC-Safe’ or Async-Cancel-Safe functions are safe to call when
  3378. asynchronous cancellation is enabled. AC in AC-Safe stands for
  3379. Asynchronous Cancellation.
  3380. The POSIX standard defines only three functions to be AC-Safe,
  3381. namely ‘pthread_cancel’, ‘pthread_setcancelstate’, and
  3382. ‘pthread_setcanceltype’. At present the GNU C Library provides no
  3383. guarantees beyond these three functions, but does document which
  3384. functions are presently AC-Safe. This documentation is provided
  3385. for use by the GNU C Library developers.
  3386. Just like signal handlers, cancellation cleanup routines must
  3387. configure the floating point environment they require. The
  3388. routines cannot assume a floating point environment, particularly
  3389. when asynchronous cancellation is enabled. If the configuration of
  3390. the floating point environment cannot be performed atomically then
  3391. it is also possible that the environment encountered is internally
  3392. inconsistent.
  3393. • ‘MT-Unsafe’, ‘AS-Unsafe’, ‘AC-Unsafe’ functions are not safe to
  3394. call within the safety contexts described above. Calling them
  3395. within such contexts invokes undefined behavior.
  3396. Functions not explicitly documented as safe in a safety context
  3397. should be regarded as Unsafe.
  3398. • ‘Preliminary’ safety properties are documented, indicating these
  3399. properties may _not_ be counted on in future releases of the GNU C
  3400. Library.
  3401. Such preliminary properties are the result of an assessment of the
  3402. properties of our current implementation, rather than of what is
  3403. mandated and permitted by current and future standards.
  3404. Although we strive to abide by the standards, in some cases our
  3405. implementation is safe even when the standard does not demand
  3406. safety, and in other cases our implementation does not meet the
  3407. standard safety requirements. The latter are most likely bugs; the
  3408. former, when marked as ‘Preliminary’, should not be counted on:
  3409. future standards may require changes that are not compatible with
  3410. the additional safety properties afforded by the current
  3411. implementation.
  3412. Furthermore, the POSIX standard does not offer a detailed
  3413. definition of safety. We assume that, by “safe to call”, POSIX
  3414. means that, as long as the program does not invoke undefined
  3415. behavior, the “safe to call” function behaves as specified, and
  3416. does not cause other functions to deviate from their specified
  3417. behavior. We have chosen to use its loose definitions of safety,
  3418. not because they are the best definitions to use, but because
  3419. choosing them harmonizes this manual with POSIX.
  3420. Please keep in mind that these are preliminary definitions and
  3421. annotations, and certain aspects of the definitions are still under
  3422. discussion and might be subject to clarification or change.
  3423. Over time, we envision evolving the preliminary safety notes into
  3424. stable commitments, as stable as those of our interfaces. As we
  3425. do, we will remove the ‘Preliminary’ keyword from safety notes. As
  3426. long as the keyword remains, however, they are not to be regarded
  3427. as a promise of future behavior.
  3428. Other keywords that appear in safety notes are defined in subsequent
  3429. sections.
  3430. 
  3431. File: libc.info, Node: Unsafe Features, Next: Conditionally Safe Features, Prev: POSIX Safety Concepts, Up: POSIX
  3432. 1.2.2.2 Unsafe Features
  3433. .......................
  3434. Functions that are unsafe to call in certain contexts are annotated with
  3435. keywords that document their features that make them unsafe to call.
  3436. AS-Unsafe features in this section indicate the functions are never safe
  3437. to call when asynchronous signals are enabled. AC-Unsafe features
  3438. indicate they are never safe to call when asynchronous cancellation is
  3439. enabled. There are no MT-Unsafe marks in this section.
  3440. • ‘lock’
  3441. Functions marked with ‘lock’ as an AS-Unsafe feature may be
  3442. interrupted by a signal while holding a non-recursive lock. If the
  3443. signal handler calls another such function that takes the same
  3444. lock, the result is a deadlock.
  3445. Functions annotated with ‘lock’ as an AC-Unsafe feature may, if
  3446. cancelled asynchronously, fail to release a lock that would have
  3447. been released if their execution had not been interrupted by
  3448. asynchronous thread cancellation. Once a lock is left taken,
  3449. attempts to take that lock will block indefinitely.
  3450. • ‘corrupt’
  3451. Functions marked with ‘corrupt’ as an AS-Unsafe feature may corrupt
  3452. data structures and misbehave when they interrupt, or are
  3453. interrupted by, another such function. Unlike functions marked
  3454. with ‘lock’, these take recursive locks to avoid MT-Safety
  3455. problems, but this is not enough to stop a signal handler from
  3456. observing a partially-updated data structure. Further corruption
  3457. may arise from the interrupted function’s failure to notice updates
  3458. made by signal handlers.
  3459. Functions marked with ‘corrupt’ as an AC-Unsafe feature may leave
  3460. data structures in a corrupt, partially updated state. Subsequent
  3461. uses of the data structure may misbehave.
  3462. • ‘heap’
  3463. Functions marked with ‘heap’ may call heap memory management
  3464. functions from the ‘malloc’/‘free’ family of functions and are only
  3465. as safe as those functions. This note is thus equivalent to:
  3466. | AS-Unsafe lock | AC-Unsafe lock fd mem |
  3467. • ‘dlopen’
  3468. Functions marked with ‘dlopen’ use the dynamic loader to load
  3469. shared libraries into the current execution image. This involves
  3470. opening files, mapping them into memory, allocating additional
  3471. memory, resolving symbols, applying relocations and more, all of
  3472. this while holding internal dynamic loader locks.
  3473. The locks are enough for these functions to be AS- and AC-Unsafe,
  3474. but other issues may arise. At present this is a placeholder for
  3475. all potential safety issues raised by ‘dlopen’.
  3476. • ‘plugin’
  3477. Functions annotated with ‘plugin’ may run code from plugins that
  3478. may be external to the GNU C Library. Such plugin functions are
  3479. assumed to be MT-Safe, AS-Unsafe and AC-Unsafe. Examples of such
  3480. plugins are stack unwinding libraries, name service switch (NSS)
  3481. and character set conversion (iconv) back-ends.
  3482. Although the plugins mentioned as examples are all brought in by
  3483. means of dlopen, the ‘plugin’ keyword does not imply any direct
  3484. involvement of the dynamic loader or the ‘libdl’ interfaces, those
  3485. are covered by ‘dlopen’. For example, if one function loads a
  3486. module and finds the addresses of some of its functions, while
  3487. another just calls those already-resolved functions, the former
  3488. will be marked with ‘dlopen’, whereas the latter will get the
  3489. ‘plugin’. When a single function takes all of these actions, then
  3490. it gets both marks.
  3491. • ‘i18n’
  3492. Functions marked with ‘i18n’ may call internationalization
  3493. functions of the ‘gettext’ family and will be only as safe as those
  3494. functions. This note is thus equivalent to:
  3495. | MT-Safe env | AS-Unsafe corrupt heap dlopen | AC-Unsafe corrupt |
  3496. • ‘timer’
  3497. Functions marked with ‘timer’ use the ‘alarm’ function or similar
  3498. to set a time-out for a system call or a long-running operation.
  3499. In a multi-threaded program, there is a risk that the time-out
  3500. signal will be delivered to a different thread, thus failing to
  3501. interrupt the intended thread. Besides being MT-Unsafe, such
  3502. functions are always AS-Unsafe, because calling them in signal
  3503. handlers may interfere with timers set in the interrupted code, and
  3504. AC-Unsafe, because there is no safe way to guarantee an earlier
  3505. timer will be reset in case of asynchronous cancellation.
  3506. 
  3507. File: libc.info, Node: Conditionally Safe Features, Next: Other Safety Remarks, Prev: Unsafe Features, Up: POSIX
  3508. 1.2.2.3 Conditionally Safe Features
  3509. ...................................
  3510. For some features that make functions unsafe to call in certain
  3511. contexts, there are known ways to avoid the safety problem other than
  3512. refraining from calling the function altogether. The keywords that
  3513. follow refer to such features, and each of their definitions indicate
  3514. how the whole program needs to be constrained in order to remove the
  3515. safety problem indicated by the keyword. Only when all the reasons that
  3516. make a function unsafe are observed and addressed, by applying the
  3517. documented constraints, does the function become safe to call in a
  3518. context.
  3519. • ‘init’
  3520. Functions marked with ‘init’ as an MT-Unsafe feature perform
  3521. MT-Unsafe initialization when they are first called.
  3522. Calling such a function at least once in single-threaded mode
  3523. removes this specific cause for the function to be regarded as
  3524. MT-Unsafe. If no other cause for that remains, the function can
  3525. then be safely called after other threads are started.
  3526. Functions marked with ‘init’ as an AS- or AC-Unsafe feature use the
  3527. internal ‘libc_once’ machinery or similar to initialize internal
  3528. data structures.
  3529. If a signal handler interrupts such an initializer, and calls any
  3530. function that also performs ‘libc_once’ initialization, it will
  3531. deadlock if the thread library has been loaded.
  3532. Furthermore, if an initializer is partially complete before it is
  3533. canceled or interrupted by a signal whose handler requires the same
  3534. initialization, some or all of the initialization may be performed
  3535. more than once, leaking resources or even resulting in corrupt
  3536. internal data.
  3537. Applications that need to call functions marked with ‘init’ as an
  3538. AS- or AC-Unsafe feature should ensure the initialization is
  3539. performed before configuring signal handlers or enabling
  3540. cancellation, so that the AS- and AC-Safety issues related with
  3541. ‘libc_once’ do not arise.
  3542. • ‘race’
  3543. Functions annotated with ‘race’ as an MT-Safety issue operate on
  3544. objects in ways that may cause data races or similar forms of
  3545. destructive interference out of concurrent execution. In some
  3546. cases, the objects are passed to the functions by users; in others,
  3547. they are used by the functions to return values to users; in
  3548. others, they are not even exposed to users.
  3549. We consider access to objects passed as (indirect) arguments to
  3550. functions to be data race free. The assurance of data race free
  3551. objects is the caller’s responsibility. We will not mark a
  3552. function as MT-Unsafe or AS-Unsafe if it misbehaves when users fail
  3553. to take the measures required by POSIX to avoid data races when
  3554. dealing with such objects. As a general rule, if a function is
  3555. documented as reading from an object passed (by reference) to it,
  3556. or modifying it, users ought to use memory synchronization
  3557. primitives to avoid data races just as they would should they
  3558. perform the accesses themselves rather than by calling the library
  3559. function. ‘FILE’ streams are the exception to the general rule, in
  3560. that POSIX mandates the library to guard against data races in many
  3561. functions that manipulate objects of this specific opaque type. We
  3562. regard this as a convenience provided to users, rather than as a
  3563. general requirement whose expectations should extend to other
  3564. types.
  3565. In order to remind users that guarding certain arguments is their
  3566. responsibility, we will annotate functions that take objects of
  3567. certain types as arguments. We draw the line for objects passed by
  3568. users as follows: objects whose types are exposed to users, and
  3569. that users are expected to access directly, such as memory buffers,
  3570. strings, and various user-visible ‘struct’ types, do _not_ give
  3571. reason for functions to be annotated with ‘race’. It would be
  3572. noisy and redundant with the general requirement, and not many
  3573. would be surprised by the library’s lack of internal guards when
  3574. accessing objects that can be accessed directly by users.
  3575. As for objects that are opaque or opaque-like, in that they are to
  3576. be manipulated only by passing them to library functions (e.g.,
  3577. ‘FILE’, ‘DIR’, ‘obstack’, ‘iconv_t’), there might be additional
  3578. expectations as to internal coordination of access by the library.
  3579. We will annotate, with ‘race’ followed by a colon and the argument
  3580. name, functions that take such objects but that do not take care of
  3581. synchronizing access to them by default. For example, ‘FILE’
  3582. stream ‘unlocked’ functions will be annotated, but those that
  3583. perform implicit locking on ‘FILE’ streams by default will not,
  3584. even though the implicit locking may be disabled on a per-stream
  3585. basis.
  3586. In either case, we will not regard as MT-Unsafe functions that may
  3587. access user-supplied objects in unsafe ways should users fail to
  3588. ensure the accesses are well defined. The notion prevails that
  3589. users are expected to safeguard against data races any
  3590. user-supplied objects that the library accesses on their behalf.
  3591. This user responsibility does not apply, however, to objects
  3592. controlled by the library itself, such as internal objects and
  3593. static buffers used to return values from certain calls. When the
  3594. library doesn’t guard them against concurrent uses, these cases are
  3595. regarded as MT-Unsafe and AS-Unsafe (although the ‘race’ mark under
  3596. AS-Unsafe will be omitted as redundant with the one under
  3597. MT-Unsafe). As in the case of user-exposed objects, the mark may
  3598. be followed by a colon and an identifier. The identifier groups
  3599. all functions that operate on a certain unguarded object; users may
  3600. avoid the MT-Safety issues related with unguarded concurrent access
  3601. to such internal objects by creating a non-recursive mutex related
  3602. with the identifier, and always holding the mutex when calling any
  3603. function marked as racy on that identifier, as they would have to
  3604. should the identifier be an object under user control. The
  3605. non-recursive mutex avoids the MT-Safety issue, but it trades one
  3606. AS-Safety issue for another, so use in asynchronous signals remains
  3607. undefined.
  3608. When the identifier relates to a static buffer used to hold return
  3609. values, the mutex must be held for as long as the buffer remains in
  3610. use by the caller. Many functions that return pointers to static
  3611. buffers offer reentrant variants that store return values in
  3612. caller-supplied buffers instead. In some cases, such as ‘tmpname’,
  3613. the variant is chosen not by calling an alternate entry point, but
  3614. by passing a non-‘NULL’ pointer to the buffer in which the returned
  3615. values are to be stored. These variants are generally preferable
  3616. in multi-threaded programs, although some of them are not MT-Safe
  3617. because of other internal buffers, also documented with ‘race’
  3618. notes.
  3619. • ‘const’
  3620. Functions marked with ‘const’ as an MT-Safety issue non-atomically
  3621. modify internal objects that are better regarded as constant,
  3622. because a substantial portion of the GNU C Library accesses them
  3623. without synchronization. Unlike ‘race’, that causes both readers
  3624. and writers of internal objects to be regarded as MT-Unsafe and
  3625. AS-Unsafe, this mark is applied to writers only. Writers remain
  3626. equally MT- and AS-Unsafe to call, but the then-mandatory constness
  3627. of objects they modify enables readers to be regarded as MT-Safe
  3628. and AS-Safe (as long as no other reasons for them to be unsafe
  3629. remain), since the lack of synchronization is not a problem when
  3630. the objects are effectively constant.
  3631. The identifier that follows the ‘const’ mark will appear by itself
  3632. as a safety note in readers. Programs that wish to work around
  3633. this safety issue, so as to call writers, may use a non-recursve
  3634. ‘rwlock’ associated with the identifier, and guard _all_ calls to
  3635. functions marked with ‘const’ followed by the identifier with a
  3636. write lock, and _all_ calls to functions marked with the identifier
  3637. by itself with a read lock. The non-recursive locking removes the
  3638. MT-Safety problem, but it trades one AS-Safety problem for another,
  3639. so use in asynchronous signals remains undefined.
  3640. • ‘sig’
  3641. Functions marked with ‘sig’ as a MT-Safety issue (that implies an
  3642. identical AS-Safety issue, omitted for brevity) may temporarily
  3643. install a signal handler for internal purposes, which may interfere
  3644. with other uses of the signal, identified after a colon.
  3645. This safety problem can be worked around by ensuring that no other
  3646. uses of the signal will take place for the duration of the call.
  3647. Holding a non-recursive mutex while calling all functions that use
  3648. the same temporary signal; blocking that signal before the call and
  3649. resetting its handler afterwards is recommended.
  3650. There is no safe way to guarantee the original signal handler is
  3651. restored in case of asynchronous cancellation, therefore so-marked
  3652. functions are also AC-Unsafe.
  3653. Besides the measures recommended to work around the MT- and
  3654. AS-Safety problem, in order to avert the cancellation problem,
  3655. disabling asynchronous cancellation _and_ installing a cleanup
  3656. handler to restore the signal to the desired state and to release
  3657. the mutex are recommended.
  3658. • ‘term’
  3659. Functions marked with ‘term’ as an MT-Safety issue may change the
  3660. terminal settings in the recommended way, namely: call ‘tcgetattr’,
  3661. modify some flags, and then call ‘tcsetattr’; this creates a window
  3662. in which changes made by other threads are lost. Thus, functions
  3663. marked with ‘term’ are MT-Unsafe. The same window enables changes
  3664. made by asynchronous signals to be lost. These functions are also
  3665. AS-Unsafe, but the corresponding mark is omitted as redundant.
  3666. It is thus advisable for applications using the terminal to avoid
  3667. concurrent and reentrant interactions with it, by not using it in
  3668. signal handlers or blocking signals that might use it, and holding
  3669. a lock while calling these functions and interacting with the
  3670. terminal. This lock should also be used for mutual exclusion with
  3671. functions marked with ‘race:tcattr(fd)’, where FD is a file
  3672. descriptor for the controlling terminal. The caller may use a
  3673. single mutex for simplicity, or use one mutex per terminal, even if
  3674. referenced by different file descriptors.
  3675. Functions marked with ‘term’ as an AC-Safety issue are supposed to
  3676. restore terminal settings to their original state, after
  3677. temporarily changing them, but they may fail to do so if cancelled.
  3678. Besides the measures recommended to work around the MT- and
  3679. AS-Safety problem, in order to avert the cancellation problem,
  3680. disabling asynchronous cancellation _and_ installing a cleanup
  3681. handler to restore the terminal settings to the original state and
  3682. to release the mutex are recommended.
  3683. 
  3684. File: libc.info, Node: Other Safety Remarks, Prev: Conditionally Safe Features, Up: POSIX
  3685. 1.2.2.4 Other Safety Remarks
  3686. ............................
  3687. Additional keywords may be attached to functions, indicating features
  3688. that do not make a function unsafe to call, but that may need to be
  3689. taken into account in certain classes of programs:
  3690. • ‘locale’
  3691. Functions annotated with ‘locale’ as an MT-Safety issue read from
  3692. the locale object without any form of synchronization. Functions
  3693. annotated with ‘locale’ called concurrently with locale changes may
  3694. behave in ways that do not correspond to any of the locales active
  3695. during their execution, but an unpredictable mix thereof.
  3696. We do not mark these functions as MT- or AS-Unsafe, however,
  3697. because functions that modify the locale object are marked with
  3698. ‘const:locale’ and regarded as unsafe. Being unsafe, the latter
  3699. are not to be called when multiple threads are running or
  3700. asynchronous signals are enabled, and so the locale can be
  3701. considered effectively constant in these contexts, which makes the
  3702. former safe.
  3703. • ‘env’
  3704. Functions marked with ‘env’ as an MT-Safety issue access the
  3705. environment with ‘getenv’ or similar, without any guards to ensure
  3706. safety in the presence of concurrent modifications.
  3707. We do not mark these functions as MT- or AS-Unsafe, however,
  3708. because functions that modify the environment are all marked with
  3709. ‘const:env’ and regarded as unsafe. Being unsafe, the latter are
  3710. not to be called when multiple threads are running or asynchronous
  3711. signals are enabled, and so the environment can be considered
  3712. effectively constant in these contexts, which makes the former
  3713. safe.
  3714. • ‘hostid’
  3715. The function marked with ‘hostid’ as an MT-Safety issue reads from
  3716. the system-wide data structures that hold the “host ID” of the
  3717. machine. These data structures cannot generally be modified
  3718. atomically. Since it is expected that the “host ID” will not
  3719. normally change, the function that reads from it (‘gethostid’) is
  3720. regarded as safe, whereas the function that modifies it
  3721. (‘sethostid’) is marked with ‘const:hostid’, indicating it may
  3722. require special care if it is to be called. In this specific case,
  3723. the special care amounts to system-wide (not merely intra-process)
  3724. coordination.
  3725. • ‘sigintr’
  3726. Functions marked with ‘sigintr’ as an MT-Safety issue access the
  3727. ‘_sigintr’ internal data structure without any guards to ensure
  3728. safety in the presence of concurrent modifications.
  3729. We do not mark these functions as MT- or AS-Unsafe, however,
  3730. because functions that modify the this data structure are all
  3731. marked with ‘const:sigintr’ and regarded as unsafe. Being unsafe,
  3732. the latter are not to be called when multiple threads are running
  3733. or asynchronous signals are enabled, and so the data structure can
  3734. be considered effectively constant in these contexts, which makes
  3735. the former safe.
  3736. • ‘fd’
  3737. Functions annotated with ‘fd’ as an AC-Safety issue may leak file
  3738. descriptors if asynchronous thread cancellation interrupts their
  3739. execution.
  3740. Functions that allocate or deallocate file descriptors will
  3741. generally be marked as such. Even if they attempted to protect the
  3742. file descriptor allocation and deallocation with cleanup regions,
  3743. allocating a new descriptor and storing its number where the
  3744. cleanup region could release it cannot be performed as a single
  3745. atomic operation. Similarly, releasing the descriptor and taking
  3746. it out of the data structure normally responsible for releasing it
  3747. cannot be performed atomically. There will always be a window in
  3748. which the descriptor cannot be released because it was not stored
  3749. in the cleanup handler argument yet, or it was already taken out
  3750. before releasing it. It cannot be taken out after release: an open
  3751. descriptor could mean either that the descriptor still has to be
  3752. closed, or that it already did so but the descriptor was
  3753. reallocated by another thread or signal handler.
  3754. Such leaks could be internally avoided, with some performance
  3755. penalty, by temporarily disabling asynchronous thread cancellation.
  3756. However, since callers of allocation or deallocation functions
  3757. would have to do this themselves, to avoid the same sort of leak in
  3758. their own layer, it makes more sense for the library to assume they
  3759. are taking care of it than to impose a performance penalty that is
  3760. redundant when the problem is solved in upper layers, and
  3761. insufficient when it is not.
  3762. This remark by itself does not cause a function to be regarded as
  3763. AC-Unsafe. However, cumulative effects of such leaks may pose a
  3764. problem for some programs. If this is the case, suspending
  3765. asynchronous cancellation for the duration of calls to such
  3766. functions is recommended.
  3767. • ‘mem’
  3768. Functions annotated with ‘mem’ as an AC-Safety issue may leak
  3769. memory if asynchronous thread cancellation interrupts their
  3770. execution.
  3771. The problem is similar to that of file descriptors: there is no
  3772. atomic interface to allocate memory and store its address in the
  3773. argument to a cleanup handler, or to release it and remove its
  3774. address from that argument, without at least temporarily disabling
  3775. asynchronous cancellation, which these functions do not do.
  3776. This remark does not by itself cause a function to be regarded as
  3777. generally AC-Unsafe. However, cumulative effects of such leaks may
  3778. be severe enough for some programs that disabling asynchronous
  3779. cancellation for the duration of calls to such functions may be
  3780. required.
  3781. • ‘cwd’
  3782. Functions marked with ‘cwd’ as an MT-Safety issue may temporarily
  3783. change the current working directory during their execution, which
  3784. may cause relative pathnames to be resolved in unexpected ways in
  3785. other threads or within asynchronous signal or cancellation
  3786. handlers.
  3787. This is not enough of a reason to mark so-marked functions as MT-
  3788. or AS-Unsafe, but when this behavior is optional (e.g., ‘nftw’ with
  3789. ‘FTW_CHDIR’), avoiding the option may be a good alternative to
  3790. using full pathnames or file descriptor-relative (e.g. ‘openat’)
  3791. system calls.
  3792. • ‘!posix’
  3793. This remark, as an MT-, AS- or AC-Safety note to a function,
  3794. indicates the safety status of the function is known to differ from
  3795. the specified status in the POSIX standard. For example, POSIX
  3796. does not require a function to be Safe, but our implementation is,
  3797. or vice-versa.
  3798. For the time being, the absence of this remark does not imply the
  3799. safety properties we documented are identical to those mandated by
  3800. POSIX for the corresponding functions.
  3801. • ‘:identifier’
  3802. Annotations may sometimes be followed by identifiers, intended to
  3803. group several functions that e.g. access the data structures in an
  3804. unsafe way, as in ‘race’ and ‘const’, or to provide more specific
  3805. information, such as naming a signal in a function marked with
  3806. ‘sig’. It is envisioned that it may be applied to ‘lock’ and
  3807. ‘corrupt’ as well in the future.
  3808. In most cases, the identifier will name a set of functions, but it
  3809. may name global objects or function arguments, or identifiable
  3810. properties or logical components associated with them, with a
  3811. notation such as e.g. ‘:buf(arg)’ to denote a buffer associated
  3812. with the argument ARG, or ‘:tcattr(fd)’ to denote the terminal
  3813. attributes of a file descriptor FD.
  3814. The most common use for identifiers is to provide logical groups of
  3815. functions and arguments that need to be protected by the same
  3816. synchronization primitive in order to ensure safe operation in a
  3817. given context.
  3818. • ‘/condition’
  3819. Some safety annotations may be conditional, in that they only apply
  3820. if a boolean expression involving arguments, global variables or
  3821. even the underlying kernel evaluates to true. Such conditions as
  3822. ‘/hurd’ or ‘/!linux!bsd’ indicate the preceding marker only applies
  3823. when the underlying kernel is the HURD, or when it is neither Linux
  3824. nor a BSD kernel, respectively. ‘/!ps’ and ‘/one_per_line’
  3825. indicate the preceding marker only applies when argument PS is
  3826. NULL, or global variable ONE_PER_LINE is nonzero.
  3827. When all marks that render a function unsafe are adorned with such
  3828. conditions, and none of the named conditions hold, then the
  3829. function can be regarded as safe.
  3830. 
  3831. File: libc.info, Node: Berkeley Unix, Next: SVID, Prev: POSIX, Up: Standards and Portability
  3832. 1.2.3 Berkeley Unix
  3833. -------------------
  3834. The GNU C Library defines facilities from some versions of Unix which
  3835. are not formally standardized, specifically from the 4.2 BSD, 4.3 BSD,
  3836. and 4.4 BSD Unix systems (also known as “Berkeley Unix”) and from
  3837. “SunOS” (a popular 4.2 BSD derivative that includes some Unix System V
  3838. functionality). These systems support most of the ISO C and POSIX
  3839. facilities, and 4.4 BSD and newer releases of SunOS in fact support them
  3840. all.
  3841. The BSD facilities include symbolic links (*note Symbolic Links::),
  3842. the ‘select’ function (*note Waiting for I/O::), the BSD signal
  3843. functions (*note BSD Signal Handling::), and sockets (*note Sockets::).
  3844. 
  3845. File: libc.info, Node: SVID, Next: XPG, Prev: Berkeley Unix, Up: Standards and Portability
  3846. 1.2.4 SVID (The System V Interface Description)
  3847. -----------------------------------------------
  3848. The “System V Interface Description” (SVID) is a document describing the
  3849. AT&T Unix System V operating system. It is to some extent a superset of
  3850. the POSIX standard (*note POSIX::).
  3851. The GNU C Library defines most of the facilities required by the SVID
  3852. that are not also required by the ISO C or POSIX standards, for
  3853. compatibility with System V Unix and other Unix systems (such as SunOS)
  3854. which include these facilities. However, many of the more obscure and
  3855. less generally useful facilities required by the SVID are not included.
  3856. (In fact, Unix System V itself does not provide them all.)
  3857. The supported facilities from System V include the methods for
  3858. inter-process communication and shared memory, the ‘hsearch’ and
  3859. ‘drand48’ families of functions, ‘fmtmsg’ and several of the
  3860. mathematical functions.
  3861. 
  3862. File: libc.info, Node: XPG, Prev: SVID, Up: Standards and Portability
  3863. 1.2.5 XPG (The X/Open Portability Guide)
  3864. ----------------------------------------
  3865. The X/Open Portability Guide, published by the X/Open Company, Ltd., is
  3866. a more general standard than POSIX. X/Open owns the Unix copyright and
  3867. the XPG specifies the requirements for systems which are intended to be
  3868. a Unix system.
  3869. The GNU C Library complies to the X/Open Portability Guide, Issue
  3870. 4.2, with all extensions common to XSI (X/Open System Interface)
  3871. compliant systems and also all X/Open UNIX extensions.
  3872. The additions on top of POSIX are mainly derived from functionality
  3873. available in System V and BSD systems. Some of the really bad mistakes
  3874. in System V systems were corrected, though. Since fulfilling the XPG
  3875. standard with the Unix extensions is a precondition for getting the Unix
  3876. brand chances are good that the functionality is available on commercial
  3877. systems.
  3878. 
  3879. File: libc.info, Node: Using the Library, Next: Roadmap to the Manual, Prev: Standards and Portability, Up: Introduction
  3880. 1.3 Using the Library
  3881. =====================
  3882. This section describes some of the practical issues involved in using
  3883. the GNU C Library.
  3884. * Menu:
  3885. * Header Files:: How to include the header files in your
  3886. programs.
  3887. * Macro Definitions:: Some functions in the library may really
  3888. be implemented as macros.
  3889. * Reserved Names:: The C standard reserves some names for
  3890. the library, and some for users.
  3891. * Feature Test Macros:: How to control what names are defined.
  3892. 
  3893. File: libc.info, Node: Header Files, Next: Macro Definitions, Up: Using the Library
  3894. 1.3.1 Header Files
  3895. ------------------
  3896. Libraries for use by C programs really consist of two parts: “header
  3897. files” that define types and macros and declare variables and functions;
  3898. and the actual library or “archive” that contains the definitions of the
  3899. variables and functions.
  3900. (Recall that in C, a “declaration” merely provides information that a
  3901. function or variable exists and gives its type. For a function
  3902. declaration, information about the types of its arguments might be
  3903. provided as well. The purpose of declarations is to allow the compiler
  3904. to correctly process references to the declared variables and functions.
  3905. A “definition”, on the other hand, actually allocates storage for a
  3906. variable or says what a function does.)
  3907. In order to use the facilities in the GNU C Library, you should be
  3908. sure that your program source files include the appropriate header
  3909. files. This is so that the compiler has declarations of these
  3910. facilities available and can correctly process references to them. Once
  3911. your program has been compiled, the linker resolves these references to
  3912. the actual definitions provided in the archive file.
  3913. Header files are included into a program source file by the
  3914. ‘#include’ preprocessor directive. The C language supports two forms of
  3915. this directive; the first,
  3916. #include "HEADER"
  3917. is typically used to include a header file HEADER that you write
  3918. yourself; this would contain definitions and declarations describing the
  3919. interfaces between the different parts of your particular application.
  3920. By contrast,
  3921. #include <file.h>
  3922. is typically used to include a header file ‘file.h’ that contains
  3923. definitions and declarations for a standard library. This file would
  3924. normally be installed in a standard place by your system administrator.
  3925. You should use this second form for the C library header files.
  3926. Typically, ‘#include’ directives are placed at the top of the C
  3927. source file, before any other code. If you begin your source files with
  3928. some comments explaining what the code in the file does (a good idea),
  3929. put the ‘#include’ directives immediately afterwards, following the
  3930. feature test macro definition (*note Feature Test Macros::).
  3931. For more information about the use of header files and ‘#include’
  3932. directives, *note (cpp.info)Header Files::.
  3933. The GNU C Library provides several header files, each of which
  3934. contains the type and macro definitions and variable and function
  3935. declarations for a group of related facilities. This means that your
  3936. programs may need to include several header files, depending on exactly
  3937. which facilities you are using.
  3938. Some library header files include other library header files
  3939. automatically. However, as a matter of programming style, you should
  3940. not rely on this; it is better to explicitly include all the header
  3941. files required for the library facilities you are using. The GNU C
  3942. Library header files have been written in such a way that it doesn’t
  3943. matter if a header file is accidentally included more than once;
  3944. including a header file a second time has no effect. Likewise, if your
  3945. program needs to include multiple header files, the order in which they
  3946. are included doesn’t matter.
  3947. *Compatibility Note:* Inclusion of standard header files in any order
  3948. and any number of times works in any ISO C implementation. However,
  3949. this has traditionally not been the case in many older C
  3950. implementations.
  3951. Strictly speaking, you don’t _have to_ include a header file to use a
  3952. function it declares; you could declare the function explicitly
  3953. yourself, according to the specifications in this manual. But it is
  3954. usually better to include the header file because it may define types
  3955. and macros that are not otherwise available and because it may define
  3956. more efficient macro replacements for some functions. It is also a sure
  3957. way to have the correct declaration.
  3958. 
  3959. File: libc.info, Node: Macro Definitions, Next: Reserved Names, Prev: Header Files, Up: Using the Library
  3960. 1.3.2 Macro Definitions of Functions
  3961. ------------------------------------
  3962. If we describe something as a function in this manual, it may have a
  3963. macro definition as well. This normally has no effect on how your
  3964. program runs—the macro definition does the same thing as the function
  3965. would. In particular, macro equivalents for library functions evaluate
  3966. arguments exactly once, in the same way that a function call would. The
  3967. main reason for these macro definitions is that sometimes they can
  3968. produce an inline expansion that is considerably faster than an actual
  3969. function call.
  3970. Taking the address of a library function works even if it is also
  3971. defined as a macro. This is because, in this context, the name of the
  3972. function isn’t followed by the left parenthesis that is syntactically
  3973. necessary to recognize a macro call.
  3974. You might occasionally want to avoid using the macro definition of a
  3975. function—perhaps to make your program easier to debug. There are two
  3976. ways you can do this:
  3977. • You can avoid a macro definition in a specific use by enclosing the
  3978. name of the function in parentheses. This works because the name
  3979. of the function doesn’t appear in a syntactic context where it is
  3980. recognizable as a macro call.
  3981. • You can suppress any macro definition for a whole source file by
  3982. using the ‘#undef’ preprocessor directive, unless otherwise stated
  3983. explicitly in the description of that facility.
  3984. For example, suppose the header file ‘stdlib.h’ declares a function
  3985. named ‘abs’ with
  3986. extern int abs (int);
  3987. and also provides a macro definition for ‘abs’. Then, in:
  3988. #include <stdlib.h>
  3989. int f (int *i) { return abs (++*i); }
  3990. the reference to ‘abs’ might refer to either a macro or a function. On
  3991. the other hand, in each of the following examples the reference is to a
  3992. function and not a macro.
  3993. #include <stdlib.h>
  3994. int g (int *i) { return (abs) (++*i); }
  3995. #undef abs
  3996. int h (int *i) { return abs (++*i); }
  3997. Since macro definitions that double for a function behave in exactly
  3998. the same way as the actual function version, there is usually no need
  3999. for any of these methods. In fact, removing macro definitions usually
  4000. just makes your program slower.
  4001. 
  4002. File: libc.info, Node: Reserved Names, Next: Feature Test Macros, Prev: Macro Definitions, Up: Using the Library
  4003. 1.3.3 Reserved Names
  4004. --------------------
  4005. The names of all library types, macros, variables and functions that
  4006. come from the ISO C standard are reserved unconditionally; your program
  4007. *may not* redefine these names. All other library names are reserved if
  4008. your program explicitly includes the header file that defines or
  4009. declares them. There are several reasons for these restrictions:
  4010. • Other people reading your code could get very confused if you were
  4011. using a function named ‘exit’ to do something completely different
  4012. from what the standard ‘exit’ function does, for example.
  4013. Preventing this situation helps to make your programs easier to
  4014. understand and contributes to modularity and maintainability.
  4015. • It avoids the possibility of a user accidentally redefining a
  4016. library function that is called by other library functions. If
  4017. redefinition were allowed, those other functions would not work
  4018. properly.
  4019. • It allows the compiler to do whatever special optimizations it
  4020. pleases on calls to these functions, without the possibility that
  4021. they may have been redefined by the user. Some library facilities,
  4022. such as those for dealing with variadic arguments (*note Variadic
  4023. Functions::) and non-local exits (*note Non-Local Exits::),
  4024. actually require a considerable amount of cooperation on the part
  4025. of the C compiler, and with respect to the implementation, it might
  4026. be easier for the compiler to treat these as built-in parts of the
  4027. language.
  4028. In addition to the names documented in this manual, reserved names
  4029. include all external identifiers (global functions and variables) that
  4030. begin with an underscore (‘_’) and all identifiers regardless of use
  4031. that begin with either two underscores or an underscore followed by a
  4032. capital letter are reserved names. This is so that the library and
  4033. header files can define functions, variables, and macros for internal
  4034. purposes without risk of conflict with names in user programs.
  4035. Some additional classes of identifier names are reserved for future
  4036. extensions to the C language or the POSIX.1 environment. While using
  4037. these names for your own purposes right now might not cause a problem,
  4038. they do raise the possibility of conflict with future versions of the C
  4039. or POSIX standards, so you should avoid these names.
  4040. • Names beginning with a capital ‘E’ followed a digit or uppercase
  4041. letter may be used for additional error code names. *Note Error
  4042. Reporting::.
  4043. • Names that begin with either ‘is’ or ‘to’ followed by a lowercase
  4044. letter may be used for additional character testing and conversion
  4045. functions. *Note Character Handling::.
  4046. • Names that begin with ‘LC_’ followed by an uppercase letter may be
  4047. used for additional macros specifying locale attributes. *Note
  4048. Locales::.
  4049. • Names of all existing mathematics functions (*note Mathematics::)
  4050. suffixed with ‘f’ or ‘l’ are reserved for corresponding functions
  4051. that operate on ‘float’ and ‘long double’ arguments, respectively.
  4052. • Names that begin with ‘SIG’ followed by an uppercase letter are
  4053. reserved for additional signal names. *Note Standard Signals::.
  4054. • Names that begin with ‘SIG_’ followed by an uppercase letter are
  4055. reserved for additional signal actions. *Note Basic Signal
  4056. Handling::.
  4057. • Names beginning with ‘str’, ‘mem’, or ‘wcs’ followed by a lowercase
  4058. letter are reserved for additional string and array functions.
  4059. *Note String and Array Utilities::.
  4060. • Names that end with ‘_t’ are reserved for additional type names.
  4061. In addition, some individual header files reserve names beyond those
  4062. that they actually define. You only need to worry about these
  4063. restrictions if your program includes that particular header file.
  4064. • The header file ‘dirent.h’ reserves names prefixed with ‘d_’.
  4065. • The header file ‘fcntl.h’ reserves names prefixed with ‘l_’, ‘F_’,
  4066. ‘O_’, and ‘S_’.
  4067. • The header file ‘grp.h’ reserves names prefixed with ‘gr_’.
  4068. • The header file ‘limits.h’ reserves names suffixed with ‘_MAX’.
  4069. • The header file ‘pwd.h’ reserves names prefixed with ‘pw_’.
  4070. • The header file ‘signal.h’ reserves names prefixed with ‘sa_’ and
  4071. ‘SA_’.
  4072. • The header file ‘sys/stat.h’ reserves names prefixed with ‘st_’ and
  4073. ‘S_’.
  4074. • The header file ‘sys/times.h’ reserves names prefixed with ‘tms_’.
  4075. • The header file ‘termios.h’ reserves names prefixed with ‘c_’, ‘V’,
  4076. ‘I’, ‘O’, and ‘TC’; and names prefixed with ‘B’ followed by a
  4077. digit.
  4078. 
  4079. File: libc.info, Node: Feature Test Macros, Prev: Reserved Names, Up: Using the Library
  4080. 1.3.4 Feature Test Macros
  4081. -------------------------
  4082. The exact set of features available when you compile a source file is
  4083. controlled by which “feature test macros” you define.
  4084. If you compile your programs using ‘gcc -ansi’, you get only the
  4085. ISO C library features, unless you explicitly request additional
  4086. features by defining one or more of the feature macros. *Note GNU CC
  4087. Command Options: (gcc)Invoking GCC, for more information about GCC
  4088. options.
  4089. You should define these macros by using ‘#define’ preprocessor
  4090. directives at the top of your source code files. These directives
  4091. _must_ come before any ‘#include’ of a system header file. It is best
  4092. to make them the very first thing in the file, preceded only by
  4093. comments. You could also use the ‘-D’ option to GCC, but it’s better if
  4094. you make the source files indicate their own meaning in a self-contained
  4095. way.
  4096. This system exists to allow the library to conform to multiple
  4097. standards. Although the different standards are often described as
  4098. supersets of each other, they are usually incompatible because larger
  4099. standards require functions with names that smaller ones reserve to the
  4100. user program. This is not mere pedantry — it has been a problem in
  4101. practice. For instance, some non-GNU programs define functions named
  4102. ‘getline’ that have nothing to do with this library’s ‘getline’. They
  4103. would not be compilable if all features were enabled indiscriminately.
  4104. This should not be used to verify that a program conforms to a
  4105. limited standard. It is insufficient for this purpose, as it will not
  4106. protect you from including header files outside the standard, or relying
  4107. on semantics undefined within the standard.
  4108. -- Macro: _POSIX_SOURCE
  4109. If you define this macro, then the functionality from the POSIX.1
  4110. standard (IEEE Standard 1003.1) is available, as well as all of the
  4111. ISO C facilities.
  4112. The state of ‘_POSIX_SOURCE’ is irrelevant if you define the macro
  4113. ‘_POSIX_C_SOURCE’ to a positive integer.
  4114. -- Macro: _POSIX_C_SOURCE
  4115. Define this macro to a positive integer to control which POSIX
  4116. functionality is made available. The greater the value of this
  4117. macro, the more functionality is made available.
  4118. If you define this macro to a value greater than or equal to ‘1’,
  4119. then the functionality from the 1990 edition of the POSIX.1
  4120. standard (IEEE Standard 1003.1-1990) is made available.
  4121. If you define this macro to a value greater than or equal to ‘2’,
  4122. then the functionality from the 1992 edition of the POSIX.2
  4123. standard (IEEE Standard 1003.2-1992) is made available.
  4124. If you define this macro to a value greater than or equal to
  4125. ‘199309L’, then the functionality from the 1993 edition of the
  4126. POSIX.1b standard (IEEE Standard 1003.1b-1993) is made available.
  4127. If you define this macro to a value greater than or equal to
  4128. ‘199506L’, then the functionality from the 1995 edition of the
  4129. POSIX.1c standard (IEEE Standard 1003.1c-1995) is made available.
  4130. If you define this macro to a value greater than or equal to
  4131. ‘200112L’, then the functionality from the 2001 edition of the
  4132. POSIX standard (IEEE Standard 1003.1-2001) is made available.
  4133. If you define this macro to a value greater than or equal to
  4134. ‘200809L’, then the functionality from the 2008 edition of the
  4135. POSIX standard (IEEE Standard 1003.1-2008) is made available.
  4136. Greater values for ‘_POSIX_C_SOURCE’ will enable future extensions.
  4137. The POSIX standards process will define these values as necessary,
  4138. and the GNU C Library should support them some time after they
  4139. become standardized. The 1996 edition of POSIX.1 (ISO/IEC 9945-1:
  4140. 1996) states that if you define ‘_POSIX_C_SOURCE’ to a value
  4141. greater than or equal to ‘199506L’, then the functionality from the
  4142. 1996 edition is made available. In general, in the GNU C Library,
  4143. bugfixes to the standards are included when specifying the base
  4144. version; e.g., POSIX.1-2004 will always be included with a value of
  4145. ‘200112L’.
  4146. -- Macro: _XOPEN_SOURCE
  4147. -- Macro: _XOPEN_SOURCE_EXTENDED
  4148. If you define this macro, functionality described in the X/Open
  4149. Portability Guide is included. This is a superset of the POSIX.1
  4150. and POSIX.2 functionality and in fact ‘_POSIX_SOURCE’ and
  4151. ‘_POSIX_C_SOURCE’ are automatically defined.
  4152. As the unification of all Unices, functionality only available in
  4153. BSD and SVID is also included.
  4154. If the macro ‘_XOPEN_SOURCE_EXTENDED’ is also defined, even more
  4155. functionality is available. The extra functions will make all
  4156. functions available which are necessary for the X/Open Unix brand.
  4157. If the macro ‘_XOPEN_SOURCE’ has the value 500 this includes all
  4158. functionality described so far plus some new definitions from the
  4159. Single Unix Specification, version 2. The value 600 (corresponding
  4160. to the sixth revision) includes definitions from SUSv3, and using
  4161. 700 (the seventh revision) includes definitions from SUSv4.
  4162. -- Macro: _LARGEFILE_SOURCE
  4163. If this macro is defined some extra functions are available which
  4164. rectify a few shortcomings in all previous standards.
  4165. Specifically, the functions ‘fseeko’ and ‘ftello’ are available.
  4166. Without these functions the difference between the ISO C interface
  4167. (‘fseek’, ‘ftell’) and the low-level POSIX interface (‘lseek’)
  4168. would lead to problems.
  4169. This macro was introduced as part of the Large File Support
  4170. extension (LFS).
  4171. -- Macro: _LARGEFILE64_SOURCE
  4172. If you define this macro an additional set of functions is made
  4173. available which enables 32 bit systems to use files of sizes beyond
  4174. the usual limit of 2GB. This interface is not available if the
  4175. system does not support files that large. On systems where the
  4176. natural file size limit is greater than 2GB (i.e., on 64 bit
  4177. systems) the new functions are identical to the replaced functions.
  4178. The new functionality is made available by a new set of types and
  4179. functions which replace the existing ones. The names of these new
  4180. objects contain ‘64’ to indicate the intention, e.g., ‘off_t’ vs.
  4181. ‘off64_t’ and ‘fseeko’ vs. ‘fseeko64’.
  4182. This macro was introduced as part of the Large File Support
  4183. extension (LFS). It is a transition interface for the period when
  4184. 64 bit offsets are not generally used (see ‘_FILE_OFFSET_BITS’).
  4185. -- Macro: _FILE_OFFSET_BITS
  4186. This macro determines which file system interface shall be used,
  4187. one replacing the other. Whereas ‘_LARGEFILE64_SOURCE’ makes the
  4188. 64 bit interface available as an additional interface,
  4189. ‘_FILE_OFFSET_BITS’ allows the 64 bit interface to replace the old
  4190. interface.
  4191. If ‘_FILE_OFFSET_BITS’ is undefined, or if it is defined to the
  4192. value ‘32’, nothing changes. The 32 bit interface is used and
  4193. types like ‘off_t’ have a size of 32 bits on 32 bit systems.
  4194. If the macro is defined to the value ‘64’, the large file interface
  4195. replaces the old interface. I.e., the functions are not made
  4196. available under different names (as they are with
  4197. ‘_LARGEFILE64_SOURCE’). Instead the old function names now
  4198. reference the new functions, e.g., a call to ‘fseeko’ now indeed
  4199. calls ‘fseeko64’.
  4200. This macro should only be selected if the system provides
  4201. mechanisms for handling large files. On 64 bit systems this macro
  4202. has no effect since the ‘*64’ functions are identical to the normal
  4203. functions.
  4204. This macro was introduced as part of the Large File Support
  4205. extension (LFS).
  4206. -- Macro: _ISOC99_SOURCE
  4207. If this macro is defined, features from ISO C99 are included.
  4208. Since these features are included by default, this macro is mostly
  4209. relevant when the compiler uses an earlier language version.
  4210. -- Macro: _ISOC11_SOURCE
  4211. If this macro is defined, ISO C11 extensions to ISO C99 are
  4212. included.
  4213. -- Macro: _ISOC2X_SOURCE
  4214. If this macro is defined, ISO C2X extensions to ISO C11 are
  4215. included. Only some features from this draft standard are
  4216. supported by the GNU C Library.
  4217. -- Macro: __STDC_WANT_LIB_EXT2__
  4218. If you define this macro to the value ‘1’, features from ISO/IEC TR
  4219. 24731-2:2010 (Dynamic Allocation Functions) are enabled. Only some
  4220. of the features from this TR are supported by the GNU C Library.
  4221. -- Macro: __STDC_WANT_IEC_60559_BFP_EXT__
  4222. If you define this macro, features from ISO/IEC TS 18661-1:2014
  4223. (Floating-point extensions for C: Binary floating-point arithmetic)
  4224. are enabled. Only some of the features from this TS are supported
  4225. by the GNU C Library.
  4226. -- Macro: __STDC_WANT_IEC_60559_FUNCS_EXT__
  4227. If you define this macro, features from ISO/IEC TS 18661-4:2015
  4228. (Floating-point extensions for C: Supplementary functions) are
  4229. enabled. Only some of the features from this TS are supported by
  4230. the GNU C Library.
  4231. -- Macro: __STDC_WANT_IEC_60559_TYPES_EXT__
  4232. If you define this macro, features from ISO/IEC TS 18661-3:2015
  4233. (Floating-point extensions for C: Interchange and extended types)
  4234. are enabled. Only some of the features from this TS are supported
  4235. by the GNU C Library.
  4236. -- Macro: _GNU_SOURCE
  4237. If you define this macro, everything is included: ISO C89, ISO C99,
  4238. POSIX.1, POSIX.2, BSD, SVID, X/Open, LFS, and GNU extensions. In
  4239. the cases where POSIX.1 conflicts with BSD, the POSIX definitions
  4240. take precedence.
  4241. -- Macro: _DEFAULT_SOURCE
  4242. If you define this macro, most features are included apart from
  4243. X/Open, LFS and GNU extensions: the effect is to enable features
  4244. from the 2008 edition of POSIX, as well as certain BSD and SVID
  4245. features without a separate feature test macro to control them.
  4246. Be aware that compiler options also affect included features:
  4247. • If you use a strict conformance option, features beyond those
  4248. from the compiler’s language version will be disabled, though
  4249. feature test macros may be used to enable them.
  4250. • Features enabled by compiler options are not overridden by
  4251. feature test macros.
  4252. -- Macro: _ATFILE_SOURCE
  4253. If this macro is defined, additional ‘*at’ interfaces are included.
  4254. -- Macro: _FORTIFY_SOURCE
  4255. If this macro is defined to 1, security hardening is added to
  4256. various library functions. If defined to 2, even stricter checks
  4257. are applied. If defined to 3, the GNU C Library may also use
  4258. checks that may have an additional performance overhead.
  4259. -- Macro: _REENTRANT
  4260. -- Macro: _THREAD_SAFE
  4261. These macros are obsolete. They have the same effect as defining
  4262. ‘_POSIX_C_SOURCE’ with the value ‘199506L’.
  4263. Some very old C libraries required one of these macros to be
  4264. defined for basic functionality (e.g. ‘getchar’) to be thread-safe.
  4265. We recommend you use ‘_GNU_SOURCE’ in new programs. If you don’t
  4266. specify the ‘-ansi’ option to GCC, or other conformance options such as
  4267. ‘-std=c99’, and don’t define any of these macros explicitly, the effect
  4268. is the same as defining ‘_DEFAULT_SOURCE’ to 1.
  4269. When you define a feature test macro to request a larger class of
  4270. features, it is harmless to define in addition a feature test macro for
  4271. a subset of those features. For example, if you define
  4272. ‘_POSIX_C_SOURCE’, then defining ‘_POSIX_SOURCE’ as well has no effect.
  4273. Likewise, if you define ‘_GNU_SOURCE’, then defining either
  4274. ‘_POSIX_SOURCE’ or ‘_POSIX_C_SOURCE’ as well has no effect.
  4275. 
  4276. File: libc.info, Node: Roadmap to the Manual, Prev: Using the Library, Up: Introduction
  4277. 1.4 Roadmap to the Manual
  4278. =========================
  4279. Here is an overview of the contents of the remaining chapters of this
  4280. manual.
  4281. • *note Error Reporting::, describes how errors detected by the
  4282. library are reported.
  4283. • *note Memory::, describes the GNU C Library’s facilities for
  4284. managing and using virtual and real memory, including dynamic
  4285. allocation of virtual memory. If you do not know in advance how
  4286. much memory your program needs, you can allocate it dynamically
  4287. instead, and manipulate it via pointers.
  4288. • *note Character Handling::, contains information about character
  4289. classification functions (such as ‘isspace’) and functions for
  4290. performing case conversion.
  4291. • *note String and Array Utilities::, has descriptions of functions
  4292. for manipulating strings (null-terminated character arrays) and
  4293. general byte arrays, including operations such as copying and
  4294. comparison.
  4295. • *note Character Set Handling::, contains information about
  4296. manipulating characters and strings using character sets larger
  4297. than will fit in the usual ‘char’ data type.
  4298. • *note Locales::, describes how selecting a particular country or
  4299. language affects the behavior of the library. For example, the
  4300. locale affects collation sequences for strings and how monetary
  4301. values are formatted.
  4302. • *note Searching and Sorting::, contains information about functions
  4303. for searching and sorting arrays. You can use these functions on
  4304. any kind of array by providing an appropriate comparison function.
  4305. • *note Pattern Matching::, presents functions for matching regular
  4306. expressions and shell file name patterns, and for expanding words
  4307. as the shell does.
  4308. • *note I/O Overview::, gives an overall look at the input and output
  4309. facilities in the library, and contains information about basic
  4310. concepts such as file names.
  4311. • *note I/O on Streams::, describes I/O operations involving streams
  4312. (or ‘FILE *’ objects). These are the normal C library functions
  4313. from ‘stdio.h’.
  4314. • *note Low-Level I/O::, contains information about I/O operations on
  4315. file descriptors. File descriptors are a lower-level mechanism
  4316. specific to the Unix family of operating systems.
  4317. • *note File System Interface::, has descriptions of operations on
  4318. entire files, such as functions for deleting and renaming them and
  4319. for creating new directories. This chapter also contains
  4320. information about how you can access the attributes of a file, such
  4321. as its owner and file protection modes.
  4322. • *note Pipes and FIFOs::, contains information about simple
  4323. interprocess communication mechanisms. Pipes allow communication
  4324. between two related processes (such as between a parent and child),
  4325. while FIFOs allow communication between processes sharing a common
  4326. file system on the same machine.
  4327. • *note Sockets::, describes a more complicated interprocess
  4328. communication mechanism that allows processes running on different
  4329. machines to communicate over a network. This chapter also contains
  4330. information about Internet host addressing and how to use the
  4331. system network databases.
  4332. • *note Low-Level Terminal Interface::, describes how you can change
  4333. the attributes of a terminal device. If you want to disable echo
  4334. of characters typed by the user, for example, read this chapter.
  4335. • *note Mathematics::, contains information about the math library
  4336. functions. These include things like random-number generators and
  4337. remainder functions on integers as well as the usual trigonometric
  4338. and exponential functions on floating-point numbers.
  4339. • *note Low-Level Arithmetic Functions: Arithmetic, describes
  4340. functions for simple arithmetic, analysis of floating-point values,
  4341. and reading numbers from strings.
  4342. • *note Date and Time::, describes functions for measuring both
  4343. calendar time and CPU time, as well as functions for setting alarms
  4344. and timers.
  4345. • *note Non-Local Exits::, contains descriptions of the ‘setjmp’ and
  4346. ‘longjmp’ functions. These functions provide a facility for
  4347. ‘goto’-like jumps which can jump from one function to another.
  4348. • *note Signal Handling::, tells you all about signals—what they are,
  4349. how to establish a handler that is called when a particular kind of
  4350. signal is delivered, and how to prevent signals from arriving
  4351. during critical sections of your program.
  4352. • *note Program Basics::, tells how your programs can access their
  4353. command-line arguments and environment variables.
  4354. • *note Processes::, contains information about how to start new
  4355. processes and run programs.
  4356. • *note Job Control::, describes functions for manipulating process
  4357. groups and the controlling terminal. This material is probably
  4358. only of interest if you are writing a shell or other program which
  4359. handles job control specially.
  4360. • *note Name Service Switch::, describes the services which are
  4361. available for looking up names in the system databases, how to
  4362. determine which service is used for which database, and how these
  4363. services are implemented so that contributors can design their own
  4364. services.
  4365. • *note User Database::, and *note Group Database::, tell you how to
  4366. access the system user and group databases.
  4367. • *note System Management::, describes functions for controlling and
  4368. getting information about the hardware and software configuration
  4369. your program is executing under.
  4370. • *note System Configuration::, tells you how you can get information
  4371. about various operating system limits. Most of these parameters
  4372. are provided for compatibility with POSIX.
  4373. • *note Language Features::, contains information about library
  4374. support for standard parts of the C language, including things like
  4375. the ‘sizeof’ operator and the symbolic constant ‘NULL’, how to
  4376. write functions accepting variable numbers of arguments, and
  4377. constants describing the ranges and other properties of the
  4378. numerical types. There is also a simple debugging mechanism which
  4379. allows you to put assertions in your code, and have diagnostic
  4380. messages printed if the tests fail.
  4381. • *note Library Summary::, gives a summary of all the functions,
  4382. variables, and macros in the library, with complete data types and
  4383. function prototypes, and says what standard or system each is
  4384. derived from.
  4385. • *note Installation::, explains how to build and install the GNU C
  4386. Library on your system, and how to report any bugs you might find.
  4387. • *note Maintenance::, explains how to add new functions or port the
  4388. library to a new system.
  4389. If you already know the name of the facility you are interested in,
  4390. you can look it up in *note Library Summary::. This gives you a summary
  4391. of its syntax and a pointer to where you can find a more detailed
  4392. description. This appendix is particularly useful if you just want to
  4393. verify the order and type of arguments to a function, for example. It
  4394. also tells you what standard or system each function, variable, or macro
  4395. is derived from.
  4396. 
  4397. File: libc.info, Node: Error Reporting, Next: Memory, Prev: Introduction, Up: Top
  4398. 2 Error Reporting
  4399. *****************
  4400. Many functions in the GNU C Library detect and report error conditions,
  4401. and sometimes your programs need to check for these error conditions.
  4402. For example, when you open an input file, you should verify that the
  4403. file was actually opened correctly, and print an error message or take
  4404. other appropriate action if the call to the library function failed.
  4405. This chapter describes how the error reporting facility works. Your
  4406. program should include the header file ‘errno.h’ to use this facility.
  4407. * Menu:
  4408. * Checking for Errors:: How errors are reported by library functions.
  4409. * Error Codes:: Error code macros; all of these expand
  4410. into integer constant values.
  4411. * Error Messages:: Mapping error codes onto error messages.
  4412. 
  4413. File: libc.info, Node: Checking for Errors, Next: Error Codes, Up: Error Reporting
  4414. 2.1 Checking for Errors
  4415. =======================
  4416. Most library functions return a special value to indicate that they have
  4417. failed. The special value is typically ‘-1’, a null pointer, or a
  4418. constant such as ‘EOF’ that is defined for that purpose. But this
  4419. return value tells you only that an error has occurred. To find out
  4420. what kind of error it was, you need to look at the error code stored in
  4421. the variable ‘errno’. This variable is declared in the header file
  4422. ‘errno.h’.
  4423. -- Variable: volatile int errno
  4424. The variable ‘errno’ contains the system error number. You can
  4425. change the value of ‘errno’.
  4426. Since ‘errno’ is declared ‘volatile’, it might be changed
  4427. asynchronously by a signal handler; see *note Defining Handlers::.
  4428. However, a properly written signal handler saves and restores the
  4429. value of ‘errno’, so you generally do not need to worry about this
  4430. possibility except when writing signal handlers.
  4431. The initial value of ‘errno’ at program startup is zero. In many
  4432. cases, when a library function encounters an error, it will set
  4433. ‘errno’ to a non-zero value to indicate what specific error
  4434. condition occurred. The documentation for each function lists the
  4435. error conditions that are possible for that function. Not all
  4436. library functions use this mechanism; some return an error code
  4437. directly, instead.
  4438. *Warning:* Many library functions may set ‘errno’ to some
  4439. meaningless non-zero value even if they did not encounter any
  4440. errors, and even if they return error codes directly. Therefore,
  4441. it is usually incorrect to check _whether_ an error occurred by
  4442. inspecting the value of ‘errno’. The proper way to check for error
  4443. is documented for each function.
  4444. *Portability Note:* ISO C specifies ‘errno’ as a “modifiable
  4445. lvalue” rather than as a variable, permitting it to be implemented
  4446. as a macro. For example, its expansion might involve a function
  4447. call, like ‘*__errno_location ()’. In fact, that is what it is on
  4448. GNU/Linux and GNU/Hurd systems. The GNU C Library, on each system,
  4449. does whatever is right for the particular system.
  4450. There are a few library functions, like ‘sqrt’ and ‘atan’, that
  4451. return a perfectly legitimate value in case of an error, but also
  4452. set ‘errno’. For these functions, if you want to check to see
  4453. whether an error occurred, the recommended method is to set ‘errno’
  4454. to zero before calling the function, and then check its value
  4455. afterward.
  4456. All the error codes have symbolic names; they are macros defined in
  4457. ‘errno.h’. The names start with ‘E’ and an upper-case letter or digit;
  4458. you should consider names of this form to be reserved names. *Note
  4459. Reserved Names::.
  4460. The error code values are all positive integers and are all distinct,
  4461. with one exception: ‘EWOULDBLOCK’ and ‘EAGAIN’ are the same. Since the
  4462. values are distinct, you can use them as labels in a ‘switch’ statement;
  4463. just don’t use both ‘EWOULDBLOCK’ and ‘EAGAIN’. Your program should not
  4464. make any other assumptions about the specific values of these symbolic
  4465. constants.
  4466. The value of ‘errno’ doesn’t necessarily have to correspond to any of
  4467. these macros, since some library functions might return other error
  4468. codes of their own for other situations. The only values that are
  4469. guaranteed to be meaningful for a particular library function are the
  4470. ones that this manual lists for that function.
  4471. Except on GNU/Hurd systems, almost any system call can return
  4472. ‘EFAULT’ if it is given an invalid pointer as an argument. Since this
  4473. could only happen as a result of a bug in your program, and since it
  4474. will not happen on GNU/Hurd systems, we have saved space by not
  4475. mentioning ‘EFAULT’ in the descriptions of individual functions.
  4476. In some Unix systems, many system calls can also return ‘EFAULT’ if
  4477. given as an argument a pointer into the stack, and the kernel for some
  4478. obscure reason fails in its attempt to extend the stack. If this ever
  4479. happens, you should probably try using statically or dynamically
  4480. allocated memory instead of stack memory on that system.
  4481. 
  4482. File: libc.info, Node: Error Codes, Next: Error Messages, Prev: Checking for Errors, Up: Error Reporting
  4483. 2.2 Error Codes
  4484. ===============
  4485. The error code macros are defined in the header file ‘errno.h’. All of
  4486. them expand into integer constant values. Some of these error codes
  4487. can’t occur on GNU systems, but they can occur using the GNU C Library
  4488. on other systems.
  4489. -- Macro: int EPERM
  4490. “Operation not permitted.” Only the owner of the file (or other
  4491. resource) or processes with special privileges can perform the
  4492. operation.
  4493. -- Macro: int ENOENT
  4494. “No such file or directory.” This is a “file doesn’t exist” error
  4495. for ordinary files that are referenced in contexts where they are
  4496. expected to already exist.
  4497. -- Macro: int ESRCH
  4498. “No such process.” No process matches the specified process ID.
  4499. -- Macro: int EINTR
  4500. “Interrupted system call.” An asynchronous signal occurred and
  4501. prevented completion of the call. When this happens, you should
  4502. try the call again.
  4503. You can choose to have functions resume after a signal that is
  4504. handled, rather than failing with ‘EINTR’; see *note Interrupted
  4505. Primitives::.
  4506. -- Macro: int EIO
  4507. “Input/output error.” Usually used for physical read or write
  4508. errors.
  4509. -- Macro: int ENXIO
  4510. “No such device or address.” The system tried to use the device
  4511. represented by a file you specified, and it couldn’t find the
  4512. device. This can mean that the device file was installed
  4513. incorrectly, or that the physical device is missing or not
  4514. correctly attached to the computer.
  4515. -- Macro: int E2BIG
  4516. “Argument list too long.” Used when the arguments passed to a new
  4517. program being executed with one of the ‘exec’ functions (*note
  4518. Executing a File::) occupy too much memory space. This condition
  4519. never arises on GNU/Hurd systems.
  4520. -- Macro: int ENOEXEC
  4521. “Exec format error.” Invalid executable file format. This
  4522. condition is detected by the ‘exec’ functions; see *note Executing
  4523. a File::.
  4524. -- Macro: int EBADF
  4525. “Bad file descriptor.” For example, I/O on a descriptor that has
  4526. been closed or reading from a descriptor open only for writing (or
  4527. vice versa).
  4528. -- Macro: int ECHILD
  4529. “No child processes.” This error happens on operations that are
  4530. supposed to manipulate child processes, when there aren’t any
  4531. processes to manipulate.
  4532. -- Macro: int EDEADLK
  4533. “Resource deadlock avoided.” Allocating a system resource would
  4534. have resulted in a deadlock situation. The system does not
  4535. guarantee that it will notice all such situations. This error
  4536. means you got lucky and the system noticed; it might just hang.
  4537. *Note File Locks::, for an example.
  4538. -- Macro: int ENOMEM
  4539. “Cannot allocate memory.” The system cannot allocate more virtual
  4540. memory because its capacity is full.
  4541. -- Macro: int EACCES
  4542. “Permission denied.” The file permissions do not allow the
  4543. attempted operation.
  4544. -- Macro: int EFAULT
  4545. “Bad address.” An invalid pointer was detected. On GNU/Hurd
  4546. systems, this error never happens; you get a signal instead.
  4547. -- Macro: int ENOTBLK
  4548. “Block device required.” A file that isn’t a block special file was
  4549. given in a situation that requires one. For example, trying to
  4550. mount an ordinary file as a file system in Unix gives this error.
  4551. -- Macro: int EBUSY
  4552. “Device or resource busy.” A system resource that can’t be shared
  4553. is already in use. For example, if you try to delete a file that
  4554. is the root of a currently mounted filesystem, you get this error.
  4555. -- Macro: int EEXIST
  4556. “File exists.” An existing file was specified in a context where it
  4557. only makes sense to specify a new file.
  4558. -- Macro: int EXDEV
  4559. “Invalid cross-device link.” An attempt to make an improper link
  4560. across file systems was detected. This happens not only when you
  4561. use ‘link’ (*note Hard Links::) but also when you rename a file
  4562. with ‘rename’ (*note Renaming Files::).
  4563. -- Macro: int ENODEV
  4564. “No such device.” The wrong type of device was given to a function
  4565. that expects a particular sort of device.
  4566. -- Macro: int ENOTDIR
  4567. “Not a directory.” A file that isn’t a directory was specified when
  4568. a directory is required.
  4569. -- Macro: int EISDIR
  4570. “Is a directory.” You cannot open a directory for writing, or
  4571. create or remove hard links to it.
  4572. -- Macro: int EINVAL
  4573. “Invalid argument.” This is used to indicate various kinds of
  4574. problems with passing the wrong argument to a library function.
  4575. -- Macro: int EMFILE
  4576. “Too many open files.” The current process has too many files open
  4577. and can’t open any more. Duplicate descriptors do count toward
  4578. this limit.
  4579. In BSD and GNU, the number of open files is controlled by a
  4580. resource limit that can usually be increased. If you get this
  4581. error, you might want to increase the ‘RLIMIT_NOFILE’ limit or make
  4582. it unlimited; *note Limits on Resources::.
  4583. -- Macro: int ENFILE
  4584. “Too many open files in system.” There are too many distinct file
  4585. openings in the entire system. Note that any number of linked
  4586. channels count as just one file opening; see *note Linked
  4587. Channels::. This error never occurs on GNU/Hurd systems.
  4588. -- Macro: int ENOTTY
  4589. “Inappropriate ioctl for device.” Inappropriate I/O control
  4590. operation, such as trying to set terminal modes on an ordinary
  4591. file.
  4592. -- Macro: int ETXTBSY
  4593. “Text file busy.” An attempt to execute a file that is currently
  4594. open for writing, or write to a file that is currently being
  4595. executed. Often using a debugger to run a program is considered
  4596. having it open for writing and will cause this error. (The name
  4597. stands for “text file busy”.) This is not an error on GNU/Hurd
  4598. systems; the text is copied as necessary.
  4599. -- Macro: int EFBIG
  4600. “File too large.” The size of a file would be larger than allowed
  4601. by the system.
  4602. -- Macro: int ENOSPC
  4603. “No space left on device.” Write operation on a file failed because
  4604. the disk is full.
  4605. -- Macro: int ESPIPE
  4606. “Illegal seek.” Invalid seek operation (such as on a pipe).
  4607. -- Macro: int EROFS
  4608. “Read-only file system.” An attempt was made to modify something on
  4609. a read-only file system.
  4610. -- Macro: int EMLINK
  4611. “Too many links.” The link count of a single file would become too
  4612. large. ‘rename’ can cause this error if the file being renamed
  4613. already has as many links as it can take (*note Renaming Files::).
  4614. -- Macro: int EPIPE
  4615. “Broken pipe.” There is no process reading from the other end of a
  4616. pipe. Every library function that returns this error code also
  4617. generates a ‘SIGPIPE’ signal; this signal terminates the program if
  4618. not handled or blocked. Thus, your program will never actually see
  4619. ‘EPIPE’ unless it has handled or blocked ‘SIGPIPE’.
  4620. -- Macro: int EDOM
  4621. “Numerical argument out of domain.” Used by mathematical functions
  4622. when an argument value does not fall into the domain over which the
  4623. function is defined.
  4624. -- Macro: int ERANGE
  4625. “Numerical result out of range.” Used by mathematical functions
  4626. when the result value is not representable because of overflow or
  4627. underflow.
  4628. -- Macro: int EAGAIN
  4629. “Resource temporarily unavailable.” The call might work if you try
  4630. again later. The macro ‘EWOULDBLOCK’ is another name for ‘EAGAIN’;
  4631. they are always the same in the GNU C Library.
  4632. This error can happen in a few different situations:
  4633. • An operation that would block was attempted on an object that
  4634. has non-blocking mode selected. Trying the same operation
  4635. again will block until some external condition makes it
  4636. possible to read, write, or connect (whatever the operation).
  4637. You can use ‘select’ to find out when the operation will be
  4638. possible; *note Waiting for I/O::.
  4639. *Portability Note:* In many older Unix systems, this condition
  4640. was indicated by ‘EWOULDBLOCK’, which was a distinct error
  4641. code different from ‘EAGAIN’. To make your program portable,
  4642. you should check for both codes and treat them the same.
  4643. • A temporary resource shortage made an operation impossible.
  4644. ‘fork’ can return this error. It indicates that the shortage
  4645. is expected to pass, so your program can try the call again
  4646. later and it may succeed. It is probably a good idea to delay
  4647. for a few seconds before trying it again, to allow time for
  4648. other processes to release scarce resources. Such shortages
  4649. are usually fairly serious and affect the whole system, so
  4650. usually an interactive program should report the error to the
  4651. user and return to its command loop.
  4652. -- Macro: int EWOULDBLOCK
  4653. “Operation would block.” In the GNU C Library, this is another name
  4654. for ‘EAGAIN’ (above). The values are always the same, on every
  4655. operating system.
  4656. C libraries in many older Unix systems have ‘EWOULDBLOCK’ as a
  4657. separate error code.
  4658. -- Macro: int EINPROGRESS
  4659. “Operation now in progress.” An operation that cannot complete
  4660. immediately was initiated on an object that has non-blocking mode
  4661. selected. Some functions that must always block (such as
  4662. ‘connect’; *note Connecting::) never return ‘EAGAIN’. Instead,
  4663. they return ‘EINPROGRESS’ to indicate that the operation has begun
  4664. and will take some time. Attempts to manipulate the object before
  4665. the call completes return ‘EALREADY’. You can use the ‘select’
  4666. function to find out when the pending operation has completed;
  4667. *note Waiting for I/O::.
  4668. -- Macro: int EALREADY
  4669. “Operation already in progress.” An operation is already in
  4670. progress on an object that has non-blocking mode selected.
  4671. -- Macro: int ENOTSOCK
  4672. “Socket operation on non-socket.” A file that isn’t a socket was
  4673. specified when a socket is required.
  4674. -- Macro: int EMSGSIZE
  4675. “Message too long.” The size of a message sent on a socket was
  4676. larger than the supported maximum size.
  4677. -- Macro: int EPROTOTYPE
  4678. “Protocol wrong type for socket.” The socket type does not support
  4679. the requested communications protocol.
  4680. -- Macro: int ENOPROTOOPT
  4681. “Protocol not available.” You specified a socket option that
  4682. doesn’t make sense for the particular protocol being used by the
  4683. socket. *Note Socket Options::.
  4684. -- Macro: int EPROTONOSUPPORT
  4685. “Protocol not supported.” The socket domain does not support the
  4686. requested communications protocol (perhaps because the requested
  4687. protocol is completely invalid). *Note Creating a Socket::.
  4688. -- Macro: int ESOCKTNOSUPPORT
  4689. “Socket type not supported.” The socket type is not supported.
  4690. -- Macro: int EOPNOTSUPP
  4691. “Operation not supported.” The operation you requested is not
  4692. supported. Some socket functions don’t make sense for all types of
  4693. sockets, and others may not be implemented for all communications
  4694. protocols. On GNU/Hurd systems, this error can happen for many
  4695. calls when the object does not support the particular operation; it
  4696. is a generic indication that the server knows nothing to do for
  4697. that call.
  4698. -- Macro: int EPFNOSUPPORT
  4699. “Protocol family not supported.” The socket communications protocol
  4700. family you requested is not supported.
  4701. -- Macro: int EAFNOSUPPORT
  4702. “Address family not supported by protocol.” The address family
  4703. specified for a socket is not supported; it is inconsistent with
  4704. the protocol being used on the socket. *Note Sockets::.
  4705. -- Macro: int EADDRINUSE
  4706. “Address already in use.” The requested socket address is already
  4707. in use. *Note Socket Addresses::.
  4708. -- Macro: int EADDRNOTAVAIL
  4709. “Cannot assign requested address.” The requested socket address is
  4710. not available; for example, you tried to give a socket a name that
  4711. doesn’t match the local host name. *Note Socket Addresses::.
  4712. -- Macro: int ENETDOWN
  4713. “Network is down.” A socket operation failed because the network
  4714. was down.
  4715. -- Macro: int ENETUNREACH
  4716. “Network is unreachable.” A socket operation failed because the
  4717. subnet containing the remote host was unreachable.
  4718. -- Macro: int ENETRESET
  4719. “Network dropped connection on reset.” A network connection was
  4720. reset because the remote host crashed.
  4721. -- Macro: int ECONNABORTED
  4722. “Software caused connection abort.” A network connection was
  4723. aborted locally.
  4724. -- Macro: int ECONNRESET
  4725. “Connection reset by peer.” A network connection was closed for
  4726. reasons outside the control of the local host, such as by the
  4727. remote machine rebooting or an unrecoverable protocol violation.
  4728. -- Macro: int ENOBUFS
  4729. “No buffer space available.” The kernel’s buffers for I/O
  4730. operations are all in use. In GNU, this error is always synonymous
  4731. with ‘ENOMEM’; you may get one or the other from network
  4732. operations.
  4733. -- Macro: int EISCONN
  4734. “Transport endpoint is already connected.” You tried to connect a
  4735. socket that is already connected. *Note Connecting::.
  4736. -- Macro: int ENOTCONN
  4737. “Transport endpoint is not connected.” The socket is not connected
  4738. to anything. You get this error when you try to transmit data over
  4739. a socket, without first specifying a destination for the data. For
  4740. a connectionless socket (for datagram protocols, such as UDP), you
  4741. get ‘EDESTADDRREQ’ instead.
  4742. -- Macro: int EDESTADDRREQ
  4743. “Destination address required.” No default destination address was
  4744. set for the socket. You get this error when you try to transmit
  4745. data over a connectionless socket, without first specifying a
  4746. destination for the data with ‘connect’.
  4747. -- Macro: int ESHUTDOWN
  4748. “Cannot send after transport endpoint shutdown.” The socket has
  4749. already been shut down.
  4750. -- Macro: int ETOOMANYREFS
  4751. “Too many references: cannot splice.”
  4752. -- Macro: int ETIMEDOUT
  4753. “Connection timed out.” A socket operation with a specified timeout
  4754. received no response during the timeout period.
  4755. -- Macro: int ECONNREFUSED
  4756. “Connection refused.” A remote host refused to allow the network
  4757. connection (typically because it is not running the requested
  4758. service).
  4759. -- Macro: int ELOOP
  4760. “Too many levels of symbolic links.” Too many levels of symbolic
  4761. links were encountered in looking up a file name. This often
  4762. indicates a cycle of symbolic links.
  4763. -- Macro: int ENAMETOOLONG
  4764. “File name too long.” Filename too long (longer than ‘PATH_MAX’;
  4765. *note Limits for Files::) or host name too long (in ‘gethostname’
  4766. or ‘sethostname’; *note Host Identification::).
  4767. -- Macro: int EHOSTDOWN
  4768. “Host is down.” The remote host for a requested network connection
  4769. is down.
  4770. -- Macro: int EHOSTUNREACH
  4771. “No route to host.” The remote host for a requested network
  4772. connection is not reachable.
  4773. -- Macro: int ENOTEMPTY
  4774. “Directory not empty.” Directory not empty, where an empty
  4775. directory was expected. Typically, this error occurs when you are
  4776. trying to delete a directory.
  4777. -- Macro: int EPROCLIM
  4778. “Too many processes.” This means that the per-user limit on new
  4779. process would be exceeded by an attempted ‘fork’. *Note Limits on
  4780. Resources::, for details on the ‘RLIMIT_NPROC’ limit.
  4781. -- Macro: int EUSERS
  4782. “Too many users.” The file quota system is confused because there
  4783. are too many users.
  4784. -- Macro: int EDQUOT
  4785. “Disk quota exceeded.” The user’s disk quota was exceeded.
  4786. -- Macro: int ESTALE
  4787. “Stale file handle.” This indicates an internal confusion in the
  4788. file system which is due to file system rearrangements on the
  4789. server host for NFS file systems or corruption in other file
  4790. systems. Repairing this condition usually requires unmounting,
  4791. possibly repairing and remounting the file system.
  4792. -- Macro: int EREMOTE
  4793. “Object is remote.” An attempt was made to NFS-mount a remote file
  4794. system with a file name that already specifies an NFS-mounted file.
  4795. (This is an error on some operating systems, but we expect it to
  4796. work properly on GNU/Hurd systems, making this error code
  4797. impossible.)
  4798. -- Macro: int EBADRPC
  4799. “RPC struct is bad.”
  4800. -- Macro: int ERPCMISMATCH
  4801. “RPC version wrong.”
  4802. -- Macro: int EPROGUNAVAIL
  4803. “RPC program not available.”
  4804. -- Macro: int EPROGMISMATCH
  4805. “RPC program version wrong.”
  4806. -- Macro: int EPROCUNAVAIL
  4807. “RPC bad procedure for program.”
  4808. -- Macro: int ENOLCK
  4809. “No locks available.” This is used by the file locking facilities;
  4810. see *note File Locks::. This error is never generated by GNU/Hurd
  4811. systems, but it can result from an operation to an NFS server
  4812. running another operating system.
  4813. -- Macro: int EFTYPE
  4814. “Inappropriate file type or format.” The file was the wrong type
  4815. for the operation, or a data file had the wrong format.
  4816. On some systems ‘chmod’ returns this error if you try to set the
  4817. sticky bit on a non-directory file; *note Setting Permissions::.
  4818. -- Macro: int EAUTH
  4819. “Authentication error.”
  4820. -- Macro: int ENEEDAUTH
  4821. “Need authenticator.”
  4822. -- Macro: int ENOSYS
  4823. “Function not implemented.” This indicates that the function called
  4824. is not implemented at all, either in the C library itself or in the
  4825. operating system. When you get this error, you can be sure that
  4826. this particular function will always fail with ‘ENOSYS’ unless you
  4827. install a new version of the C library or the operating system.
  4828. -- Macro: int ENOTSUP
  4829. “Not supported.” A function returns this error when certain
  4830. parameter values are valid, but the functionality they request is
  4831. not available. This can mean that the function does not implement
  4832. a particular command or option value or flag bit at all. For
  4833. functions that operate on some object given in a parameter, such as
  4834. a file descriptor or a port, it might instead mean that only _that
  4835. specific object_ (file descriptor, port, etc.) is unable to
  4836. support the other parameters given; different file descriptors
  4837. might support different ranges of parameter values.
  4838. If the entire function is not available at all in the
  4839. implementation, it returns ‘ENOSYS’ instead.
  4840. -- Macro: int EILSEQ
  4841. “Invalid or incomplete multibyte or wide character.” While decoding
  4842. a multibyte character the function came along an invalid or an
  4843. incomplete sequence of bytes or the given wide character is
  4844. invalid.
  4845. -- Macro: int EBACKGROUND
  4846. “Inappropriate operation for background process.” On GNU/Hurd
  4847. systems, servers supporting the ‘term’ protocol return this error
  4848. for certain operations when the caller is not in the foreground
  4849. process group of the terminal. Users do not usually see this error
  4850. because functions such as ‘read’ and ‘write’ translate it into a
  4851. ‘SIGTTIN’ or ‘SIGTTOU’ signal. *Note Job Control::, for
  4852. information on process groups and these signals.
  4853. -- Macro: int EDIED
  4854. “Translator died.” On GNU/Hurd systems, opening a file returns this
  4855. error when the file is translated by a program and the translator
  4856. program dies while starting up, before it has connected to the
  4857. file.
  4858. -- Macro: int ED
  4859. “?.” The experienced user will know what is wrong.
  4860. -- Macro: int EGREGIOUS
  4861. “You really blew it this time.” You did *what*?
  4862. -- Macro: int EIEIO
  4863. “Computer bought the farm.” Go home and have a glass of warm,
  4864. dairy-fresh milk.
  4865. -- Macro: int EGRATUITOUS
  4866. “Gratuitous error.” This error code has no purpose.
  4867. -- Macro: int EBADMSG
  4868. “Bad message.”
  4869. -- Macro: int EIDRM
  4870. “Identifier removed.”
  4871. -- Macro: int EMULTIHOP
  4872. “Multihop attempted.”
  4873. -- Macro: int ENODATA
  4874. “No data available.”
  4875. -- Macro: int ENOLINK
  4876. “Link has been severed.”
  4877. -- Macro: int ENOMSG
  4878. “No message of desired type.”
  4879. -- Macro: int ENOSR
  4880. “Out of streams resources.”
  4881. -- Macro: int ENOSTR
  4882. “Device not a stream.”
  4883. -- Macro: int EOVERFLOW
  4884. “Value too large for defined data type.”
  4885. -- Macro: int EPROTO
  4886. “Protocol error.”
  4887. -- Macro: int ETIME
  4888. “Timer expired.”
  4889. -- Macro: int ECANCELED
  4890. “Operation canceled.” An asynchronous operation was canceled before
  4891. it completed. *Note Asynchronous I/O::. When you call
  4892. ‘aio_cancel’, the normal result is for the operations affected to
  4893. complete with this error; *note Cancel AIO Operations::.
  4894. -- Macro: int EOWNERDEAD
  4895. “Owner died.”
  4896. -- Macro: int ENOTRECOVERABLE
  4897. “State not recoverable.”
  4898. _The following error codes are defined by the Linux/i386 kernel.
  4899. They are not yet documented._
  4900. -- Macro: int ERESTART
  4901. “Interrupted system call should be restarted.”
  4902. -- Macro: int ECHRNG
  4903. “Channel number out of range.”
  4904. -- Macro: int EL2NSYNC
  4905. “Level 2 not synchronized.”
  4906. -- Macro: int EL3HLT
  4907. “Level 3 halted.”
  4908. -- Macro: int EL3RST
  4909. “Level 3 reset.”
  4910. -- Macro: int ELNRNG
  4911. “Link number out of range.”
  4912. -- Macro: int EUNATCH
  4913. “Protocol driver not attached.”
  4914. -- Macro: int ENOCSI
  4915. “No CSI structure available.”
  4916. -- Macro: int EL2HLT
  4917. “Level 2 halted.”
  4918. -- Macro: int EBADE
  4919. “Invalid exchange.”
  4920. -- Macro: int EBADR
  4921. “Invalid request descriptor.”
  4922. -- Macro: int EXFULL
  4923. “Exchange full.”
  4924. -- Macro: int ENOANO
  4925. “No anode.”
  4926. -- Macro: int EBADRQC
  4927. “Invalid request code.”
  4928. -- Macro: int EBADSLT
  4929. “Invalid slot.”
  4930. -- Macro: int EDEADLOCK
  4931. “File locking deadlock error.”
  4932. -- Macro: int EBFONT
  4933. “Bad font file format.”
  4934. -- Macro: int ENONET
  4935. “Machine is not on the network.”
  4936. -- Macro: int ENOPKG
  4937. “Package not installed.”
  4938. -- Macro: int EADV
  4939. “Advertise error.”
  4940. -- Macro: int ESRMNT
  4941. “Srmount error.”
  4942. -- Macro: int ECOMM
  4943. “Communication error on send.”
  4944. -- Macro: int EDOTDOT
  4945. “RFS specific error.”
  4946. -- Macro: int ENOTUNIQ
  4947. “Name not unique on network.”
  4948. -- Macro: int EBADFD
  4949. “File descriptor in bad state.”
  4950. -- Macro: int EREMCHG
  4951. “Remote address changed.”
  4952. -- Macro: int ELIBACC
  4953. “Can not access a needed shared library.”
  4954. -- Macro: int ELIBBAD
  4955. “Accessing a corrupted shared library.”
  4956. -- Macro: int ELIBSCN
  4957. “.lib section in a.out corrupted.”
  4958. -- Macro: int ELIBMAX
  4959. “Attempting to link in too many shared libraries.”
  4960. -- Macro: int ELIBEXEC
  4961. “Cannot exec a shared library directly.”
  4962. -- Macro: int ESTRPIPE
  4963. “Streams pipe error.”
  4964. -- Macro: int EUCLEAN
  4965. “Structure needs cleaning.”
  4966. -- Macro: int ENOTNAM
  4967. “Not a XENIX named type file.”
  4968. -- Macro: int ENAVAIL
  4969. “No XENIX semaphores available.”
  4970. -- Macro: int EISNAM
  4971. “Is a named type file.”
  4972. -- Macro: int EREMOTEIO
  4973. “Remote I/O error.”
  4974. -- Macro: int ENOMEDIUM
  4975. “No medium found.”
  4976. -- Macro: int EMEDIUMTYPE
  4977. “Wrong medium type.”
  4978. -- Macro: int ENOKEY
  4979. “Required key not available.”
  4980. -- Macro: int EKEYEXPIRED
  4981. “Key has expired.”
  4982. -- Macro: int EKEYREVOKED
  4983. “Key has been revoked.”
  4984. -- Macro: int EKEYREJECTED
  4985. “Key was rejected by service.”
  4986. -- Macro: int ERFKILL
  4987. “Operation not possible due to RF-kill.”
  4988. -- Macro: int EHWPOISON
  4989. “Memory page has hardware error.”
  4990. 
  4991. File: libc.info, Node: Error Messages, Prev: Error Codes, Up: Error Reporting
  4992. 2.3 Error Messages
  4993. ==================
  4994. The library has functions and variables designed to make it easy for
  4995. your program to report informative error messages in the customary
  4996. format about the failure of a library call. The functions ‘strerror’
  4997. and ‘perror’ give you the standard error message for a given error code;
  4998. the variable ‘program_invocation_short_name’ gives you convenient access
  4999. to the name of the program that encountered the error.
  5000. -- Function: char * strerror (int ERRNUM)
  5001. Preliminary: | MT-Unsafe race:strerror | AS-Unsafe heap i18n |
  5002. AC-Unsafe mem | *Note POSIX Safety Concepts::.
  5003. The ‘strerror’ function maps the error code (*note Checking for
  5004. Errors::) specified by the ERRNUM argument to a descriptive error
  5005. message string. The return value is a pointer to this string.
  5006. The value ERRNUM normally comes from the variable ‘errno’.
  5007. You should not modify the string returned by ‘strerror’. Also, if
  5008. you make subsequent calls to ‘strerror’, the string might be
  5009. overwritten. (But it’s guaranteed that no library function ever
  5010. calls ‘strerror’ behind your back.)
  5011. The function ‘strerror’ is declared in ‘string.h’.
  5012. -- Function: char * strerror_r (int ERRNUM, char *BUF, size_t N)
  5013. Preliminary: | MT-Safe | AS-Unsafe i18n | AC-Unsafe | *Note POSIX
  5014. Safety Concepts::.
  5015. The ‘strerror_r’ function works like ‘strerror’ but instead of
  5016. returning the error message in a statically allocated buffer shared
  5017. by all threads in the process, it returns a private copy for the
  5018. thread. This might be either some permanent global data or a
  5019. message string in the user supplied buffer starting at BUF with the
  5020. length of N bytes.
  5021. At most N characters are written (including the NUL byte) so it is
  5022. up to the user to select a buffer large enough.
  5023. This function should always be used in multi-threaded programs
  5024. since there is no way to guarantee the string returned by
  5025. ‘strerror’ really belongs to the last call of the current thread.
  5026. The function ‘strerror_r’ is a GNU extension and it is declared in
  5027. ‘string.h’.
  5028. -- Function: void perror (const char *MESSAGE)
  5029. Preliminary: | MT-Safe race:stderr | AS-Unsafe corrupt i18n heap
  5030. lock | AC-Unsafe corrupt lock mem fd | *Note POSIX Safety
  5031. Concepts::.
  5032. This function prints an error message to the stream ‘stderr’; see
  5033. *note Standard Streams::. The orientation of ‘stderr’ is not
  5034. changed.
  5035. If you call ‘perror’ with a MESSAGE that is either a null pointer
  5036. or an empty string, ‘perror’ just prints the error message
  5037. corresponding to ‘errno’, adding a trailing newline.
  5038. If you supply a non-null MESSAGE argument, then ‘perror’ prefixes
  5039. its output with this string. It adds a colon and a space character
  5040. to separate the MESSAGE from the error string corresponding to
  5041. ‘errno’.
  5042. The function ‘perror’ is declared in ‘stdio.h’.
  5043. -- Function: const char * strerrorname_np (int ERRNUM)
  5044. | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety Concepts::.
  5045. This function returns the name describing the error ERRNUM or
  5046. ‘NULL’ if there is no known constant with this value (e.g "EINVAL"
  5047. for ‘EINVAL’).
  5048. This function is a GNU extension, declared in the header file
  5049. ‘string.h’.
  5050. -- Function: const char * strerrordesc_np (int ERRNUM)
  5051. | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety Concepts::.
  5052. This function returns the message describing the error ERRNUM or
  5053. ‘NULL’ if there is no known constant with this value (e.g "Invalid
  5054. argument" for ‘EINVAL’). Different than ‘strerror’ the returned
  5055. description is not translated.
  5056. This function is a GNU extension, declared in the header file
  5057. ‘string.h’.
  5058. ‘strerror’ and ‘perror’ produce the exact same message for any given
  5059. error code; the precise text varies from system to system. With the GNU
  5060. C Library, the messages are fairly short; there are no multi-line
  5061. messages or embedded newlines. Each error message begins with a capital
  5062. letter and does not include any terminating punctuation.
  5063. Many programs that don’t read input from the terminal are designed to
  5064. exit if any system call fails. By convention, the error message from
  5065. such a program should start with the program’s name, sans directories.
  5066. You can find that name in the variable ‘program_invocation_short_name’;
  5067. the full file name is stored the variable ‘program_invocation_name’.
  5068. -- Variable: char * program_invocation_name
  5069. This variable’s value is the name that was used to invoke the
  5070. program running in the current process. It is the same as
  5071. ‘argv[0]’. Note that this is not necessarily a useful file name;
  5072. often it contains no directory names. *Note Program Arguments::.
  5073. This variable is a GNU extension and is declared in ‘errno.h’.
  5074. -- Variable: char * program_invocation_short_name
  5075. This variable’s value is the name that was used to invoke the
  5076. program running in the current process, with directory names
  5077. removed. (That is to say, it is the same as
  5078. ‘program_invocation_name’ minus everything up to the last slash, if
  5079. any.)
  5080. This variable is a GNU extension and is declared in ‘errno.h’.
  5081. The library initialization code sets up both of these variables
  5082. before calling ‘main’.
  5083. *Portability Note:* If you want your program to work with non-GNU
  5084. libraries, you must save the value of ‘argv[0]’ in ‘main’, and then
  5085. strip off the directory names yourself. We added these extensions to
  5086. make it possible to write self-contained error-reporting subroutines
  5087. that require no explicit cooperation from ‘main’.
  5088. Here is an example showing how to handle failure to open a file
  5089. correctly. The function ‘open_sesame’ tries to open the named file for
  5090. reading and returns a stream if successful. The ‘fopen’ library
  5091. function returns a null pointer if it couldn’t open the file for some
  5092. reason. In that situation, ‘open_sesame’ constructs an appropriate
  5093. error message using the ‘strerror’ function, and terminates the program.
  5094. If we were going to make some other library calls before passing the
  5095. error code to ‘strerror’, we’d have to save it in a local variable
  5096. instead, because those other library functions might overwrite ‘errno’
  5097. in the meantime.
  5098. #define _GNU_SOURCE
  5099. #include <errno.h>
  5100. #include <stdio.h>
  5101. #include <stdlib.h>
  5102. #include <string.h>
  5103. FILE *
  5104. open_sesame (char *name)
  5105. {
  5106. FILE *stream;
  5107. errno = 0;
  5108. stream = fopen (name, "r");
  5109. if (stream == NULL)
  5110. {
  5111. fprintf (stderr, "%s: Couldn't open file %s; %s\n",
  5112. program_invocation_short_name, name, strerror (errno));
  5113. exit (EXIT_FAILURE);
  5114. }
  5115. else
  5116. return stream;
  5117. }
  5118. Using ‘perror’ has the advantage that the function is portable and
  5119. available on all systems implementing ISO C. But often the text ‘perror’
  5120. generates is not what is wanted and there is no way to extend or change
  5121. what ‘perror’ does. The GNU coding standard, for instance, requires
  5122. error messages to be preceded by the program name and programs which
  5123. read some input files should provide information about the input file
  5124. name and the line number in case an error is encountered while reading
  5125. the file. For these occasions there are two functions available which
  5126. are widely used throughout the GNU project. These functions are
  5127. declared in ‘error.h’.
  5128. -- Function: void error (int STATUS, int ERRNUM, const char *FORMAT,
  5129. ...)
  5130. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap i18n |
  5131. AC-Safe | *Note POSIX Safety Concepts::.
  5132. The ‘error’ function can be used to report general problems during
  5133. program execution. The FORMAT argument is a format string just
  5134. like those given to the ‘printf’ family of functions. The
  5135. arguments required for the format can follow the FORMAT parameter.
  5136. Just like ‘perror’, ‘error’ also can report an error code in
  5137. textual form. But unlike ‘perror’ the error value is explicitly
  5138. passed to the function in the ERRNUM parameter. This eliminates
  5139. the problem mentioned above that the error reporting function must
  5140. be called immediately after the function causing the error since
  5141. otherwise ‘errno’ might have a different value.
  5142. ‘error’ prints first the program name. If the application defined
  5143. a global variable ‘error_print_progname’ and points it to a
  5144. function this function will be called to print the program name.
  5145. Otherwise the string from the global variable ‘program_name’ is
  5146. used. The program name is followed by a colon and a space which in
  5147. turn is followed by the output produced by the format string. If
  5148. the ERRNUM parameter is non-zero the format string output is
  5149. followed by a colon and a space, followed by the error message for
  5150. the error code ERRNUM. In any case is the output terminated with a
  5151. newline.
  5152. The output is directed to the ‘stderr’ stream. If the ‘stderr’
  5153. wasn’t oriented before the call it will be narrow-oriented
  5154. afterwards.
  5155. The function will return unless the STATUS parameter has a non-zero
  5156. value. In this case the function will call ‘exit’ with the STATUS
  5157. value for its parameter and therefore never return. If ‘error’
  5158. returns, the global variable ‘error_message_count’ is incremented
  5159. by one to keep track of the number of errors reported.
  5160. -- Function: void error_at_line (int STATUS, int ERRNUM, const char
  5161. *FNAME, unsigned int LINENO, const char *FORMAT, ...)
  5162. Preliminary: | MT-Unsafe race:error_at_line/error_one_per_line
  5163. locale | AS-Unsafe corrupt heap i18n | AC-Unsafe
  5164. corrupt/error_one_per_line | *Note POSIX Safety Concepts::.
  5165. The ‘error_at_line’ function is very similar to the ‘error’
  5166. function. The only differences are the additional parameters FNAME
  5167. and LINENO. The handling of the other parameters is identical to
  5168. that of ‘error’ except that between the program name and the string
  5169. generated by the format string additional text is inserted.
  5170. Directly following the program name a colon, followed by the file
  5171. name pointed to by FNAME, another colon, and the value of LINENO is
  5172. printed.
  5173. This additional output of course is meant to be used to locate an
  5174. error in an input file (like a programming language source code
  5175. file etc).
  5176. If the global variable ‘error_one_per_line’ is set to a non-zero
  5177. value ‘error_at_line’ will avoid printing consecutive messages for
  5178. the same file and line. Repetition which are not directly
  5179. following each other are not caught.
  5180. Just like ‘error’ this function only returns if STATUS is zero.
  5181. Otherwise ‘exit’ is called with the non-zero value. If ‘error’
  5182. returns, the global variable ‘error_message_count’ is incremented
  5183. by one to keep track of the number of errors reported.
  5184. As mentioned above, the ‘error’ and ‘error_at_line’ functions can be
  5185. customized by defining a variable named ‘error_print_progname’.
  5186. -- Variable: void (*error_print_progname) (void)
  5187. If the ‘error_print_progname’ variable is defined to a non-zero
  5188. value the function pointed to is called by ‘error’ or
  5189. ‘error_at_line’. It is expected to print the program name or do
  5190. something similarly useful.
  5191. The function is expected to print to the ‘stderr’ stream and must
  5192. be able to handle whatever orientation the stream has.
  5193. The variable is global and shared by all threads.
  5194. -- Variable: unsigned int error_message_count
  5195. The ‘error_message_count’ variable is incremented whenever one of
  5196. the functions ‘error’ or ‘error_at_line’ returns. The variable is
  5197. global and shared by all threads.
  5198. -- Variable: int error_one_per_line
  5199. The ‘error_one_per_line’ variable influences only ‘error_at_line’.
  5200. Normally the ‘error_at_line’ function creates output for every
  5201. invocation. If ‘error_one_per_line’ is set to a non-zero value
  5202. ‘error_at_line’ keeps track of the last file name and line number
  5203. for which an error was reported and avoids directly following
  5204. messages for the same file and line. This variable is global and
  5205. shared by all threads.
  5206. A program which read some input file and reports errors in it could look
  5207. like this:
  5208. {
  5209. char *line = NULL;
  5210. size_t len = 0;
  5211. unsigned int lineno = 0;
  5212. error_message_count = 0;
  5213. while (! feof_unlocked (fp))
  5214. {
  5215. ssize_t n = getline (&line, &len, fp);
  5216. if (n <= 0)
  5217. /* End of file or error. */
  5218. break;
  5219. ++lineno;
  5220. /* Process the line. */
  5221. ...
  5222. if (Detect error in line)
  5223. error_at_line (0, errval, filename, lineno,
  5224. "some error text %s", some_variable);
  5225. }
  5226. if (error_message_count != 0)
  5227. error (EXIT_FAILURE, 0, "%u errors found", error_message_count);
  5228. }
  5229. ‘error’ and ‘error_at_line’ are clearly the functions of choice and
  5230. enable the programmer to write applications which follow the GNU coding
  5231. standard. The GNU C Library additionally contains functions which are
  5232. used in BSD for the same purpose. These functions are declared in
  5233. ‘err.h’. It is generally advised to not use these functions. They are
  5234. included only for compatibility.
  5235. -- Function: void warn (const char *FORMAT, ...)
  5236. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap i18n |
  5237. AC-Unsafe corrupt lock mem | *Note POSIX Safety Concepts::.
  5238. The ‘warn’ function is roughly equivalent to a call like
  5239. error (0, errno, format, the parameters)
  5240. except that the global variables ‘error’ respects and modifies are
  5241. not used.
  5242. -- Function: void vwarn (const char *FORMAT, va_list AP)
  5243. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap i18n |
  5244. AC-Unsafe corrupt lock mem | *Note POSIX Safety Concepts::.
  5245. The ‘vwarn’ function is just like ‘warn’ except that the parameters
  5246. for the handling of the format string FORMAT are passed in as a
  5247. value of type ‘va_list’.
  5248. -- Function: void warnx (const char *FORMAT, ...)
  5249. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  5250. corrupt lock mem | *Note POSIX Safety Concepts::.
  5251. The ‘warnx’ function is roughly equivalent to a call like
  5252. error (0, 0, format, the parameters)
  5253. except that the global variables ‘error’ respects and modifies are
  5254. not used. The difference to ‘warn’ is that no error number string
  5255. is printed.
  5256. -- Function: void vwarnx (const char *FORMAT, va_list AP)
  5257. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  5258. corrupt lock mem | *Note POSIX Safety Concepts::.
  5259. The ‘vwarnx’ function is just like ‘warnx’ except that the
  5260. parameters for the handling of the format string FORMAT are passed
  5261. in as a value of type ‘va_list’.
  5262. -- Function: void err (int STATUS, const char *FORMAT, ...)
  5263. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap i18n |
  5264. AC-Unsafe corrupt lock mem | *Note POSIX Safety Concepts::.
  5265. The ‘err’ function is roughly equivalent to a call like
  5266. error (status, errno, format, the parameters)
  5267. except that the global variables ‘error’ respects and modifies are
  5268. not used and that the program is exited even if STATUS is zero.
  5269. -- Function: void verr (int STATUS, const char *FORMAT, va_list AP)
  5270. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap i18n |
  5271. AC-Unsafe corrupt lock mem | *Note POSIX Safety Concepts::.
  5272. The ‘verr’ function is just like ‘err’ except that the parameters
  5273. for the handling of the format string FORMAT are passed in as a
  5274. value of type ‘va_list’.
  5275. -- Function: void errx (int STATUS, const char *FORMAT, ...)
  5276. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  5277. corrupt lock mem | *Note POSIX Safety Concepts::.
  5278. The ‘errx’ function is roughly equivalent to a call like
  5279. error (status, 0, format, the parameters)
  5280. except that the global variables ‘error’ respects and modifies are
  5281. not used and that the program is exited even if STATUS is zero.
  5282. The difference to ‘err’ is that no error number string is printed.
  5283. -- Function: void verrx (int STATUS, const char *FORMAT, va_list AP)
  5284. Preliminary: | MT-Safe locale | AS-Unsafe corrupt heap | AC-Unsafe
  5285. corrupt lock mem | *Note POSIX Safety Concepts::.
  5286. The ‘verrx’ function is just like ‘errx’ except that the parameters
  5287. for the handling of the format string FORMAT are passed in as a
  5288. value of type ‘va_list’.
  5289. 
  5290. File: libc.info, Node: Memory, Next: Character Handling, Prev: Error Reporting, Up: Top
  5291. 3 Virtual Memory Allocation And Paging
  5292. **************************************
  5293. This chapter describes how processes manage and use memory in a system
  5294. that uses the GNU C Library.
  5295. The GNU C Library has several functions for dynamically allocating
  5296. virtual memory in various ways. They vary in generality and in
  5297. efficiency. The library also provides functions for controlling paging
  5298. and allocation of real memory.
  5299. * Menu:
  5300. * Memory Concepts:: An introduction to concepts and terminology.
  5301. * Memory Allocation:: Allocating storage for your program data
  5302. * Resizing the Data Segment:: ‘brk’, ‘sbrk’
  5303. * Memory Protection:: Controlling access to memory regions.
  5304. * Locking Pages:: Preventing page faults
  5305. Memory mapped I/O is not discussed in this chapter. *Note
  5306. Memory-mapped I/O::.
  5307. 
  5308. File: libc.info, Node: Memory Concepts, Next: Memory Allocation, Up: Memory
  5309. 3.1 Process Memory Concepts
  5310. ===========================
  5311. One of the most basic resources a process has available to it is memory.
  5312. There are a lot of different ways systems organize memory, but in a
  5313. typical one, each process has one linear virtual address space, with
  5314. addresses running from zero to some huge maximum. It need not be
  5315. contiguous; i.e., not all of these addresses actually can be used to
  5316. store data.
  5317. The virtual memory is divided into pages (4 kilobytes is typical).
  5318. Backing each page of virtual memory is a page of real memory (called a
  5319. “frame”) or some secondary storage, usually disk space. The disk space
  5320. might be swap space or just some ordinary disk file. Actually, a page
  5321. of all zeroes sometimes has nothing at all backing it – there’s just a
  5322. flag saying it is all zeroes.
  5323. The same frame of real memory or backing store can back multiple
  5324. virtual pages belonging to multiple processes. This is normally the
  5325. case, for example, with virtual memory occupied by GNU C Library code.
  5326. The same real memory frame containing the ‘printf’ function backs a
  5327. virtual memory page in each of the existing processes that has a
  5328. ‘printf’ call in its program.
  5329. In order for a program to access any part of a virtual page, the page
  5330. must at that moment be backed by (“connected to”) a real frame. But
  5331. because there is usually a lot more virtual memory than real memory, the
  5332. pages must move back and forth between real memory and backing store
  5333. regularly, coming into real memory when a process needs to access them
  5334. and then retreating to backing store when not needed anymore. This
  5335. movement is called “paging”.
  5336. When a program attempts to access a page which is not at that moment
  5337. backed by real memory, this is known as a “page fault”. When a page
  5338. fault occurs, the kernel suspends the process, places the page into a
  5339. real page frame (this is called “paging in” or “faulting in”), then
  5340. resumes the process so that from the process’ point of view, the page
  5341. was in real memory all along. In fact, to the process, all pages always
  5342. seem to be in real memory. Except for one thing: the elapsed execution
  5343. time of an instruction that would normally be a few nanoseconds is
  5344. suddenly much, much, longer (because the kernel normally has to do I/O
  5345. to complete the page-in). For programs sensitive to that, the functions
  5346. described in *note Locking Pages:: can control it.
  5347. Within each virtual address space, a process has to keep track of
  5348. what is at which addresses, and that process is called memory
  5349. allocation. Allocation usually brings to mind meting out scarce
  5350. resources, but in the case of virtual memory, that’s not a major goal,
  5351. because there is generally much more of it than anyone needs. Memory
  5352. allocation within a process is mainly just a matter of making sure that
  5353. the same byte of memory isn’t used to store two different things.
  5354. Processes allocate memory in two major ways: by exec and
  5355. programmatically. Actually, forking is a third way, but it’s not very
  5356. interesting. *Note Creating a Process::.
  5357. Exec is the operation of creating a virtual address space for a
  5358. process, loading its basic program into it, and executing the program.
  5359. It is done by the “exec” family of functions (e.g. ‘execl’). The
  5360. operation takes a program file (an executable), it allocates space to
  5361. load all the data in the executable, loads it, and transfers control to
  5362. it. That data is most notably the instructions of the program (the
  5363. “text”), but also literals and constants in the program and even some
  5364. variables: C variables with the static storage class (*note Memory
  5365. Allocation and C::).
  5366. Once that program begins to execute, it uses programmatic allocation
  5367. to gain additional memory. In a C program with the GNU C Library, there
  5368. are two kinds of programmatic allocation: automatic and dynamic. *Note
  5369. Memory Allocation and C::.
  5370. Memory-mapped I/O is another form of dynamic virtual memory
  5371. allocation. Mapping memory to a file means declaring that the contents
  5372. of certain range of a process’ addresses shall be identical to the
  5373. contents of a specified regular file. The system makes the virtual
  5374. memory initially contain the contents of the file, and if you modify the
  5375. memory, the system writes the same modification to the file. Note that
  5376. due to the magic of virtual memory and page faults, there is no reason
  5377. for the system to do I/O to read the file, or allocate real memory for
  5378. its contents, until the program accesses the virtual memory. *Note
  5379. Memory-mapped I/O::.
  5380. Just as it programmatically allocates memory, the program can
  5381. programmatically deallocate (“free”) it. You can’t free the memory that
  5382. was allocated by exec. When the program exits or execs, you might say
  5383. that all its memory gets freed, but since in both cases the address
  5384. space ceases to exist, the point is really moot. *Note Program
  5385. Termination::.
  5386. A process’ virtual address space is divided into segments. A segment
  5387. is a contiguous range of virtual addresses. Three important segments
  5388. are:
  5389. The “text segment” contains a program’s instructions and literals
  5390. and static constants. It is allocated by exec and stays the same
  5391. size for the life of the virtual address space.
  5392. • The “data segment” is working storage for the program. It can be
  5393. preallocated and preloaded by exec and the process can extend or
  5394. shrink it by calling functions as described in *Note Resizing the
  5395. Data Segment::. Its lower end is fixed.
  5396. • The “stack segment” contains a program stack. It grows as the
  5397. stack grows, but doesn’t shrink when the stack shrinks.
  5398. 
  5399. File: libc.info, Node: Memory Allocation, Next: Resizing the Data Segment, Prev: Memory Concepts, Up: Memory
  5400. 3.2 Allocating Storage For Program Data
  5401. =======================================
  5402. This section covers how ordinary programs manage storage for their data,
  5403. including the famous ‘malloc’ function and some fancier facilities
  5404. special to the GNU C Library and GNU Compiler.
  5405. * Menu:
  5406. * Memory Allocation and C:: How to get different kinds of allocation in C.
  5407. * The GNU Allocator:: An overview of the GNU ‘malloc’
  5408. implementation.
  5409. * Unconstrained Allocation:: The ‘malloc’ facility allows fully general
  5410. dynamic allocation.
  5411. * Allocation Debugging:: Finding memory leaks and not freed memory.
  5412. * Replacing malloc:: Using your own ‘malloc’-style allocator.
  5413. * Obstacks:: Obstacks are less general than malloc
  5414. but more efficient and convenient.
  5415. * Variable Size Automatic:: Allocation of variable-sized blocks
  5416. of automatic storage that are freed when the
  5417. calling function returns.
  5418. 
  5419. File: libc.info, Node: Memory Allocation and C, Next: The GNU Allocator, Up: Memory Allocation
  5420. 3.2.1 Memory Allocation in C Programs
  5421. -------------------------------------
  5422. The C language supports two kinds of memory allocation through the
  5423. variables in C programs:
  5424. • “Static allocation” is what happens when you declare a static or
  5425. global variable. Each static or global variable defines one block
  5426. of space, of a fixed size. The space is allocated once, when your
  5427. program is started (part of the exec operation), and is never
  5428. freed.
  5429. • “Automatic allocation” happens when you declare an automatic
  5430. variable, such as a function argument or a local variable. The
  5431. space for an automatic variable is allocated when the compound
  5432. statement containing the declaration is entered, and is freed when
  5433. that compound statement is exited.
  5434. In GNU C, the size of the automatic storage can be an expression
  5435. that varies. In other C implementations, it must be a constant.
  5436. A third important kind of memory allocation, “dynamic allocation”, is
  5437. not supported by C variables but is available via GNU C Library
  5438. functions.
  5439. 3.2.1.1 Dynamic Memory Allocation
  5440. .................................
  5441. “Dynamic memory allocation” is a technique in which programs determine
  5442. as they are running where to store some information. You need dynamic
  5443. allocation when the amount of memory you need, or how long you continue
  5444. to need it, depends on factors that are not known before the program
  5445. runs.
  5446. For example, you may need a block to store a line read from an input
  5447. file; since there is no limit to how long a line can be, you must
  5448. allocate the memory dynamically and make it dynamically larger as you
  5449. read more of the line.
  5450. Or, you may need a block for each record or each definition in the
  5451. input data; since you can’t know in advance how many there will be, you
  5452. must allocate a new block for each record or definition as you read it.
  5453. When you use dynamic allocation, the allocation of a block of memory
  5454. is an action that the program requests explicitly. You call a function
  5455. or macro when you want to allocate space, and specify the size with an
  5456. argument. If you want to free the space, you do so by calling another
  5457. function or macro. You can do these things whenever you want, as often
  5458. as you want.
  5459. Dynamic allocation is not supported by C variables; there is no
  5460. storage class “dynamic”, and there can never be a C variable whose value
  5461. is stored in dynamically allocated space. The only way to get
  5462. dynamically allocated memory is via a system call (which is generally
  5463. via a GNU C Library function call), and the only way to refer to
  5464. dynamically allocated space is through a pointer. Because it is less
  5465. convenient, and because the actual process of dynamic allocation
  5466. requires more computation time, programmers generally use dynamic
  5467. allocation only when neither static nor automatic allocation will serve.
  5468. For example, if you want to allocate dynamically some space to hold a
  5469. ‘struct foobar’, you cannot declare a variable of type ‘struct foobar’
  5470. whose contents are the dynamically allocated space. But you can declare
  5471. a variable of pointer type ‘struct foobar *’ and assign it the address
  5472. of the space. Then you can use the operators ‘*’ and ‘->’ on this
  5473. pointer variable to refer to the contents of the space:
  5474. {
  5475. struct foobar *ptr
  5476. = (struct foobar *) malloc (sizeof (struct foobar));
  5477. ptr->name = x;
  5478. ptr->next = current_foobar;
  5479. current_foobar = ptr;
  5480. }
  5481. 
  5482. File: libc.info, Node: The GNU Allocator, Next: Unconstrained Allocation, Prev: Memory Allocation and C, Up: Memory Allocation
  5483. 3.2.2 The GNU Allocator
  5484. -----------------------
  5485. The ‘malloc’ implementation in the GNU C Library is derived from
  5486. ptmalloc (pthreads malloc), which in turn is derived from dlmalloc (Doug
  5487. Lea malloc). This malloc may allocate memory in two different ways
  5488. depending on their size and certain parameters that may be controlled by
  5489. users. The most common way is to allocate portions of memory (called
  5490. chunks) from a large contiguous area of memory and manage these areas to
  5491. optimize their use and reduce wastage in the form of unusable chunks.
  5492. Traditionally the system heap was set up to be the one large memory area
  5493. but the GNU C Library ‘malloc’ implementation maintains multiple such
  5494. areas to optimize their use in multi-threaded applications. Each such
  5495. area is internally referred to as an “arena”.
  5496. As opposed to other versions, the ‘malloc’ in the GNU C Library does
  5497. not round up chunk sizes to powers of two, neither for large nor for
  5498. small sizes. Neighboring chunks can be coalesced on a ‘free’ no matter
  5499. what their size is. This makes the implementation suitable for all
  5500. kinds of allocation patterns without generally incurring high memory
  5501. waste through fragmentation. The presence of multiple arenas allows
  5502. multiple threads to allocate memory simultaneously in separate arenas,
  5503. thus improving performance.
  5504. The other way of memory allocation is for very large blocks, i.e.
  5505. much larger than a page. These requests are allocated with ‘mmap’
  5506. (anonymous or via ‘/dev/zero’; *note Memory-mapped I/O::)). This has
  5507. the great advantage that these chunks are returned to the system
  5508. immediately when they are freed. Therefore, it cannot happen that a
  5509. large chunk becomes “locked” in between smaller ones and even after
  5510. calling ‘free’ wastes memory. The size threshold for ‘mmap’ to be used
  5511. is dynamic and gets adjusted according to allocation patterns of the
  5512. program. ‘mallopt’ can be used to statically adjust the threshold using
  5513. ‘M_MMAP_THRESHOLD’ and the use of ‘mmap’ can be disabled completely with
  5514. ‘M_MMAP_MAX’; *note Malloc Tunable Parameters::.
  5515. A more detailed technical description of the GNU Allocator is
  5516. maintained in the GNU C Library wiki. See
  5517. <https://sourceware.org/glibc/wiki/MallocInternals>.
  5518. It is possible to use your own custom ‘malloc’ instead of the
  5519. built-in allocator provided by the GNU C Library. *Note Replacing
  5520. malloc::.
  5521. 
  5522. File: libc.info, Node: Unconstrained Allocation, Next: Allocation Debugging, Prev: The GNU Allocator, Up: Memory Allocation
  5523. 3.2.3 Unconstrained Allocation
  5524. ------------------------------
  5525. The most general dynamic allocation facility is ‘malloc’. It allows you
  5526. to allocate blocks of memory of any size at any time, make them bigger
  5527. or smaller at any time, and free the blocks individually at any time (or
  5528. never).
  5529. * Menu:
  5530. * Basic Allocation:: Simple use of ‘malloc’.
  5531. * Malloc Examples:: Examples of ‘malloc’. ‘xmalloc’.
  5532. * Freeing after Malloc:: Use ‘free’ to free a block you
  5533. got with ‘malloc’.
  5534. * Changing Block Size:: Use ‘realloc’ to make a block
  5535. bigger or smaller.
  5536. * Allocating Cleared Space:: Use ‘calloc’ to allocate a
  5537. block and clear it.
  5538. * Aligned Memory Blocks:: Allocating specially aligned memory.
  5539. * Malloc Tunable Parameters:: Use ‘mallopt’ to adjust allocation
  5540. parameters.
  5541. * Heap Consistency Checking:: Automatic checking for errors.
  5542. * Hooks for Malloc:: You can use these hooks for debugging
  5543. programs that use ‘malloc’.
  5544. * Statistics of Malloc:: Getting information about how much
  5545. memory your program is using.
  5546. * Summary of Malloc:: Summary of ‘malloc’ and related functions.
  5547. 
  5548. File: libc.info, Node: Basic Allocation, Next: Malloc Examples, Up: Unconstrained Allocation
  5549. 3.2.3.1 Basic Memory Allocation
  5550. ...............................
  5551. To allocate a block of memory, call ‘malloc’. The prototype for this
  5552. function is in ‘stdlib.h’.
  5553. -- Function: void * malloc (size_t SIZE)
  5554. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock fd mem |
  5555. *Note POSIX Safety Concepts::.
  5556. This function returns a pointer to a newly allocated block SIZE
  5557. bytes long, or a null pointer if the block could not be allocated.
  5558. The contents of the block are undefined; you must initialize it
  5559. yourself (or use ‘calloc’ instead; *note Allocating Cleared Space::).
  5560. Normally you would cast the value as a pointer to the kind of object
  5561. that you want to store in the block. Here we show an example of doing
  5562. so, and of initializing the space with zeros using the library function
  5563. ‘memset’ (*note Copying Strings and Arrays::):
  5564. struct foo *ptr;
  5565. ...
  5566. ptr = (struct foo *) malloc (sizeof (struct foo));
  5567. if (ptr == 0) abort ();
  5568. memset (ptr, 0, sizeof (struct foo));
  5569. You can store the result of ‘malloc’ into any pointer variable
  5570. without a cast, because ISO C automatically converts the type ‘void *’
  5571. to another type of pointer when necessary. But the cast is necessary in
  5572. contexts other than assignment operators or if you might want your code
  5573. to run in traditional C.
  5574. Remember that when allocating space for a string, the argument to
  5575. ‘malloc’ must be one plus the length of the string. This is because a
  5576. string is terminated with a null character that doesn’t count in the
  5577. “length” of the string but does need space. For example:
  5578. char *ptr;
  5579. ...
  5580. ptr = (char *) malloc (length + 1);
  5581. *Note Representation of Strings::, for more information about this.
  5582. 
  5583. File: libc.info, Node: Malloc Examples, Next: Freeing after Malloc, Prev: Basic Allocation, Up: Unconstrained Allocation
  5584. 3.2.3.2 Examples of ‘malloc’
  5585. ............................
  5586. If no more space is available, ‘malloc’ returns a null pointer. You
  5587. should check the value of _every_ call to ‘malloc’. It is useful to
  5588. write a subroutine that calls ‘malloc’ and reports an error if the value
  5589. is a null pointer, returning only if the value is nonzero. This
  5590. function is conventionally called ‘xmalloc’. Here it is:
  5591. void *
  5592. xmalloc (size_t size)
  5593. {
  5594. void *value = malloc (size);
  5595. if (value == 0)
  5596. fatal ("virtual memory exhausted");
  5597. return value;
  5598. }
  5599. Here is a real example of using ‘malloc’ (by way of ‘xmalloc’). The
  5600. function ‘savestring’ will copy a sequence of characters into a newly
  5601. allocated null-terminated string:
  5602. char *
  5603. savestring (const char *ptr, size_t len)
  5604. {
  5605. char *value = (char *) xmalloc (len + 1);
  5606. value[len] = '\0';
  5607. return (char *) memcpy (value, ptr, len);
  5608. }
  5609. The block that ‘malloc’ gives you is guaranteed to be aligned so that
  5610. it can hold any type of data. On GNU systems, the address is always a
  5611. multiple of eight on 32-bit systems, and a multiple of 16 on 64-bit
  5612. systems. Only rarely is any higher boundary (such as a page boundary)
  5613. necessary; for those cases, use ‘aligned_alloc’ or ‘posix_memalign’
  5614. (*note Aligned Memory Blocks::).
  5615. Note that the memory located after the end of the block is likely to
  5616. be in use for something else; perhaps a block already allocated by
  5617. another call to ‘malloc’. If you attempt to treat the block as longer
  5618. than you asked for it to be, you are liable to destroy the data that
  5619. ‘malloc’ uses to keep track of its blocks, or you may destroy the
  5620. contents of another block. If you have already allocated a block and
  5621. discover you want it to be bigger, use ‘realloc’ (*note Changing Block
  5622. Size::).
  5623. 
  5624. File: libc.info, Node: Freeing after Malloc, Next: Changing Block Size, Prev: Malloc Examples, Up: Unconstrained Allocation
  5625. 3.2.3.3 Freeing Memory Allocated with ‘malloc’
  5626. ..............................................
  5627. When you no longer need a block that you got with ‘malloc’, use the
  5628. function ‘free’ to make the block available to be allocated again. The
  5629. prototype for this function is in ‘stdlib.h’.
  5630. -- Function: void free (void *PTR)
  5631. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock fd mem |
  5632. *Note POSIX Safety Concepts::.
  5633. The ‘free’ function deallocates the block of memory pointed at by
  5634. PTR.
  5635. Freeing a block alters the contents of the block. *Do not expect to
  5636. find any data (such as a pointer to the next block in a chain of blocks)
  5637. in the block after freeing it.* Copy whatever you need out of the block
  5638. before freeing it! Here is an example of the proper way to free all the
  5639. blocks in a chain, and the strings that they point to:
  5640. struct chain
  5641. {
  5642. struct chain *next;
  5643. char *name;
  5644. }
  5645. void
  5646. free_chain (struct chain *chain)
  5647. {
  5648. while (chain != 0)
  5649. {
  5650. struct chain *next = chain->next;
  5651. free (chain->name);
  5652. free (chain);
  5653. chain = next;
  5654. }
  5655. }
  5656. Occasionally, ‘free’ can actually return memory to the operating
  5657. system and make the process smaller. Usually, all it can do is allow a
  5658. later call to ‘malloc’ to reuse the space. In the meantime, the space
  5659. remains in your program as part of a free-list used internally by
  5660. ‘malloc’.
  5661. The ‘free’ function preserves the value of ‘errno’, so that cleanup
  5662. code need not worry about saving and restoring ‘errno’ around a call to
  5663. ‘free’. Although neither ISO C nor POSIX.1-2017 requires ‘free’ to
  5664. preserve ‘errno’, a future version of POSIX is planned to require it.
  5665. There is no point in freeing blocks at the end of a program, because
  5666. all of the program’s space is given back to the system when the process
  5667. terminates.
  5668. 
  5669. File: libc.info, Node: Changing Block Size, Next: Allocating Cleared Space, Prev: Freeing after Malloc, Up: Unconstrained Allocation
  5670. 3.2.3.4 Changing the Size of a Block
  5671. ....................................
  5672. Often you do not know for certain how big a block you will ultimately
  5673. need at the time you must begin to use the block. For example, the
  5674. block might be a buffer that you use to hold a line being read from a
  5675. file; no matter how long you make the buffer initially, you may
  5676. encounter a line that is longer.
  5677. You can make the block longer by calling ‘realloc’ or ‘reallocarray’.
  5678. These functions are declared in ‘stdlib.h’.
  5679. -- Function: void * realloc (void *PTR, size_t NEWSIZE)
  5680. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock fd mem |
  5681. *Note POSIX Safety Concepts::.
  5682. The ‘realloc’ function changes the size of the block whose address
  5683. is PTR to be NEWSIZE.
  5684. Since the space after the end of the block may be in use, ‘realloc’
  5685. may find it necessary to copy the block to a new address where more
  5686. free space is available. The value of ‘realloc’ is the new address
  5687. of the block. If the block needs to be moved, ‘realloc’ copies the
  5688. old contents.
  5689. If you pass a null pointer for PTR, ‘realloc’ behaves just like
  5690. ‘malloc (NEWSIZE)’. This can be convenient, but beware that older
  5691. implementations (before ISO C) may not support this behavior, and
  5692. will probably crash when ‘realloc’ is passed a null pointer.
  5693. -- Function: void * reallocarray (void *PTR, size_t NMEMB, size_t SIZE)
  5694. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock fd mem |
  5695. *Note POSIX Safety Concepts::.
  5696. The ‘reallocarray’ function changes the size of the block whose
  5697. address is PTR to be long enough to contain a vector of NMEMB
  5698. elements, each of size SIZE. It is equivalent to ‘realloc (PTR,
  5699. NMEMB * SIZE)’, except that ‘reallocarray’ fails safely if the
  5700. multiplication overflows, by setting ‘errno’ to ‘ENOMEM’, returning
  5701. a null pointer, and leaving the original block unchanged.
  5702. ‘reallocarray’ should be used instead of ‘realloc’ when the new
  5703. size of the allocated block is the result of a multiplication that
  5704. might overflow.
  5705. *Portability Note:* This function is not part of any standard. It
  5706. was first introduced in OpenBSD 5.6.
  5707. Like ‘malloc’, ‘realloc’ and ‘reallocarray’ may return a null pointer
  5708. if no memory space is available to make the block bigger. When this
  5709. happens, the original block is untouched; it has not been modified or
  5710. relocated.
  5711. In most cases it makes no difference what happens to the original
  5712. block when ‘realloc’ fails, because the application program cannot
  5713. continue when it is out of memory, and the only thing to do is to give a
  5714. fatal error message. Often it is convenient to write and use a
  5715. subroutine, conventionally called ‘xrealloc’, that takes care of the
  5716. error message as ‘xmalloc’ does for ‘malloc’:
  5717. void *
  5718. xrealloc (void *ptr, size_t size)
  5719. {
  5720. void *value = realloc (ptr, size);
  5721. if (value == 0)
  5722. fatal ("Virtual memory exhausted");
  5723. return value;
  5724. }
  5725. You can also use ‘realloc’ or ‘reallocarray’ to make a block smaller.
  5726. The reason you would do this is to avoid tying up a lot of memory space
  5727. when only a little is needed. In several allocation implementations,
  5728. making a block smaller sometimes necessitates copying it, so it can fail
  5729. if no other space is available.
  5730. If the new size you specify is the same as the old size, ‘realloc’
  5731. and ‘reallocarray’ are guaranteed to change nothing and return the same
  5732. address that you gave.
  5733. 
  5734. File: libc.info, Node: Allocating Cleared Space, Next: Aligned Memory Blocks, Prev: Changing Block Size, Up: Unconstrained Allocation
  5735. 3.2.3.5 Allocating Cleared Space
  5736. ................................
  5737. The function ‘calloc’ allocates memory and clears it to zero. It is
  5738. declared in ‘stdlib.h’.
  5739. -- Function: void * calloc (size_t COUNT, size_t ELTSIZE)
  5740. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock fd mem |
  5741. *Note POSIX Safety Concepts::.
  5742. This function allocates a block long enough to contain a vector of
  5743. COUNT elements, each of size ELTSIZE. Its contents are cleared to
  5744. zero before ‘calloc’ returns.
  5745. You could define ‘calloc’ as follows:
  5746. void *
  5747. calloc (size_t count, size_t eltsize)
  5748. {
  5749. size_t size = count * eltsize;
  5750. void *value = malloc (size);
  5751. if (value != 0)
  5752. memset (value, 0, size);
  5753. return value;
  5754. }
  5755. But in general, it is not guaranteed that ‘calloc’ calls ‘malloc’
  5756. internally. Therefore, if an application provides its own
  5757. ‘malloc’/‘realloc’/‘free’ outside the C library, it should always define
  5758. ‘calloc’, too.
  5759. 
  5760. File: libc.info, Node: Aligned Memory Blocks, Next: Malloc Tunable Parameters, Prev: Allocating Cleared Space, Up: Unconstrained Allocation
  5761. 3.2.3.6 Allocating Aligned Memory Blocks
  5762. ........................................
  5763. The address of a block returned by ‘malloc’ or ‘realloc’ in GNU systems
  5764. is always a multiple of eight (or sixteen on 64-bit systems). If you
  5765. need a block whose address is a multiple of a higher power of two than
  5766. that, use ‘aligned_alloc’ or ‘posix_memalign’. ‘aligned_alloc’ and
  5767. ‘posix_memalign’ are declared in ‘stdlib.h’.
  5768. -- Function: void * aligned_alloc (size_t ALIGNMENT, size_t SIZE)
  5769. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock fd mem |
  5770. *Note POSIX Safety Concepts::.
  5771. The ‘aligned_alloc’ function allocates a block of SIZE bytes whose
  5772. address is a multiple of ALIGNMENT. The ALIGNMENT must be a power
  5773. of two and SIZE must be a multiple of ALIGNMENT.
  5774. The ‘aligned_alloc’ function returns a null pointer on error and
  5775. sets ‘errno’ to one of the following values:
  5776. ‘ENOMEM’
  5777. There was insufficient memory available to satisfy the
  5778. request.
  5779. ‘EINVAL’
  5780. ALIGNMENT is not a power of two.
  5781. This function was introduced in ISO C11 and hence may have
  5782. better portability to modern non-POSIX systems than
  5783. ‘posix_memalign’.
  5784. -- Function: void * memalign (size_t BOUNDARY, size_t SIZE)
  5785. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock fd mem |
  5786. *Note POSIX Safety Concepts::.
  5787. The ‘memalign’ function allocates a block of SIZE bytes whose
  5788. address is a multiple of BOUNDARY. The BOUNDARY must be a power of
  5789. two! The function ‘memalign’ works by allocating a somewhat larger
  5790. block, and then returning an address within the block that is on
  5791. the specified boundary.
  5792. The ‘memalign’ function returns a null pointer on error and sets
  5793. ‘errno’ to one of the following values:
  5794. ‘ENOMEM’
  5795. There was insufficient memory available to satisfy the
  5796. request.
  5797. ‘EINVAL’
  5798. BOUNDARY is not a power of two.
  5799. The ‘memalign’ function is obsolete and ‘aligned_alloc’ or
  5800. ‘posix_memalign’ should be used instead.
  5801. -- Function: int posix_memalign (void **MEMPTR, size_t ALIGNMENT,
  5802. size_t SIZE)
  5803. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock fd mem |
  5804. *Note POSIX Safety Concepts::.
  5805. The ‘posix_memalign’ function is similar to the ‘memalign’ function
  5806. in that it returns a buffer of SIZE bytes aligned to a multiple of
  5807. ALIGNMENT. But it adds one requirement to the parameter ALIGNMENT:
  5808. the value must be a power of two multiple of ‘sizeof (void *)’.
  5809. If the function succeeds in allocation memory a pointer to the
  5810. allocated memory is returned in ‘*MEMPTR’ and the return value is
  5811. zero. Otherwise the function returns an error value indicating the
  5812. problem. The possible error values returned are:
  5813. ‘ENOMEM’
  5814. There was insufficient memory available to satisfy the
  5815. request.
  5816. ‘EINVAL’
  5817. ALIGNMENT is not a power of two multiple of ‘sizeof (void *)’.
  5818. This function was introduced in POSIX 1003.1d. Although this
  5819. function is superseded by ‘aligned_alloc’, it is more portable to
  5820. older POSIX systems that do not support ISO C11.
  5821. -- Function: void * valloc (size_t SIZE)
  5822. Preliminary: | MT-Unsafe init | AS-Unsafe init lock | AC-Unsafe
  5823. init lock fd mem | *Note POSIX Safety Concepts::.
  5824. Using ‘valloc’ is like using ‘memalign’ and passing the page size
  5825. as the value of the first argument. It is implemented like this:
  5826. void *
  5827. valloc (size_t size)
  5828. {
  5829. return memalign (getpagesize (), size);
  5830. }
  5831. *note Query Memory Parameters:: for more information about the
  5832. memory subsystem.
  5833. The ‘valloc’ function is obsolete and ‘aligned_alloc’ or
  5834. ‘posix_memalign’ should be used instead.
  5835. 
  5836. File: libc.info, Node: Malloc Tunable Parameters, Next: Heap Consistency Checking, Prev: Aligned Memory Blocks, Up: Unconstrained Allocation
  5837. 3.2.3.7 Malloc Tunable Parameters
  5838. .................................
  5839. You can adjust some parameters for dynamic memory allocation with the
  5840. ‘mallopt’ function. This function is the general SVID/XPG interface,
  5841. defined in ‘malloc.h’.
  5842. -- Function: int mallopt (int PARAM, int VALUE)
  5843. Preliminary: | MT-Unsafe init const:mallopt | AS-Unsafe init lock |
  5844. AC-Unsafe init lock | *Note POSIX Safety Concepts::.
  5845. When calling ‘mallopt’, the PARAM argument specifies the parameter
  5846. to be set, and VALUE the new value to be set. Possible choices for
  5847. PARAM, as defined in ‘malloc.h’, are:
  5848. ‘M_MMAP_MAX’
  5849. The maximum number of chunks to allocate with ‘mmap’. Setting
  5850. this to zero disables all use of ‘mmap’.
  5851. The default value of this parameter is ‘65536’.
  5852. This parameter can also be set for the process at startup by
  5853. setting the environment variable ‘MALLOC_MMAP_MAX_’ to the
  5854. desired value.
  5855. ‘M_MMAP_THRESHOLD’
  5856. All chunks larger than this value are allocated outside the
  5857. normal heap, using the ‘mmap’ system call. This way it is
  5858. guaranteed that the memory for these chunks can be returned to
  5859. the system on ‘free’. Note that requests smaller than this
  5860. threshold might still be allocated via ‘mmap’.
  5861. If this parameter is not set, the default value is set as 128
  5862. KiB and the threshold is adjusted dynamically to suit the
  5863. allocation patterns of the program. If the parameter is set,
  5864. the dynamic adjustment is disabled and the value is set
  5865. statically to the input value.
  5866. This parameter can also be set for the process at startup by
  5867. setting the environment variable ‘MALLOC_MMAP_THRESHOLD_’ to
  5868. the desired value.
  5869. ‘M_PERTURB’
  5870. If non-zero, memory blocks are filled with values depending on
  5871. some low order bits of this parameter when they are allocated
  5872. (except when allocated by ‘calloc’) and freed. This can be
  5873. used to debug the use of uninitialized or freed heap memory.
  5874. Note that this option does not guarantee that the freed block
  5875. will have any specific values. It only guarantees that the
  5876. content the block had before it was freed will be overwritten.
  5877. The default value of this parameter is ‘0’.
  5878. This parameter can also be set for the process at startup by
  5879. setting the environment variable ‘MALLOC_PERTURB_’ to the
  5880. desired value.
  5881. ‘M_TOP_PAD’
  5882. This parameter determines the amount of extra memory to obtain
  5883. from the system when an arena needs to be extended. It also
  5884. specifies the number of bytes to retain when shrinking an
  5885. arena. This provides the necessary hysteresis in heap size
  5886. such that excessive amounts of system calls can be avoided.
  5887. The default value of this parameter is ‘0’.
  5888. This parameter can also be set for the process at startup by
  5889. setting the environment variable ‘MALLOC_TOP_PAD_’ to the
  5890. desired value.
  5891. ‘M_TRIM_THRESHOLD’
  5892. This is the minimum size (in bytes) of the top-most,
  5893. releasable chunk that will trigger a system call in order to
  5894. return memory to the system.
  5895. If this parameter is not set, the default value is set as 128
  5896. KiB and the threshold is adjusted dynamically to suit the
  5897. allocation patterns of the program. If the parameter is set,
  5898. the dynamic adjustment is disabled and the value is set
  5899. statically to the provided input.
  5900. This parameter can also be set for the process at startup by
  5901. setting the environment variable ‘MALLOC_TRIM_THRESHOLD_’ to
  5902. the desired value.
  5903. ‘M_ARENA_TEST’
  5904. This parameter specifies the number of arenas that can be
  5905. created before the test on the limit to the number of arenas
  5906. is conducted. The value is ignored if ‘M_ARENA_MAX’ is set.
  5907. The default value of this parameter is 2 on 32-bit systems and
  5908. 8 on 64-bit systems.
  5909. This parameter can also be set for the process at startup by
  5910. setting the environment variable ‘MALLOC_ARENA_TEST’ to the
  5911. desired value.
  5912. ‘M_ARENA_MAX’
  5913. This parameter sets the number of arenas to use regardless of
  5914. the number of cores in the system.
  5915. The default value of this tunable is ‘0’, meaning that the
  5916. limit on the number of arenas is determined by the number of
  5917. CPU cores online. For 32-bit systems the limit is twice the
  5918. number of cores online and on 64-bit systems, it is eight
  5919. times the number of cores online. Note that the default value
  5920. is not derived from the default value of M_ARENA_TEST and is
  5921. computed independently.
  5922. This parameter can also be set for the process at startup by
  5923. setting the environment variable ‘MALLOC_ARENA_MAX’ to the
  5924. desired value.
  5925. 
  5926. File: libc.info, Node: Heap Consistency Checking, Next: Hooks for Malloc, Prev: Malloc Tunable Parameters, Up: Unconstrained Allocation
  5927. 3.2.3.8 Heap Consistency Checking
  5928. .................................
  5929. You can ask ‘malloc’ to check the consistency of dynamic memory by using
  5930. the ‘mcheck’ function. This function is a GNU extension, declared in
  5931. ‘mcheck.h’.
  5932. -- Function: int mcheck (void (*ABORTFN) (enum mcheck_status STATUS))
  5933. Preliminary: | MT-Unsafe race:mcheck const:malloc_hooks | AS-Unsafe
  5934. corrupt | AC-Unsafe corrupt | *Note POSIX Safety Concepts::.
  5935. Calling ‘mcheck’ tells ‘malloc’ to perform occasional consistency
  5936. checks. These will catch things such as writing past the end of a
  5937. block that was allocated with ‘malloc’.
  5938. The ABORTFN argument is the function to call when an inconsistency
  5939. is found. If you supply a null pointer, then ‘mcheck’ uses a
  5940. default function which prints a message and calls ‘abort’ (*note
  5941. Aborting a Program::). The function you supply is called with one
  5942. argument, which says what sort of inconsistency was detected; its
  5943. type is described below.
  5944. It is too late to begin allocation checking once you have allocated
  5945. anything with ‘malloc’. So ‘mcheck’ does nothing in that case.
  5946. The function returns ‘-1’ if you call it too late, and ‘0’
  5947. otherwise (when it is successful).
  5948. The easiest way to arrange to call ‘mcheck’ early enough is to use
  5949. the option ‘-lmcheck’ when you link your program; then you don’t
  5950. need to modify your program source at all. Alternatively you might
  5951. use a debugger to insert a call to ‘mcheck’ whenever the program is
  5952. started, for example these gdb commands will automatically call
  5953. ‘mcheck’ whenever the program starts:
  5954. (gdb) break main
  5955. Breakpoint 1, main (argc=2, argv=0xbffff964) at whatever.c:10
  5956. (gdb) command 1
  5957. Type commands for when breakpoint 1 is hit, one per line.
  5958. End with a line saying just "end".
  5959. >call mcheck(0)
  5960. >continue
  5961. >end
  5962. (gdb) ...
  5963. This will however only work if no initialization function of any
  5964. object involved calls any of the ‘malloc’ functions since ‘mcheck’
  5965. must be called before the first such function.
  5966. -- Function: enum mcheck_status mprobe (void *POINTER)
  5967. Preliminary: | MT-Unsafe race:mcheck const:malloc_hooks | AS-Unsafe
  5968. corrupt | AC-Unsafe corrupt | *Note POSIX Safety Concepts::.
  5969. The ‘mprobe’ function lets you explicitly check for inconsistencies
  5970. in a particular allocated block. You must have already called
  5971. ‘mcheck’ at the beginning of the program, to do its occasional
  5972. checks; calling ‘mprobe’ requests an additional consistency check
  5973. to be done at the time of the call.
  5974. The argument POINTER must be a pointer returned by ‘malloc’ or
  5975. ‘realloc’. ‘mprobe’ returns a value that says what inconsistency,
  5976. if any, was found. The values are described below.
  5977. -- Data Type: enum mcheck_status
  5978. This enumerated type describes what kind of inconsistency was
  5979. detected in an allocated block, if any. Here are the possible
  5980. values:
  5981. ‘MCHECK_DISABLED’
  5982. ‘mcheck’ was not called before the first allocation. No
  5983. consistency checking can be done.
  5984. ‘MCHECK_OK’
  5985. No inconsistency detected.
  5986. ‘MCHECK_HEAD’
  5987. The data immediately before the block was modified. This
  5988. commonly happens when an array index or pointer is decremented
  5989. too far.
  5990. ‘MCHECK_TAIL’
  5991. The data immediately after the block was modified. This
  5992. commonly happens when an array index or pointer is incremented
  5993. too far.
  5994. ‘MCHECK_FREE’
  5995. The block was already freed.
  5996. Another possibility to check for and guard against bugs in the use of
  5997. ‘malloc’, ‘realloc’ and ‘free’ is to set the environment variable
  5998. ‘MALLOC_CHECK_’. When ‘MALLOC_CHECK_’ is set to a non-zero value, a
  5999. special (less efficient) implementation is used which is designed to be
  6000. tolerant against simple errors, such as double calls of ‘free’ with the
  6001. same argument, or overruns of a single byte (off-by-one bugs). Not all
  6002. such errors can be protected against, however, and memory leaks can
  6003. result.
  6004. Any detected heap corruption results in immediate termination of the
  6005. process.
  6006. There is one problem with ‘MALLOC_CHECK_’: in SUID or SGID binaries
  6007. it could possibly be exploited since diverging from the normal programs
  6008. behavior it now writes something to the standard error descriptor.
  6009. Therefore the use of ‘MALLOC_CHECK_’ is disabled by default for SUID and
  6010. SGID binaries. It can be enabled again by the system administrator by
  6011. adding a file ‘/etc/suid-debug’ (the content is not important it could
  6012. be empty).
  6013. So, what’s the difference between using ‘MALLOC_CHECK_’ and linking
  6014. with ‘-lmcheck’? ‘MALLOC_CHECK_’ is orthogonal with respect to
  6015. ‘-lmcheck’. ‘-lmcheck’ has been added for backward compatibility. Both
  6016. ‘MALLOC_CHECK_’ and ‘-lmcheck’ should uncover the same bugs - but using
  6017. ‘MALLOC_CHECK_’ you don’t need to recompile your application.