libc.info-10 297 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384
  1. This is libc.info, produced by makeinfo version 7.3 from libc.texinfo.
  2. This is ‘The GNU C Library Reference Manual’, for version 2.43.
  3. Copyright © 1993-2026 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Free Software Needs Free Documentation" and
  8. "GNU Lesser General Public License", the Front-Cover texts being "A GNU
  9. Manual", and with the Back-Cover Texts as in (a) below. A copy of the
  10. license is included in the section entitled "GNU Free Documentation
  11. License".
  12. (a) The FSF's Back-Cover Text is: "You have the freedom to copy and
  13. modify this GNU manual. Buying copies from the FSF supports it in
  14. developing GNU and promoting software freedom."
  15. INFO-DIR-SECTION Software libraries
  16. START-INFO-DIR-ENTRY
  17. * Libc: (libc). C library.
  18. END-INFO-DIR-ENTRY
  19. INFO-DIR-SECTION GNU C library functions and macros
  20. START-INFO-DIR-ENTRY
  21. * ALTWERASE: (libc)Local Modes.
  22. * ARGP_ERR_UNKNOWN: (libc)Argp Parser Functions.
  23. * ARG_MAX: (libc)General Limits.
  24. * BAUD_MAX: (libc)Line Speed.
  25. * BC_BASE_MAX: (libc)Utility Limits.
  26. * BC_DIM_MAX: (libc)Utility Limits.
  27. * BC_SCALE_MAX: (libc)Utility Limits.
  28. * BC_STRING_MAX: (libc)Utility Limits.
  29. * BRKINT: (libc)Input Modes.
  30. * BUFSIZ: (libc)Controlling Buffering.
  31. * CCTS_OFLOW: (libc)Control Modes.
  32. * CHAR_BIT: (libc)Width of Type.
  33. * CHILD_MAX: (libc)General Limits.
  34. * CIGNORE: (libc)Control Modes.
  35. * CLK_TCK: (libc)Processor Time.
  36. * CLOCAL: (libc)Control Modes.
  37. * CLOCKS_PER_SEC: (libc)CPU Time.
  38. * CLOCK_BOOTTIME: (libc)Getting the Time.
  39. * CLOCK_BOOTTIME_ALARM: (libc)Getting the Time.
  40. * CLOCK_MONOTONIC: (libc)Getting the Time.
  41. * CLOCK_MONOTONIC_COARSE: (libc)Getting the Time.
  42. * CLOCK_MONOTONIC_RAW: (libc)Getting the Time.
  43. * CLOCK_PROCESS_CPUTIME_ID: (libc)Getting the Time.
  44. * CLOCK_REALTIME: (libc)Getting the Time.
  45. * CLOCK_REALTIME_ALARM: (libc)Getting the Time.
  46. * CLOCK_REALTIME_COARSE: (libc)Getting the Time.
  47. * CLOCK_TAI: (libc)Getting the Time.
  48. * CLOCK_THREAD_CPUTIME_ID: (libc)Getting the Time.
  49. * COLL_WEIGHTS_MAX: (libc)Utility Limits.
  50. * CPU_ALLOC: (libc)CPU Affinity.
  51. * CPU_ALLOC_SIZE: (libc)CPU Affinity.
  52. * CPU_AND: (libc)CPU Affinity.
  53. * CPU_AND_S: (libc)CPU Affinity.
  54. * CPU_CLR: (libc)CPU Affinity.
  55. * CPU_CLR_S: (libc)CPU Affinity.
  56. * CPU_COUNT: (libc)CPU Affinity.
  57. * CPU_COUNT_S: (libc)CPU Affinity.
  58. * CPU_EQUAL: (libc)CPU Affinity.
  59. * CPU_EQUAL_S: (libc)CPU Affinity.
  60. * CPU_FEATURE_ACTIVE: (libc)X86.
  61. * CPU_FEATURE_PRESENT: (libc)X86.
  62. * CPU_FREE: (libc)CPU Affinity.
  63. * CPU_ISSET: (libc)CPU Affinity.
  64. * CPU_ISSET_S: (libc)CPU Affinity.
  65. * CPU_OR: (libc)CPU Affinity.
  66. * CPU_OR_S: (libc)CPU Affinity.
  67. * CPU_SET: (libc)CPU Affinity.
  68. * CPU_SETSIZE: (libc)CPU Affinity.
  69. * CPU_SET_S: (libc)CPU Affinity.
  70. * CPU_XOR: (libc)CPU Affinity.
  71. * CPU_XOR_S: (libc)CPU Affinity.
  72. * CPU_ZERO: (libc)CPU Affinity.
  73. * CPU_ZERO_S: (libc)CPU Affinity.
  74. * CREAD: (libc)Control Modes.
  75. * CRTS_IFLOW: (libc)Control Modes.
  76. * CS5: (libc)Control Modes.
  77. * CS6: (libc)Control Modes.
  78. * CS7: (libc)Control Modes.
  79. * CS8: (libc)Control Modes.
  80. * CSIZE: (libc)Control Modes.
  81. * CSTOPB: (libc)Control Modes.
  82. * DLFO_EH_SEGMENT_TYPE: (libc)Dynamic Linker Introspection.
  83. * DLFO_STRUCT_HAS_EH_COUNT: (libc)Dynamic Linker Introspection.
  84. * DLFO_STRUCT_HAS_EH_DBASE: (libc)Dynamic Linker Introspection.
  85. * DTTOIF: (libc)Directory Entries.
  86. * E2BIG: (libc)Error Codes.
  87. * EACCES: (libc)Error Codes.
  88. * EADDRINUSE: (libc)Error Codes.
  89. * EADDRNOTAVAIL: (libc)Error Codes.
  90. * EADV: (libc)Error Codes.
  91. * EAFNOSUPPORT: (libc)Error Codes.
  92. * EAGAIN: (libc)Error Codes.
  93. * EALREADY: (libc)Error Codes.
  94. * EAUTH: (libc)Error Codes.
  95. * EBACKGROUND: (libc)Error Codes.
  96. * EBADE: (libc)Error Codes.
  97. * EBADF: (libc)Error Codes.
  98. * EBADFD: (libc)Error Codes.
  99. * EBADMSG: (libc)Error Codes.
  100. * EBADR: (libc)Error Codes.
  101. * EBADRPC: (libc)Error Codes.
  102. * EBADRQC: (libc)Error Codes.
  103. * EBADSLT: (libc)Error Codes.
  104. * EBFONT: (libc)Error Codes.
  105. * EBUSY: (libc)Error Codes.
  106. * ECANCELED: (libc)Error Codes.
  107. * ECHILD: (libc)Error Codes.
  108. * ECHO: (libc)Local Modes.
  109. * ECHOCTL: (libc)Local Modes.
  110. * ECHOE: (libc)Local Modes.
  111. * ECHOK: (libc)Local Modes.
  112. * ECHOKE: (libc)Local Modes.
  113. * ECHONL: (libc)Local Modes.
  114. * ECHOPRT: (libc)Local Modes.
  115. * ECHRNG: (libc)Error Codes.
  116. * ECOMM: (libc)Error Codes.
  117. * ECONNABORTED: (libc)Error Codes.
  118. * ECONNREFUSED: (libc)Error Codes.
  119. * ECONNRESET: (libc)Error Codes.
  120. * ED: (libc)Error Codes.
  121. * EDEADLK: (libc)Error Codes.
  122. * EDEADLOCK: (libc)Error Codes.
  123. * EDESTADDRREQ: (libc)Error Codes.
  124. * EDIED: (libc)Error Codes.
  125. * EDOM: (libc)Error Codes.
  126. * EDOTDOT: (libc)Error Codes.
  127. * EDQUOT: (libc)Error Codes.
  128. * EEXIST: (libc)Error Codes.
  129. * EFAULT: (libc)Error Codes.
  130. * EFBIG: (libc)Error Codes.
  131. * EFTYPE: (libc)Error Codes.
  132. * EGRATUITOUS: (libc)Error Codes.
  133. * EGREGIOUS: (libc)Error Codes.
  134. * EHOSTDOWN: (libc)Error Codes.
  135. * EHOSTUNREACH: (libc)Error Codes.
  136. * EHWPOISON: (libc)Error Codes.
  137. * EIDRM: (libc)Error Codes.
  138. * EIEIO: (libc)Error Codes.
  139. * EILSEQ: (libc)Error Codes.
  140. * EINPROGRESS: (libc)Error Codes.
  141. * EINTR: (libc)Error Codes.
  142. * EINVAL: (libc)Error Codes.
  143. * EIO: (libc)Error Codes.
  144. * EISCONN: (libc)Error Codes.
  145. * EISDIR: (libc)Error Codes.
  146. * EISNAM: (libc)Error Codes.
  147. * EKEYEXPIRED: (libc)Error Codes.
  148. * EKEYREJECTED: (libc)Error Codes.
  149. * EKEYREVOKED: (libc)Error Codes.
  150. * EL2HLT: (libc)Error Codes.
  151. * EL2NSYNC: (libc)Error Codes.
  152. * EL3HLT: (libc)Error Codes.
  153. * EL3RST: (libc)Error Codes.
  154. * ELIBACC: (libc)Error Codes.
  155. * ELIBBAD: (libc)Error Codes.
  156. * ELIBEXEC: (libc)Error Codes.
  157. * ELIBMAX: (libc)Error Codes.
  158. * ELIBSCN: (libc)Error Codes.
  159. * ELNRNG: (libc)Error Codes.
  160. * ELOOP: (libc)Error Codes.
  161. * EMEDIUMTYPE: (libc)Error Codes.
  162. * EMFILE: (libc)Error Codes.
  163. * EMLINK: (libc)Error Codes.
  164. * EMSGSIZE: (libc)Error Codes.
  165. * EMULTIHOP: (libc)Error Codes.
  166. * ENAMETOOLONG: (libc)Error Codes.
  167. * ENAVAIL: (libc)Error Codes.
  168. * ENEEDAUTH: (libc)Error Codes.
  169. * ENETDOWN: (libc)Error Codes.
  170. * ENETRESET: (libc)Error Codes.
  171. * ENETUNREACH: (libc)Error Codes.
  172. * ENFILE: (libc)Error Codes.
  173. * ENOANO: (libc)Error Codes.
  174. * ENOBUFS: (libc)Error Codes.
  175. * ENOCSI: (libc)Error Codes.
  176. * ENODATA: (libc)Error Codes.
  177. * ENODEV: (libc)Error Codes.
  178. * ENOENT: (libc)Error Codes.
  179. * ENOEXEC: (libc)Error Codes.
  180. * ENOKEY: (libc)Error Codes.
  181. * ENOLCK: (libc)Error Codes.
  182. * ENOLINK: (libc)Error Codes.
  183. * ENOMEDIUM: (libc)Error Codes.
  184. * ENOMEM: (libc)Error Codes.
  185. * ENOMSG: (libc)Error Codes.
  186. * ENONET: (libc)Error Codes.
  187. * ENOPKG: (libc)Error Codes.
  188. * ENOPROTOOPT: (libc)Error Codes.
  189. * ENOSPC: (libc)Error Codes.
  190. * ENOSR: (libc)Error Codes.
  191. * ENOSTR: (libc)Error Codes.
  192. * ENOSYS: (libc)Error Codes.
  193. * ENOTBLK: (libc)Error Codes.
  194. * ENOTCONN: (libc)Error Codes.
  195. * ENOTDIR: (libc)Error Codes.
  196. * ENOTEMPTY: (libc)Error Codes.
  197. * ENOTNAM: (libc)Error Codes.
  198. * ENOTRECOVERABLE: (libc)Error Codes.
  199. * ENOTSOCK: (libc)Error Codes.
  200. * ENOTSUP: (libc)Error Codes.
  201. * ENOTTY: (libc)Error Codes.
  202. * ENOTUNIQ: (libc)Error Codes.
  203. * ENXIO: (libc)Error Codes.
  204. * EOF: (libc)EOF and Errors.
  205. * EOPNOTSUPP: (libc)Error Codes.
  206. * EOVERFLOW: (libc)Error Codes.
  207. * EOWNERDEAD: (libc)Error Codes.
  208. * EPERM: (libc)Error Codes.
  209. * EPFNOSUPPORT: (libc)Error Codes.
  210. * EPIPE: (libc)Error Codes.
  211. * EPROCLIM: (libc)Error Codes.
  212. * EPROCUNAVAIL: (libc)Error Codes.
  213. * EPROGMISMATCH: (libc)Error Codes.
  214. * EPROGUNAVAIL: (libc)Error Codes.
  215. * EPROTO: (libc)Error Codes.
  216. * EPROTONOSUPPORT: (libc)Error Codes.
  217. * EPROTOTYPE: (libc)Error Codes.
  218. * EQUIV_CLASS_MAX: (libc)Utility Limits.
  219. * ERANGE: (libc)Error Codes.
  220. * EREMCHG: (libc)Error Codes.
  221. * EREMOTE: (libc)Error Codes.
  222. * EREMOTEIO: (libc)Error Codes.
  223. * ERESTART: (libc)Error Codes.
  224. * ERFKILL: (libc)Error Codes.
  225. * EROFS: (libc)Error Codes.
  226. * ERPCMISMATCH: (libc)Error Codes.
  227. * ESHUTDOWN: (libc)Error Codes.
  228. * ESOCKTNOSUPPORT: (libc)Error Codes.
  229. * ESPIPE: (libc)Error Codes.
  230. * ESRCH: (libc)Error Codes.
  231. * ESRMNT: (libc)Error Codes.
  232. * ESTALE: (libc)Error Codes.
  233. * ESTRPIPE: (libc)Error Codes.
  234. * ETIME: (libc)Error Codes.
  235. * ETIMEDOUT: (libc)Error Codes.
  236. * ETOOMANYREFS: (libc)Error Codes.
  237. * ETXTBSY: (libc)Error Codes.
  238. * EUCLEAN: (libc)Error Codes.
  239. * EUNATCH: (libc)Error Codes.
  240. * EUSERS: (libc)Error Codes.
  241. * EWOULDBLOCK: (libc)Error Codes.
  242. * EXDEV: (libc)Error Codes.
  243. * EXFULL: (libc)Error Codes.
  244. * EXIT_FAILURE: (libc)Exit Status.
  245. * EXIT_SUCCESS: (libc)Exit Status.
  246. * EXPR_NEST_MAX: (libc)Utility Limits.
  247. * FD_CLOEXEC: (libc)Descriptor Flags.
  248. * FD_CLR: (libc)Waiting for I/O.
  249. * FD_ISSET: (libc)Waiting for I/O.
  250. * FD_SET: (libc)Waiting for I/O.
  251. * FD_SETSIZE: (libc)Waiting for I/O.
  252. * FD_ZERO: (libc)Waiting for I/O.
  253. * FE_SNANS_ALWAYS_SIGNAL: (libc)Infinity and NaN.
  254. * FILENAME_MAX: (libc)Limits for Files.
  255. * FLUSHO: (libc)Local Modes.
  256. * FOPEN_MAX: (libc)Opening Streams.
  257. * FP_ILOGB0: (libc)Exponents and Logarithms.
  258. * FP_ILOGBNAN: (libc)Exponents and Logarithms.
  259. * FP_LLOGB0: (libc)Exponents and Logarithms.
  260. * FP_LLOGBNAN: (libc)Exponents and Logarithms.
  261. * F_DUPFD: (libc)Duplicating Descriptors.
  262. * F_GETFD: (libc)Descriptor Flags.
  263. * F_GETFL: (libc)Getting File Status Flags.
  264. * F_GETLK: (libc)File Locks.
  265. * F_GETOWN: (libc)Interrupt Input.
  266. * F_OFD_GETLK: (libc)Open File Description Locks.
  267. * F_OFD_SETLK: (libc)Open File Description Locks.
  268. * F_OFD_SETLKW: (libc)Open File Description Locks.
  269. * F_OK: (libc)Testing File Access.
  270. * F_SETFD: (libc)Descriptor Flags.
  271. * F_SETFL: (libc)Getting File Status Flags.
  272. * F_SETLK: (libc)File Locks.
  273. * F_SETLKW: (libc)File Locks.
  274. * F_SETOWN: (libc)Interrupt Input.
  275. * HUGE_VAL: (libc)Math Error Reporting.
  276. * HUGE_VALF: (libc)Math Error Reporting.
  277. * HUGE_VALL: (libc)Math Error Reporting.
  278. * HUGE_VAL_FN: (libc)Math Error Reporting.
  279. * HUGE_VAL_FNx: (libc)Math Error Reporting.
  280. * HUPCL: (libc)Control Modes.
  281. * I: (libc)Complex Numbers.
  282. * ICANON: (libc)Local Modes.
  283. * ICRNL: (libc)Input Modes.
  284. * IEXTEN: (libc)Local Modes.
  285. * IFNAMSIZ: (libc)Interface Naming.
  286. * IFTODT: (libc)Directory Entries.
  287. * IGNBRK: (libc)Input Modes.
  288. * IGNCR: (libc)Input Modes.
  289. * IGNPAR: (libc)Input Modes.
  290. * IMAXBEL: (libc)Input Modes.
  291. * INADDR_ANY: (libc)Host Address Data Type.
  292. * INADDR_BROADCAST: (libc)Host Address Data Type.
  293. * INADDR_LOOPBACK: (libc)Host Address Data Type.
  294. * INADDR_NONE: (libc)Host Address Data Type.
  295. * INFINITY: (libc)Infinity and NaN.
  296. * INLCR: (libc)Input Modes.
  297. * INPCK: (libc)Input Modes.
  298. * IPPORT_RESERVED: (libc)Ports.
  299. * IPPORT_USERRESERVED: (libc)Ports.
  300. * ISIG: (libc)Local Modes.
  301. * ISTRIP: (libc)Input Modes.
  302. * IXANY: (libc)Input Modes.
  303. * IXOFF: (libc)Input Modes.
  304. * IXON: (libc)Input Modes.
  305. * LINE_MAX: (libc)Utility Limits.
  306. * LINK_MAX: (libc)Limits for Files.
  307. * L_ctermid: (libc)Identifying the Terminal.
  308. * L_cuserid: (libc)Who Logged In.
  309. * L_tmpnam: (libc)Temporary Files.
  310. * MAXNAMLEN: (libc)Limits for Files.
  311. * MAXSYMLINKS: (libc)Symbolic Links.
  312. * MAX_CANON: (libc)Limits for Files.
  313. * MAX_INPUT: (libc)Limits for Files.
  314. * MB_CUR_MAX: (libc)Selecting the Conversion.
  315. * MB_LEN_MAX: (libc)Selecting the Conversion.
  316. * MDMBUF: (libc)Control Modes.
  317. * MSG_DONTROUTE: (libc)Socket Data Options.
  318. * MSG_OOB: (libc)Socket Data Options.
  319. * MSG_PEEK: (libc)Socket Data Options.
  320. * NAME_MAX: (libc)Limits for Files.
  321. * NAN: (libc)Infinity and NaN.
  322. * NCCS: (libc)Mode Data Types.
  323. * NGROUPS_MAX: (libc)General Limits.
  324. * NOFLSH: (libc)Local Modes.
  325. * NOKERNINFO: (libc)Local Modes.
  326. * NSIG: (libc)Standard Signals.
  327. * NULL: (libc)Null Pointer Constant.
  328. * ONLCR: (libc)Output Modes.
  329. * ONOEOT: (libc)Output Modes.
  330. * OPEN_MAX: (libc)General Limits.
  331. * OPOST: (libc)Output Modes.
  332. * OXTABS: (libc)Output Modes.
  333. * O_ACCMODE: (libc)Access Modes.
  334. * O_APPEND: (libc)Operating Modes.
  335. * O_ASYNC: (libc)Operating Modes.
  336. * O_CREAT: (libc)Open-time Flags.
  337. * O_DIRECTORY: (libc)Open-time Flags.
  338. * O_EXCL: (libc)Open-time Flags.
  339. * O_EXEC: (libc)Access Modes.
  340. * O_EXLOCK: (libc)Open-time Flags.
  341. * O_FSYNC: (libc)Operating Modes.
  342. * O_IGNORE_CTTY: (libc)Open-time Flags.
  343. * O_NDELAY: (libc)Operating Modes.
  344. * O_NOATIME: (libc)Operating Modes.
  345. * O_NOCTTY: (libc)Open-time Flags.
  346. * O_NOFOLLOW: (libc)Open-time Flags.
  347. * O_NOLINK: (libc)Open-time Flags.
  348. * O_NONBLOCK: (libc)Open-time Flags.
  349. * O_NONBLOCK: (libc)Operating Modes.
  350. * O_NOTRANS: (libc)Open-time Flags.
  351. * O_PATH: (libc)Access Modes.
  352. * O_RDONLY: (libc)Access Modes.
  353. * O_RDWR: (libc)Access Modes.
  354. * O_READ: (libc)Access Modes.
  355. * O_SHLOCK: (libc)Open-time Flags.
  356. * O_SYNC: (libc)Operating Modes.
  357. * O_TMPFILE: (libc)Open-time Flags.
  358. * O_TRUNC: (libc)Open-time Flags.
  359. * O_WRITE: (libc)Access Modes.
  360. * O_WRONLY: (libc)Access Modes.
  361. * PARENB: (libc)Control Modes.
  362. * PARMRK: (libc)Input Modes.
  363. * PARODD: (libc)Control Modes.
  364. * PATH_MAX: (libc)Limits for Files.
  365. * PA_FLAG_MASK: (libc)Parsing a Template String.
  366. * PENDIN: (libc)Local Modes.
  367. * PF_FILE: (libc)Local Namespace Details.
  368. * PF_INET6: (libc)Internet Namespace.
  369. * PF_INET: (libc)Internet Namespace.
  370. * PF_LOCAL: (libc)Local Namespace Details.
  371. * PF_UNIX: (libc)Local Namespace Details.
  372. * PIPE_BUF: (libc)Limits for Files.
  373. * PTHREAD_ATTR_NO_SIGMASK_NP: (libc)Initial Thread Signal Mask.
  374. * P_tmpdir: (libc)Temporary Files.
  375. * RAND_MAX: (libc)ISO Random.
  376. * RE_DUP_MAX: (libc)General Limits.
  377. * RLIM_INFINITY: (libc)Limits on Resources.
  378. * RSEQ_SIG: (libc)Restartable Sequences.
  379. * R_OK: (libc)Testing File Access.
  380. * SA_NOCLDSTOP: (libc)Flags for Sigaction.
  381. * SA_NOCLDWAIT: (libc)Flags for Sigaction.
  382. * SA_NODEFER: (libc)Flags for Sigaction.
  383. * SA_ONSTACK: (libc)Flags for Sigaction.
  384. * SA_RESETHAND: (libc)Flags for Sigaction.
  385. * SA_RESTART: (libc)Flags for Sigaction.
  386. * SA_SIGINFO: (libc)Flags for Sigaction.
  387. * SEEK_CUR: (libc)File Positioning.
  388. * SEEK_END: (libc)File Positioning.
  389. * SEEK_SET: (libc)File Positioning.
  390. * SIGABRT: (libc)Program Error Signals.
  391. * SIGALRM: (libc)Alarm Signals.
  392. * SIGBUS: (libc)Program Error Signals.
  393. * SIGCHLD: (libc)Job Control Signals.
  394. * SIGCLD: (libc)Job Control Signals.
  395. * SIGCONT: (libc)Job Control Signals.
  396. * SIGEMT: (libc)Program Error Signals.
  397. * SIGFPE: (libc)Program Error Signals.
  398. * SIGHUP: (libc)Termination Signals.
  399. * SIGILL: (libc)Program Error Signals.
  400. * SIGINFO: (libc)Miscellaneous Signals.
  401. * SIGINT: (libc)Termination Signals.
  402. * SIGIO: (libc)Asynchronous I/O Signals.
  403. * SIGIOT: (libc)Program Error Signals.
  404. * SIGKILL: (libc)Termination Signals.
  405. * SIGLOST: (libc)Operation Error Signals.
  406. * SIGPIPE: (libc)Operation Error Signals.
  407. * SIGPOLL: (libc)Asynchronous I/O Signals.
  408. * SIGPROF: (libc)Alarm Signals.
  409. * SIGPWR: (libc)Miscellaneous Signals.
  410. * SIGQUIT: (libc)Termination Signals.
  411. * SIGSEGV: (libc)Program Error Signals.
  412. * SIGSTKFLT: (libc)Program Error Signals.
  413. * SIGSTOP: (libc)Job Control Signals.
  414. * SIGSYS: (libc)Program Error Signals.
  415. * SIGTERM: (libc)Termination Signals.
  416. * SIGTRAP: (libc)Program Error Signals.
  417. * SIGTSTP: (libc)Job Control Signals.
  418. * SIGTTIN: (libc)Job Control Signals.
  419. * SIGTTOU: (libc)Job Control Signals.
  420. * SIGURG: (libc)Asynchronous I/O Signals.
  421. * SIGUSR1: (libc)Miscellaneous Signals.
  422. * SIGUSR2: (libc)Miscellaneous Signals.
  423. * SIGVTALRM: (libc)Alarm Signals.
  424. * SIGWINCH: (libc)Miscellaneous Signals.
  425. * SIGXCPU: (libc)Operation Error Signals.
  426. * SIGXFSZ: (libc)Operation Error Signals.
  427. * SIG_ERR: (libc)Basic Signal Handling.
  428. * SNAN: (libc)Infinity and NaN.
  429. * SNANF: (libc)Infinity and NaN.
  430. * SNANFN: (libc)Infinity and NaN.
  431. * SNANFNx: (libc)Infinity and NaN.
  432. * SNANL: (libc)Infinity and NaN.
  433. * SOCK_DGRAM: (libc)Communication Styles.
  434. * SOCK_RAW: (libc)Communication Styles.
  435. * SOCK_RDM: (libc)Communication Styles.
  436. * SOCK_SEQPACKET: (libc)Communication Styles.
  437. * SOCK_STREAM: (libc)Communication Styles.
  438. * SOL_SOCKET: (libc)Socket-Level Options.
  439. * SPEED_MAX: (libc)Line Speed.
  440. * SSIZE_MAX: (libc)General Limits.
  441. * STREAM_MAX: (libc)General Limits.
  442. * SUN_LEN: (libc)Local Namespace Details.
  443. * S_IFMT: (libc)Testing File Type.
  444. * S_ISBLK: (libc)Testing File Type.
  445. * S_ISCHR: (libc)Testing File Type.
  446. * S_ISDIR: (libc)Testing File Type.
  447. * S_ISFIFO: (libc)Testing File Type.
  448. * S_ISLNK: (libc)Testing File Type.
  449. * S_ISREG: (libc)Testing File Type.
  450. * S_ISSOCK: (libc)Testing File Type.
  451. * S_TYPEISMQ: (libc)Testing File Type.
  452. * S_TYPEISSEM: (libc)Testing File Type.
  453. * S_TYPEISSHM: (libc)Testing File Type.
  454. * TIME_UTC: (libc)Getting the Time.
  455. * TMP_MAX: (libc)Temporary Files.
  456. * TOSTOP: (libc)Local Modes.
  457. * TZNAME_MAX: (libc)General Limits.
  458. * VDISCARD: (libc)Other Special.
  459. * VDSUSP: (libc)Signal Characters.
  460. * VEOF: (libc)Editing Characters.
  461. * VEOL2: (libc)Editing Characters.
  462. * VEOL: (libc)Editing Characters.
  463. * VERASE: (libc)Editing Characters.
  464. * VINTR: (libc)Signal Characters.
  465. * VKILL: (libc)Editing Characters.
  466. * VLNEXT: (libc)Other Special.
  467. * VMIN: (libc)Noncanonical Input.
  468. * VQUIT: (libc)Signal Characters.
  469. * VREPRINT: (libc)Editing Characters.
  470. * VSTART: (libc)Start/Stop Characters.
  471. * VSTATUS: (libc)Other Special.
  472. * VSTOP: (libc)Start/Stop Characters.
  473. * VSUSP: (libc)Signal Characters.
  474. * VTIME: (libc)Noncanonical Input.
  475. * VWERASE: (libc)Editing Characters.
  476. * WCHAR_MAX: (libc)Extended Char Intro.
  477. * WCHAR_MIN: (libc)Extended Char Intro.
  478. * WCOREDUMP: (libc)Process Completion Status.
  479. * WEOF: (libc)EOF and Errors.
  480. * WEOF: (libc)Extended Char Intro.
  481. * WEXITSTATUS: (libc)Process Completion Status.
  482. * WIFEXITED: (libc)Process Completion Status.
  483. * WIFSIGNALED: (libc)Process Completion Status.
  484. * WIFSTOPPED: (libc)Process Completion Status.
  485. * WSTOPSIG: (libc)Process Completion Status.
  486. * WTERMSIG: (libc)Process Completion Status.
  487. * W_OK: (libc)Testing File Access.
  488. * X_OK: (libc)Testing File Access.
  489. * _Complex_I: (libc)Complex Numbers.
  490. * _Exit: (libc)Termination Internals.
  491. * _Fork: (libc)Creating a Process.
  492. * _IOFBF: (libc)Controlling Buffering.
  493. * _IOLBF: (libc)Controlling Buffering.
  494. * _IONBF: (libc)Controlling Buffering.
  495. * _Imaginary_I: (libc)Complex Numbers.
  496. * _PATH_UTMP: (libc)Manipulating the Database.
  497. * _PATH_WTMP: (libc)Manipulating the Database.
  498. * _POSIX2_C_DEV: (libc)System Options.
  499. * _POSIX2_C_VERSION: (libc)Version Supported.
  500. * _POSIX2_FORT_DEV: (libc)System Options.
  501. * _POSIX2_FORT_RUN: (libc)System Options.
  502. * _POSIX2_LOCALEDEF: (libc)System Options.
  503. * _POSIX2_SW_DEV: (libc)System Options.
  504. * _POSIX_CHOWN_RESTRICTED: (libc)Options for Files.
  505. * _POSIX_JOB_CONTROL: (libc)System Options.
  506. * _POSIX_NO_TRUNC: (libc)Options for Files.
  507. * _POSIX_SAVED_IDS: (libc)System Options.
  508. * _POSIX_VDISABLE: (libc)Options for Files.
  509. * _POSIX_VERSION: (libc)Version Supported.
  510. * __fbufsize: (libc)Controlling Buffering.
  511. * __flbf: (libc)Controlling Buffering.
  512. * __fpending: (libc)Controlling Buffering.
  513. * __fpurge: (libc)Flushing Buffers.
  514. * __freadable: (libc)Opening Streams.
  515. * __freading: (libc)Opening Streams.
  516. * __fsetlocking: (libc)Streams and Threads.
  517. * __fwritable: (libc)Opening Streams.
  518. * __fwriting: (libc)Opening Streams.
  519. * __gconv_end_fct: (libc)glibc iconv Implementation.
  520. * __gconv_fct: (libc)glibc iconv Implementation.
  521. * __gconv_init_fct: (libc)glibc iconv Implementation.
  522. * __ppc_get_timebase: (libc)PowerPC.
  523. * __ppc_get_timebase_freq: (libc)PowerPC.
  524. * __ppc_mdoio: (libc)PowerPC.
  525. * __ppc_mdoom: (libc)PowerPC.
  526. * __ppc_set_ppr_low: (libc)PowerPC.
  527. * __ppc_set_ppr_med: (libc)PowerPC.
  528. * __ppc_set_ppr_med_high: (libc)PowerPC.
  529. * __ppc_set_ppr_med_low: (libc)PowerPC.
  530. * __ppc_set_ppr_very_low: (libc)PowerPC.
  531. * __ppc_yield: (libc)PowerPC.
  532. * __riscv_flush_icache: (libc)RISC-V.
  533. * __va_copy: (libc)Argument Macros.
  534. * __x86_get_cpuid_feature_leaf: (libc)X86.
  535. * _dl_find_object: (libc)Dynamic Linker Introspection.
  536. * _exit: (libc)Termination Internals.
  537. * _flushlbf: (libc)Flushing Buffers.
  538. * _tolower: (libc)Case Conversion.
  539. * _toupper: (libc)Case Conversion.
  540. * a64l: (libc)Encode Binary Data.
  541. * abort: (libc)Aborting a Program.
  542. * abs: (libc)Absolute Value.
  543. * accept: (libc)Accepting Connections.
  544. * access: (libc)Testing File Access.
  545. * acos: (libc)Inverse Trig Functions.
  546. * acosf: (libc)Inverse Trig Functions.
  547. * acosfN: (libc)Inverse Trig Functions.
  548. * acosfNx: (libc)Inverse Trig Functions.
  549. * acosh: (libc)Hyperbolic Functions.
  550. * acoshf: (libc)Hyperbolic Functions.
  551. * acoshfN: (libc)Hyperbolic Functions.
  552. * acoshfNx: (libc)Hyperbolic Functions.
  553. * acoshl: (libc)Hyperbolic Functions.
  554. * acosl: (libc)Inverse Trig Functions.
  555. * acospi: (libc)Inverse Trig Functions.
  556. * acospif: (libc)Inverse Trig Functions.
  557. * acospifN: (libc)Inverse Trig Functions.
  558. * acospifNx: (libc)Inverse Trig Functions.
  559. * acospil: (libc)Inverse Trig Functions.
  560. * addmntent: (libc)mtab.
  561. * addseverity: (libc)Adding Severity Classes.
  562. * adjtime: (libc)Setting and Adjusting the Time.
  563. * adjtimex: (libc)Setting and Adjusting the Time.
  564. * aio_cancel64: (libc)Cancel AIO Operations.
  565. * aio_cancel: (libc)Cancel AIO Operations.
  566. * aio_error64: (libc)Status of AIO Operations.
  567. * aio_error: (libc)Status of AIO Operations.
  568. * aio_fsync64: (libc)Synchronizing AIO Operations.
  569. * aio_fsync: (libc)Synchronizing AIO Operations.
  570. * aio_init: (libc)Configuration of AIO.
  571. * aio_read64: (libc)Asynchronous Reads/Writes.
  572. * aio_read: (libc)Asynchronous Reads/Writes.
  573. * aio_return64: (libc)Status of AIO Operations.
  574. * aio_return: (libc)Status of AIO Operations.
  575. * aio_suspend64: (libc)Synchronizing AIO Operations.
  576. * aio_suspend: (libc)Synchronizing AIO Operations.
  577. * aio_write64: (libc)Asynchronous Reads/Writes.
  578. * aio_write: (libc)Asynchronous Reads/Writes.
  579. * alarm: (libc)Setting an Alarm.
  580. * aligned_alloc: (libc)Aligned Memory Blocks.
  581. * alloca: (libc)Variable Size Automatic.
  582. * alphasort64: (libc)Scanning Directory Content.
  583. * alphasort: (libc)Scanning Directory Content.
  584. * arc4random: (libc)High Quality Random.
  585. * arc4random_buf: (libc)High Quality Random.
  586. * arc4random_uniform: (libc)High Quality Random.
  587. * argp_error: (libc)Argp Helper Functions.
  588. * argp_failure: (libc)Argp Helper Functions.
  589. * argp_help: (libc)Argp Help.
  590. * argp_parse: (libc)Argp.
  591. * argp_state_help: (libc)Argp Helper Functions.
  592. * argp_usage: (libc)Argp Helper Functions.
  593. * argz_add: (libc)Argz Functions.
  594. * argz_add_sep: (libc)Argz Functions.
  595. * argz_append: (libc)Argz Functions.
  596. * argz_count: (libc)Argz Functions.
  597. * argz_create: (libc)Argz Functions.
  598. * argz_create_sep: (libc)Argz Functions.
  599. * argz_delete: (libc)Argz Functions.
  600. * argz_extract: (libc)Argz Functions.
  601. * argz_insert: (libc)Argz Functions.
  602. * argz_next: (libc)Argz Functions.
  603. * argz_replace: (libc)Argz Functions.
  604. * argz_stringify: (libc)Argz Functions.
  605. * asctime: (libc)Formatting Calendar Time.
  606. * asctime_r: (libc)Formatting Calendar Time.
  607. * asin: (libc)Inverse Trig Functions.
  608. * asinf: (libc)Inverse Trig Functions.
  609. * asinfN: (libc)Inverse Trig Functions.
  610. * asinfNx: (libc)Inverse Trig Functions.
  611. * asinh: (libc)Hyperbolic Functions.
  612. * asinhf: (libc)Hyperbolic Functions.
  613. * asinhfN: (libc)Hyperbolic Functions.
  614. * asinhfNx: (libc)Hyperbolic Functions.
  615. * asinhl: (libc)Hyperbolic Functions.
  616. * asinl: (libc)Inverse Trig Functions.
  617. * asinpi: (libc)Inverse Trig Functions.
  618. * asinpif: (libc)Inverse Trig Functions.
  619. * asinpifN: (libc)Inverse Trig Functions.
  620. * asinpifNx: (libc)Inverse Trig Functions.
  621. * asinpil: (libc)Inverse Trig Functions.
  622. * asprintf: (libc)Dynamic Output.
  623. * assert: (libc)Consistency Checking.
  624. * assert_perror: (libc)Consistency Checking.
  625. * atan2: (libc)Inverse Trig Functions.
  626. * atan2f: (libc)Inverse Trig Functions.
  627. * atan2fN: (libc)Inverse Trig Functions.
  628. * atan2fNx: (libc)Inverse Trig Functions.
  629. * atan2l: (libc)Inverse Trig Functions.
  630. * atan2pi: (libc)Inverse Trig Functions.
  631. * atan2pif: (libc)Inverse Trig Functions.
  632. * atan2pifN: (libc)Inverse Trig Functions.
  633. * atan2pifNx: (libc)Inverse Trig Functions.
  634. * atan2pil: (libc)Inverse Trig Functions.
  635. * atan: (libc)Inverse Trig Functions.
  636. * atanf: (libc)Inverse Trig Functions.
  637. * atanfN: (libc)Inverse Trig Functions.
  638. * atanfNx: (libc)Inverse Trig Functions.
  639. * atanh: (libc)Hyperbolic Functions.
  640. * atanhf: (libc)Hyperbolic Functions.
  641. * atanhfN: (libc)Hyperbolic Functions.
  642. * atanhfNx: (libc)Hyperbolic Functions.
  643. * atanhl: (libc)Hyperbolic Functions.
  644. * atanl: (libc)Inverse Trig Functions.
  645. * atanpi: (libc)Inverse Trig Functions.
  646. * atanpif: (libc)Inverse Trig Functions.
  647. * atanpifN: (libc)Inverse Trig Functions.
  648. * atanpifNx: (libc)Inverse Trig Functions.
  649. * atanpil: (libc)Inverse Trig Functions.
  650. * atexit: (libc)Cleanups on Exit.
  651. * atof: (libc)Parsing of Floats.
  652. * atoi: (libc)Parsing of Integers.
  653. * atol: (libc)Parsing of Integers.
  654. * atoll: (libc)Parsing of Integers.
  655. * backtrace: (libc)Backtraces.
  656. * backtrace_symbols: (libc)Backtraces.
  657. * backtrace_symbols_fd: (libc)Backtraces.
  658. * basename: (libc)Finding Tokens in a String.
  659. * basename: (libc)Finding Tokens in a String.
  660. * bcmp: (libc)String/Array Comparison.
  661. * bcopy: (libc)Copying Strings and Arrays.
  662. * bind: (libc)Setting Address.
  663. * bind_textdomain_codeset: (libc)Charset conversion in gettext.
  664. * bindtextdomain: (libc)Locating gettext catalog.
  665. * brk: (libc)Resizing the Data Segment.
  666. * bsearch: (libc)Array Search Function.
  667. * btowc: (libc)Converting a Character.
  668. * bzero: (libc)Copying Strings and Arrays.
  669. * cabs: (libc)Absolute Value.
  670. * cabsf: (libc)Absolute Value.
  671. * cabsfN: (libc)Absolute Value.
  672. * cabsfNx: (libc)Absolute Value.
  673. * cabsl: (libc)Absolute Value.
  674. * cacos: (libc)Inverse Trig Functions.
  675. * cacosf: (libc)Inverse Trig Functions.
  676. * cacosfN: (libc)Inverse Trig Functions.
  677. * cacosfNx: (libc)Inverse Trig Functions.
  678. * cacosh: (libc)Hyperbolic Functions.
  679. * cacoshf: (libc)Hyperbolic Functions.
  680. * cacoshfN: (libc)Hyperbolic Functions.
  681. * cacoshfNx: (libc)Hyperbolic Functions.
  682. * cacoshl: (libc)Hyperbolic Functions.
  683. * cacosl: (libc)Inverse Trig Functions.
  684. * call_once: (libc)Call Once.
  685. * calloc: (libc)Allocating Cleared Space.
  686. * canonicalize: (libc)FP Bit Twiddling.
  687. * canonicalize_file_name: (libc)Symbolic Links.
  688. * canonicalizef: (libc)FP Bit Twiddling.
  689. * canonicalizefN: (libc)FP Bit Twiddling.
  690. * canonicalizefNx: (libc)FP Bit Twiddling.
  691. * canonicalizel: (libc)FP Bit Twiddling.
  692. * carg: (libc)Operations on Complex.
  693. * cargf: (libc)Operations on Complex.
  694. * cargfN: (libc)Operations on Complex.
  695. * cargfNx: (libc)Operations on Complex.
  696. * cargl: (libc)Operations on Complex.
  697. * casin: (libc)Inverse Trig Functions.
  698. * casinf: (libc)Inverse Trig Functions.
  699. * casinfN: (libc)Inverse Trig Functions.
  700. * casinfNx: (libc)Inverse Trig Functions.
  701. * casinh: (libc)Hyperbolic Functions.
  702. * casinhf: (libc)Hyperbolic Functions.
  703. * casinhfN: (libc)Hyperbolic Functions.
  704. * casinhfNx: (libc)Hyperbolic Functions.
  705. * casinhl: (libc)Hyperbolic Functions.
  706. * casinl: (libc)Inverse Trig Functions.
  707. * catan: (libc)Inverse Trig Functions.
  708. * catanf: (libc)Inverse Trig Functions.
  709. * catanfN: (libc)Inverse Trig Functions.
  710. * catanfNx: (libc)Inverse Trig Functions.
  711. * catanh: (libc)Hyperbolic Functions.
  712. * catanhf: (libc)Hyperbolic Functions.
  713. * catanhfN: (libc)Hyperbolic Functions.
  714. * catanhfNx: (libc)Hyperbolic Functions.
  715. * catanhl: (libc)Hyperbolic Functions.
  716. * catanl: (libc)Inverse Trig Functions.
  717. * catclose: (libc)The catgets Functions.
  718. * catgets: (libc)The catgets Functions.
  719. * catopen: (libc)The catgets Functions.
  720. * cbrt: (libc)Exponents and Logarithms.
  721. * cbrtf: (libc)Exponents and Logarithms.
  722. * cbrtfN: (libc)Exponents and Logarithms.
  723. * cbrtfNx: (libc)Exponents and Logarithms.
  724. * cbrtl: (libc)Exponents and Logarithms.
  725. * ccos: (libc)Trig Functions.
  726. * ccosf: (libc)Trig Functions.
  727. * ccosfN: (libc)Trig Functions.
  728. * ccosfNx: (libc)Trig Functions.
  729. * ccosh: (libc)Hyperbolic Functions.
  730. * ccoshf: (libc)Hyperbolic Functions.
  731. * ccoshfN: (libc)Hyperbolic Functions.
  732. * ccoshfNx: (libc)Hyperbolic Functions.
  733. * ccoshl: (libc)Hyperbolic Functions.
  734. * ccosl: (libc)Trig Functions.
  735. * ceil: (libc)Rounding Functions.
  736. * ceilf: (libc)Rounding Functions.
  737. * ceilfN: (libc)Rounding Functions.
  738. * ceilfNx: (libc)Rounding Functions.
  739. * ceill: (libc)Rounding Functions.
  740. * cexp: (libc)Exponents and Logarithms.
  741. * cexpf: (libc)Exponents and Logarithms.
  742. * cexpfN: (libc)Exponents and Logarithms.
  743. * cexpfNx: (libc)Exponents and Logarithms.
  744. * cexpl: (libc)Exponents and Logarithms.
  745. * cfgetibaud: (libc)Line Speed.
  746. * cfgetispeed: (libc)Line Speed.
  747. * cfgetobaud: (libc)Line Speed.
  748. * cfgetospeed: (libc)Line Speed.
  749. * cfmakeraw: (libc)Noncanonical Input.
  750. * cfsetbaud: (libc)Line Speed.
  751. * cfsetibaud: (libc)Line Speed.
  752. * cfsetispeed: (libc)Line Speed.
  753. * cfsetobaud: (libc)Line Speed.
  754. * cfsetospeed: (libc)Line Speed.
  755. * cfsetspeed: (libc)Line Speed.
  756. * chdir: (libc)Working Directory.
  757. * chmod: (libc)Setting Permissions.
  758. * chown: (libc)File Owner.
  759. * cimag: (libc)Operations on Complex.
  760. * cimagf: (libc)Operations on Complex.
  761. * cimagfN: (libc)Operations on Complex.
  762. * cimagfNx: (libc)Operations on Complex.
  763. * cimagl: (libc)Operations on Complex.
  764. * clearenv: (libc)Environment Access.
  765. * clearerr: (libc)Error Recovery.
  766. * clearerr_unlocked: (libc)Error Recovery.
  767. * clock: (libc)CPU Time.
  768. * clock_getres: (libc)Getting the Time.
  769. * clock_gettime: (libc)Getting the Time.
  770. * clock_nanosleep: (libc)Sleeping.
  771. * clock_settime: (libc)Setting and Adjusting the Time.
  772. * clog10: (libc)Exponents and Logarithms.
  773. * clog10f: (libc)Exponents and Logarithms.
  774. * clog10fN: (libc)Exponents and Logarithms.
  775. * clog10fNx: (libc)Exponents and Logarithms.
  776. * clog10l: (libc)Exponents and Logarithms.
  777. * clog: (libc)Exponents and Logarithms.
  778. * clogf: (libc)Exponents and Logarithms.
  779. * clogfN: (libc)Exponents and Logarithms.
  780. * clogfNx: (libc)Exponents and Logarithms.
  781. * clogl: (libc)Exponents and Logarithms.
  782. * close: (libc)Opening and Closing Files.
  783. * close_range: (libc)Opening and Closing Files.
  784. * closedir: (libc)Reading/Closing Directory.
  785. * closefrom: (libc)Opening and Closing Files.
  786. * closelog: (libc)closelog.
  787. * cnd_broadcast: (libc)ISO C Condition Variables.
  788. * cnd_destroy: (libc)ISO C Condition Variables.
  789. * cnd_init: (libc)ISO C Condition Variables.
  790. * cnd_signal: (libc)ISO C Condition Variables.
  791. * cnd_timedwait: (libc)ISO C Condition Variables.
  792. * cnd_wait: (libc)ISO C Condition Variables.
  793. * compoundn: (libc)Exponents and Logarithms.
  794. * compoundnf: (libc)Exponents and Logarithms.
  795. * compoundnfN: (libc)Exponents and Logarithms.
  796. * compoundnfNx: (libc)Exponents and Logarithms.
  797. * compoundnl: (libc)Exponents and Logarithms.
  798. * confstr: (libc)String Parameters.
  799. * conj: (libc)Operations on Complex.
  800. * conjf: (libc)Operations on Complex.
  801. * conjfN: (libc)Operations on Complex.
  802. * conjfNx: (libc)Operations on Complex.
  803. * conjl: (libc)Operations on Complex.
  804. * connect: (libc)Connecting.
  805. * copy_file_range: (libc)Copying File Data.
  806. * copysign: (libc)FP Bit Twiddling.
  807. * copysignf: (libc)FP Bit Twiddling.
  808. * copysignfN: (libc)FP Bit Twiddling.
  809. * copysignfNx: (libc)FP Bit Twiddling.
  810. * copysignl: (libc)FP Bit Twiddling.
  811. * cos: (libc)Trig Functions.
  812. * cosf: (libc)Trig Functions.
  813. * cosfN: (libc)Trig Functions.
  814. * cosfNx: (libc)Trig Functions.
  815. * cosh: (libc)Hyperbolic Functions.
  816. * coshf: (libc)Hyperbolic Functions.
  817. * coshfN: (libc)Hyperbolic Functions.
  818. * coshfNx: (libc)Hyperbolic Functions.
  819. * coshl: (libc)Hyperbolic Functions.
  820. * cosl: (libc)Trig Functions.
  821. * cospi: (libc)Trig Functions.
  822. * cospif: (libc)Trig Functions.
  823. * cospifN: (libc)Trig Functions.
  824. * cospifNx: (libc)Trig Functions.
  825. * cospil: (libc)Trig Functions.
  826. * cpow: (libc)Exponents and Logarithms.
  827. * cpowf: (libc)Exponents and Logarithms.
  828. * cpowfN: (libc)Exponents and Logarithms.
  829. * cpowfNx: (libc)Exponents and Logarithms.
  830. * cpowl: (libc)Exponents and Logarithms.
  831. * cproj: (libc)Operations on Complex.
  832. * cprojf: (libc)Operations on Complex.
  833. * cprojfN: (libc)Operations on Complex.
  834. * cprojfNx: (libc)Operations on Complex.
  835. * cprojl: (libc)Operations on Complex.
  836. * creal: (libc)Operations on Complex.
  837. * crealf: (libc)Operations on Complex.
  838. * crealfN: (libc)Operations on Complex.
  839. * crealfNx: (libc)Operations on Complex.
  840. * creall: (libc)Operations on Complex.
  841. * creat64: (libc)Opening and Closing Files.
  842. * creat: (libc)Opening and Closing Files.
  843. * csin: (libc)Trig Functions.
  844. * csinf: (libc)Trig Functions.
  845. * csinfN: (libc)Trig Functions.
  846. * csinfNx: (libc)Trig Functions.
  847. * csinh: (libc)Hyperbolic Functions.
  848. * csinhf: (libc)Hyperbolic Functions.
  849. * csinhfN: (libc)Hyperbolic Functions.
  850. * csinhfNx: (libc)Hyperbolic Functions.
  851. * csinhl: (libc)Hyperbolic Functions.
  852. * csinl: (libc)Trig Functions.
  853. * csqrt: (libc)Exponents and Logarithms.
  854. * csqrtf: (libc)Exponents and Logarithms.
  855. * csqrtfN: (libc)Exponents and Logarithms.
  856. * csqrtfNx: (libc)Exponents and Logarithms.
  857. * csqrtl: (libc)Exponents and Logarithms.
  858. * ctan: (libc)Trig Functions.
  859. * ctanf: (libc)Trig Functions.
  860. * ctanfN: (libc)Trig Functions.
  861. * ctanfNx: (libc)Trig Functions.
  862. * ctanh: (libc)Hyperbolic Functions.
  863. * ctanhf: (libc)Hyperbolic Functions.
  864. * ctanhfN: (libc)Hyperbolic Functions.
  865. * ctanhfNx: (libc)Hyperbolic Functions.
  866. * ctanhl: (libc)Hyperbolic Functions.
  867. * ctanl: (libc)Trig Functions.
  868. * ctermid: (libc)Identifying the Terminal.
  869. * ctime: (libc)Formatting Calendar Time.
  870. * ctime_r: (libc)Formatting Calendar Time.
  871. * cuserid: (libc)Who Logged In.
  872. * daddl: (libc)Misc FP Arithmetic.
  873. * dcgettext: (libc)Translation with gettext.
  874. * dcngettext: (libc)Advanced gettext functions.
  875. * ddivl: (libc)Misc FP Arithmetic.
  876. * dfmal: (libc)Misc FP Arithmetic.
  877. * dgettext: (libc)Translation with gettext.
  878. * difftime: (libc)Calculating Elapsed Time.
  879. * dirfd: (libc)Opening a Directory.
  880. * dirname: (libc)Finding Tokens in a String.
  881. * div: (libc)Integer Division.
  882. * dlinfo: (libc)Dynamic Linker Introspection.
  883. * dmull: (libc)Misc FP Arithmetic.
  884. * dngettext: (libc)Advanced gettext functions.
  885. * dprintf: (libc)Formatted Output Functions.
  886. * drand48: (libc)SVID Random.
  887. * drand48_r: (libc)SVID Random.
  888. * drem: (libc)Remainder Functions.
  889. * dremf: (libc)Remainder Functions.
  890. * dreml: (libc)Remainder Functions.
  891. * dsqrtl: (libc)Misc FP Arithmetic.
  892. * dsubl: (libc)Misc FP Arithmetic.
  893. * dup2: (libc)Duplicating Descriptors.
  894. * dup3: (libc)Duplicating Descriptors.
  895. * dup: (libc)Duplicating Descriptors.
  896. * ecvt: (libc)System V Number Conversion.
  897. * ecvt_r: (libc)System V Number Conversion.
  898. * endfsent: (libc)fstab.
  899. * endgrent: (libc)Scanning All Groups.
  900. * endhostent: (libc)Host Names.
  901. * endmntent: (libc)mtab.
  902. * endnetent: (libc)Networks Database.
  903. * endnetgrent: (libc)Lookup Netgroup.
  904. * endprotoent: (libc)Protocols Database.
  905. * endpwent: (libc)Scanning All Users.
  906. * endservent: (libc)Services Database.
  907. * endutent: (libc)Manipulating the Database.
  908. * endutxent: (libc)XPG Functions.
  909. * envz_add: (libc)Envz Functions.
  910. * envz_entry: (libc)Envz Functions.
  911. * envz_get: (libc)Envz Functions.
  912. * envz_merge: (libc)Envz Functions.
  913. * envz_remove: (libc)Envz Functions.
  914. * envz_strip: (libc)Envz Functions.
  915. * epoll_create: (libc)Other Low-Level I/O APIs.
  916. * epoll_wait: (libc)Other Low-Level I/O APIs.
  917. * erand48: (libc)SVID Random.
  918. * erand48_r: (libc)SVID Random.
  919. * erf: (libc)Special Functions.
  920. * erfc: (libc)Special Functions.
  921. * erfcf: (libc)Special Functions.
  922. * erfcfN: (libc)Special Functions.
  923. * erfcfNx: (libc)Special Functions.
  924. * erfcl: (libc)Special Functions.
  925. * erff: (libc)Special Functions.
  926. * erffN: (libc)Special Functions.
  927. * erffNx: (libc)Special Functions.
  928. * erfl: (libc)Special Functions.
  929. * err: (libc)Error Messages.
  930. * errno: (libc)Checking for Errors.
  931. * error: (libc)Error Messages.
  932. * error_at_line: (libc)Error Messages.
  933. * errx: (libc)Error Messages.
  934. * execl: (libc)Executing a File.
  935. * execle: (libc)Executing a File.
  936. * execlp: (libc)Executing a File.
  937. * execv: (libc)Executing a File.
  938. * execve: (libc)Executing a File.
  939. * execvp: (libc)Executing a File.
  940. * exit: (libc)Normal Termination.
  941. * exp10: (libc)Exponents and Logarithms.
  942. * exp10f: (libc)Exponents and Logarithms.
  943. * exp10fN: (libc)Exponents and Logarithms.
  944. * exp10fNx: (libc)Exponents and Logarithms.
  945. * exp10l: (libc)Exponents and Logarithms.
  946. * exp10m1: (libc)Exponents and Logarithms.
  947. * exp10m1f: (libc)Exponents and Logarithms.
  948. * exp10m1fN: (libc)Exponents and Logarithms.
  949. * exp10m1fNx: (libc)Exponents and Logarithms.
  950. * exp10m1l: (libc)Exponents and Logarithms.
  951. * exp2: (libc)Exponents and Logarithms.
  952. * exp2f: (libc)Exponents and Logarithms.
  953. * exp2fN: (libc)Exponents and Logarithms.
  954. * exp2fNx: (libc)Exponents and Logarithms.
  955. * exp2l: (libc)Exponents and Logarithms.
  956. * exp2m1: (libc)Exponents and Logarithms.
  957. * exp2m1f: (libc)Exponents and Logarithms.
  958. * exp2m1fN: (libc)Exponents and Logarithms.
  959. * exp2m1fNx: (libc)Exponents and Logarithms.
  960. * exp2m1l: (libc)Exponents and Logarithms.
  961. * exp: (libc)Exponents and Logarithms.
  962. * expf: (libc)Exponents and Logarithms.
  963. * expfN: (libc)Exponents and Logarithms.
  964. * expfNx: (libc)Exponents and Logarithms.
  965. * expl: (libc)Exponents and Logarithms.
  966. * explicit_bzero: (libc)Erasing Sensitive Data.
  967. * expm1: (libc)Exponents and Logarithms.
  968. * expm1f: (libc)Exponents and Logarithms.
  969. * expm1fN: (libc)Exponents and Logarithms.
  970. * expm1fNx: (libc)Exponents and Logarithms.
  971. * expm1l: (libc)Exponents and Logarithms.
  972. * fMaddfN: (libc)Misc FP Arithmetic.
  973. * fMaddfNx: (libc)Misc FP Arithmetic.
  974. * fMdivfN: (libc)Misc FP Arithmetic.
  975. * fMdivfNx: (libc)Misc FP Arithmetic.
  976. * fMfmafN: (libc)Misc FP Arithmetic.
  977. * fMfmafNx: (libc)Misc FP Arithmetic.
  978. * fMmulfN: (libc)Misc FP Arithmetic.
  979. * fMmulfNx: (libc)Misc FP Arithmetic.
  980. * fMsqrtfN: (libc)Misc FP Arithmetic.
  981. * fMsqrtfNx: (libc)Misc FP Arithmetic.
  982. * fMsubfN: (libc)Misc FP Arithmetic.
  983. * fMsubfNx: (libc)Misc FP Arithmetic.
  984. * fMxaddfN: (libc)Misc FP Arithmetic.
  985. * fMxaddfNx: (libc)Misc FP Arithmetic.
  986. * fMxdivfN: (libc)Misc FP Arithmetic.
  987. * fMxdivfNx: (libc)Misc FP Arithmetic.
  988. * fMxfmafN: (libc)Misc FP Arithmetic.
  989. * fMxfmafNx: (libc)Misc FP Arithmetic.
  990. * fMxmulfN: (libc)Misc FP Arithmetic.
  991. * fMxmulfNx: (libc)Misc FP Arithmetic.
  992. * fMxsqrtfN: (libc)Misc FP Arithmetic.
  993. * fMxsqrtfNx: (libc)Misc FP Arithmetic.
  994. * fMxsubfN: (libc)Misc FP Arithmetic.
  995. * fMxsubfNx: (libc)Misc FP Arithmetic.
  996. * fabs: (libc)Absolute Value.
  997. * fabsf: (libc)Absolute Value.
  998. * fabsfN: (libc)Absolute Value.
  999. * fabsfNx: (libc)Absolute Value.
  1000. * fabsl: (libc)Absolute Value.
  1001. * faccessat: (libc)Testing File Access.
  1002. * fadd: (libc)Misc FP Arithmetic.
  1003. * faddl: (libc)Misc FP Arithmetic.
  1004. * fchdir: (libc)Working Directory.
  1005. * fchmod: (libc)Setting Permissions.
  1006. * fchown: (libc)File Owner.
  1007. * fclose: (libc)Closing Streams.
  1008. * fcloseall: (libc)Closing Streams.
  1009. * fcntl: (libc)Control Operations.
  1010. * fcvt: (libc)System V Number Conversion.
  1011. * fcvt_r: (libc)System V Number Conversion.
  1012. * fdatasync: (libc)Synchronizing I/O.
  1013. * fdim: (libc)Misc FP Arithmetic.
  1014. * fdimf: (libc)Misc FP Arithmetic.
  1015. * fdimfN: (libc)Misc FP Arithmetic.
  1016. * fdimfNx: (libc)Misc FP Arithmetic.
  1017. * fdiml: (libc)Misc FP Arithmetic.
  1018. * fdiv: (libc)Misc FP Arithmetic.
  1019. * fdivl: (libc)Misc FP Arithmetic.
  1020. * fdopen: (libc)Descriptors and Streams.
  1021. * fdopendir: (libc)Opening a Directory.
  1022. * feclearexcept: (libc)Status bit operations.
  1023. * fedisableexcept: (libc)Control Functions.
  1024. * feenableexcept: (libc)Control Functions.
  1025. * fegetenv: (libc)Control Functions.
  1026. * fegetexcept: (libc)Control Functions.
  1027. * fegetexceptflag: (libc)Status bit operations.
  1028. * fegetmode: (libc)Control Functions.
  1029. * fegetround: (libc)Rounding.
  1030. * feholdexcept: (libc)Control Functions.
  1031. * feof: (libc)EOF and Errors.
  1032. * feof_unlocked: (libc)EOF and Errors.
  1033. * feraiseexcept: (libc)Status bit operations.
  1034. * ferror: (libc)EOF and Errors.
  1035. * ferror_unlocked: (libc)EOF and Errors.
  1036. * fesetenv: (libc)Control Functions.
  1037. * fesetexcept: (libc)Status bit operations.
  1038. * fesetexceptflag: (libc)Status bit operations.
  1039. * fesetmode: (libc)Control Functions.
  1040. * fesetround: (libc)Rounding.
  1041. * fetestexcept: (libc)Status bit operations.
  1042. * fetestexceptflag: (libc)Status bit operations.
  1043. * feupdateenv: (libc)Control Functions.
  1044. * fexecve: (libc)Executing a File.
  1045. * fflush: (libc)Flushing Buffers.
  1046. * fflush_unlocked: (libc)Flushing Buffers.
  1047. * ffma: (libc)Misc FP Arithmetic.
  1048. * ffmal: (libc)Misc FP Arithmetic.
  1049. * fgetc: (libc)Character Input.
  1050. * fgetc_unlocked: (libc)Character Input.
  1051. * fgetgrent: (libc)Scanning All Groups.
  1052. * fgetgrent_r: (libc)Scanning All Groups.
  1053. * fgetpos64: (libc)Portable Positioning.
  1054. * fgetpos: (libc)Portable Positioning.
  1055. * fgetpwent: (libc)Scanning All Users.
  1056. * fgetpwent_r: (libc)Scanning All Users.
  1057. * fgets: (libc)Line Input.
  1058. * fgets_unlocked: (libc)Line Input.
  1059. * fgetwc: (libc)Character Input.
  1060. * fgetwc_unlocked: (libc)Character Input.
  1061. * fgetws: (libc)Line Input.
  1062. * fgetws_unlocked: (libc)Line Input.
  1063. * fileno: (libc)Descriptors and Streams.
  1064. * fileno_unlocked: (libc)Descriptors and Streams.
  1065. * finite: (libc)Floating Point Classes.
  1066. * finitef: (libc)Floating Point Classes.
  1067. * finitel: (libc)Floating Point Classes.
  1068. * flockfile: (libc)Streams and Threads.
  1069. * floor: (libc)Rounding Functions.
  1070. * floorf: (libc)Rounding Functions.
  1071. * floorfN: (libc)Rounding Functions.
  1072. * floorfNx: (libc)Rounding Functions.
  1073. * floorl: (libc)Rounding Functions.
  1074. * fma: (libc)Misc FP Arithmetic.
  1075. * fmaf: (libc)Misc FP Arithmetic.
  1076. * fmafN: (libc)Misc FP Arithmetic.
  1077. * fmafNx: (libc)Misc FP Arithmetic.
  1078. * fmal: (libc)Misc FP Arithmetic.
  1079. * fmax: (libc)Misc FP Arithmetic.
  1080. * fmaxf: (libc)Misc FP Arithmetic.
  1081. * fmaxfN: (libc)Misc FP Arithmetic.
  1082. * fmaxfNx: (libc)Misc FP Arithmetic.
  1083. * fmaximum: (libc)Misc FP Arithmetic.
  1084. * fmaximum_mag: (libc)Misc FP Arithmetic.
  1085. * fmaximum_mag_num: (libc)Misc FP Arithmetic.
  1086. * fmaximum_mag_numf: (libc)Misc FP Arithmetic.
  1087. * fmaximum_mag_numfN: (libc)Misc FP Arithmetic.
  1088. * fmaximum_mag_numfNx: (libc)Misc FP Arithmetic.
  1089. * fmaximum_mag_numl: (libc)Misc FP Arithmetic.
  1090. * fmaximum_magf: (libc)Misc FP Arithmetic.
  1091. * fmaximum_magfN: (libc)Misc FP Arithmetic.
  1092. * fmaximum_magfNx: (libc)Misc FP Arithmetic.
  1093. * fmaximum_magl: (libc)Misc FP Arithmetic.
  1094. * fmaximum_num: (libc)Misc FP Arithmetic.
  1095. * fmaximum_numf: (libc)Misc FP Arithmetic.
  1096. * fmaximum_numfN: (libc)Misc FP Arithmetic.
  1097. * fmaximum_numfNx: (libc)Misc FP Arithmetic.
  1098. * fmaximum_numl: (libc)Misc FP Arithmetic.
  1099. * fmaximumf: (libc)Misc FP Arithmetic.
  1100. * fmaximumfN: (libc)Misc FP Arithmetic.
  1101. * fmaximumfNx: (libc)Misc FP Arithmetic.
  1102. * fmaximuml: (libc)Misc FP Arithmetic.
  1103. * fmaxl: (libc)Misc FP Arithmetic.
  1104. * fmaxmag: (libc)Misc FP Arithmetic.
  1105. * fmaxmagf: (libc)Misc FP Arithmetic.
  1106. * fmaxmagfN: (libc)Misc FP Arithmetic.
  1107. * fmaxmagfNx: (libc)Misc FP Arithmetic.
  1108. * fmaxmagl: (libc)Misc FP Arithmetic.
  1109. * fmemopen: (libc)String Streams.
  1110. * fmin: (libc)Misc FP Arithmetic.
  1111. * fminf: (libc)Misc FP Arithmetic.
  1112. * fminfN: (libc)Misc FP Arithmetic.
  1113. * fminfNx: (libc)Misc FP Arithmetic.
  1114. * fminimum: (libc)Misc FP Arithmetic.
  1115. * fminimum_mag: (libc)Misc FP Arithmetic.
  1116. * fminimum_mag_num: (libc)Misc FP Arithmetic.
  1117. * fminimum_mag_numf: (libc)Misc FP Arithmetic.
  1118. * fminimum_mag_numfN: (libc)Misc FP Arithmetic.
  1119. * fminimum_mag_numfNx: (libc)Misc FP Arithmetic.
  1120. * fminimum_mag_numl: (libc)Misc FP Arithmetic.
  1121. * fminimum_magf: (libc)Misc FP Arithmetic.
  1122. * fminimum_magfN: (libc)Misc FP Arithmetic.
  1123. * fminimum_magfNx: (libc)Misc FP Arithmetic.
  1124. * fminimum_magl: (libc)Misc FP Arithmetic.
  1125. * fminimum_num: (libc)Misc FP Arithmetic.
  1126. * fminimum_numf: (libc)Misc FP Arithmetic.
  1127. * fminimum_numfN: (libc)Misc FP Arithmetic.
  1128. * fminimum_numfNx: (libc)Misc FP Arithmetic.
  1129. * fminimum_numl: (libc)Misc FP Arithmetic.
  1130. * fminimumf: (libc)Misc FP Arithmetic.
  1131. * fminimumfN: (libc)Misc FP Arithmetic.
  1132. * fminimumfNx: (libc)Misc FP Arithmetic.
  1133. * fminimuml: (libc)Misc FP Arithmetic.
  1134. * fminl: (libc)Misc FP Arithmetic.
  1135. * fminmag: (libc)Misc FP Arithmetic.
  1136. * fminmagf: (libc)Misc FP Arithmetic.
  1137. * fminmagfN: (libc)Misc FP Arithmetic.
  1138. * fminmagfNx: (libc)Misc FP Arithmetic.
  1139. * fminmagl: (libc)Misc FP Arithmetic.
  1140. * fmod: (libc)Remainder Functions.
  1141. * fmodf: (libc)Remainder Functions.
  1142. * fmodfN: (libc)Remainder Functions.
  1143. * fmodfNx: (libc)Remainder Functions.
  1144. * fmodl: (libc)Remainder Functions.
  1145. * fmtmsg: (libc)Printing Formatted Messages.
  1146. * fmul: (libc)Misc FP Arithmetic.
  1147. * fmull: (libc)Misc FP Arithmetic.
  1148. * fnmatch: (libc)Wildcard Matching.
  1149. * fopen64: (libc)Opening Streams.
  1150. * fopen: (libc)Opening Streams.
  1151. * fopencookie: (libc)Streams and Cookies.
  1152. * fork: (libc)Creating a Process.
  1153. * forkpty: (libc)Pseudo-Terminal Pairs.
  1154. * fpathconf: (libc)Pathconf.
  1155. * fpclassify: (libc)Floating Point Classes.
  1156. * fprintf: (libc)Formatted Output Functions.
  1157. * fputc: (libc)Simple Output.
  1158. * fputc_unlocked: (libc)Simple Output.
  1159. * fputs: (libc)Simple Output.
  1160. * fputs_unlocked: (libc)Simple Output.
  1161. * fputwc: (libc)Simple Output.
  1162. * fputwc_unlocked: (libc)Simple Output.
  1163. * fputws: (libc)Simple Output.
  1164. * fputws_unlocked: (libc)Simple Output.
  1165. * fread: (libc)Block Input/Output.
  1166. * fread_unlocked: (libc)Block Input/Output.
  1167. * free: (libc)Freeing after Malloc.
  1168. * free_aligned_sized: (libc)Freeing after Malloc.
  1169. * free_sized: (libc)Freeing after Malloc.
  1170. * freopen64: (libc)Opening Streams.
  1171. * freopen: (libc)Opening Streams.
  1172. * frexp: (libc)Normalization Functions.
  1173. * frexpf: (libc)Normalization Functions.
  1174. * frexpfN: (libc)Normalization Functions.
  1175. * frexpfNx: (libc)Normalization Functions.
  1176. * frexpl: (libc)Normalization Functions.
  1177. * fromfp: (libc)Rounding Functions.
  1178. * fromfpf: (libc)Rounding Functions.
  1179. * fromfpfN: (libc)Rounding Functions.
  1180. * fromfpfNx: (libc)Rounding Functions.
  1181. * fromfpl: (libc)Rounding Functions.
  1182. * fromfpx: (libc)Rounding Functions.
  1183. * fromfpxf: (libc)Rounding Functions.
  1184. * fromfpxfN: (libc)Rounding Functions.
  1185. * fromfpxfNx: (libc)Rounding Functions.
  1186. * fromfpxl: (libc)Rounding Functions.
  1187. * fscanf: (libc)Formatted Input Functions.
  1188. * fseek: (libc)File Positioning.
  1189. * fseeko64: (libc)File Positioning.
  1190. * fseeko: (libc)File Positioning.
  1191. * fsetpos64: (libc)Portable Positioning.
  1192. * fsetpos: (libc)Portable Positioning.
  1193. * fsqrt: (libc)Misc FP Arithmetic.
  1194. * fsqrtl: (libc)Misc FP Arithmetic.
  1195. * fstat64: (libc)Reading Attributes.
  1196. * fstat: (libc)Reading Attributes.
  1197. * fstatat64: (libc)Reading Attributes.
  1198. * fstatat: (libc)Reading Attributes.
  1199. * fsub: (libc)Misc FP Arithmetic.
  1200. * fsubl: (libc)Misc FP Arithmetic.
  1201. * fsync: (libc)Synchronizing I/O.
  1202. * ftell: (libc)File Positioning.
  1203. * ftello64: (libc)File Positioning.
  1204. * ftello: (libc)File Positioning.
  1205. * ftruncate64: (libc)File Size.
  1206. * ftruncate: (libc)File Size.
  1207. * ftrylockfile: (libc)Streams and Threads.
  1208. * ftw64: (libc)Working with Directory Trees.
  1209. * ftw: (libc)Working with Directory Trees.
  1210. * funlockfile: (libc)Streams and Threads.
  1211. * futimens: (libc)File Times.
  1212. * futimes: (libc)File Times.
  1213. * fwide: (libc)Streams and I18N.
  1214. * fwprintf: (libc)Formatted Output Functions.
  1215. * fwrite: (libc)Block Input/Output.
  1216. * fwrite_unlocked: (libc)Block Input/Output.
  1217. * fwscanf: (libc)Formatted Input Functions.
  1218. * gamma: (libc)Special Functions.
  1219. * gammaf: (libc)Special Functions.
  1220. * gammal: (libc)Special Functions.
  1221. * gcvt: (libc)System V Number Conversion.
  1222. * get_avphys_pages: (libc)Query Memory Parameters.
  1223. * get_current_dir_name: (libc)Working Directory.
  1224. * get_nprocs: (libc)Processor Resources.
  1225. * get_nprocs_conf: (libc)Processor Resources.
  1226. * get_phys_pages: (libc)Query Memory Parameters.
  1227. * getauxval: (libc)Auxiliary Vector.
  1228. * getc: (libc)Character Input.
  1229. * getc_unlocked: (libc)Character Input.
  1230. * getchar: (libc)Character Input.
  1231. * getchar_unlocked: (libc)Character Input.
  1232. * getcontext: (libc)System V contexts.
  1233. * getcpu: (libc)CPU Affinity.
  1234. * getcwd: (libc)Working Directory.
  1235. * getdate: (libc)General Time String Parsing.
  1236. * getdate_r: (libc)General Time String Parsing.
  1237. * getdelim: (libc)Line Input.
  1238. * getdents64: (libc)Low-level Directory Access.
  1239. * getdomainname: (libc)Host Identification.
  1240. * getegid: (libc)Reading Persona.
  1241. * getentropy: (libc)Unpredictable Bytes.
  1242. * getenv: (libc)Environment Access.
  1243. * geteuid: (libc)Reading Persona.
  1244. * getfsent: (libc)fstab.
  1245. * getfsfile: (libc)fstab.
  1246. * getfsspec: (libc)fstab.
  1247. * getgid: (libc)Reading Persona.
  1248. * getgrent: (libc)Scanning All Groups.
  1249. * getgrent_r: (libc)Scanning All Groups.
  1250. * getgrgid: (libc)Lookup Group.
  1251. * getgrgid_r: (libc)Lookup Group.
  1252. * getgrnam: (libc)Lookup Group.
  1253. * getgrnam_r: (libc)Lookup Group.
  1254. * getgrouplist: (libc)Setting Groups.
  1255. * getgroups: (libc)Reading Persona.
  1256. * gethostbyaddr: (libc)Host Names.
  1257. * gethostbyaddr_r: (libc)Host Names.
  1258. * gethostbyname2: (libc)Host Names.
  1259. * gethostbyname2_r: (libc)Host Names.
  1260. * gethostbyname: (libc)Host Names.
  1261. * gethostbyname_r: (libc)Host Names.
  1262. * gethostent: (libc)Host Names.
  1263. * gethostid: (libc)Host Identification.
  1264. * gethostname: (libc)Host Identification.
  1265. * getitimer: (libc)Setting an Alarm.
  1266. * getline: (libc)Line Input.
  1267. * getloadavg: (libc)Processor Resources.
  1268. * getlogin: (libc)Who Logged In.
  1269. * getmntent: (libc)mtab.
  1270. * getmntent_r: (libc)mtab.
  1271. * getnetbyaddr: (libc)Networks Database.
  1272. * getnetbyname: (libc)Networks Database.
  1273. * getnetent: (libc)Networks Database.
  1274. * getnetgrent: (libc)Lookup Netgroup.
  1275. * getnetgrent_r: (libc)Lookup Netgroup.
  1276. * getopt: (libc)Using Getopt.
  1277. * getopt_long: (libc)Getopt Long Options.
  1278. * getopt_long_only: (libc)Getopt Long Options.
  1279. * getpagesize: (libc)Query Memory Parameters.
  1280. * getpass: (libc)getpass.
  1281. * getpayload: (libc)FP Bit Twiddling.
  1282. * getpayloadf: (libc)FP Bit Twiddling.
  1283. * getpayloadfN: (libc)FP Bit Twiddling.
  1284. * getpayloadfNx: (libc)FP Bit Twiddling.
  1285. * getpayloadl: (libc)FP Bit Twiddling.
  1286. * getpeername: (libc)Who is Connected.
  1287. * getpgid: (libc)Process Group Functions.
  1288. * getpgrp: (libc)Process Group Functions.
  1289. * getpid: (libc)Process Identification.
  1290. * getppid: (libc)Process Identification.
  1291. * getpriority: (libc)Traditional Scheduling Functions.
  1292. * getprotobyname: (libc)Protocols Database.
  1293. * getprotobynumber: (libc)Protocols Database.
  1294. * getprotoent: (libc)Protocols Database.
  1295. * getpt: (libc)Allocation.
  1296. * getpwent: (libc)Scanning All Users.
  1297. * getpwent_r: (libc)Scanning All Users.
  1298. * getpwnam: (libc)Lookup User.
  1299. * getpwnam_r: (libc)Lookup User.
  1300. * getpwuid: (libc)Lookup User.
  1301. * getpwuid_r: (libc)Lookup User.
  1302. * getrandom: (libc)Unpredictable Bytes.
  1303. * getrlimit64: (libc)Limits on Resources.
  1304. * getrlimit: (libc)Limits on Resources.
  1305. * getrusage: (libc)Resource Usage.
  1306. * gets: (libc)Line Input.
  1307. * getservbyname: (libc)Services Database.
  1308. * getservbyport: (libc)Services Database.
  1309. * getservent: (libc)Services Database.
  1310. * getsid: (libc)Process Group Functions.
  1311. * getsockname: (libc)Reading Address.
  1312. * getsockopt: (libc)Socket Option Functions.
  1313. * getsubopt: (libc)Suboptions.
  1314. * gettext: (libc)Translation with gettext.
  1315. * gettid: (libc)Process Identification.
  1316. * gettimeofday: (libc)Getting the Time.
  1317. * getuid: (libc)Reading Persona.
  1318. * getumask: (libc)Setting Permissions.
  1319. * getutent: (libc)Manipulating the Database.
  1320. * getutent_r: (libc)Manipulating the Database.
  1321. * getutid: (libc)Manipulating the Database.
  1322. * getutid_r: (libc)Manipulating the Database.
  1323. * getutline: (libc)Manipulating the Database.
  1324. * getutline_r: (libc)Manipulating the Database.
  1325. * getutmp: (libc)XPG Functions.
  1326. * getutmpx: (libc)XPG Functions.
  1327. * getutxent: (libc)XPG Functions.
  1328. * getutxid: (libc)XPG Functions.
  1329. * getutxline: (libc)XPG Functions.
  1330. * getw: (libc)Character Input.
  1331. * getwc: (libc)Character Input.
  1332. * getwc_unlocked: (libc)Character Input.
  1333. * getwchar: (libc)Character Input.
  1334. * getwchar_unlocked: (libc)Character Input.
  1335. * getwd: (libc)Working Directory.
  1336. * glob64: (libc)Calling Glob.
  1337. * glob: (libc)Calling Glob.
  1338. * globfree64: (libc)More Flags for Globbing.
  1339. * globfree: (libc)More Flags for Globbing.
  1340. * gmtime: (libc)Broken-down Time.
  1341. * gmtime_r: (libc)Broken-down Time.
  1342. * grantpt: (libc)Allocation.
  1343. * gsignal: (libc)Signaling Yourself.
  1344. * gtty: (libc)BSD Terminal Modes.
  1345. * hasmntopt: (libc)mtab.
  1346. * hcreate: (libc)Hash Search Function.
  1347. * hcreate_r: (libc)Hash Search Function.
  1348. * hdestroy: (libc)Hash Search Function.
  1349. * hdestroy_r: (libc)Hash Search Function.
  1350. * hsearch: (libc)Hash Search Function.
  1351. * hsearch_r: (libc)Hash Search Function.
  1352. * htonl: (libc)Byte Order.
  1353. * htons: (libc)Byte Order.
  1354. * hypot: (libc)Exponents and Logarithms.
  1355. * hypotf: (libc)Exponents and Logarithms.
  1356. * hypotfN: (libc)Exponents and Logarithms.
  1357. * hypotfNx: (libc)Exponents and Logarithms.
  1358. * hypotl: (libc)Exponents and Logarithms.
  1359. * iconv: (libc)Generic Conversion Interface.
  1360. * iconv_close: (libc)Generic Conversion Interface.
  1361. * iconv_open: (libc)Generic Conversion Interface.
  1362. * if_freenameindex: (libc)Interface Naming.
  1363. * if_indextoname: (libc)Interface Naming.
  1364. * if_nameindex: (libc)Interface Naming.
  1365. * if_nametoindex: (libc)Interface Naming.
  1366. * ilogb: (libc)Exponents and Logarithms.
  1367. * ilogbf: (libc)Exponents and Logarithms.
  1368. * ilogbfN: (libc)Exponents and Logarithms.
  1369. * ilogbfNx: (libc)Exponents and Logarithms.
  1370. * ilogbl: (libc)Exponents and Logarithms.
  1371. * imaxabs: (libc)Absolute Value.
  1372. * imaxdiv: (libc)Integer Division.
  1373. * in6addr_any: (libc)Host Address Data Type.
  1374. * in6addr_loopback: (libc)Host Address Data Type.
  1375. * index: (libc)Search Functions.
  1376. * inet_addr: (libc)Host Address Functions.
  1377. * inet_aton: (libc)Host Address Functions.
  1378. * inet_lnaof: (libc)Host Address Functions.
  1379. * inet_makeaddr: (libc)Host Address Functions.
  1380. * inet_netof: (libc)Host Address Functions.
  1381. * inet_network: (libc)Host Address Functions.
  1382. * inet_ntoa: (libc)Host Address Functions.
  1383. * inet_ntop: (libc)Host Address Functions.
  1384. * inet_pton: (libc)Host Address Functions.
  1385. * initgroups: (libc)Setting Groups.
  1386. * initstate: (libc)BSD Random.
  1387. * initstate_r: (libc)BSD Random.
  1388. * innetgr: (libc)Netgroup Membership.
  1389. * ioctl: (libc)IOCTLs.
  1390. * isalnum: (libc)Classification of Characters.
  1391. * isalpha: (libc)Classification of Characters.
  1392. * isascii: (libc)Classification of Characters.
  1393. * isatty: (libc)Is It a Terminal.
  1394. * isblank: (libc)Classification of Characters.
  1395. * iscanonical: (libc)Floating Point Classes.
  1396. * iscntrl: (libc)Classification of Characters.
  1397. * isdigit: (libc)Classification of Characters.
  1398. * iseqsig: (libc)FP Comparison Functions.
  1399. * isfinite: (libc)Floating Point Classes.
  1400. * isgraph: (libc)Classification of Characters.
  1401. * isgreater: (libc)FP Comparison Functions.
  1402. * isgreaterequal: (libc)FP Comparison Functions.
  1403. * isinf: (libc)Floating Point Classes.
  1404. * isinff: (libc)Floating Point Classes.
  1405. * isinfl: (libc)Floating Point Classes.
  1406. * isless: (libc)FP Comparison Functions.
  1407. * islessequal: (libc)FP Comparison Functions.
  1408. * islessgreater: (libc)FP Comparison Functions.
  1409. * islower: (libc)Classification of Characters.
  1410. * isnan: (libc)Floating Point Classes.
  1411. * isnan: (libc)Floating Point Classes.
  1412. * isnanf: (libc)Floating Point Classes.
  1413. * isnanl: (libc)Floating Point Classes.
  1414. * isnormal: (libc)Floating Point Classes.
  1415. * isprint: (libc)Classification of Characters.
  1416. * ispunct: (libc)Classification of Characters.
  1417. * issignaling: (libc)Floating Point Classes.
  1418. * isspace: (libc)Classification of Characters.
  1419. * issubnormal: (libc)Floating Point Classes.
  1420. * isunordered: (libc)FP Comparison Functions.
  1421. * isupper: (libc)Classification of Characters.
  1422. * iswalnum: (libc)Classification of Wide Characters.
  1423. * iswalpha: (libc)Classification of Wide Characters.
  1424. * iswblank: (libc)Classification of Wide Characters.
  1425. * iswcntrl: (libc)Classification of Wide Characters.
  1426. * iswctype: (libc)Classification of Wide Characters.
  1427. * iswdigit: (libc)Classification of Wide Characters.
  1428. * iswgraph: (libc)Classification of Wide Characters.
  1429. * iswlower: (libc)Classification of Wide Characters.
  1430. * iswprint: (libc)Classification of Wide Characters.
  1431. * iswpunct: (libc)Classification of Wide Characters.
  1432. * iswspace: (libc)Classification of Wide Characters.
  1433. * iswupper: (libc)Classification of Wide Characters.
  1434. * iswxdigit: (libc)Classification of Wide Characters.
  1435. * isxdigit: (libc)Classification of Characters.
  1436. * iszero: (libc)Floating Point Classes.
  1437. * j0: (libc)Special Functions.
  1438. * j0f: (libc)Special Functions.
  1439. * j0fN: (libc)Special Functions.
  1440. * j0fNx: (libc)Special Functions.
  1441. * j0l: (libc)Special Functions.
  1442. * j1: (libc)Special Functions.
  1443. * j1f: (libc)Special Functions.
  1444. * j1fN: (libc)Special Functions.
  1445. * j1fNx: (libc)Special Functions.
  1446. * j1l: (libc)Special Functions.
  1447. * jn: (libc)Special Functions.
  1448. * jnf: (libc)Special Functions.
  1449. * jnfN: (libc)Special Functions.
  1450. * jnfNx: (libc)Special Functions.
  1451. * jnl: (libc)Special Functions.
  1452. * jrand48: (libc)SVID Random.
  1453. * jrand48_r: (libc)SVID Random.
  1454. * kill: (libc)Signaling Another Process.
  1455. * killpg: (libc)Signaling Another Process.
  1456. * l64a: (libc)Encode Binary Data.
  1457. * labs: (libc)Absolute Value.
  1458. * lcong48: (libc)SVID Random.
  1459. * lcong48_r: (libc)SVID Random.
  1460. * ldexp: (libc)Normalization Functions.
  1461. * ldexpf: (libc)Normalization Functions.
  1462. * ldexpfN: (libc)Normalization Functions.
  1463. * ldexpfNx: (libc)Normalization Functions.
  1464. * ldexpl: (libc)Normalization Functions.
  1465. * ldiv: (libc)Integer Division.
  1466. * lfind: (libc)Array Search Function.
  1467. * lgamma: (libc)Special Functions.
  1468. * lgamma_r: (libc)Special Functions.
  1469. * lgammaf: (libc)Special Functions.
  1470. * lgammafN: (libc)Special Functions.
  1471. * lgammafN_r: (libc)Special Functions.
  1472. * lgammafNx: (libc)Special Functions.
  1473. * lgammafNx_r: (libc)Special Functions.
  1474. * lgammaf_r: (libc)Special Functions.
  1475. * lgammal: (libc)Special Functions.
  1476. * lgammal_r: (libc)Special Functions.
  1477. * link: (libc)Hard Links.
  1478. * linkat: (libc)Hard Links.
  1479. * lio_listio64: (libc)Asynchronous Reads/Writes.
  1480. * lio_listio: (libc)Asynchronous Reads/Writes.
  1481. * listen: (libc)Listening.
  1482. * llabs: (libc)Absolute Value.
  1483. * lldiv: (libc)Integer Division.
  1484. * llogb: (libc)Exponents and Logarithms.
  1485. * llogbf: (libc)Exponents and Logarithms.
  1486. * llogbfN: (libc)Exponents and Logarithms.
  1487. * llogbfNx: (libc)Exponents and Logarithms.
  1488. * llogbl: (libc)Exponents and Logarithms.
  1489. * llrint: (libc)Rounding Functions.
  1490. * llrintf: (libc)Rounding Functions.
  1491. * llrintfN: (libc)Rounding Functions.
  1492. * llrintfNx: (libc)Rounding Functions.
  1493. * llrintl: (libc)Rounding Functions.
  1494. * llround: (libc)Rounding Functions.
  1495. * llroundf: (libc)Rounding Functions.
  1496. * llroundfN: (libc)Rounding Functions.
  1497. * llroundfNx: (libc)Rounding Functions.
  1498. * llroundl: (libc)Rounding Functions.
  1499. * localeconv: (libc)The Lame Way to Locale Data.
  1500. * localtime: (libc)Broken-down Time.
  1501. * localtime_r: (libc)Broken-down Time.
  1502. * log10: (libc)Exponents and Logarithms.
  1503. * log10f: (libc)Exponents and Logarithms.
  1504. * log10fN: (libc)Exponents and Logarithms.
  1505. * log10fNx: (libc)Exponents and Logarithms.
  1506. * log10l: (libc)Exponents and Logarithms.
  1507. * log10p1: (libc)Exponents and Logarithms.
  1508. * log10p1f: (libc)Exponents and Logarithms.
  1509. * log10p1fN: (libc)Exponents and Logarithms.
  1510. * log10p1fNx: (libc)Exponents and Logarithms.
  1511. * log10p1l: (libc)Exponents and Logarithms.
  1512. * log1p: (libc)Exponents and Logarithms.
  1513. * log1pf: (libc)Exponents and Logarithms.
  1514. * log1pfN: (libc)Exponents and Logarithms.
  1515. * log1pfNx: (libc)Exponents and Logarithms.
  1516. * log1pl: (libc)Exponents and Logarithms.
  1517. * log2: (libc)Exponents and Logarithms.
  1518. * log2f: (libc)Exponents and Logarithms.
  1519. * log2fN: (libc)Exponents and Logarithms.
  1520. * log2fNx: (libc)Exponents and Logarithms.
  1521. * log2l: (libc)Exponents and Logarithms.
  1522. * log2p1: (libc)Exponents and Logarithms.
  1523. * log2p1f: (libc)Exponents and Logarithms.
  1524. * log2p1fN: (libc)Exponents and Logarithms.
  1525. * log2p1fNx: (libc)Exponents and Logarithms.
  1526. * log2p1l: (libc)Exponents and Logarithms.
  1527. * log: (libc)Exponents and Logarithms.
  1528. * logb: (libc)Exponents and Logarithms.
  1529. * logbf: (libc)Exponents and Logarithms.
  1530. * logbfN: (libc)Exponents and Logarithms.
  1531. * logbfNx: (libc)Exponents and Logarithms.
  1532. * logbl: (libc)Exponents and Logarithms.
  1533. * logf: (libc)Exponents and Logarithms.
  1534. * logfN: (libc)Exponents and Logarithms.
  1535. * logfNx: (libc)Exponents and Logarithms.
  1536. * login: (libc)Logging In and Out.
  1537. * login_tty: (libc)Logging In and Out.
  1538. * logl: (libc)Exponents and Logarithms.
  1539. * logout: (libc)Logging In and Out.
  1540. * logp1: (libc)Exponents and Logarithms.
  1541. * logp1f: (libc)Exponents and Logarithms.
  1542. * logp1fN: (libc)Exponents and Logarithms.
  1543. * logp1fNx: (libc)Exponents and Logarithms.
  1544. * logp1l: (libc)Exponents and Logarithms.
  1545. * logwtmp: (libc)Logging In and Out.
  1546. * longjmp: (libc)Non-Local Details.
  1547. * lrand48: (libc)SVID Random.
  1548. * lrand48_r: (libc)SVID Random.
  1549. * lrint: (libc)Rounding Functions.
  1550. * lrintf: (libc)Rounding Functions.
  1551. * lrintfN: (libc)Rounding Functions.
  1552. * lrintfNx: (libc)Rounding Functions.
  1553. * lrintl: (libc)Rounding Functions.
  1554. * lround: (libc)Rounding Functions.
  1555. * lroundf: (libc)Rounding Functions.
  1556. * lroundfN: (libc)Rounding Functions.
  1557. * lroundfNx: (libc)Rounding Functions.
  1558. * lroundl: (libc)Rounding Functions.
  1559. * lsearch: (libc)Array Search Function.
  1560. * lseek64: (libc)File Position Primitive.
  1561. * lseek: (libc)File Position Primitive.
  1562. * lstat64: (libc)Reading Attributes.
  1563. * lstat: (libc)Reading Attributes.
  1564. * lutimes: (libc)File Times.
  1565. * madvise: (libc)Memory-mapped I/O.
  1566. * makecontext: (libc)System V contexts.
  1567. * mallinfo2: (libc)Statistics of Malloc.
  1568. * malloc: (libc)Basic Allocation.
  1569. * mallopt: (libc)Malloc Tunable Parameters.
  1570. * mblen: (libc)Non-reentrant Character Conversion.
  1571. * mbrlen: (libc)Converting a Character.
  1572. * mbrtowc: (libc)Converting a Character.
  1573. * mbsinit: (libc)Keeping the state.
  1574. * mbsnrtowcs: (libc)Converting Strings.
  1575. * mbsrtowcs: (libc)Converting Strings.
  1576. * mbstowcs: (libc)Non-reentrant String Conversion.
  1577. * mbtowc: (libc)Non-reentrant Character Conversion.
  1578. * mcheck: (libc)Heap Consistency Checking.
  1579. * memalign: (libc)Aligned Memory Blocks.
  1580. * memalignment: (libc)Aligned Memory Blocks.
  1581. * memccpy: (libc)Copying Strings and Arrays.
  1582. * memchr: (libc)Search Functions.
  1583. * memcmp: (libc)String/Array Comparison.
  1584. * memcpy: (libc)Copying Strings and Arrays.
  1585. * memfd_create: (libc)Memory-mapped I/O.
  1586. * memfrob: (libc)Obfuscating Data.
  1587. * memmem: (libc)Search Functions.
  1588. * memmove: (libc)Copying Strings and Arrays.
  1589. * mempcpy: (libc)Copying Strings and Arrays.
  1590. * memrchr: (libc)Search Functions.
  1591. * memset: (libc)Copying Strings and Arrays.
  1592. * memset_explicit: (libc)Erasing Sensitive Data.
  1593. * mkdir: (libc)Creating Directories.
  1594. * mkdirat: (libc)Creating Directories.
  1595. * mkdtemp: (libc)Temporary Files.
  1596. * mkfifo: (libc)FIFO Special Files.
  1597. * mknod: (libc)Making Special Files.
  1598. * mkstemp: (libc)Temporary Files.
  1599. * mktemp: (libc)Temporary Files.
  1600. * mktime: (libc)Broken-down Time.
  1601. * mlock2: (libc)Page Lock Functions.
  1602. * mlock: (libc)Page Lock Functions.
  1603. * mlockall: (libc)Page Lock Functions.
  1604. * mmap64: (libc)Memory-mapped I/O.
  1605. * mmap: (libc)Memory-mapped I/O.
  1606. * modf: (libc)Rounding Functions.
  1607. * modff: (libc)Rounding Functions.
  1608. * modffN: (libc)Rounding Functions.
  1609. * modffNx: (libc)Rounding Functions.
  1610. * modfl: (libc)Rounding Functions.
  1611. * mount: (libc)Mount-Unmount-Remount.
  1612. * mprobe: (libc)Heap Consistency Checking.
  1613. * mprotect: (libc)Memory Protection.
  1614. * mrand48: (libc)SVID Random.
  1615. * mrand48_r: (libc)SVID Random.
  1616. * mremap: (libc)Memory-mapped I/O.
  1617. * mseal: (libc)Memory Protection.
  1618. * msync: (libc)Memory-mapped I/O.
  1619. * mtrace: (libc)Tracing malloc.
  1620. * mtx_destroy: (libc)ISO C Mutexes.
  1621. * mtx_init: (libc)ISO C Mutexes.
  1622. * mtx_lock: (libc)ISO C Mutexes.
  1623. * mtx_timedlock: (libc)ISO C Mutexes.
  1624. * mtx_trylock: (libc)ISO C Mutexes.
  1625. * mtx_unlock: (libc)ISO C Mutexes.
  1626. * munlock: (libc)Page Lock Functions.
  1627. * munlockall: (libc)Page Lock Functions.
  1628. * munmap: (libc)Memory-mapped I/O.
  1629. * muntrace: (libc)Tracing malloc.
  1630. * nan: (libc)FP Bit Twiddling.
  1631. * nanf: (libc)FP Bit Twiddling.
  1632. * nanfN: (libc)FP Bit Twiddling.
  1633. * nanfNx: (libc)FP Bit Twiddling.
  1634. * nanl: (libc)FP Bit Twiddling.
  1635. * nanosleep: (libc)Sleeping.
  1636. * nearbyint: (libc)Rounding Functions.
  1637. * nearbyintf: (libc)Rounding Functions.
  1638. * nearbyintfN: (libc)Rounding Functions.
  1639. * nearbyintfNx: (libc)Rounding Functions.
  1640. * nearbyintl: (libc)Rounding Functions.
  1641. * nextafter: (libc)FP Bit Twiddling.
  1642. * nextafterf: (libc)FP Bit Twiddling.
  1643. * nextafterfN: (libc)FP Bit Twiddling.
  1644. * nextafterfNx: (libc)FP Bit Twiddling.
  1645. * nextafterl: (libc)FP Bit Twiddling.
  1646. * nextdown: (libc)FP Bit Twiddling.
  1647. * nextdownf: (libc)FP Bit Twiddling.
  1648. * nextdownfN: (libc)FP Bit Twiddling.
  1649. * nextdownfNx: (libc)FP Bit Twiddling.
  1650. * nextdownl: (libc)FP Bit Twiddling.
  1651. * nexttoward: (libc)FP Bit Twiddling.
  1652. * nexttowardf: (libc)FP Bit Twiddling.
  1653. * nexttowardl: (libc)FP Bit Twiddling.
  1654. * nextup: (libc)FP Bit Twiddling.
  1655. * nextupf: (libc)FP Bit Twiddling.
  1656. * nextupfN: (libc)FP Bit Twiddling.
  1657. * nextupfNx: (libc)FP Bit Twiddling.
  1658. * nextupl: (libc)FP Bit Twiddling.
  1659. * nftw64: (libc)Working with Directory Trees.
  1660. * nftw: (libc)Working with Directory Trees.
  1661. * ngettext: (libc)Advanced gettext functions.
  1662. * nice: (libc)Traditional Scheduling Functions.
  1663. * nl_langinfo: (libc)The Elegant and Fast Way.
  1664. * nrand48: (libc)SVID Random.
  1665. * nrand48_r: (libc)SVID Random.
  1666. * ntohl: (libc)Byte Order.
  1667. * ntohs: (libc)Byte Order.
  1668. * ntp_adjtime: (libc)Setting and Adjusting the Time.
  1669. * ntp_gettime: (libc)Setting and Adjusting the Time.
  1670. * obstack_1grow: (libc)Growing Objects.
  1671. * obstack_1grow_fast: (libc)Extra Fast Growing.
  1672. * obstack_alignment_mask: (libc)Obstacks Data Alignment.
  1673. * obstack_alloc: (libc)Allocation in an Obstack.
  1674. * obstack_base: (libc)Status of an Obstack.
  1675. * obstack_blank: (libc)Growing Objects.
  1676. * obstack_blank_fast: (libc)Extra Fast Growing.
  1677. * obstack_chunk_size: (libc)Obstack Chunks.
  1678. * obstack_copy0: (libc)Allocation in an Obstack.
  1679. * obstack_copy: (libc)Allocation in an Obstack.
  1680. * obstack_finish: (libc)Growing Objects.
  1681. * obstack_free: (libc)Freeing Obstack Objects.
  1682. * obstack_grow0: (libc)Growing Objects.
  1683. * obstack_grow: (libc)Growing Objects.
  1684. * obstack_init: (libc)Preparing for Obstacks.
  1685. * obstack_int_grow: (libc)Growing Objects.
  1686. * obstack_int_grow_fast: (libc)Extra Fast Growing.
  1687. * obstack_next_free: (libc)Status of an Obstack.
  1688. * obstack_object_size: (libc)Growing Objects.
  1689. * obstack_object_size: (libc)Status of an Obstack.
  1690. * obstack_printf: (libc)Dynamic Output.
  1691. * obstack_ptr_grow: (libc)Growing Objects.
  1692. * obstack_ptr_grow_fast: (libc)Extra Fast Growing.
  1693. * obstack_room: (libc)Extra Fast Growing.
  1694. * obstack_vprintf: (libc)Variable Arguments Output.
  1695. * offsetof: (libc)Structure Measurement.
  1696. * on_exit: (libc)Cleanups on Exit.
  1697. * open64: (libc)Opening and Closing Files.
  1698. * open: (libc)Opening and Closing Files.
  1699. * open_memstream: (libc)String Streams.
  1700. * openat2: (libc)Opening and Closing Files.
  1701. * openat64: (libc)Opening and Closing Files.
  1702. * openat: (libc)Opening and Closing Files.
  1703. * opendir: (libc)Opening a Directory.
  1704. * openlog: (libc)openlog.
  1705. * openpty: (libc)Pseudo-Terminal Pairs.
  1706. * parse_printf_format: (libc)Parsing a Template String.
  1707. * pathconf: (libc)Pathconf.
  1708. * pause: (libc)Using Pause.
  1709. * pclose: (libc)Pipe to a Subprocess.
  1710. * perror: (libc)Error Messages.
  1711. * pidfd_getpid: (libc)Querying a Process.
  1712. * pipe: (libc)Creating a Pipe.
  1713. * pkey_alloc: (libc)Memory Protection.
  1714. * pkey_free: (libc)Memory Protection.
  1715. * pkey_get: (libc)Memory Protection.
  1716. * pkey_mprotect: (libc)Memory Protection.
  1717. * pkey_set: (libc)Memory Protection.
  1718. * poll: (libc)Other Low-Level I/O APIs.
  1719. * popen: (libc)Pipe to a Subprocess.
  1720. * posix_fallocate64: (libc)Storage Allocation.
  1721. * posix_fallocate: (libc)Storage Allocation.
  1722. * posix_memalign: (libc)Aligned Memory Blocks.
  1723. * posix_openpt: (libc)Allocation.
  1724. * pow: (libc)Exponents and Logarithms.
  1725. * powf: (libc)Exponents and Logarithms.
  1726. * powfN: (libc)Exponents and Logarithms.
  1727. * powfNx: (libc)Exponents and Logarithms.
  1728. * powl: (libc)Exponents and Logarithms.
  1729. * pown: (libc)Exponents and Logarithms.
  1730. * pownf: (libc)Exponents and Logarithms.
  1731. * pownfN: (libc)Exponents and Logarithms.
  1732. * pownfNx: (libc)Exponents and Logarithms.
  1733. * pownl: (libc)Exponents and Logarithms.
  1734. * powr: (libc)Exponents and Logarithms.
  1735. * powrf: (libc)Exponents and Logarithms.
  1736. * powrfN: (libc)Exponents and Logarithms.
  1737. * powrfNx: (libc)Exponents and Logarithms.
  1738. * powrl: (libc)Exponents and Logarithms.
  1739. * pread64: (libc)I/O Primitives.
  1740. * pread: (libc)I/O Primitives.
  1741. * preadv2: (libc)Scatter-Gather.
  1742. * preadv64: (libc)Scatter-Gather.
  1743. * preadv64v2: (libc)Scatter-Gather.
  1744. * preadv: (libc)Scatter-Gather.
  1745. * printf: (libc)Formatted Output Functions.
  1746. * printf_size: (libc)Predefined Printf Handlers.
  1747. * printf_size_info: (libc)Predefined Printf Handlers.
  1748. * psignal: (libc)Signal Messages.
  1749. * pthread_attr_destroy: (libc)Creating and Destroying Threads.
  1750. * pthread_attr_getaffinity_np: (libc)Thread CPU Affinity.
  1751. * pthread_attr_getdetachstate: (libc)Creating and Destroying Threads.
  1752. * pthread_attr_getsigmask_np: (libc)Initial Thread Signal Mask.
  1753. * pthread_attr_init: (libc)Creating and Destroying Threads.
  1754. * pthread_attr_setaffinity_np: (libc)Thread CPU Affinity.
  1755. * pthread_attr_setdetachstate: (libc)Creating and Destroying Threads.
  1756. * pthread_attr_setsigmask_np: (libc)Initial Thread Signal Mask.
  1757. * pthread_barrier_destroy: (libc)POSIX Barriers.
  1758. * pthread_barrier_init: (libc)POSIX Barriers.
  1759. * pthread_barrier_wait: (libc)POSIX Barriers.
  1760. * pthread_clockjoin_np: (libc)Joining Threads.
  1761. * pthread_cond_clockwait: (libc)Waiting with Explicit Clocks.
  1762. * pthread_create: (libc)Creating and Destroying Threads.
  1763. * pthread_detach: (libc)Creating and Destroying Threads.
  1764. * pthread_equal: (libc)POSIX Threads Other APIs.
  1765. * pthread_getaffinity_np: (libc)Thread CPU Affinity.
  1766. * pthread_getattr_default_np: (libc)Default Thread Attributes.
  1767. * pthread_getcpuclockid: (libc)POSIX Threads Other APIs.
  1768. * pthread_getname_np: (libc)Thread Names.
  1769. * pthread_getspecific: (libc)Thread-specific Data.
  1770. * pthread_gettid_np: (libc)Process Identification.
  1771. * pthread_join: (libc)Creating and Destroying Threads.
  1772. * pthread_key_create: (libc)Thread-specific Data.
  1773. * pthread_key_delete: (libc)Thread-specific Data.
  1774. * pthread_kill: (libc)Creating and Destroying Threads.
  1775. * pthread_mutex_clocklock: (libc)POSIX Mutexes.
  1776. * pthread_mutex_destroy: (libc)POSIX Mutexes.
  1777. * pthread_mutex_init: (libc)POSIX Mutexes.
  1778. * pthread_mutex_lock: (libc)POSIX Mutexes.
  1779. * pthread_mutex_timedlock: (libc)POSIX Mutexes.
  1780. * pthread_mutex_trylock: (libc)POSIX Mutexes.
  1781. * pthread_mutex_unlock: (libc)POSIX Mutexes.
  1782. * pthread_mutexattr_destroy: (libc)POSIX Mutexes.
  1783. * pthread_mutexattr_gettype: (libc)POSIX Mutexes.
  1784. * pthread_mutexattr_init: (libc)POSIX Mutexes.
  1785. * pthread_mutexattr_settype: (libc)POSIX Mutexes.
  1786. * pthread_once: (libc)POSIX Threads Other APIs.
  1787. * pthread_rwlock_clockrdlock: (libc)Waiting with Explicit Clocks.
  1788. * pthread_rwlock_clockwrlock: (libc)Waiting with Explicit Clocks.
  1789. * pthread_self: (libc)Creating and Destroying Threads.
  1790. * pthread_setaffinity_np: (libc)Thread CPU Affinity.
  1791. * pthread_setattr_default_np: (libc)Default Thread Attributes.
  1792. * pthread_setname_np: (libc)Thread Names.
  1793. * pthread_setspecific: (libc)Thread-specific Data.
  1794. * pthread_sigmask: (libc)POSIX Threads Other APIs.
  1795. * pthread_spin_destroy: (libc)POSIX Spin Locks.
  1796. * pthread_spin_init: (libc)POSIX Spin Locks.
  1797. * pthread_spin_lock: (libc)POSIX Spin Locks.
  1798. * pthread_spin_trylock: (libc)POSIX Spin Locks.
  1799. * pthread_spin_unlock: (libc)POSIX Spin Locks.
  1800. * pthread_timedjoin_np: (libc)Joining Threads.
  1801. * pthread_tryjoin_np: (libc)Joining Threads.
  1802. * ptsname: (libc)Allocation.
  1803. * ptsname_r: (libc)Allocation.
  1804. * putc: (libc)Simple Output.
  1805. * putc_unlocked: (libc)Simple Output.
  1806. * putchar: (libc)Simple Output.
  1807. * putchar_unlocked: (libc)Simple Output.
  1808. * putenv: (libc)Environment Access.
  1809. * putpwent: (libc)Writing a User Entry.
  1810. * puts: (libc)Simple Output.
  1811. * pututline: (libc)Manipulating the Database.
  1812. * pututxline: (libc)XPG Functions.
  1813. * putw: (libc)Simple Output.
  1814. * putwc: (libc)Simple Output.
  1815. * putwc_unlocked: (libc)Simple Output.
  1816. * putwchar: (libc)Simple Output.
  1817. * putwchar_unlocked: (libc)Simple Output.
  1818. * pwrite64: (libc)I/O Primitives.
  1819. * pwrite: (libc)I/O Primitives.
  1820. * pwritev2: (libc)Scatter-Gather.
  1821. * pwritev64: (libc)Scatter-Gather.
  1822. * pwritev64v2: (libc)Scatter-Gather.
  1823. * pwritev: (libc)Scatter-Gather.
  1824. * qecvt: (libc)System V Number Conversion.
  1825. * qecvt_r: (libc)System V Number Conversion.
  1826. * qfcvt: (libc)System V Number Conversion.
  1827. * qfcvt_r: (libc)System V Number Conversion.
  1828. * qgcvt: (libc)System V Number Conversion.
  1829. * qsort: (libc)Array Sort Function.
  1830. * raise: (libc)Signaling Yourself.
  1831. * rand: (libc)ISO Random.
  1832. * rand_r: (libc)ISO Random.
  1833. * random: (libc)BSD Random.
  1834. * random_r: (libc)BSD Random.
  1835. * rawmemchr: (libc)Search Functions.
  1836. * read: (libc)I/O Primitives.
  1837. * readdir64: (libc)Reading/Closing Directory.
  1838. * readdir64_r: (libc)Reading/Closing Directory.
  1839. * readdir: (libc)Reading/Closing Directory.
  1840. * readdir_r: (libc)Reading/Closing Directory.
  1841. * readlink: (libc)Symbolic Links.
  1842. * readv: (libc)Scatter-Gather.
  1843. * realloc: (libc)Changing Block Size.
  1844. * reallocarray: (libc)Changing Block Size.
  1845. * realpath: (libc)Symbolic Links.
  1846. * recv: (libc)Receiving Data.
  1847. * recvfrom: (libc)Receiving Datagrams.
  1848. * recvmsg: (libc)Other Socket APIs.
  1849. * regcomp: (libc)POSIX Regexp Compilation.
  1850. * regerror: (libc)Regexp Cleanup.
  1851. * regexec: (libc)Matching POSIX Regexps.
  1852. * regfree: (libc)Regexp Cleanup.
  1853. * register_printf_function: (libc)Registering New Conversions.
  1854. * remainder: (libc)Remainder Functions.
  1855. * remainderf: (libc)Remainder Functions.
  1856. * remainderfN: (libc)Remainder Functions.
  1857. * remainderfNx: (libc)Remainder Functions.
  1858. * remainderl: (libc)Remainder Functions.
  1859. * remove: (libc)Deleting Files.
  1860. * rename: (libc)Renaming Files.
  1861. * renameat: (libc)Renaming Files.
  1862. * rewind: (libc)File Positioning.
  1863. * rewinddir: (libc)Random Access Directory.
  1864. * rindex: (libc)Search Functions.
  1865. * rint: (libc)Rounding Functions.
  1866. * rintf: (libc)Rounding Functions.
  1867. * rintfN: (libc)Rounding Functions.
  1868. * rintfNx: (libc)Rounding Functions.
  1869. * rintl: (libc)Rounding Functions.
  1870. * rmdir: (libc)Deleting Files.
  1871. * rootn: (libc)Exponents and Logarithms.
  1872. * rootnf: (libc)Exponents and Logarithms.
  1873. * rootnfN: (libc)Exponents and Logarithms.
  1874. * rootnfNx: (libc)Exponents and Logarithms.
  1875. * rootnl: (libc)Exponents and Logarithms.
  1876. * round: (libc)Rounding Functions.
  1877. * roundeven: (libc)Rounding Functions.
  1878. * roundevenf: (libc)Rounding Functions.
  1879. * roundevenfN: (libc)Rounding Functions.
  1880. * roundevenfNx: (libc)Rounding Functions.
  1881. * roundevenl: (libc)Rounding Functions.
  1882. * roundf: (libc)Rounding Functions.
  1883. * roundfN: (libc)Rounding Functions.
  1884. * roundfNx: (libc)Rounding Functions.
  1885. * roundl: (libc)Rounding Functions.
  1886. * rpmatch: (libc)Yes-or-No Questions.
  1887. * rsqrt: (libc)Exponents and Logarithms.
  1888. * rsqrtf: (libc)Exponents and Logarithms.
  1889. * rsqrtfN: (libc)Exponents and Logarithms.
  1890. * rsqrtfNx: (libc)Exponents and Logarithms.
  1891. * rsqrtl: (libc)Exponents and Logarithms.
  1892. * sbrk: (libc)Resizing the Data Segment.
  1893. * scalb: (libc)Normalization Functions.
  1894. * scalbf: (libc)Normalization Functions.
  1895. * scalbl: (libc)Normalization Functions.
  1896. * scalbln: (libc)Normalization Functions.
  1897. * scalblnf: (libc)Normalization Functions.
  1898. * scalblnfN: (libc)Normalization Functions.
  1899. * scalblnfNx: (libc)Normalization Functions.
  1900. * scalblnl: (libc)Normalization Functions.
  1901. * scalbn: (libc)Normalization Functions.
  1902. * scalbnf: (libc)Normalization Functions.
  1903. * scalbnfN: (libc)Normalization Functions.
  1904. * scalbnfNx: (libc)Normalization Functions.
  1905. * scalbnl: (libc)Normalization Functions.
  1906. * scandir64: (libc)Scanning Directory Content.
  1907. * scandir: (libc)Scanning Directory Content.
  1908. * scanf: (libc)Formatted Input Functions.
  1909. * sched_get_priority_max: (libc)Basic Scheduling Functions.
  1910. * sched_get_priority_min: (libc)Basic Scheduling Functions.
  1911. * sched_getaffinity: (libc)CPU Affinity.
  1912. * sched_getattr: (libc)Extensible Scheduling.
  1913. * sched_getcpu: (libc)CPU Affinity.
  1914. * sched_getparam: (libc)Basic Scheduling Functions.
  1915. * sched_getscheduler: (libc)Basic Scheduling Functions.
  1916. * sched_rr_get_interval: (libc)Basic Scheduling Functions.
  1917. * sched_setaffinity: (libc)CPU Affinity.
  1918. * sched_setattr: (libc)Extensible Scheduling.
  1919. * sched_setparam: (libc)Basic Scheduling Functions.
  1920. * sched_setscheduler: (libc)Basic Scheduling Functions.
  1921. * sched_yield: (libc)Basic Scheduling Functions.
  1922. * secure_getenv: (libc)Environment Access.
  1923. * seed48: (libc)SVID Random.
  1924. * seed48_r: (libc)SVID Random.
  1925. * seekdir: (libc)Random Access Directory.
  1926. * select: (libc)Waiting for I/O.
  1927. * sem_clockwait: (libc)POSIX Semaphores.
  1928. * sem_close: (libc)POSIX Semaphores.
  1929. * sem_destroy: (libc)POSIX Semaphores.
  1930. * sem_getvalue: (libc)POSIX Semaphores.
  1931. * sem_init: (libc)POSIX Semaphores.
  1932. * sem_open: (libc)POSIX Semaphores.
  1933. * sem_post: (libc)POSIX Semaphores.
  1934. * sem_timedwait: (libc)POSIX Semaphores.
  1935. * sem_trywait: (libc)POSIX Semaphores.
  1936. * sem_unlink: (libc)POSIX Semaphores.
  1937. * sem_wait: (libc)POSIX Semaphores.
  1938. * semctl: (libc)Semaphores.
  1939. * semget: (libc)Semaphores.
  1940. * semop: (libc)Semaphores.
  1941. * semtimedop: (libc)Semaphores.
  1942. * send: (libc)Sending Data.
  1943. * sendmsg: (libc)Other Socket APIs.
  1944. * sendto: (libc)Sending Datagrams.
  1945. * setbuf: (libc)Controlling Buffering.
  1946. * setbuffer: (libc)Controlling Buffering.
  1947. * setcontext: (libc)System V contexts.
  1948. * setdomainname: (libc)Host Identification.
  1949. * setegid: (libc)Setting Groups.
  1950. * setenv: (libc)Environment Access.
  1951. * seteuid: (libc)Setting User ID.
  1952. * setfsent: (libc)fstab.
  1953. * setgid: (libc)Setting Groups.
  1954. * setgrent: (libc)Scanning All Groups.
  1955. * setgroups: (libc)Setting Groups.
  1956. * sethostent: (libc)Host Names.
  1957. * sethostid: (libc)Host Identification.
  1958. * sethostname: (libc)Host Identification.
  1959. * setitimer: (libc)Setting an Alarm.
  1960. * setjmp: (libc)Non-Local Details.
  1961. * setlinebuf: (libc)Controlling Buffering.
  1962. * setlocale: (libc)Setting the Locale.
  1963. * setlogmask: (libc)setlogmask.
  1964. * setmntent: (libc)mtab.
  1965. * setnetent: (libc)Networks Database.
  1966. * setnetgrent: (libc)Lookup Netgroup.
  1967. * setpayload: (libc)FP Bit Twiddling.
  1968. * setpayloadf: (libc)FP Bit Twiddling.
  1969. * setpayloadfN: (libc)FP Bit Twiddling.
  1970. * setpayloadfNx: (libc)FP Bit Twiddling.
  1971. * setpayloadl: (libc)FP Bit Twiddling.
  1972. * setpayloadsig: (libc)FP Bit Twiddling.
  1973. * setpayloadsigf: (libc)FP Bit Twiddling.
  1974. * setpayloadsigfN: (libc)FP Bit Twiddling.
  1975. * setpayloadsigfNx: (libc)FP Bit Twiddling.
  1976. * setpayloadsigl: (libc)FP Bit Twiddling.
  1977. * setpgid: (libc)Process Group Functions.
  1978. * setpgrp: (libc)Process Group Functions.
  1979. * setpriority: (libc)Traditional Scheduling Functions.
  1980. * setprotoent: (libc)Protocols Database.
  1981. * setpwent: (libc)Scanning All Users.
  1982. * setregid: (libc)Setting Groups.
  1983. * setreuid: (libc)Setting User ID.
  1984. * setrlimit64: (libc)Limits on Resources.
  1985. * setrlimit: (libc)Limits on Resources.
  1986. * setservent: (libc)Services Database.
  1987. * setsid: (libc)Process Group Functions.
  1988. * setsockopt: (libc)Socket Option Functions.
  1989. * setstate: (libc)BSD Random.
  1990. * setstate_r: (libc)BSD Random.
  1991. * settimeofday: (libc)Setting and Adjusting the Time.
  1992. * setuid: (libc)Setting User ID.
  1993. * setutent: (libc)Manipulating the Database.
  1994. * setutxent: (libc)XPG Functions.
  1995. * setvbuf: (libc)Controlling Buffering.
  1996. * shm_open: (libc)Memory-mapped I/O.
  1997. * shm_unlink: (libc)Memory-mapped I/O.
  1998. * shutdown: (libc)Closing a Socket.
  1999. * sigabbrev_np: (libc)Signal Messages.
  2000. * sigaction: (libc)Advanced Signal Handling.
  2001. * sigaddset: (libc)Signal Sets.
  2002. * sigaltstack: (libc)Signal Stack.
  2003. * sigblock: (libc)BSD Signal Handling.
  2004. * sigdelset: (libc)Signal Sets.
  2005. * sigdescr_np: (libc)Signal Messages.
  2006. * sigemptyset: (libc)Signal Sets.
  2007. * sigfillset: (libc)Signal Sets.
  2008. * siginterrupt: (libc)BSD Signal Handling.
  2009. * sigismember: (libc)Signal Sets.
  2010. * siglongjmp: (libc)Non-Local Exits and Signals.
  2011. * sigmask: (libc)BSD Signal Handling.
  2012. * signal: (libc)Basic Signal Handling.
  2013. * signbit: (libc)FP Bit Twiddling.
  2014. * significand: (libc)Normalization Functions.
  2015. * significandf: (libc)Normalization Functions.
  2016. * significandl: (libc)Normalization Functions.
  2017. * sigpause: (libc)BSD Signal Handling.
  2018. * sigpending: (libc)Checking for Pending Signals.
  2019. * sigprocmask: (libc)Process Signal Mask.
  2020. * sigsetjmp: (libc)Non-Local Exits and Signals.
  2021. * sigsetmask: (libc)BSD Signal Handling.
  2022. * sigstack: (libc)Signal Stack.
  2023. * sigsuspend: (libc)Sigsuspend.
  2024. * sin: (libc)Trig Functions.
  2025. * sincos: (libc)Trig Functions.
  2026. * sincosf: (libc)Trig Functions.
  2027. * sincosfN: (libc)Trig Functions.
  2028. * sincosfNx: (libc)Trig Functions.
  2029. * sincosl: (libc)Trig Functions.
  2030. * sinf: (libc)Trig Functions.
  2031. * sinfN: (libc)Trig Functions.
  2032. * sinfNx: (libc)Trig Functions.
  2033. * sinh: (libc)Hyperbolic Functions.
  2034. * sinhf: (libc)Hyperbolic Functions.
  2035. * sinhfN: (libc)Hyperbolic Functions.
  2036. * sinhfNx: (libc)Hyperbolic Functions.
  2037. * sinhl: (libc)Hyperbolic Functions.
  2038. * sinl: (libc)Trig Functions.
  2039. * sinpi: (libc)Trig Functions.
  2040. * sinpif: (libc)Trig Functions.
  2041. * sinpifN: (libc)Trig Functions.
  2042. * sinpifNx: (libc)Trig Functions.
  2043. * sinpil: (libc)Trig Functions.
  2044. * sleep: (libc)Sleeping.
  2045. * snprintf: (libc)Formatted Output Functions.
  2046. * socket: (libc)Creating a Socket.
  2047. * socketpair: (libc)Socket Pairs.
  2048. * sprintf: (libc)Formatted Output Functions.
  2049. * sqrt: (libc)Exponents and Logarithms.
  2050. * sqrtf: (libc)Exponents and Logarithms.
  2051. * sqrtfN: (libc)Exponents and Logarithms.
  2052. * sqrtfNx: (libc)Exponents and Logarithms.
  2053. * sqrtl: (libc)Exponents and Logarithms.
  2054. * srand48: (libc)SVID Random.
  2055. * srand48_r: (libc)SVID Random.
  2056. * srand: (libc)ISO Random.
  2057. * srandom: (libc)BSD Random.
  2058. * srandom_r: (libc)BSD Random.
  2059. * sscanf: (libc)Formatted Input Functions.
  2060. * ssignal: (libc)Basic Signal Handling.
  2061. * stat64: (libc)Reading Attributes.
  2062. * stat: (libc)Reading Attributes.
  2063. * stdc_bit_ceil_uc: (libc)Bit Manipulation.
  2064. * stdc_bit_ceil_ui: (libc)Bit Manipulation.
  2065. * stdc_bit_ceil_ul: (libc)Bit Manipulation.
  2066. * stdc_bit_ceil_ull: (libc)Bit Manipulation.
  2067. * stdc_bit_ceil_us: (libc)Bit Manipulation.
  2068. * stdc_bit_floor_uc: (libc)Bit Manipulation.
  2069. * stdc_bit_floor_ui: (libc)Bit Manipulation.
  2070. * stdc_bit_floor_ul: (libc)Bit Manipulation.
  2071. * stdc_bit_floor_ull: (libc)Bit Manipulation.
  2072. * stdc_bit_floor_us: (libc)Bit Manipulation.
  2073. * stdc_bit_width_uc: (libc)Bit Manipulation.
  2074. * stdc_bit_width_ui: (libc)Bit Manipulation.
  2075. * stdc_bit_width_ul: (libc)Bit Manipulation.
  2076. * stdc_bit_width_ull: (libc)Bit Manipulation.
  2077. * stdc_bit_width_us: (libc)Bit Manipulation.
  2078. * stdc_count_ones_uc: (libc)Bit Manipulation.
  2079. * stdc_count_ones_ui: (libc)Bit Manipulation.
  2080. * stdc_count_ones_ul: (libc)Bit Manipulation.
  2081. * stdc_count_ones_ull: (libc)Bit Manipulation.
  2082. * stdc_count_ones_us: (libc)Bit Manipulation.
  2083. * stdc_count_zeros_uc: (libc)Bit Manipulation.
  2084. * stdc_count_zeros_ui: (libc)Bit Manipulation.
  2085. * stdc_count_zeros_ul: (libc)Bit Manipulation.
  2086. * stdc_count_zeros_ull: (libc)Bit Manipulation.
  2087. * stdc_count_zeros_us: (libc)Bit Manipulation.
  2088. * stdc_first_leading_one_uc: (libc)Bit Manipulation.
  2089. * stdc_first_leading_one_ui: (libc)Bit Manipulation.
  2090. * stdc_first_leading_one_ul: (libc)Bit Manipulation.
  2091. * stdc_first_leading_one_ull: (libc)Bit Manipulation.
  2092. * stdc_first_leading_one_us: (libc)Bit Manipulation.
  2093. * stdc_first_leading_zero_uc: (libc)Bit Manipulation.
  2094. * stdc_first_leading_zero_ui: (libc)Bit Manipulation.
  2095. * stdc_first_leading_zero_ul: (libc)Bit Manipulation.
  2096. * stdc_first_leading_zero_ull: (libc)Bit Manipulation.
  2097. * stdc_first_leading_zero_us: (libc)Bit Manipulation.
  2098. * stdc_first_trailing_one_uc: (libc)Bit Manipulation.
  2099. * stdc_first_trailing_one_ui: (libc)Bit Manipulation.
  2100. * stdc_first_trailing_one_ul: (libc)Bit Manipulation.
  2101. * stdc_first_trailing_one_ull: (libc)Bit Manipulation.
  2102. * stdc_first_trailing_one_us: (libc)Bit Manipulation.
  2103. * stdc_first_trailing_zero_uc: (libc)Bit Manipulation.
  2104. * stdc_first_trailing_zero_ui: (libc)Bit Manipulation.
  2105. * stdc_first_trailing_zero_ul: (libc)Bit Manipulation.
  2106. * stdc_first_trailing_zero_ull: (libc)Bit Manipulation.
  2107. * stdc_first_trailing_zero_us: (libc)Bit Manipulation.
  2108. * stdc_has_single_bit_uc: (libc)Bit Manipulation.
  2109. * stdc_has_single_bit_ui: (libc)Bit Manipulation.
  2110. * stdc_has_single_bit_ul: (libc)Bit Manipulation.
  2111. * stdc_has_single_bit_ull: (libc)Bit Manipulation.
  2112. * stdc_has_single_bit_us: (libc)Bit Manipulation.
  2113. * stdc_leading_ones_uc: (libc)Bit Manipulation.
  2114. * stdc_leading_ones_ui: (libc)Bit Manipulation.
  2115. * stdc_leading_ones_ul: (libc)Bit Manipulation.
  2116. * stdc_leading_ones_ull: (libc)Bit Manipulation.
  2117. * stdc_leading_ones_us: (libc)Bit Manipulation.
  2118. * stdc_leading_zeros_uc: (libc)Bit Manipulation.
  2119. * stdc_leading_zeros_ui: (libc)Bit Manipulation.
  2120. * stdc_leading_zeros_ul: (libc)Bit Manipulation.
  2121. * stdc_leading_zeros_ull: (libc)Bit Manipulation.
  2122. * stdc_leading_zeros_us: (libc)Bit Manipulation.
  2123. * stdc_trailing_ones_uc: (libc)Bit Manipulation.
  2124. * stdc_trailing_ones_ui: (libc)Bit Manipulation.
  2125. * stdc_trailing_ones_ul: (libc)Bit Manipulation.
  2126. * stdc_trailing_ones_ull: (libc)Bit Manipulation.
  2127. * stdc_trailing_ones_us: (libc)Bit Manipulation.
  2128. * stdc_trailing_zeros_uc: (libc)Bit Manipulation.
  2129. * stdc_trailing_zeros_ui: (libc)Bit Manipulation.
  2130. * stdc_trailing_zeros_ul: (libc)Bit Manipulation.
  2131. * stdc_trailing_zeros_ull: (libc)Bit Manipulation.
  2132. * stdc_trailing_zeros_us: (libc)Bit Manipulation.
  2133. * stime: (libc)Setting and Adjusting the Time.
  2134. * stpcpy: (libc)Copying Strings and Arrays.
  2135. * stpncpy: (libc)Truncating Strings.
  2136. * strcasecmp: (libc)String/Array Comparison.
  2137. * strcasestr: (libc)Search Functions.
  2138. * strcat: (libc)Concatenating Strings.
  2139. * strchr: (libc)Search Functions.
  2140. * strchrnul: (libc)Search Functions.
  2141. * strcmp: (libc)String/Array Comparison.
  2142. * strcoll: (libc)Collation Functions.
  2143. * strcpy: (libc)Copying Strings and Arrays.
  2144. * strcspn: (libc)Search Functions.
  2145. * strdup: (libc)Copying Strings and Arrays.
  2146. * strdupa: (libc)Copying Strings and Arrays.
  2147. * strerror: (libc)Error Messages.
  2148. * strerror_l: (libc)Error Messages.
  2149. * strerror_r: (libc)Error Messages.
  2150. * strerror_r: (libc)Error Messages.
  2151. * strerrordesc_np: (libc)Error Messages.
  2152. * strerrorname_np: (libc)Error Messages.
  2153. * strfmon: (libc)Formatting Numbers.
  2154. * strfromd: (libc)Printing of Floats.
  2155. * strfromf: (libc)Printing of Floats.
  2156. * strfromfN: (libc)Printing of Floats.
  2157. * strfromfNx: (libc)Printing of Floats.
  2158. * strfroml: (libc)Printing of Floats.
  2159. * strfry: (libc)Shuffling Bytes.
  2160. * strftime: (libc)Formatting Calendar Time.
  2161. * strftime_l: (libc)Formatting Calendar Time.
  2162. * strlcat: (libc)Truncating Strings.
  2163. * strlcpy: (libc)Truncating Strings.
  2164. * strlen: (libc)String Length.
  2165. * strncasecmp: (libc)String/Array Comparison.
  2166. * strncat: (libc)Truncating Strings.
  2167. * strncmp: (libc)String/Array Comparison.
  2168. * strncpy: (libc)Truncating Strings.
  2169. * strndup: (libc)Truncating Strings.
  2170. * strndupa: (libc)Truncating Strings.
  2171. * strnlen: (libc)String Length.
  2172. * strpbrk: (libc)Search Functions.
  2173. * strptime: (libc)Low-Level Time String Parsing.
  2174. * strrchr: (libc)Search Functions.
  2175. * strsep: (libc)Finding Tokens in a String.
  2176. * strsignal: (libc)Signal Messages.
  2177. * strspn: (libc)Search Functions.
  2178. * strstr: (libc)Search Functions.
  2179. * strtod: (libc)Parsing of Floats.
  2180. * strtof: (libc)Parsing of Floats.
  2181. * strtofN: (libc)Parsing of Floats.
  2182. * strtofNx: (libc)Parsing of Floats.
  2183. * strtoimax: (libc)Parsing of Integers.
  2184. * strtok: (libc)Finding Tokens in a String.
  2185. * strtok_r: (libc)Finding Tokens in a String.
  2186. * strtol: (libc)Parsing of Integers.
  2187. * strtold: (libc)Parsing of Floats.
  2188. * strtoll: (libc)Parsing of Integers.
  2189. * strtoq: (libc)Parsing of Integers.
  2190. * strtoul: (libc)Parsing of Integers.
  2191. * strtoull: (libc)Parsing of Integers.
  2192. * strtoumax: (libc)Parsing of Integers.
  2193. * strtouq: (libc)Parsing of Integers.
  2194. * strverscmp: (libc)String/Array Comparison.
  2195. * strxfrm: (libc)Collation Functions.
  2196. * stty: (libc)BSD Terminal Modes.
  2197. * swapcontext: (libc)System V contexts.
  2198. * swprintf: (libc)Formatted Output Functions.
  2199. * swscanf: (libc)Formatted Input Functions.
  2200. * symlink: (libc)Symbolic Links.
  2201. * sync: (libc)Synchronizing I/O.
  2202. * syscall: (libc)System Calls.
  2203. * sysconf: (libc)Sysconf Definition.
  2204. * syslog: (libc)syslog; vsyslog.
  2205. * system: (libc)Running a Command.
  2206. * sysv_signal: (libc)Basic Signal Handling.
  2207. * tan: (libc)Trig Functions.
  2208. * tanf: (libc)Trig Functions.
  2209. * tanfN: (libc)Trig Functions.
  2210. * tanfNx: (libc)Trig Functions.
  2211. * tanh: (libc)Hyperbolic Functions.
  2212. * tanhf: (libc)Hyperbolic Functions.
  2213. * tanhfN: (libc)Hyperbolic Functions.
  2214. * tanhfNx: (libc)Hyperbolic Functions.
  2215. * tanhl: (libc)Hyperbolic Functions.
  2216. * tanl: (libc)Trig Functions.
  2217. * tanpi: (libc)Trig Functions.
  2218. * tanpif: (libc)Trig Functions.
  2219. * tanpifN: (libc)Trig Functions.
  2220. * tanpifNx: (libc)Trig Functions.
  2221. * tanpil: (libc)Trig Functions.
  2222. * tcdrain: (libc)Line Control.
  2223. * tcflow: (libc)Line Control.
  2224. * tcflush: (libc)Line Control.
  2225. * tcgetattr: (libc)Mode Functions.
  2226. * tcgetpgrp: (libc)Terminal Access Functions.
  2227. * tcgetsid: (libc)Terminal Access Functions.
  2228. * tcsendbreak: (libc)Line Control.
  2229. * tcsetattr: (libc)Mode Functions.
  2230. * tcsetpgrp: (libc)Terminal Access Functions.
  2231. * tdelete: (libc)Tree Search Function.
  2232. * tdestroy: (libc)Tree Search Function.
  2233. * telldir: (libc)Random Access Directory.
  2234. * tempnam: (libc)Temporary Files.
  2235. * textdomain: (libc)Locating gettext catalog.
  2236. * tfind: (libc)Tree Search Function.
  2237. * tgamma: (libc)Special Functions.
  2238. * tgammaf: (libc)Special Functions.
  2239. * tgammafN: (libc)Special Functions.
  2240. * tgammafNx: (libc)Special Functions.
  2241. * tgammal: (libc)Special Functions.
  2242. * tgkill: (libc)Signaling Another Process.
  2243. * thrd_create: (libc)ISO C Thread Management.
  2244. * thrd_current: (libc)ISO C Thread Management.
  2245. * thrd_detach: (libc)ISO C Thread Management.
  2246. * thrd_equal: (libc)ISO C Thread Management.
  2247. * thrd_exit: (libc)ISO C Thread Management.
  2248. * thrd_join: (libc)ISO C Thread Management.
  2249. * thrd_sleep: (libc)ISO C Thread Management.
  2250. * thrd_yield: (libc)ISO C Thread Management.
  2251. * time: (libc)Getting the Time.
  2252. * timegm: (libc)Broken-down Time.
  2253. * timelocal: (libc)Broken-down Time.
  2254. * times: (libc)Processor Time.
  2255. * timespec_get: (libc)Getting the Time.
  2256. * timespec_getres: (libc)Getting the Time.
  2257. * tmpfile64: (libc)Temporary Files.
  2258. * tmpfile: (libc)Temporary Files.
  2259. * tmpnam: (libc)Temporary Files.
  2260. * tmpnam_r: (libc)Temporary Files.
  2261. * toascii: (libc)Case Conversion.
  2262. * tolower: (libc)Case Conversion.
  2263. * totalorder: (libc)FP Comparison Functions.
  2264. * totalorderf: (libc)FP Comparison Functions.
  2265. * totalorderfN: (libc)FP Comparison Functions.
  2266. * totalorderfNx: (libc)FP Comparison Functions.
  2267. * totalorderl: (libc)FP Comparison Functions.
  2268. * totalordermag: (libc)FP Comparison Functions.
  2269. * totalordermagf: (libc)FP Comparison Functions.
  2270. * totalordermagfN: (libc)FP Comparison Functions.
  2271. * totalordermagfNx: (libc)FP Comparison Functions.
  2272. * totalordermagl: (libc)FP Comparison Functions.
  2273. * toupper: (libc)Case Conversion.
  2274. * towctrans: (libc)Wide Character Case Conversion.
  2275. * towlower: (libc)Wide Character Case Conversion.
  2276. * towupper: (libc)Wide Character Case Conversion.
  2277. * trunc: (libc)Rounding Functions.
  2278. * truncate64: (libc)File Size.
  2279. * truncate: (libc)File Size.
  2280. * truncf: (libc)Rounding Functions.
  2281. * truncfN: (libc)Rounding Functions.
  2282. * truncfNx: (libc)Rounding Functions.
  2283. * truncl: (libc)Rounding Functions.
  2284. * tsearch: (libc)Tree Search Function.
  2285. * tss_create: (libc)ISO C Thread-local Storage.
  2286. * tss_delete: (libc)ISO C Thread-local Storage.
  2287. * tss_get: (libc)ISO C Thread-local Storage.
  2288. * tss_set: (libc)ISO C Thread-local Storage.
  2289. * ttyname: (libc)Is It a Terminal.
  2290. * ttyname_r: (libc)Is It a Terminal.
  2291. * twalk: (libc)Tree Search Function.
  2292. * twalk_r: (libc)Tree Search Function.
  2293. * tzset: (libc)Time Zone State.
  2294. * uabs: (libc)Absolute Value.
  2295. * ufromfp: (libc)Rounding Functions.
  2296. * ufromfpf: (libc)Rounding Functions.
  2297. * ufromfpfN: (libc)Rounding Functions.
  2298. * ufromfpfNx: (libc)Rounding Functions.
  2299. * ufromfpl: (libc)Rounding Functions.
  2300. * ufromfpx: (libc)Rounding Functions.
  2301. * ufromfpxf: (libc)Rounding Functions.
  2302. * ufromfpxfN: (libc)Rounding Functions.
  2303. * ufromfpxfNx: (libc)Rounding Functions.
  2304. * ufromfpxl: (libc)Rounding Functions.
  2305. * ulabs: (libc)Absolute Value.
  2306. * ulimit: (libc)Limits on Resources.
  2307. * ullabs: (libc)Absolute Value.
  2308. * umask: (libc)Setting Permissions.
  2309. * umaxabs: (libc)Absolute Value.
  2310. * umount2: (libc)Mount-Unmount-Remount.
  2311. * umount: (libc)Mount-Unmount-Remount.
  2312. * uname: (libc)Platform Type.
  2313. * ungetc: (libc)How Unread.
  2314. * ungetwc: (libc)How Unread.
  2315. * unlink: (libc)Deleting Files.
  2316. * unlinkat: (libc)Deleting Files.
  2317. * unlockpt: (libc)Allocation.
  2318. * unsetenv: (libc)Environment Access.
  2319. * updwtmp: (libc)Manipulating the Database.
  2320. * utime: (libc)File Times.
  2321. * utimensat: (libc)File Times.
  2322. * utimes: (libc)File Times.
  2323. * utmpname: (libc)Manipulating the Database.
  2324. * utmpxname: (libc)XPG Functions.
  2325. * va_arg: (libc)Argument Macros.
  2326. * va_copy: (libc)Argument Macros.
  2327. * va_end: (libc)Argument Macros.
  2328. * va_start: (libc)Argument Macros.
  2329. * valloc: (libc)Aligned Memory Blocks.
  2330. * vasprintf: (libc)Variable Arguments Output.
  2331. * vdprintf: (libc)Variable Arguments Output.
  2332. * verr: (libc)Error Messages.
  2333. * verrx: (libc)Error Messages.
  2334. * versionsort64: (libc)Scanning Directory Content.
  2335. * versionsort: (libc)Scanning Directory Content.
  2336. * vfork: (libc)Creating a Process.
  2337. * vfprintf: (libc)Variable Arguments Output.
  2338. * vfscanf: (libc)Variable Arguments Input.
  2339. * vfwprintf: (libc)Variable Arguments Output.
  2340. * vfwscanf: (libc)Variable Arguments Input.
  2341. * vlimit: (libc)Limits on Resources.
  2342. * vprintf: (libc)Variable Arguments Output.
  2343. * vscanf: (libc)Variable Arguments Input.
  2344. * vsnprintf: (libc)Variable Arguments Output.
  2345. * vsprintf: (libc)Variable Arguments Output.
  2346. * vsscanf: (libc)Variable Arguments Input.
  2347. * vswprintf: (libc)Variable Arguments Output.
  2348. * vswscanf: (libc)Variable Arguments Input.
  2349. * vsyslog: (libc)syslog; vsyslog.
  2350. * vwarn: (libc)Error Messages.
  2351. * vwarnx: (libc)Error Messages.
  2352. * vwprintf: (libc)Variable Arguments Output.
  2353. * vwscanf: (libc)Variable Arguments Input.
  2354. * wait3: (libc)BSD Wait Functions.
  2355. * wait4: (libc)Process Completion.
  2356. * wait: (libc)Process Completion.
  2357. * waitpid: (libc)Process Completion.
  2358. * warn: (libc)Error Messages.
  2359. * warnx: (libc)Error Messages.
  2360. * wcpcpy: (libc)Copying Strings and Arrays.
  2361. * wcpncpy: (libc)Truncating Strings.
  2362. * wcrtomb: (libc)Converting a Character.
  2363. * wcscasecmp: (libc)String/Array Comparison.
  2364. * wcscat: (libc)Concatenating Strings.
  2365. * wcschr: (libc)Search Functions.
  2366. * wcschrnul: (libc)Search Functions.
  2367. * wcscmp: (libc)String/Array Comparison.
  2368. * wcscoll: (libc)Collation Functions.
  2369. * wcscpy: (libc)Copying Strings and Arrays.
  2370. * wcscspn: (libc)Search Functions.
  2371. * wcsdup: (libc)Copying Strings and Arrays.
  2372. * wcsftime: (libc)Formatting Calendar Time.
  2373. * wcslcat: (libc)Truncating Strings.
  2374. * wcslcpy: (libc)Truncating Strings.
  2375. * wcslen: (libc)String Length.
  2376. * wcsncasecmp: (libc)String/Array Comparison.
  2377. * wcsncat: (libc)Truncating Strings.
  2378. * wcsncmp: (libc)String/Array Comparison.
  2379. * wcsncpy: (libc)Truncating Strings.
  2380. * wcsnlen: (libc)String Length.
  2381. * wcsnrtombs: (libc)Converting Strings.
  2382. * wcspbrk: (libc)Search Functions.
  2383. * wcsrchr: (libc)Search Functions.
  2384. * wcsrtombs: (libc)Converting Strings.
  2385. * wcsspn: (libc)Search Functions.
  2386. * wcsstr: (libc)Search Functions.
  2387. * wcstod: (libc)Parsing of Floats.
  2388. * wcstof: (libc)Parsing of Floats.
  2389. * wcstofN: (libc)Parsing of Floats.
  2390. * wcstofNx: (libc)Parsing of Floats.
  2391. * wcstoimax: (libc)Parsing of Integers.
  2392. * wcstok: (libc)Finding Tokens in a String.
  2393. * wcstol: (libc)Parsing of Integers.
  2394. * wcstold: (libc)Parsing of Floats.
  2395. * wcstoll: (libc)Parsing of Integers.
  2396. * wcstombs: (libc)Non-reentrant String Conversion.
  2397. * wcstoq: (libc)Parsing of Integers.
  2398. * wcstoul: (libc)Parsing of Integers.
  2399. * wcstoull: (libc)Parsing of Integers.
  2400. * wcstoumax: (libc)Parsing of Integers.
  2401. * wcstouq: (libc)Parsing of Integers.
  2402. * wcswcs: (libc)Search Functions.
  2403. * wcsxfrm: (libc)Collation Functions.
  2404. * wctob: (libc)Converting a Character.
  2405. * wctomb: (libc)Non-reentrant Character Conversion.
  2406. * wctrans: (libc)Wide Character Case Conversion.
  2407. * wctype: (libc)Classification of Wide Characters.
  2408. * wmemchr: (libc)Search Functions.
  2409. * wmemcmp: (libc)String/Array Comparison.
  2410. * wmemcpy: (libc)Copying Strings and Arrays.
  2411. * wmemmove: (libc)Copying Strings and Arrays.
  2412. * wmempcpy: (libc)Copying Strings and Arrays.
  2413. * wmemset: (libc)Copying Strings and Arrays.
  2414. * wordexp: (libc)Calling Wordexp.
  2415. * wordfree: (libc)Calling Wordexp.
  2416. * wprintf: (libc)Formatted Output Functions.
  2417. * write: (libc)I/O Primitives.
  2418. * writev: (libc)Scatter-Gather.
  2419. * wscanf: (libc)Formatted Input Functions.
  2420. * y0: (libc)Special Functions.
  2421. * y0f: (libc)Special Functions.
  2422. * y0fN: (libc)Special Functions.
  2423. * y0fNx: (libc)Special Functions.
  2424. * y0l: (libc)Special Functions.
  2425. * y1: (libc)Special Functions.
  2426. * y1f: (libc)Special Functions.
  2427. * y1fN: (libc)Special Functions.
  2428. * y1fNx: (libc)Special Functions.
  2429. * y1l: (libc)Special Functions.
  2430. * yn: (libc)Special Functions.
  2431. * ynf: (libc)Special Functions.
  2432. * ynfN: (libc)Special Functions.
  2433. * ynfNx: (libc)Special Functions.
  2434. * ynl: (libc)Special Functions.
  2435. END-INFO-DIR-ENTRY
  2436. 
  2437. File: libc.info, Node: Control Functions, Next: Arithmetic Functions, Prev: Rounding, Up: Arithmetic
  2438. 20.7 Floating-Point Control Functions
  2439. =====================================
  2440. IEEE 754 floating-point implementations allow the programmer to decide
  2441. whether traps will occur for each of the exceptions, by setting bits in
  2442. the “control word”. In C, traps result in the program receiving the
  2443. ‘SIGFPE’ signal; see *note Signal Handling::.
  2444. *NB:* IEEE 754 says that trap handlers are given details of the
  2445. exceptional situation, and can set the result value. C signals do not
  2446. provide any mechanism to pass this information back and forth. Trapping
  2447. exceptions in C is therefore not very useful.
  2448. It is sometimes necessary to save the state of the floating-point
  2449. unit while you perform some calculation. The library provides functions
  2450. which save and restore the exception flags, the set of exceptions that
  2451. generate traps, and the rounding mode. This information is known as the
  2452. “floating-point environment”.
  2453. The functions to save and restore the floating-point environment all
  2454. use a variable of type ‘fenv_t’ to store information. This type is
  2455. defined in ‘fenv.h’. Its size and contents are implementation-defined.
  2456. You should not attempt to manipulate a variable of this type directly.
  2457. To save the state of the FPU, use one of these functions:
  2458. -- Function: int fegetenv (fenv_t *ENVP)
  2459. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2460. Concepts::.
  2461. Store the floating-point environment in the variable pointed to by
  2462. ENVP.
  2463. The function returns zero in case the operation was successful, a
  2464. non-zero value otherwise.
  2465. -- Function: int feholdexcept (fenv_t *ENVP)
  2466. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2467. Concepts::.
  2468. Store the current floating-point environment in the object pointed
  2469. to by ENVP. Then clear all exception flags, and set the FPU to
  2470. trap no exceptions. Not all FPUs support trapping no exceptions;
  2471. if ‘feholdexcept’ cannot set this mode, it returns nonzero value.
  2472. If it succeeds, it returns zero.
  2473. The functions which restore the floating-point environment can take
  2474. these kinds of arguments:
  2475. • Pointers to ‘fenv_t’ objects, which were initialized previously by
  2476. a call to ‘fegetenv’ or ‘feholdexcept’.
  2477. • The special macro ‘FE_DFL_ENV’ which represents the floating-point
  2478. environment as it was available at program start.
  2479. • Implementation defined macros with names starting with ‘FE_’ and
  2480. having type ‘fenv_t *’.
  2481. If possible, the GNU C Library defines a macro ‘FE_NOMASK_ENV’
  2482. which represents an environment where every exception raised causes
  2483. a trap to occur. You can test for this macro using ‘#ifdef’. It
  2484. is only defined if ‘_GNU_SOURCE’ is defined.
  2485. Some platforms might define other predefined environments.
  2486. To set the floating-point environment, you can use either of these
  2487. functions:
  2488. -- Function: int fesetenv (const fenv_t *ENVP)
  2489. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2490. Concepts::.
  2491. Set the floating-point environment to that described by ENVP.
  2492. The function returns zero in case the operation was successful, a
  2493. non-zero value otherwise.
  2494. -- Function: int feupdateenv (const fenv_t *ENVP)
  2495. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2496. Concepts::.
  2497. Like ‘fesetenv’, this function sets the floating-point environment
  2498. to that described by ENVP. However, if any exceptions were flagged
  2499. in the status word before ‘feupdateenv’ was called, they remain
  2500. flagged after the call. In other words, after ‘feupdateenv’ is
  2501. called, the status word is the bitwise OR of the previous status
  2502. word and the one saved in ENVP.
  2503. The function returns zero in case the operation was successful, a
  2504. non-zero value otherwise.
  2505. TS 18661-1:2014 defines additional functions to save and restore
  2506. floating-point control modes (such as the rounding mode and whether
  2507. traps are enabled) while leaving other status (such as raised flags)
  2508. unchanged.
  2509. The special macro ‘FE_DFL_MODE’ may be passed to ‘fesetmode’. It
  2510. represents the floating-point control modes at program start.
  2511. -- Function: int fegetmode (femode_t *MODEP)
  2512. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2513. Concepts::.
  2514. Store the floating-point control modes in the variable pointed to
  2515. by MODEP.
  2516. The function returns zero in case the operation was successful, a
  2517. non-zero value otherwise.
  2518. -- Function: int fesetmode (const femode_t *MODEP)
  2519. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2520. Concepts::.
  2521. Set the floating-point control modes to those described by MODEP.
  2522. The function returns zero in case the operation was successful, a
  2523. non-zero value otherwise.
  2524. To control for individual exceptions if raising them causes a trap to
  2525. occur, you can use the following two functions.
  2526. *Portability Note:* These functions are all GNU extensions.
  2527. -- Function: int feenableexcept (int EXCEPTS)
  2528. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2529. Concepts::.
  2530. This function enables traps for each of the exceptions as indicated
  2531. by the parameter EXCEPTS. The individual exceptions are described
  2532. in *note Status bit operations::. Only the specified exceptions
  2533. are enabled, the status of the other exceptions is not changed.
  2534. The function returns the previous enabled exceptions in case the
  2535. operation was successful, ‘-1’ otherwise.
  2536. Note: Enabling traps for an exception for which the exception flag
  2537. is currently already set (*note Status bit operations::) has
  2538. unspecified consequences: it may or may not trigger a trap
  2539. immediately.
  2540. -- Function: int fedisableexcept (int EXCEPTS)
  2541. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2542. Concepts::.
  2543. This function disables traps for each of the exceptions as
  2544. indicated by the parameter EXCEPTS. The individual exceptions are
  2545. described in *note Status bit operations::. Only the specified
  2546. exceptions are disabled, the status of the other exceptions is not
  2547. changed.
  2548. The function returns the previous enabled exceptions in case the
  2549. operation was successful, ‘-1’ otherwise.
  2550. -- Function: int fegetexcept (void)
  2551. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2552. Concepts::.
  2553. The function returns a bitmask of all currently enabled exceptions.
  2554. It returns ‘-1’ in case of failure.
  2555. 
  2556. File: libc.info, Node: Arithmetic Functions, Next: Complex Numbers, Prev: Control Functions, Up: Arithmetic
  2557. 20.8 Arithmetic Functions
  2558. =========================
  2559. The C library provides functions to do basic operations on
  2560. floating-point numbers. These include absolute value, maximum and
  2561. minimum, normalization, bit twiddling, rounding, and a few others.
  2562. * Menu:
  2563. * Absolute Value:: Absolute values of integers and floats.
  2564. * Normalization Functions:: Extracting exponents and putting them back.
  2565. * Rounding Functions:: Rounding floats to integers.
  2566. * Remainder Functions:: Remainders on division, precisely defined.
  2567. * FP Bit Twiddling:: Sign bit adjustment. Adding epsilon.
  2568. * FP Comparison Functions:: Comparisons without risk of exceptions.
  2569. * Misc FP Arithmetic:: Max, min, positive difference, multiply-add.
  2570. 
  2571. File: libc.info, Node: Absolute Value, Next: Normalization Functions, Up: Arithmetic Functions
  2572. 20.8.1 Absolute Value
  2573. ---------------------
  2574. These functions are provided for obtaining the “absolute value” (or
  2575. “magnitude”) of a number. The absolute value of a real number X is X if
  2576. X is positive, −X if X is negative. For a complex number Z, whose real
  2577. part is X and whose imaginary part is Y, the absolute value is
  2578. ‘sqrt (X*X + Y*Y)’.
  2579. Prototypes for ‘abs’, ‘labs’, ‘llabs’, ‘uabs’, ‘ulabs’ and ‘ullabs’
  2580. are in ‘stdlib.h’; ‘imaxabs’ and ‘umaxabs’ are declared in ‘inttypes.h’;
  2581. the ‘fabs’ functions are declared in ‘math.h’; the ‘cabs’ functions are
  2582. declared in ‘complex.h’.
  2583. -- Function: int abs (int NUMBER)
  2584. -- Function: long int labs (long int NUMBER)
  2585. -- Function: long long int llabs (long long int NUMBER)
  2586. -- Function: unsigned int uabs (int NUMBER)
  2587. -- Function: unsigned long int ulabs (long int NUMBER)
  2588. -- Function: unsigned long long int ullabs (long long int NUMBER)
  2589. -- Function: intmax_t imaxabs (intmax_t NUMBER)
  2590. -- Function: uintmax_t umaxabs (intmax_t NUMBER)
  2591. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2592. Concepts::.
  2593. These functions return the absolute value of NUMBER.
  2594. Most computers use a two's complement integer representation, in
  2595. which the absolute value of ‘INT_MIN’ (the smallest possible ‘int’)
  2596. cannot be represented; thus, ‘abs (INT_MIN)’ is not defined. Using
  2597. ‘uabs’ avoids this.
  2598. ‘llabs’ and ‘imaxdiv’ are new to ISO C99. ‘uabs’, ‘ulabs’,
  2599. ‘ullabs’ and ‘umaxabs’ are new to ISO C2Y.
  2600. See *note Integers:: for a description of the ‘intmax_t’ type.
  2601. -- Function: double fabs (double NUMBER)
  2602. -- Function: float fabsf (float NUMBER)
  2603. -- Function: long double fabsl (long double NUMBER)
  2604. -- Function: _FloatN fabsfN (_FloatN NUMBER)
  2605. -- Function: _FloatNx fabsfNx (_FloatNx NUMBER)
  2606. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2607. Concepts::.
  2608. This function returns the absolute value of the floating-point
  2609. number NUMBER.
  2610. -- Function: double cabs (complex double Z)
  2611. -- Function: float cabsf (complex float Z)
  2612. -- Function: long double cabsl (complex long double Z)
  2613. -- Function: _FloatN cabsfN (complex _FloatN Z)
  2614. -- Function: _FloatNx cabsfNx (complex _FloatNx Z)
  2615. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2616. Concepts::.
  2617. These functions return the absolute value of the complex number Z
  2618. (*note Complex Numbers::). The absolute value of a complex number
  2619. is:
  2620. sqrt (creal (Z) * creal (Z) + cimag (Z) * cimag (Z))
  2621. This function should always be used instead of the direct formula
  2622. because it takes special care to avoid losing precision. It may
  2623. also take advantage of hardware support for this operation. See
  2624. ‘hypot’ in *note Exponents and Logarithms::.
  2625. 
  2626. File: libc.info, Node: Normalization Functions, Next: Rounding Functions, Prev: Absolute Value, Up: Arithmetic Functions
  2627. 20.8.2 Normalization Functions
  2628. ------------------------------
  2629. The functions described in this section are primarily provided as a way
  2630. to efficiently perform certain low-level manipulations on floating point
  2631. numbers that are represented internally using a binary radix; see *note
  2632. Floating Point Concepts::. These functions are required to have
  2633. equivalent behavior even if the representation does not use a radix of
  2634. 2, but of course they are unlikely to be particularly efficient in those
  2635. cases.
  2636. All these functions are declared in ‘math.h’.
  2637. -- Function: double frexp (double VALUE, int *EXPONENT)
  2638. -- Function: float frexpf (float VALUE, int *EXPONENT)
  2639. -- Function: long double frexpl (long double VALUE, int *EXPONENT)
  2640. -- Function: _FloatN frexpfN (_FloatN VALUE, int *EXPONENT)
  2641. -- Function: _FloatNx frexpfNx (_FloatNx VALUE, int *EXPONENT)
  2642. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2643. Concepts::.
  2644. These functions are used to split the number VALUE into a
  2645. normalized fraction and an exponent.
  2646. If the argument VALUE is not zero, the return value is VALUE times
  2647. a power of two, and its magnitude is always in the range 1/2
  2648. (inclusive) to 1 (exclusive). The corresponding exponent is stored
  2649. in ‘*EXPONENT’; the return value multiplied by 2 raised to this
  2650. exponent equals the original number VALUE.
  2651. For example, ‘frexp (12.8, &exponent)’ returns ‘0.8’ and stores ‘4’
  2652. in ‘exponent’.
  2653. If VALUE is zero, then the return value is zero and zero is stored
  2654. in ‘*EXPONENT’.
  2655. -- Function: double ldexp (double VALUE, int EXPONENT)
  2656. -- Function: float ldexpf (float VALUE, int EXPONENT)
  2657. -- Function: long double ldexpl (long double VALUE, int EXPONENT)
  2658. -- Function: _FloatN ldexpfN (_FloatN VALUE, int EXPONENT)
  2659. -- Function: _FloatNx ldexpfNx (_FloatNx VALUE, int EXPONENT)
  2660. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2661. Concepts::.
  2662. These functions return the result of multiplying the floating-point
  2663. number VALUE by 2 raised to the power EXPONENT. (It can be used to
  2664. reassemble floating-point numbers that were taken apart by
  2665. ‘frexp’.)
  2666. For example, ‘ldexp (0.8, 4)’ returns ‘12.8’.
  2667. The following functions, which come from BSD, provide facilities
  2668. equivalent to those of ‘ldexp’ and ‘frexp’. See also the ISO C function
  2669. ‘logb’ which originally also appeared in BSD. The ‘_FloatN’ and
  2670. ‘_FloatN’ variants of the following functions come from TS 18661-3:2015.
  2671. -- Function: double scalb (double VALUE, double EXPONENT)
  2672. -- Function: float scalbf (float VALUE, float EXPONENT)
  2673. -- Function: long double scalbl (long double VALUE, long double
  2674. EXPONENT)
  2675. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2676. Concepts::.
  2677. The ‘scalb’ function is the BSD name for ‘ldexp’.
  2678. -- Function: double scalbn (double X, int N)
  2679. -- Function: float scalbnf (float X, int N)
  2680. -- Function: long double scalbnl (long double X, int N)
  2681. -- Function: _FloatN scalbnfN (_FloatN X, int N)
  2682. -- Function: _FloatNx scalbnfNx (_FloatNx X, int N)
  2683. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2684. Concepts::.
  2685. ‘scalbn’ is identical to ‘scalb’, except that the exponent N is an
  2686. ‘int’ instead of a floating-point number.
  2687. -- Function: double scalbln (double X, long int N)
  2688. -- Function: float scalblnf (float X, long int N)
  2689. -- Function: long double scalblnl (long double X, long int N)
  2690. -- Function: _FloatN scalblnfN (_FloatN X, long int N)
  2691. -- Function: _FloatNx scalblnfNx (_FloatNx X, long int N)
  2692. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2693. Concepts::.
  2694. ‘scalbln’ is identical to ‘scalb’, except that the exponent N is a
  2695. ‘long int’ instead of a floating-point number.
  2696. -- Function: double significand (double X)
  2697. -- Function: float significandf (float X)
  2698. -- Function: long double significandl (long double X)
  2699. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2700. Concepts::.
  2701. ‘significand’ returns the mantissa of X scaled to the range [1,
  2702. ‘FLT_RADIX’). It is equivalent to
  2703. ‘scalb (X, (double) -ilogb (X))’.
  2704. This function exists mainly for use in certain standardized tests
  2705. of IEEE 754 conformance.
  2706. 
  2707. File: libc.info, Node: Rounding Functions, Next: Remainder Functions, Prev: Normalization Functions, Up: Arithmetic Functions
  2708. 20.8.3 Rounding Functions
  2709. -------------------------
  2710. The functions listed here perform operations such as rounding and
  2711. truncation of floating-point values. Some of these functions convert
  2712. floating point numbers to integer values. They are all declared in
  2713. ‘math.h’.
  2714. You can also convert floating-point numbers to integers simply by
  2715. casting them to ‘int’. This discards the fractional part, effectively
  2716. rounding towards zero. However, this only works if the result can
  2717. actually be represented as an ‘int’--for very large numbers, this is
  2718. impossible. The functions listed here return the result as a ‘double’
  2719. instead to get around this problem.
  2720. The ‘fromfp’ functions use the following macros, from TS
  2721. 18661-1:2014, to specify the direction of rounding. These correspond to
  2722. the rounding directions defined in IEEE 754-2008.
  2723. ‘FP_INT_UPWARD’
  2724. Round toward +oo.
  2725. ‘FP_INT_DOWNWARD’
  2726. Round toward -oo.
  2727. ‘FP_INT_TOWARDZERO’
  2728. Round toward zero.
  2729. ‘FP_INT_TONEARESTFROMZERO’
  2730. Round to nearest, ties round away from zero.
  2731. ‘FP_INT_TONEAREST’
  2732. Round to nearest, ties round to even.
  2733. -- Function: double ceil (double X)
  2734. -- Function: float ceilf (float X)
  2735. -- Function: long double ceill (long double X)
  2736. -- Function: _FloatN ceilfN (_FloatN X)
  2737. -- Function: _FloatNx ceilfNx (_FloatNx X)
  2738. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2739. Concepts::.
  2740. These functions round X upwards to the nearest integer, returning
  2741. that value as a ‘double’. Thus, ‘ceil (1.5)’ is ‘2.0’.
  2742. -- Function: double floor (double X)
  2743. -- Function: float floorf (float X)
  2744. -- Function: long double floorl (long double X)
  2745. -- Function: _FloatN floorfN (_FloatN X)
  2746. -- Function: _FloatNx floorfNx (_FloatNx X)
  2747. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2748. Concepts::.
  2749. These functions round X downwards to the nearest integer, returning
  2750. that value as a ‘double’. Thus, ‘floor (1.5)’ is ‘1.0’ and ‘floor
  2751. (-1.5)’ is ‘-2.0’.
  2752. -- Function: double trunc (double X)
  2753. -- Function: float truncf (float X)
  2754. -- Function: long double truncl (long double X)
  2755. -- Function: _FloatN truncfN (_FloatN X)
  2756. -- Function: _FloatNx truncfNx (_FloatNx X)
  2757. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2758. Concepts::.
  2759. The ‘trunc’ functions round X towards zero to the nearest integer
  2760. (returned in floating-point format). Thus, ‘trunc (1.5)’ is ‘1.0’
  2761. and ‘trunc (-1.5)’ is ‘-1.0’.
  2762. -- Function: double rint (double X)
  2763. -- Function: float rintf (float X)
  2764. -- Function: long double rintl (long double X)
  2765. -- Function: _FloatN rintfN (_FloatN X)
  2766. -- Function: _FloatNx rintfNx (_FloatNx X)
  2767. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2768. Concepts::.
  2769. These functions round X to an integer value according to the
  2770. current rounding mode. *Note Floating Point Parameters::, for
  2771. information about the various rounding modes. The default rounding
  2772. mode is to round to the nearest integer; some machines support
  2773. other modes, but round-to-nearest is always used unless you
  2774. explicitly select another.
  2775. If X was not initially an integer, these functions raise the
  2776. inexact exception.
  2777. -- Function: double nearbyint (double X)
  2778. -- Function: float nearbyintf (float X)
  2779. -- Function: long double nearbyintl (long double X)
  2780. -- Function: _FloatN nearbyintfN (_FloatN X)
  2781. -- Function: _FloatNx nearbyintfNx (_FloatNx X)
  2782. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2783. Concepts::.
  2784. These functions return the same value as the ‘rint’ functions, but
  2785. do not raise the inexact exception if X is not an integer.
  2786. -- Function: double round (double X)
  2787. -- Function: float roundf (float X)
  2788. -- Function: long double roundl (long double X)
  2789. -- Function: _FloatN roundfN (_FloatN X)
  2790. -- Function: _FloatNx roundfNx (_FloatNx X)
  2791. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2792. Concepts::.
  2793. These functions are similar to ‘rint’, but they round halfway cases
  2794. away from zero instead of to the nearest integer (or other current
  2795. rounding mode).
  2796. -- Function: double roundeven (double X)
  2797. -- Function: float roundevenf (float X)
  2798. -- Function: long double roundevenl (long double X)
  2799. -- Function: _FloatN roundevenfN (_FloatN X)
  2800. -- Function: _FloatNx roundevenfNx (_FloatNx X)
  2801. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2802. Concepts::.
  2803. These functions, from TS 18661-1:2014 and TS 18661-3:2015, are
  2804. similar to ‘round’, but they round halfway cases to even instead of
  2805. away from zero.
  2806. -- Function: long int lrint (double X)
  2807. -- Function: long int lrintf (float X)
  2808. -- Function: long int lrintl (long double X)
  2809. -- Function: long int lrintfN (_FloatN X)
  2810. -- Function: long int lrintfNx (_FloatNx X)
  2811. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2812. Concepts::.
  2813. These functions are just like ‘rint’, but they return a ‘long int’
  2814. instead of a floating-point number.
  2815. -- Function: long long int llrint (double X)
  2816. -- Function: long long int llrintf (float X)
  2817. -- Function: long long int llrintl (long double X)
  2818. -- Function: long long int llrintfN (_FloatN X)
  2819. -- Function: long long int llrintfNx (_FloatNx X)
  2820. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2821. Concepts::.
  2822. These functions are just like ‘rint’, but they return a ‘long long
  2823. int’ instead of a floating-point number.
  2824. -- Function: long int lround (double X)
  2825. -- Function: long int lroundf (float X)
  2826. -- Function: long int lroundl (long double X)
  2827. -- Function: long int lroundfN (_FloatN X)
  2828. -- Function: long int lroundfNx (_FloatNx X)
  2829. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2830. Concepts::.
  2831. These functions are just like ‘round’, but they return a ‘long int’
  2832. instead of a floating-point number.
  2833. -- Function: long long int llround (double X)
  2834. -- Function: long long int llroundf (float X)
  2835. -- Function: long long int llroundl (long double X)
  2836. -- Function: long long int llroundfN (_FloatN X)
  2837. -- Function: long long int llroundfNx (_FloatNx X)
  2838. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2839. Concepts::.
  2840. These functions are just like ‘round’, but they return a ‘long long
  2841. int’ instead of a floating-point number.
  2842. -- Function: double fromfp (double X, int ROUND, unsigned int WIDTH)
  2843. -- Function: float fromfpf (float X, int ROUND, unsigned int WIDTH)
  2844. -- Function: long double fromfpl (long double X, int ROUND, unsigned
  2845. int WIDTH)
  2846. -- Function: _FloatN fromfpfN (_FloatN X, int ROUND, unsigned int
  2847. WIDTH)
  2848. -- Function: _FloatNx fromfpfNx (_FloatNx X, int ROUND, unsigned int
  2849. WIDTH)
  2850. -- Function: double ufromfp (double X, int ROUND, unsigned int WIDTH)
  2851. -- Function: float ufromfpf (float X, int ROUND, unsigned int WIDTH)
  2852. -- Function: long double ufromfpl (long double X, int ROUND, unsigned
  2853. int WIDTH)
  2854. -- Function: _FloatN ufromfpfN (_FloatN X, int ROUND, unsigned int
  2855. WIDTH)
  2856. -- Function: _FloatNx ufromfpfNx (_FloatNx X, int ROUND, unsigned int
  2857. WIDTH)
  2858. -- Function: double fromfpx (double X, int ROUND, unsigned int WIDTH)
  2859. -- Function: float fromfpxf (float X, int ROUND, unsigned int WIDTH)
  2860. -- Function: long double fromfpxl (long double X, int ROUND, unsigned
  2861. int WIDTH)
  2862. -- Function: _FloatN fromfpxfN (_FloatN X, int ROUND, unsigned int
  2863. WIDTH)
  2864. -- Function: _FloatNx fromfpxfNx (_FloatNx X, int ROUND, unsigned int
  2865. WIDTH)
  2866. -- Function: double ufromfpx (double X, int ROUND, unsigned int WIDTH)
  2867. -- Function: float ufromfpxf (float X, int ROUND, unsigned int WIDTH)
  2868. -- Function: long double ufromfpxl (long double X, int ROUND, unsigned
  2869. int WIDTH)
  2870. -- Function: _FloatN ufromfpxfN (_FloatN X, int ROUND, unsigned int
  2871. WIDTH)
  2872. -- Function: _FloatNx ufromfpxfNx (_FloatNx X, int ROUND, unsigned int
  2873. WIDTH)
  2874. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2875. Concepts::.
  2876. These functions, from TS 18661-1:2014 and TS 18661-3:2015, convert
  2877. a floating-point number to an integer according to the rounding
  2878. direction ROUND (one of the ‘FP_INT_*’ macros). If the integer is
  2879. outside the range of a two's complement signed or unsigned
  2880. (depending on the return type of the function) integer of width
  2881. WIDTH bits, or if X is infinite or NaN, or if WIDTH is zero, a
  2882. domain error occurs and a NaN is returned. The functions with an
  2883. ‘x’ in their names raise the inexact exception when a domain error
  2884. does not occur and the argument is not an integer; the other
  2885. functions do not raise the inexact exception.
  2886. Following ISO C23, in the GNU C Library these functions return
  2887. their result in the floating-point argument type. In TS
  2888. 18661-1:2014 and TS 18661-3:2015, they were originally defined to
  2889. return ‘intmax_t’ and ‘uintmax_t’.
  2890. -- Function: double modf (double VALUE, double *INTEGER-PART)
  2891. -- Function: float modff (float VALUE, float *INTEGER-PART)
  2892. -- Function: long double modfl (long double VALUE, long double
  2893. *INTEGER-PART)
  2894. -- Function: _FloatN modffN (_FloatN VALUE, _FloatN *INTEGER-PART)
  2895. -- Function: _FloatNx modffNx (_FloatNx VALUE, _FloatNx *INTEGER-PART)
  2896. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2897. Concepts::.
  2898. These functions break the argument VALUE into an integer part and a
  2899. fractional part (between ‘-1’ and ‘1’, exclusive). Their sum
  2900. equals VALUE. Each of the parts has the same sign as VALUE, and
  2901. the integer part is always rounded toward zero.
  2902. ‘modf’ stores the integer part in ‘*INTEGER-PART’, and returns the
  2903. fractional part. For example, ‘modf (2.5, &intpart)’ returns ‘0.5’
  2904. and stores ‘2.0’ into ‘intpart’.
  2905. 
  2906. File: libc.info, Node: Remainder Functions, Next: FP Bit Twiddling, Prev: Rounding Functions, Up: Arithmetic Functions
  2907. 20.8.4 Remainder Functions
  2908. --------------------------
  2909. The functions in this section compute the remainder on division of two
  2910. floating-point numbers. Each is a little different; pick the one that
  2911. suits your problem.
  2912. -- Function: double fmod (double NUMERATOR, double DENOMINATOR)
  2913. -- Function: float fmodf (float NUMERATOR, float DENOMINATOR)
  2914. -- Function: long double fmodl (long double NUMERATOR, long double
  2915. DENOMINATOR)
  2916. -- Function: _FloatN fmodfN (_FloatN NUMERATOR, _FloatN DENOMINATOR)
  2917. -- Function: _FloatNx fmodfNx (_FloatNx NUMERATOR, _FloatNx
  2918. DENOMINATOR)
  2919. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2920. Concepts::.
  2921. These functions compute the remainder from the division of
  2922. NUMERATOR by DENOMINATOR. Specifically, the return value is
  2923. ‘NUMERATOR - N * DENOMINATOR’, where N is the quotient of NUMERATOR
  2924. divided by DENOMINATOR, rounded towards zero to an integer. Thus,
  2925. ‘fmod (6.5, 2.3)’ returns ‘1.9’, which is ‘6.5’ minus ‘4.6’.
  2926. The result has the same sign as the NUMERATOR and has magnitude
  2927. less than the magnitude of the DENOMINATOR.
  2928. If DENOMINATOR is zero, ‘fmod’ signals a domain error.
  2929. -- Function: double remainder (double NUMERATOR, double DENOMINATOR)
  2930. -- Function: float remainderf (float NUMERATOR, float DENOMINATOR)
  2931. -- Function: long double remainderl (long double NUMERATOR, long double
  2932. DENOMINATOR)
  2933. -- Function: _FloatN remainderfN (_FloatN NUMERATOR, _FloatN
  2934. DENOMINATOR)
  2935. -- Function: _FloatNx remainderfNx (_FloatNx NUMERATOR, _FloatNx
  2936. DENOMINATOR)
  2937. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2938. Concepts::.
  2939. These functions are like ‘fmod’ except that they round the internal
  2940. quotient N to the nearest integer instead of towards zero to an
  2941. integer. For example, ‘remainder (6.5, 2.3)’ returns ‘-0.4’, which
  2942. is ‘6.5’ minus ‘6.9’.
  2943. The absolute value of the result is less than or equal to half the
  2944. absolute value of the DENOMINATOR. The difference between ‘fmod
  2945. (NUMERATOR, DENOMINATOR)’ and ‘remainder (NUMERATOR, DENOMINATOR)’
  2946. is always either DENOMINATOR, minus DENOMINATOR, or zero.
  2947. If DENOMINATOR is zero, ‘remainder’ signals a domain error.
  2948. -- Function: double drem (double NUMERATOR, double DENOMINATOR)
  2949. -- Function: float dremf (float NUMERATOR, float DENOMINATOR)
  2950. -- Function: long double dreml (long double NUMERATOR, long double
  2951. DENOMINATOR)
  2952. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2953. Concepts::.
  2954. This function is another name for ‘remainder’.
  2955. 
  2956. File: libc.info, Node: FP Bit Twiddling, Next: FP Comparison Functions, Prev: Remainder Functions, Up: Arithmetic Functions
  2957. 20.8.5 Setting and modifying single bits of FP values
  2958. -----------------------------------------------------
  2959. There are some operations that are too complicated or expensive to
  2960. perform by hand on floating-point numbers. ISO C99 defines functions to
  2961. do these operations, which mostly involve changing single bits.
  2962. -- Function: double copysign (double X, double Y)
  2963. -- Function: float copysignf (float X, float Y)
  2964. -- Function: long double copysignl (long double X, long double Y)
  2965. -- Function: _FloatN copysignfN (_FloatN X, _FloatN Y)
  2966. -- Function: _FloatNx copysignfNx (_FloatNx X, _FloatNx Y)
  2967. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2968. Concepts::.
  2969. These functions return X but with the sign of Y. They work even if
  2970. X or Y are NaN or zero. Both of these can carry a sign (although
  2971. not all implementations support it) and this is one of the few
  2972. operations that can tell the difference.
  2973. ‘copysign’ never raises an exception.
  2974. This function is defined in IEC 559 (and the appendix with
  2975. recommended functions in IEEE 754/IEEE 854).
  2976. -- Function: int signbit (_float-type_ X)
  2977. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2978. Concepts::.
  2979. ‘signbit’ is a generic macro which can work on all floating-point
  2980. types. It returns a nonzero value if the value of X has its sign
  2981. bit set.
  2982. This is not the same as ‘x < 0.0’, because IEEE 754 floating point
  2983. allows zero to be signed. The comparison ‘-0.0 < 0.0’ is false,
  2984. but ‘signbit (-0.0)’ will return a nonzero value.
  2985. -- Function: double nextafter (double X, double Y)
  2986. -- Function: float nextafterf (float X, float Y)
  2987. -- Function: long double nextafterl (long double X, long double Y)
  2988. -- Function: _FloatN nextafterfN (_FloatN X, _FloatN Y)
  2989. -- Function: _FloatNx nextafterfNx (_FloatNx X, _FloatNx Y)
  2990. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2991. Concepts::.
  2992. The ‘nextafter’ function returns the next representable neighbor of
  2993. X in the direction towards Y. The size of the step between X and
  2994. the result depends on the type of the result. If X = Y the
  2995. function simply returns Y. If either value is ‘NaN’, ‘NaN’ is
  2996. returned. Otherwise a value corresponding to the value of the
  2997. least significant bit in the mantissa is added or subtracted,
  2998. depending on the direction. ‘nextafter’ will signal overflow or
  2999. underflow if the result goes outside of the range of normalized
  3000. numbers.
  3001. This function is defined in IEC 559 (and the appendix with
  3002. recommended functions in IEEE 754/IEEE 854).
  3003. -- Function: double nexttoward (double X, long double Y)
  3004. -- Function: float nexttowardf (float X, long double Y)
  3005. -- Function: long double nexttowardl (long double X, long double Y)
  3006. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3007. Concepts::.
  3008. These functions are identical to the corresponding versions of
  3009. ‘nextafter’ except that their second argument is a ‘long double’.
  3010. -- Function: double nextup (double X)
  3011. -- Function: float nextupf (float X)
  3012. -- Function: long double nextupl (long double X)
  3013. -- Function: _FloatN nextupfN (_FloatN X)
  3014. -- Function: _FloatNx nextupfNx (_FloatNx X)
  3015. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3016. Concepts::.
  3017. The ‘nextup’ function returns the next representable neighbor of X
  3018. in the direction of positive infinity. If X is the smallest
  3019. negative subnormal number in the type of X the function returns
  3020. ‘-0’. If X = ‘0’ the function returns the smallest positive
  3021. subnormal number in the type of X. If X is NaN, NaN is returned.
  3022. If X is +oo, +oo is returned. ‘nextup’ is from TS 18661-1:2014 and
  3023. TS 18661-3:2015. ‘nextup’ never raises an exception except for
  3024. signaling NaNs.
  3025. -- Function: double nextdown (double X)
  3026. -- Function: float nextdownf (float X)
  3027. -- Function: long double nextdownl (long double X)
  3028. -- Function: _FloatN nextdownfN (_FloatN X)
  3029. -- Function: _FloatNx nextdownfNx (_FloatNx X)
  3030. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3031. Concepts::.
  3032. The ‘nextdown’ function returns the next representable neighbor of
  3033. X in the direction of negative infinity. If X is the smallest
  3034. positive subnormal number in the type of X the function returns
  3035. ‘+0’. If X = ‘0’ the function returns the smallest negative
  3036. subnormal number in the type of X. If X is NaN, NaN is returned.
  3037. If X is -oo, -oo is returned. ‘nextdown’ is from TS 18661-1:2014
  3038. and TS 18661-3:2015. ‘nextdown’ never raises an exception except
  3039. for signaling NaNs.
  3040. -- Function: double nan (const char *TAGP)
  3041. -- Function: float nanf (const char *TAGP)
  3042. -- Function: long double nanl (const char *TAGP)
  3043. -- Function: _FloatN nanfN (const char *TAGP)
  3044. -- Function: _FloatNx nanfNx (const char *TAGP)
  3045. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3046. Safety Concepts::.
  3047. The ‘nan’ function returns a representation of NaN, provided that
  3048. NaN is supported by the target platform. ‘nan ("N-CHAR-SEQUENCE")’
  3049. is equivalent to ‘strtod ("NAN(N-CHAR-SEQUENCE)")’.
  3050. The argument TAGP is used in an unspecified manner. On IEEE 754
  3051. systems, there are many representations of NaN, and TAGP selects
  3052. one. On other systems it may do nothing.
  3053. -- Function: int canonicalize (double *CX, const double *X)
  3054. -- Function: int canonicalizef (float *CX, const float *X)
  3055. -- Function: int canonicalizel (long double *CX, const long double *X)
  3056. -- Function: int canonicalizefN (_FloatN *CX, const _FloatN *X)
  3057. -- Function: int canonicalizefNx (_FloatNx *CX, const _FloatNx *X)
  3058. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3059. Concepts::.
  3060. In some floating-point formats, some values have canonical
  3061. (preferred) and noncanonical encodings (for IEEE interchange binary
  3062. formats, all encodings are canonical). These functions, defined by
  3063. TS 18661-1:2014 and TS 18661-3:2015, attempt to produce a canonical
  3064. version of the floating-point value pointed to by X; if that value
  3065. is a signaling NaN, they raise the invalid exception and produce a
  3066. quiet NaN. If a canonical value is produced, it is stored in the
  3067. object pointed to by CX, and these functions return zero.
  3068. Otherwise (if a canonical value could not be produced because the
  3069. object pointed to by X is not a valid representation of any
  3070. floating-point value), the object pointed to by CX is unchanged and
  3071. a nonzero value is returned.
  3072. Note that some formats have multiple encodings of a value which are
  3073. all equally canonical; when such an encoding is used as an input to
  3074. this function, any such encoding of the same value (or of the
  3075. corresponding quiet NaN, if that value is a signaling NaN) may be
  3076. produced as output.
  3077. -- Function: double getpayload (const double *X)
  3078. -- Function: float getpayloadf (const float *X)
  3079. -- Function: long double getpayloadl (const long double *X)
  3080. -- Function: _FloatN getpayloadfN (const _FloatN *X)
  3081. -- Function: _FloatNx getpayloadfNx (const _FloatNx *X)
  3082. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3083. Concepts::.
  3084. IEEE 754 defines the “payload” of a NaN to be an integer value
  3085. encoded in the representation of the NaN. Payloads are typically
  3086. propagated from NaN inputs to the result of a floating-point
  3087. operation. These functions, defined by TS 18661-1:2014 and TS
  3088. 18661-3:2015, return the payload of the NaN pointed to by X
  3089. (returned as a positive integer, or positive zero, represented as a
  3090. floating-point number); if X is not a NaN, they return −1. They
  3091. raise no floating-point exceptions even for signaling NaNs. (The
  3092. return value of −1 for an argument that is not a NaN is specified
  3093. in C23; the value was unspecified in TS 18661.)
  3094. -- Function: int setpayload (double *X, double PAYLOAD)
  3095. -- Function: int setpayloadf (float *X, float PAYLOAD)
  3096. -- Function: int setpayloadl (long double *X, long double PAYLOAD)
  3097. -- Function: int setpayloadfN (_FloatN *X, _FloatN PAYLOAD)
  3098. -- Function: int setpayloadfNx (_FloatNx *X, _FloatNx PAYLOAD)
  3099. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3100. Concepts::.
  3101. These functions, defined by TS 18661-1:2014 and TS 18661-3:2015,
  3102. set the object pointed to by X to a quiet NaN with payload PAYLOAD
  3103. and a zero sign bit and return zero. If PAYLOAD is not a
  3104. positive-signed integer that is a valid payload for a quiet NaN of
  3105. the given type, the object pointed to by X is set to positive zero
  3106. and a nonzero value is returned. They raise no floating-point
  3107. exceptions.
  3108. -- Function: int setpayloadsig (double *X, double PAYLOAD)
  3109. -- Function: int setpayloadsigf (float *X, float PAYLOAD)
  3110. -- Function: int setpayloadsigl (long double *X, long double PAYLOAD)
  3111. -- Function: int setpayloadsigfN (_FloatN *X, _FloatN PAYLOAD)
  3112. -- Function: int setpayloadsigfNx (_FloatNx *X, _FloatNx PAYLOAD)
  3113. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3114. Concepts::.
  3115. These functions, defined by TS 18661-1:2014 and TS 18661-3:2015,
  3116. set the object pointed to by X to a signaling NaN with payload
  3117. PAYLOAD and a zero sign bit and return zero. If PAYLOAD is not a
  3118. positive-signed integer that is a valid payload for a signaling NaN
  3119. of the given type, the object pointed to by X is set to positive
  3120. zero and a nonzero value is returned. They raise no floating-point
  3121. exceptions.
  3122. 
  3123. File: libc.info, Node: FP Comparison Functions, Next: Misc FP Arithmetic, Prev: FP Bit Twiddling, Up: Arithmetic Functions
  3124. 20.8.6 Floating-Point Comparison Functions
  3125. ------------------------------------------
  3126. The standard C comparison operators provoke exceptions when one or other
  3127. of the operands is NaN. For example,
  3128. int v = a < 1.0;
  3129. will raise an exception if A is NaN. (This does _not_ happen with ‘==’
  3130. and ‘!=’; those merely return false and true, respectively, when NaN is
  3131. examined.) Frequently this exception is undesirable. ISO C99 therefore
  3132. defines comparison functions that do not raise exceptions when NaN is
  3133. examined. All of the functions are implemented as macros which allow
  3134. their arguments to be of any floating-point type. The macros are
  3135. guaranteed to evaluate their arguments only once. TS 18661-1:2014 adds
  3136. such a macro for an equality comparison that _does_ raise an exception
  3137. for a NaN argument; it also adds functions that provide a total ordering
  3138. on all floating-point values, including NaNs, without raising any
  3139. exceptions even for signaling NaNs.
  3140. -- Macro: int isgreater (_real-floating_ X, _real-floating_ Y)
  3141. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3142. Concepts::.
  3143. This macro determines whether the argument X is greater than Y. It
  3144. is equivalent to ‘(X) > (Y)’, but no exception is raised if X or Y
  3145. are NaN.
  3146. -- Macro: int isgreaterequal (_real-floating_ X, _real-floating_ Y)
  3147. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3148. Concepts::.
  3149. This macro determines whether the argument X is greater than or
  3150. equal to Y. It is equivalent to ‘(X) >= (Y)’, but no exception is
  3151. raised if X or Y are NaN.
  3152. -- Macro: int isless (_real-floating_ X, _real-floating_ Y)
  3153. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3154. Concepts::.
  3155. This macro determines whether the argument X is less than Y. It is
  3156. equivalent to ‘(X) < (Y)’, but no exception is raised if X or Y are
  3157. NaN.
  3158. -- Macro: int islessequal (_real-floating_ X, _real-floating_ Y)
  3159. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3160. Concepts::.
  3161. This macro determines whether the argument X is less than or equal
  3162. to Y. It is equivalent to ‘(X) <= (Y)’, but no exception is raised
  3163. if X or Y are NaN.
  3164. -- Macro: int islessgreater (_real-floating_ X, _real-floating_ Y)
  3165. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3166. Concepts::.
  3167. This macro determines whether the argument X is less or greater
  3168. than Y. It is equivalent to ‘(X) < (Y) || (X) > (Y)’ (although it
  3169. only evaluates X and Y once), but no exception is raised if X or Y
  3170. are NaN.
  3171. This macro is not equivalent to ‘X != Y’, because that expression
  3172. is true if X or Y are NaN.
  3173. -- Macro: int isunordered (_real-floating_ X, _real-floating_ Y)
  3174. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3175. Concepts::.
  3176. This macro determines whether its arguments are unordered. In
  3177. other words, it is true if X or Y are NaN, and false otherwise.
  3178. -- Macro: int iseqsig (_real-floating_ X, _real-floating_ Y)
  3179. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3180. Concepts::.
  3181. This macro determines whether its arguments are equal. It is
  3182. equivalent to ‘(X) == (Y)’, but it raises the invalid exception and
  3183. sets ‘errno’ to ‘EDOM’ if either argument is a NaN.
  3184. -- Function: int totalorder (const double *X, const double *Y)
  3185. -- Function: int totalorderf (const float *X, const float *Y)
  3186. -- Function: int totalorderl (const long double *X, const long double
  3187. *Y)
  3188. -- Function: int totalorderfN (const _FloatN *X, const _FloatN *Y)
  3189. -- Function: int totalorderfNx (const _FloatNx *X, const _FloatNx *Y)
  3190. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3191. Concepts::.
  3192. These functions determine whether the total order relationship,
  3193. defined in IEEE 754-2008, is true for ‘*X’ and ‘*Y’, returning
  3194. nonzero if it is true and zero if it is false. No exceptions are
  3195. raised even for signaling NaNs. The relationship is true if they
  3196. are the same floating-point value (including sign for zero and
  3197. NaNs, and payload for NaNs), or if ‘*X’ comes before ‘*Y’ in the
  3198. following order: negative quiet NaNs, in order of decreasing
  3199. payload; negative signaling NaNs, in order of decreasing payload;
  3200. negative infinity; finite numbers, in ascending order, with
  3201. negative zero before positive zero; positive infinity; positive
  3202. signaling NaNs, in order of increasing payload; positive quiet
  3203. NaNs, in order of increasing payload.
  3204. -- Function: int totalordermag (const double *X, const double *Y)
  3205. -- Function: int totalordermagf (const float *X, const float *Y)
  3206. -- Function: int totalordermagl (const long double *X, const long
  3207. double *Y)
  3208. -- Function: int totalordermagfN (const _FloatN *X, const _FloatN *Y)
  3209. -- Function: int totalordermagfNx (const _FloatNx *X, const _FloatNx
  3210. *Y)
  3211. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3212. Concepts::.
  3213. These functions determine whether the total order relationship,
  3214. defined in IEEE 754-2008, is true for the absolute values of ‘*X’
  3215. and ‘*Y’, returning nonzero if it is true and zero if it is false.
  3216. No exceptions are raised even for signaling NaNs.
  3217. Not all machines provide hardware support for these operations. On
  3218. machines that don't, the macros can be very slow. Therefore, you should
  3219. not use these functions when NaN is not a concern.
  3220. *NB:* There are no macros ‘isequal’ or ‘isunequal’. They are
  3221. unnecessary, because the ‘==’ and ‘!=’ operators do _not_ throw an
  3222. exception if one or both of the operands are NaN.
  3223. 
  3224. File: libc.info, Node: Misc FP Arithmetic, Prev: FP Comparison Functions, Up: Arithmetic Functions
  3225. 20.8.7 Miscellaneous FP arithmetic functions
  3226. --------------------------------------------
  3227. The functions in this section perform miscellaneous but common
  3228. operations that are awkward to express with C operators. On some
  3229. processors these functions can use special machine instructions to
  3230. perform these operations faster than the equivalent C code.
  3231. -- Function: double fmin (double X, double Y)
  3232. -- Function: float fminf (float X, float Y)
  3233. -- Function: long double fminl (long double X, long double Y)
  3234. -- Function: _FloatN fminfN (_FloatN X, _FloatN Y)
  3235. -- Function: _FloatNx fminfNx (_FloatNx X, _FloatNx Y)
  3236. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3237. Concepts::.
  3238. The ‘fmin’ function returns the lesser of the two values X and Y.
  3239. It is similar to the expression
  3240. ((x) < (y) ? (x) : (y))
  3241. except that X and Y are only evaluated once.
  3242. If an argument is a quiet NaN, the other argument is returned. If
  3243. both arguments are NaN, or either is a signaling NaN, NaN is
  3244. returned.
  3245. -- Function: double fmax (double X, double Y)
  3246. -- Function: float fmaxf (float X, float Y)
  3247. -- Function: long double fmaxl (long double X, long double Y)
  3248. -- Function: _FloatN fmaxfN (_FloatN X, _FloatN Y)
  3249. -- Function: _FloatNx fmaxfNx (_FloatNx X, _FloatNx Y)
  3250. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3251. Concepts::.
  3252. The ‘fmax’ function returns the greater of the two values X and Y.
  3253. If an argument is a quiet NaN, the other argument is returned. If
  3254. both arguments are NaN, or either is a signaling NaN, NaN is
  3255. returned.
  3256. -- Function: double fminimum (double X, double Y)
  3257. -- Function: float fminimumf (float X, float Y)
  3258. -- Function: long double fminimuml (long double X, long double Y)
  3259. -- Function: _FloatN fminimumfN (_FloatN X, _FloatN Y)
  3260. -- Function: _FloatNx fminimumfNx (_FloatNx X, _FloatNx Y)
  3261. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3262. Concepts::.
  3263. The ‘fminimum’ function returns the lesser of the two values X and
  3264. Y. Unlike ‘fmin’, if either argument is a NaN, NaN is returned.
  3265. Positive zero is treated as greater than negative zero.
  3266. -- Function: double fmaximum (double X, double Y)
  3267. -- Function: float fmaximumf (float X, float Y)
  3268. -- Function: long double fmaximuml (long double X, long double Y)
  3269. -- Function: _FloatN fmaximumfN (_FloatN X, _FloatN Y)
  3270. -- Function: _FloatNx fmaximumfNx (_FloatNx X, _FloatNx Y)
  3271. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3272. Concepts::.
  3273. The ‘fmaximum’ function returns the greater of the two values X and
  3274. Y. Unlike ‘fmax’, if either argument is a NaN, NaN is returned.
  3275. Positive zero is treated as greater than negative zero.
  3276. -- Function: double fminimum_num (double X, double Y)
  3277. -- Function: float fminimum_numf (float X, float Y)
  3278. -- Function: long double fminimum_numl (long double X, long double Y)
  3279. -- Function: _FloatN fminimum_numfN (_FloatN X, _FloatN Y)
  3280. -- Function: _FloatNx fminimum_numfNx (_FloatNx X, _FloatNx Y)
  3281. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3282. Concepts::.
  3283. The ‘fminimum_num’ function returns the lesser of the two values X
  3284. and Y. If one argument is a number and the other is a NaN, even a
  3285. signaling NaN, the number is returned. Positive zero is treated as
  3286. greater than negative zero.
  3287. -- Function: double fmaximum_num (double X, double Y)
  3288. -- Function: float fmaximum_numf (float X, float Y)
  3289. -- Function: long double fmaximum_numl (long double X, long double Y)
  3290. -- Function: _FloatN fmaximum_numfN (_FloatN X, _FloatN Y)
  3291. -- Function: _FloatNx fmaximum_numfNx (_FloatNx X, _FloatNx Y)
  3292. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3293. Concepts::.
  3294. The ‘fmaximum_num’ function returns the greater of the two values X
  3295. and Y. If one argument is a number and the other is a NaN, even a
  3296. signaling NaN, the number is returned. Positive zero is treated as
  3297. greater than negative zero.
  3298. -- Function: double fminmag (double X, double Y)
  3299. -- Function: float fminmagf (float X, float Y)
  3300. -- Function: long double fminmagl (long double X, long double Y)
  3301. -- Function: _FloatN fminmagfN (_FloatN X, _FloatN Y)
  3302. -- Function: _FloatNx fminmagfNx (_FloatNx X, _FloatNx Y)
  3303. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3304. Concepts::.
  3305. These functions, from TS 18661-1:2014 and TS 18661-3:2015, return
  3306. whichever of the two values X and Y has the smaller absolute value.
  3307. If both have the same absolute value, or either is NaN, they behave
  3308. the same as the ‘fmin’ functions.
  3309. -- Function: double fmaxmag (double X, double Y)
  3310. -- Function: float fmaxmagf (float X, float Y)
  3311. -- Function: long double fmaxmagl (long double X, long double Y)
  3312. -- Function: _FloatN fmaxmagfN (_FloatN X, _FloatN Y)
  3313. -- Function: _FloatNx fmaxmagfNx (_FloatNx X, _FloatNx Y)
  3314. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3315. Concepts::.
  3316. These functions, from TS 18661-1:2014, return whichever of the two
  3317. values X and Y has the greater absolute value. If both have the
  3318. same absolute value, or either is NaN, they behave the same as the
  3319. ‘fmax’ functions.
  3320. -- Function: double fminimum_mag (double X, double Y)
  3321. -- Function: float fminimum_magf (float X, float Y)
  3322. -- Function: long double fminimum_magl (long double X, long double Y)
  3323. -- Function: _FloatN fminimum_magfN (_FloatN X, _FloatN Y)
  3324. -- Function: _FloatNx fminimum_magfNx (_FloatNx X, _FloatNx Y)
  3325. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3326. Concepts::.
  3327. These functions return whichever of the two values X and Y has the
  3328. smaller absolute value. If both have the same absolute value, or
  3329. either is NaN, they behave the same as the ‘fminimum’ functions.
  3330. -- Function: double fmaximum_mag (double X, double Y)
  3331. -- Function: float fmaximum_magf (float X, float Y)
  3332. -- Function: long double fmaximum_magl (long double X, long double Y)
  3333. -- Function: _FloatN fmaximum_magfN (_FloatN X, _FloatN Y)
  3334. -- Function: _FloatNx fmaximum_magfNx (_FloatNx X, _FloatNx Y)
  3335. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3336. Concepts::.
  3337. These functions return whichever of the two values X and Y has the
  3338. greater absolute value. If both have the same absolute value, or
  3339. either is NaN, they behave the same as the ‘fmaximum’ functions.
  3340. -- Function: double fminimum_mag_num (double X, double Y)
  3341. -- Function: float fminimum_mag_numf (float X, float Y)
  3342. -- Function: long double fminimum_mag_numl (long double X, long double
  3343. Y)
  3344. -- Function: _FloatN fminimum_mag_numfN (_FloatN X, _FloatN Y)
  3345. -- Function: _FloatNx fminimum_mag_numfNx (_FloatNx X, _FloatNx Y)
  3346. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3347. Concepts::.
  3348. These functions return whichever of the two values X and Y has the
  3349. smaller absolute value. If both have the same absolute value, or
  3350. either is NaN, they behave the same as the ‘fminimum_num’
  3351. functions.
  3352. -- Function: double fmaximum_mag_num (double X, double Y)
  3353. -- Function: float fmaximum_mag_numf (float X, float Y)
  3354. -- Function: long double fmaximum_mag_numl (long double X, long double
  3355. Y)
  3356. -- Function: _FloatN fmaximum_mag_numfN (_FloatN X, _FloatN Y)
  3357. -- Function: _FloatNx fmaximum_mag_numfNx (_FloatNx X, _FloatNx Y)
  3358. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3359. Concepts::.
  3360. These functions return whichever of the two values X and Y has the
  3361. greater absolute value. If both have the same absolute value, or
  3362. either is NaN, they behave the same as the ‘fmaximum_num’
  3363. functions.
  3364. -- Function: double fdim (double X, double Y)
  3365. -- Function: float fdimf (float X, float Y)
  3366. -- Function: long double fdiml (long double X, long double Y)
  3367. -- Function: _FloatN fdimfN (_FloatN X, _FloatN Y)
  3368. -- Function: _FloatNx fdimfNx (_FloatNx X, _FloatNx Y)
  3369. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3370. Concepts::.
  3371. The ‘fdim’ function returns the positive difference between X and
  3372. Y. The positive difference is X - Y if X is greater than Y, and 0
  3373. otherwise.
  3374. If X, Y, or both are NaN, NaN is returned.
  3375. -- Function: double fma (double X, double Y, double Z)
  3376. -- Function: float fmaf (float X, float Y, float Z)
  3377. -- Function: long double fmal (long double X, long double Y, long
  3378. double Z)
  3379. -- Function: _FloatN fmafN (_FloatN X, _FloatN Y, _FloatN Z)
  3380. -- Function: _FloatNx fmafNx (_FloatNx X, _FloatNx Y, _FloatNx Z)
  3381. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3382. Concepts::.
  3383. The ‘fma’ function performs floating-point multiply-add. This is
  3384. the operation (X * Y) + Z, but the intermediate result is not
  3385. rounded to the destination type. This can sometimes improve the
  3386. precision of a calculation.
  3387. This function was introduced because some processors have a special
  3388. instruction to perform multiply-add. The C compiler cannot use it
  3389. directly, because the expression ‘x*y + z’ is defined to round the
  3390. intermediate result. ‘fma’ lets you choose when you want to round
  3391. only once.
  3392. On processors which do not implement multiply-add in hardware,
  3393. ‘fma’ can be very slow since it must avoid intermediate rounding.
  3394. ‘math.h’ defines the symbols ‘FP_FAST_FMA’, ‘FP_FAST_FMAF’, and
  3395. ‘FP_FAST_FMAL’ when the corresponding version of ‘fma’ is no slower
  3396. than the expression ‘x*y + z’. In the GNU C Library, this always
  3397. means the operation is implemented in hardware.
  3398. -- Function: float fadd (double X, double Y)
  3399. -- Function: float faddl (long double X, long double Y)
  3400. -- Function: double daddl (long double X, long double Y)
  3401. -- Function: _FloatM fMaddfN (_FloatN X, _FloatN Y)
  3402. -- Function: _FloatM fMaddfNx (_FloatNx X, _FloatNx Y)
  3403. -- Function: _FloatMx fMxaddfN (_FloatN X, _FloatN Y)
  3404. -- Function: _FloatMx fMxaddfNx (_FloatNx X, _FloatNx Y)
  3405. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3406. Concepts::.
  3407. These functions, from TS 18661-1:2014 and TS 18661-3:2015, return X
  3408. + Y, rounded once to the return type of the function without any
  3409. intermediate rounding to the type of the arguments.
  3410. -- Function: float fsub (double X, double Y)
  3411. -- Function: float fsubl (long double X, long double Y)
  3412. -- Function: double dsubl (long double X, long double Y)
  3413. -- Function: _FloatM fMsubfN (_FloatN X, _FloatN Y)
  3414. -- Function: _FloatM fMsubfNx (_FloatNx X, _FloatNx Y)
  3415. -- Function: _FloatMx fMxsubfN (_FloatN X, _FloatN Y)
  3416. -- Function: _FloatMx fMxsubfNx (_FloatNx X, _FloatNx Y)
  3417. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3418. Concepts::.
  3419. These functions, from TS 18661-1:2014 and TS 18661-3:2015, return X
  3420. - Y, rounded once to the return type of the function without any
  3421. intermediate rounding to the type of the arguments.
  3422. -- Function: float fmul (double X, double Y)
  3423. -- Function: float fmull (long double X, long double Y)
  3424. -- Function: double dmull (long double X, long double Y)
  3425. -- Function: _FloatM fMmulfN (_FloatN X, _FloatN Y)
  3426. -- Function: _FloatM fMmulfNx (_FloatNx X, _FloatNx Y)
  3427. -- Function: _FloatMx fMxmulfN (_FloatN X, _FloatN Y)
  3428. -- Function: _FloatMx fMxmulfNx (_FloatNx X, _FloatNx Y)
  3429. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3430. Concepts::.
  3431. These functions, from TS 18661-1:2014 and TS 18661-3:2015, return X
  3432. * Y, rounded once to the return type of the function without any
  3433. intermediate rounding to the type of the arguments.
  3434. -- Function: float fdiv (double X, double Y)
  3435. -- Function: float fdivl (long double X, long double Y)
  3436. -- Function: double ddivl (long double X, long double Y)
  3437. -- Function: _FloatM fMdivfN (_FloatN X, _FloatN Y)
  3438. -- Function: _FloatM fMdivfNx (_FloatNx X, _FloatNx Y)
  3439. -- Function: _FloatMx fMxdivfN (_FloatN X, _FloatN Y)
  3440. -- Function: _FloatMx fMxdivfNx (_FloatNx X, _FloatNx Y)
  3441. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3442. Concepts::.
  3443. These functions, from TS 18661-1:2014 and TS 18661-3:2015, return X
  3444. / Y, rounded once to the return type of the function without any
  3445. intermediate rounding to the type of the arguments.
  3446. -- Function: float fsqrt (double X)
  3447. -- Function: float fsqrtl (long double X)
  3448. -- Function: double dsqrtl (long double X)
  3449. -- Function: _FloatM fMsqrtfN (_FloatN X)
  3450. -- Function: _FloatM fMsqrtfNx (_FloatNx X)
  3451. -- Function: _FloatMx fMxsqrtfN (_FloatN X)
  3452. -- Function: _FloatMx fMxsqrtfNx (_FloatNx X)
  3453. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3454. Concepts::.
  3455. These functions, from TS 18661-1:2014 and TS 18661-3:2015, return
  3456. the square root of X, rounded once to the return type of the
  3457. function without any intermediate rounding to the type of the
  3458. arguments.
  3459. -- Function: float ffma (double X, double Y, double Z)
  3460. -- Function: float ffmal (long double X, long double Y, long double Z)
  3461. -- Function: double dfmal (long double X, long double Y, long double Z)
  3462. -- Function: _FloatM fMfmafN (_FloatN X, _FloatN Y, _FloatN Z)
  3463. -- Function: _FloatM fMfmafNx (_FloatNx X, _FloatNx Y, _FloatNx Z)
  3464. -- Function: _FloatMx fMxfmafN (_FloatN X, _FloatN Y, _FloatN Z)
  3465. -- Function: _FloatMx fMxfmafNx (_FloatNx X, _FloatNx Y, _FloatNx Z)
  3466. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3467. Concepts::.
  3468. These functions, from TS 18661-1:2014 and TS 18661-3:2015, return
  3469. (X * Y) + Z, rounded once to the return type of the function
  3470. without any intermediate rounding to the type of the arguments and
  3471. without any intermediate rounding of result of the multiplication.
  3472. 
  3473. File: libc.info, Node: Complex Numbers, Next: Operations on Complex, Prev: Arithmetic Functions, Up: Arithmetic
  3474. 20.9 Complex Numbers
  3475. ====================
  3476. ISO C99 introduces support for complex numbers in C. This is done with a
  3477. new type qualifier, ‘complex’. It is a keyword if and only if
  3478. ‘complex.h’ has been included. There are three complex types,
  3479. corresponding to the three real types: ‘float complex’, ‘double
  3480. complex’, and ‘long double complex’.
  3481. Likewise, on machines that have support for ‘_FloatN’ or ‘_FloatNx’
  3482. enabled, the complex types ‘_FloatN complex’ and ‘_FloatNx complex’ are
  3483. also available if ‘complex.h’ has been included; *note Mathematics::.
  3484. To construct complex numbers you need a way to indicate the imaginary
  3485. part of a number. There is no standard notation for an imaginary
  3486. floating point constant. Instead, ‘complex.h’ defines two macros that
  3487. can be used to create complex numbers.
  3488. -- Macro: const float complex _Complex_I
  3489. This macro is a representation of the complex number "0+1i".
  3490. Multiplying a real floating-point value by ‘_Complex_I’ gives a
  3491. complex number whose value is purely imaginary. You can use this
  3492. to construct complex constants:
  3493. 3.0 + 4.0i = 3.0 + 4.0 * _Complex_I
  3494. Note that ‘_Complex_I * _Complex_I’ has the value ‘-1’, but the
  3495. type of that value is ‘complex’.
  3496. ‘_Complex_I’ is a bit of a mouthful. ‘complex.h’ also defines a shorter
  3497. name for the same constant.
  3498. -- Macro: const float complex I
  3499. This macro has exactly the same value as ‘_Complex_I’. Most of the
  3500. time it is preferable. However, it causes problems if you want to
  3501. use the identifier ‘I’ for something else. You can safely write
  3502. #include <complex.h>
  3503. #undef I
  3504. if you need ‘I’ for your own purposes. (In that case we recommend
  3505. you also define some other short name for ‘_Complex_I’, such as
  3506. ‘J’.)
  3507. 
  3508. File: libc.info, Node: Operations on Complex, Next: Parsing of Numbers, Prev: Complex Numbers, Up: Arithmetic
  3509. 20.10 Projections, Conjugates, and Decomposing of Complex Numbers
  3510. =================================================================
  3511. ISO C99 also defines functions that perform basic operations on complex
  3512. numbers, such as decomposition and conjugation. The prototypes for all
  3513. these functions are in ‘complex.h’. All functions are available in
  3514. three variants, one for each of the three complex types.
  3515. -- Function: double creal (complex double Z)
  3516. -- Function: float crealf (complex float Z)
  3517. -- Function: long double creall (complex long double Z)
  3518. -- Function: _FloatN crealfN (complex _FloatN Z)
  3519. -- Function: _FloatNx crealfNx (complex _FloatNx Z)
  3520. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3521. Concepts::.
  3522. These functions return the real part of the complex number Z.
  3523. -- Function: double cimag (complex double Z)
  3524. -- Function: float cimagf (complex float Z)
  3525. -- Function: long double cimagl (complex long double Z)
  3526. -- Function: _FloatN cimagfN (complex _FloatN Z)
  3527. -- Function: _FloatNx cimagfNx (complex _FloatNx Z)
  3528. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3529. Concepts::.
  3530. These functions return the imaginary part of the complex number Z.
  3531. -- Function: complex double conj (complex double Z)
  3532. -- Function: complex float conjf (complex float Z)
  3533. -- Function: complex long double conjl (complex long double Z)
  3534. -- Function: complex _FloatN conjfN (complex _FloatN Z)
  3535. -- Function: complex _FloatNx conjfNx (complex _FloatNx Z)
  3536. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3537. Concepts::.
  3538. These functions return the conjugate value of the complex number Z.
  3539. The conjugate of a complex number has the same real part and a
  3540. negated imaginary part. In other words, ‘conj(a + bi) = a + -bi’.
  3541. -- Function: double carg (complex double Z)
  3542. -- Function: float cargf (complex float Z)
  3543. -- Function: long double cargl (complex long double Z)
  3544. -- Function: _FloatN cargfN (complex _FloatN Z)
  3545. -- Function: _FloatNx cargfNx (complex _FloatNx Z)
  3546. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3547. Concepts::.
  3548. These functions return the argument of the complex number Z. The
  3549. argument of a complex number is the angle in the complex plane
  3550. between the positive real axis and a line passing through zero and
  3551. the number. This angle is measured in the usual fashion and ranges
  3552. from -pi to pi.
  3553. ‘carg’ has a branch cut along the negative real axis.
  3554. -- Function: complex double cproj (complex double Z)
  3555. -- Function: complex float cprojf (complex float Z)
  3556. -- Function: complex long double cprojl (complex long double Z)
  3557. -- Function: complex _FloatN cprojfN (complex _FloatN Z)
  3558. -- Function: complex _FloatNx cprojfNx (complex _FloatNx Z)
  3559. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3560. Concepts::.
  3561. These functions return the projection of the complex value Z onto
  3562. the Riemann sphere. Values with an infinite imaginary part are
  3563. projected to positive infinity on the real axis, even if the real
  3564. part is NaN. If the real part is infinite, the result is equivalent
  3565. to
  3566. INFINITY + I * copysign (0.0, cimag (z))
  3567. 
  3568. File: libc.info, Node: Parsing of Numbers, Next: Printing of Floats, Prev: Operations on Complex, Up: Arithmetic
  3569. 20.11 Parsing of Numbers
  3570. ========================
  3571. This section describes functions for "reading" integer and
  3572. floating-point numbers from a string. It may be more convenient in some
  3573. cases to use ‘sscanf’ or one of the related functions; see *note
  3574. Formatted Input::. But often you can make a program more robust by
  3575. finding the tokens in the string by hand, then converting the numbers
  3576. one by one.
  3577. * Menu:
  3578. * Parsing of Integers:: Functions for conversion of integer values.
  3579. * Parsing of Floats:: Functions for conversion of floating-point
  3580. values.
  3581. 
  3582. File: libc.info, Node: Parsing of Integers, Next: Parsing of Floats, Up: Parsing of Numbers
  3583. 20.11.1 Parsing of Integers
  3584. ---------------------------
  3585. The ‘str’ functions are declared in ‘stdlib.h’ and those beginning with
  3586. ‘wcs’ are declared in ‘wchar.h’. One might wonder about the use of
  3587. ‘restrict’ in the prototypes of the functions in this section. It is
  3588. seemingly useless but the ISO C standard uses it (for the functions
  3589. defined there) so we have to do it as well.
  3590. -- Function: long int strtol (const char *restrict STRING, char
  3591. **restrict TAILPTR, int BASE)
  3592. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3593. Safety Concepts::.
  3594. The ‘strtol’ ("string-to-long") function converts the initial part
  3595. of STRING to a signed integer, which is returned as a value of type
  3596. ‘long int’.
  3597. This function attempts to decompose STRING as follows:
  3598. • A (possibly empty) sequence of whitespace characters. Which
  3599. characters are whitespace is determined by the ‘isspace’
  3600. function (*note Classification of Characters::). These are
  3601. discarded.
  3602. • An optional plus or minus sign (‘+’ or ‘-’).
  3603. • A nonempty sequence of digits in the radix specified by BASE.
  3604. If BASE is zero, decimal radix is assumed unless the series of
  3605. digits begins with ‘0’ (specifying octal radix), or ‘0x’ or
  3606. ‘0X’ (specifying hexadecimal radix), or ‘0b’ or ‘0B’
  3607. (specifying binary radix; only supported when C23 features are
  3608. enabled); in other words, the same syntax used for integer
  3609. constants in C.
  3610. Otherwise BASE must have a value between ‘2’ and ‘36’. If
  3611. BASE is ‘16’, the digits may optionally be preceded by ‘0x’ or
  3612. ‘0X’. If BASE is ‘2’, and C23 features are enabled, the
  3613. digits may optionally be preceded by ‘0b’ or ‘0B’. If base
  3614. has no legal value the value returned is ‘0l’ and the global
  3615. variable ‘errno’ is set to ‘EINVAL’.
  3616. • Any remaining characters in the string. If TAILPTR is not a
  3617. null pointer, ‘strtol’ stores a pointer to this tail in
  3618. ‘*TAILPTR’.
  3619. If the string is empty, contains only whitespace, or does not
  3620. contain an initial substring that has the expected syntax for an
  3621. integer in the specified BASE, no conversion is performed. In this
  3622. case, ‘strtol’ returns a value of zero and the value stored in
  3623. ‘*TAILPTR’ is the value of STRING.
  3624. In a locale other than the standard ‘"C"’ locale, this function may
  3625. recognize additional implementation-dependent syntax.
  3626. If the string has valid syntax for an integer but the value is not
  3627. representable because of overflow, ‘strtol’ returns either
  3628. ‘LONG_MAX’ or ‘LONG_MIN’ (*note Range of Type::), as appropriate
  3629. for the sign of the value. It also sets ‘errno’ to ‘ERANGE’ to
  3630. indicate there was overflow.
  3631. You should not check for errors by examining the return value of
  3632. ‘strtol’, because the string might be a valid representation of
  3633. ‘0l’, ‘LONG_MAX’, or ‘LONG_MIN’. Instead, check whether TAILPTR
  3634. points to what you expect after the number (e.g. ‘'\0'’ if the
  3635. string should end after the number). You also need to clear
  3636. ‘errno’ before the call and check it afterward, in case there was
  3637. overflow.
  3638. There is an example at the end of this section.
  3639. -- Function: long int wcstol (const wchar_t *restrict STRING, wchar_t
  3640. **restrict TAILPTR, int BASE)
  3641. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3642. Safety Concepts::.
  3643. The ‘wcstol’ function is equivalent to the ‘strtol’ function in
  3644. nearly all aspects but handles wide character strings.
  3645. The ‘wcstol’ function was introduced in Amendment 1 of ISO C90.
  3646. -- Function: unsigned long int strtoul (const char *restrict STRING,
  3647. char **restrict TAILPTR, int BASE)
  3648. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3649. Safety Concepts::.
  3650. The ‘strtoul’ ("string-to-unsigned-long") function is like ‘strtol’
  3651. except it converts to an ‘unsigned long int’ value. The syntax is
  3652. the same as described above for ‘strtol’. The value returned on
  3653. overflow is ‘ULONG_MAX’ (*note Range of Type::).
  3654. If STRING depicts a negative number, ‘strtoul’ acts the same as
  3655. STRTOL but casts the result to an unsigned integer. That means for
  3656. example that ‘strtoul’ on ‘"-1"’ returns ‘ULONG_MAX’ and an input
  3657. more negative than ‘LONG_MIN’ returns (‘ULONG_MAX’ + 1) / 2.
  3658. ‘strtoul’ sets ‘errno’ to ‘EINVAL’ if BASE is out of range, or
  3659. ‘ERANGE’ on overflow.
  3660. -- Function: unsigned long int wcstoul (const wchar_t *restrict STRING,
  3661. wchar_t **restrict TAILPTR, int BASE)
  3662. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3663. Safety Concepts::.
  3664. The ‘wcstoul’ function is equivalent to the ‘strtoul’ function in
  3665. nearly all aspects but handles wide character strings.
  3666. The ‘wcstoul’ function was introduced in Amendment 1 of ISO C90.
  3667. -- Function: long long int strtoll (const char *restrict STRING, char
  3668. **restrict TAILPTR, int BASE)
  3669. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3670. Safety Concepts::.
  3671. The ‘strtoll’ function is like ‘strtol’ except that it returns a
  3672. ‘long long int’ value, and accepts numbers with a correspondingly
  3673. larger range.
  3674. If the string has valid syntax for an integer but the value is not
  3675. representable because of overflow, ‘strtoll’ returns either
  3676. ‘LLONG_MAX’ or ‘LLONG_MIN’ (*note Range of Type::), as appropriate
  3677. for the sign of the value. It also sets ‘errno’ to ‘ERANGE’ to
  3678. indicate there was overflow.
  3679. The ‘strtoll’ function was introduced in ISO C99.
  3680. -- Function: long long int wcstoll (const wchar_t *restrict STRING,
  3681. wchar_t **restrict TAILPTR, int BASE)
  3682. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3683. Safety Concepts::.
  3684. The ‘wcstoll’ function is equivalent to the ‘strtoll’ function in
  3685. nearly all aspects but handles wide character strings.
  3686. The ‘wcstoll’ function was introduced in Amendment 1 of ISO C90.
  3687. -- Function: long long int strtoq (const char *restrict STRING, char
  3688. **restrict TAILPTR, int BASE)
  3689. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3690. Safety Concepts::.
  3691. ‘strtoq’ ("string-to-quad-word") is the BSD name for ‘strtoll’.
  3692. -- Function: long long int wcstoq (const wchar_t *restrict STRING,
  3693. wchar_t **restrict TAILPTR, int BASE)
  3694. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3695. Safety Concepts::.
  3696. The ‘wcstoq’ function is equivalent to the ‘strtoq’ function in
  3697. nearly all aspects but handles wide character strings.
  3698. The ‘wcstoq’ function is a GNU extension.
  3699. -- Function: unsigned long long int strtoull (const char *restrict
  3700. STRING, char **restrict TAILPTR, int BASE)
  3701. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3702. Safety Concepts::.
  3703. The ‘strtoull’ function is related to ‘strtoll’ the same way
  3704. ‘strtoul’ is related to ‘strtol’.
  3705. The ‘strtoull’ function was introduced in ISO C99.
  3706. -- Function: unsigned long long int wcstoull (const wchar_t *restrict
  3707. STRING, wchar_t **restrict TAILPTR, int BASE)
  3708. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3709. Safety Concepts::.
  3710. The ‘wcstoull’ function is equivalent to the ‘strtoull’ function in
  3711. nearly all aspects but handles wide character strings.
  3712. The ‘wcstoull’ function was introduced in Amendment 1 of ISO C90.
  3713. -- Function: unsigned long long int strtouq (const char *restrict
  3714. STRING, char **restrict TAILPTR, int BASE)
  3715. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3716. Safety Concepts::.
  3717. ‘strtouq’ is the BSD name for ‘strtoull’.
  3718. -- Function: unsigned long long int wcstouq (const wchar_t *restrict
  3719. STRING, wchar_t **restrict TAILPTR, int BASE)
  3720. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3721. Safety Concepts::.
  3722. The ‘wcstouq’ function is equivalent to the ‘strtouq’ function in
  3723. nearly all aspects but handles wide character strings.
  3724. The ‘wcstouq’ function is a GNU extension.
  3725. -- Function: intmax_t strtoimax (const char *restrict STRING, char
  3726. **restrict TAILPTR, int BASE)
  3727. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3728. Safety Concepts::.
  3729. The ‘strtoimax’ function is like ‘strtol’ except that it returns a
  3730. ‘intmax_t’ value, and accepts numbers of a corresponding range.
  3731. If the string has valid syntax for an integer but the value is not
  3732. representable because of overflow, ‘strtoimax’ returns either
  3733. ‘INTMAX_MAX’ or ‘INTMAX_MIN’ (*note Integers::), as appropriate for
  3734. the sign of the value. It also sets ‘errno’ to ‘ERANGE’ to
  3735. indicate there was overflow.
  3736. See *note Integers:: for a description of the ‘intmax_t’ type. The
  3737. ‘strtoimax’ function was introduced in ISO C99.
  3738. -- Function: intmax_t wcstoimax (const wchar_t *restrict STRING,
  3739. wchar_t **restrict TAILPTR, int BASE)
  3740. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3741. Safety Concepts::.
  3742. The ‘wcstoimax’ function is equivalent to the ‘strtoimax’ function
  3743. in nearly all aspects but handles wide character strings.
  3744. The ‘wcstoimax’ function was introduced in ISO C99.
  3745. -- Function: uintmax_t strtoumax (const char *restrict STRING, char
  3746. **restrict TAILPTR, int BASE)
  3747. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3748. Safety Concepts::.
  3749. The ‘strtoumax’ function is related to ‘strtoimax’ the same way
  3750. that ‘strtoul’ is related to ‘strtol’.
  3751. See *note Integers:: for a description of the ‘intmax_t’ type. The
  3752. ‘strtoumax’ function was introduced in ISO C99.
  3753. -- Function: uintmax_t wcstoumax (const wchar_t *restrict STRING,
  3754. wchar_t **restrict TAILPTR, int BASE)
  3755. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3756. Safety Concepts::.
  3757. The ‘wcstoumax’ function is equivalent to the ‘strtoumax’ function
  3758. in nearly all aspects but handles wide character strings.
  3759. The ‘wcstoumax’ function was introduced in ISO C99.
  3760. -- Function: long int atol (const char *STRING)
  3761. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3762. Safety Concepts::.
  3763. This function is similar to the ‘strtol’ function with a BASE
  3764. argument of ‘10’, except that it need not detect overflow errors.
  3765. The ‘atol’ function is provided mostly for compatibility with
  3766. existing code; using ‘strtol’ is more robust.
  3767. -- Function: int atoi (const char *STRING)
  3768. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3769. Safety Concepts::.
  3770. This function is like ‘atol’, except that it returns an ‘int’. The
  3771. ‘atoi’ function is also considered obsolete; use ‘strtol’ instead.
  3772. -- Function: long long int atoll (const char *STRING)
  3773. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3774. Safety Concepts::.
  3775. This function is similar to ‘atol’, except it returns a ‘long long
  3776. int’.
  3777. The ‘atoll’ function was introduced in ISO C99. It too is obsolete
  3778. (despite having just been added); use ‘strtoll’ instead.
  3779. All the functions mentioned in this section so far do not handle
  3780. alternative representations of characters as described in the locale
  3781. data. Some locales specify thousands separator and the way they have to
  3782. be used which can help to make large numbers more readable. To read
  3783. such numbers one has to use the ‘scanf’ functions with the ‘'’ flag.
  3784. Here is a function which parses a string as a sequence of integers
  3785. and returns the sum of them:
  3786. int
  3787. sum_ints_from_string (char *string)
  3788. {
  3789. int sum = 0;
  3790. while (1) {
  3791. char *tail;
  3792. int next;
  3793. /* Skip whitespace by hand, to detect the end. */
  3794. while (isspace (*string)) string++;
  3795. if (*string == 0)
  3796. break;
  3797. /* There is more nonwhitespace, */
  3798. /* so it ought to be another number. */
  3799. errno = 0;
  3800. /* Parse it. */
  3801. next = strtol (string, &tail, 0);
  3802. /* Add it in, if not overflow. */
  3803. if (errno)
  3804. printf ("Overflow\n");
  3805. else
  3806. sum += next;
  3807. /* Advance past it. */
  3808. string = tail;
  3809. }
  3810. return sum;
  3811. }
  3812. 
  3813. File: libc.info, Node: Parsing of Floats, Prev: Parsing of Integers, Up: Parsing of Numbers
  3814. 20.11.2 Parsing of Floats
  3815. -------------------------
  3816. The ‘str’ functions are declared in ‘stdlib.h’ and those beginning with
  3817. ‘wcs’ are declared in ‘wchar.h’. One might wonder about the use of
  3818. ‘restrict’ in the prototypes of the functions in this section. It is
  3819. seemingly useless but the ISO C standard uses it (for the functions
  3820. defined there) so we have to do it as well.
  3821. -- Function: double strtod (const char *restrict STRING, char
  3822. **restrict TAILPTR)
  3823. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3824. Safety Concepts::.
  3825. The ‘strtod’ ("string-to-double") function converts the initial
  3826. part of STRING to a floating-point number, which is returned as a
  3827. value of type ‘double’.
  3828. This function attempts to decompose STRING as follows:
  3829. • A (possibly empty) sequence of whitespace characters. Which
  3830. characters are whitespace is determined by the ‘isspace’
  3831. function (*note Classification of Characters::). These are
  3832. discarded.
  3833. • An optional plus or minus sign (‘+’ or ‘-’).
  3834. • A floating point number in decimal or hexadecimal format. The
  3835. decimal format is:
  3836. − A nonempty sequence of digits optionally containing a
  3837. decimal-point character--normally ‘.’, but it depends on
  3838. the locale (*note General Numeric::).
  3839. − An optional exponent part, consisting of a character ‘e’
  3840. or ‘E’, an optional sign, and a sequence of digits.
  3841. The hexadecimal format is as follows:
  3842. − A 0x or 0X followed by a nonempty sequence of hexadecimal
  3843. digits optionally containing a decimal-point
  3844. character--normally ‘.’, but it depends on the locale
  3845. (*note General Numeric::).
  3846. − An optional binary-exponent part, consisting of a
  3847. character ‘p’ or ‘P’, an optional sign, and a sequence of
  3848. digits.
  3849. • Any remaining characters in the string. If TAILPTR is not a
  3850. null pointer, a pointer to this tail of the string is stored
  3851. in ‘*TAILPTR’.
  3852. If the string is empty, contains only whitespace, or does not
  3853. contain an initial substring that has the expected syntax for a
  3854. floating-point number, no conversion is performed. In this case,
  3855. ‘strtod’ returns a value of zero and the value returned in
  3856. ‘*TAILPTR’ is the value of STRING.
  3857. In a locale other than the standard ‘"C"’ or ‘"POSIX"’ locales,
  3858. this function may recognize additional locale-dependent syntax.
  3859. If the string has valid syntax for a floating-point number but the
  3860. value is outside the range of a ‘double’, ‘strtod’ will signal
  3861. overflow or underflow as described in *note Math Error Reporting::.
  3862. ‘strtod’ recognizes four special input strings. The strings
  3863. ‘"inf"’ and ‘"infinity"’ are converted to oo, or to the largest
  3864. representable value if the floating-point format doesn't support
  3865. infinities. You can prepend a ‘"+"’ or ‘"-"’ to specify the sign.
  3866. Case is ignored when scanning these strings.
  3867. The strings ‘"nan"’ and ‘"nan(CHARS...)"’ are converted to NaN.
  3868. Again, case is ignored. If CHARS... are provided, they are used in
  3869. some unspecified fashion to select a particular representation of
  3870. NaN (there can be several).
  3871. Since zero is a valid result as well as the value returned on
  3872. error, you should check for errors in the same way as for ‘strtol’,
  3873. by examining ‘errno’ and TAILPTR.
  3874. -- Function: float strtof (const char *STRING, char **TAILPTR)
  3875. -- Function: long double strtold (const char *STRING, char **TAILPTR)
  3876. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3877. Safety Concepts::.
  3878. These functions are analogous to ‘strtod’, but return ‘float’ and
  3879. ‘long double’ values respectively. They report errors in the same
  3880. way as ‘strtod’. ‘strtof’ can be substantially faster than
  3881. ‘strtod’, but has less precision; conversely, ‘strtold’ can be much
  3882. slower but has more precision (on systems where ‘long double’ is a
  3883. separate type).
  3884. These functions have been GNU extensions and are new to ISO C99.
  3885. -- Function: _FloatN strtofN (const char *STRING, char **TAILPTR)
  3886. -- Function: _FloatNx strtofNx (const char *STRING, char **TAILPTR)
  3887. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3888. Safety Concepts::.
  3889. These functions are like ‘strtod’, except for the return type.
  3890. They were introduced in ISO/IEC TS 18661-3 and are available on
  3891. machines that support the related types; *note Mathematics::.
  3892. -- Function: double wcstod (const wchar_t *restrict STRING, wchar_t
  3893. **restrict TAILPTR)
  3894. -- Function: float wcstof (const wchar_t *STRING, wchar_t **TAILPTR)
  3895. -- Function: long double wcstold (const wchar_t *STRING, wchar_t
  3896. **TAILPTR)
  3897. -- Function: _FloatN wcstofN (const wchar_t *STRING, wchar_t **TAILPTR)
  3898. -- Function: _FloatNx wcstofNx (const wchar_t *STRING, wchar_t
  3899. **TAILPTR)
  3900. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3901. Safety Concepts::.
  3902. The ‘wcstod’, ‘wcstof’, ‘wcstol’, ‘wcstofN’, and ‘wcstofNx’
  3903. functions are equivalent in nearly all aspects to the ‘strtod’,
  3904. ‘strtof’, ‘strtold’, ‘strtofN’, and ‘strtofNx’ functions, but they
  3905. handle wide character strings.
  3906. The ‘wcstod’ function was introduced in Amendment 1 of ISO C90.
  3907. The ‘wcstof’ and ‘wcstold’ functions were introduced in ISO C99.
  3908. The ‘wcstofN’ and ‘wcstofNx’ functions are not in any standard, but
  3909. are added to provide completeness for the non-deprecated interface
  3910. of wide character string to floating-point conversion functions.
  3911. They are only available on machines that support the related types;
  3912. *note Mathematics::.
  3913. -- Function: double atof (const char *STRING)
  3914. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3915. Safety Concepts::.
  3916. This function is similar to the ‘strtod’ function, except that it
  3917. need not detect overflow and underflow errors. The ‘atof’ function
  3918. is provided mostly for compatibility with existing code; using
  3919. ‘strtod’ is more robust.
  3920. The GNU C Library also provides ‘_l’ versions of these functions,
  3921. which take an additional argument, the locale to use in conversion.
  3922. See also *note Parsing of Integers::.
  3923. 
  3924. File: libc.info, Node: Printing of Floats, Next: System V Number Conversion, Prev: Parsing of Numbers, Up: Arithmetic
  3925. 20.12 Printing of Floats
  3926. ========================
  3927. The ‘strfrom’ functions are declared in ‘stdlib.h’.
  3928. -- Function: int strfromd (char *restrict STRING, size_t SIZE, const
  3929. char *restrict FORMAT, double VALUE)
  3930. -- Function: int strfromf (char *restrict STRING, size_t SIZE, const
  3931. char *restrict FORMAT, float VALUE)
  3932. -- Function: int strfroml (char *restrict STRING, size_t SIZE, const
  3933. char *restrict FORMAT, long double VALUE)
  3934. Preliminary: | MT-Safe locale | AS-Unsafe heap | AC-Unsafe mem |
  3935. *Note POSIX Safety Concepts::.
  3936. The functions ‘strfromd’ ("string-from-double"), ‘strfromf’
  3937. ("string-from-float"), and ‘strfroml’ ("string-from-long-double")
  3938. convert the floating-point number VALUE to a string of characters
  3939. and stores them into the area pointed to by STRING. The conversion
  3940. writes at most SIZE characters and respects the format specified by
  3941. FORMAT.
  3942. The format string must start with the character ‘%’. An optional
  3943. precision follows, which starts with a period, ‘.’, and may be
  3944. followed by a decimal integer, representing the precision. If a
  3945. decimal integer is not specified after the period, the precision is
  3946. taken to be zero. The character ‘*’ is not allowed. Finally, the
  3947. format string ends with one of the following conversion specifiers:
  3948. ‘a’, ‘A’, ‘e’, ‘E’, ‘f’, ‘F’, ‘g’ or ‘G’ (*note Table of Output
  3949. Conversions::). Invalid format strings result in undefined
  3950. behavior.
  3951. These functions return the number of characters that would have
  3952. been written to STRING had SIZE been sufficiently large, not
  3953. counting the terminating null character. Thus, the null-terminated
  3954. output has been completely written if and only if the returned
  3955. value is less than SIZE.
  3956. These functions were introduced by ISO/IEC TS 18661-1.
  3957. -- Function: int strfromfN (char *restrict STRING, size_t SIZE, const
  3958. char *restrict FORMAT, _FloatN VALUE)
  3959. -- Function: int strfromfNx (char *restrict STRING, size_t SIZE, const
  3960. char *restrict FORMAT, _FloatNx VALUE)
  3961. Preliminary: | MT-Safe locale | AS-Unsafe heap | AC-Unsafe mem |
  3962. *Note POSIX Safety Concepts::.
  3963. These functions are like ‘strfromd’, except for the type of
  3964. ‘value’.
  3965. They were introduced in ISO/IEC TS 18661-3 and are available on
  3966. machines that support the related types; *note Mathematics::.
  3967. 
  3968. File: libc.info, Node: System V Number Conversion, Prev: Printing of Floats, Up: Arithmetic
  3969. 20.13 Old-fashioned System V number-to-string functions
  3970. =======================================================
  3971. The old System V C library provided three functions to convert numbers
  3972. to strings, with unusual and hard-to-use semantics. The GNU C Library
  3973. also provides these functions and some natural extensions.
  3974. These functions are only available in the GNU C Library and on
  3975. systems descended from AT&T Unix. Therefore, unless these functions do
  3976. precisely what you need, it is better to use ‘sprintf’, which is
  3977. standard.
  3978. All these functions are defined in ‘stdlib.h’.
  3979. -- Function: char * ecvt (double VALUE, int NDIGIT, int *DECPT, int
  3980. *NEG)
  3981. Preliminary: | MT-Unsafe race:ecvt | AS-Unsafe | AC-Safe | *Note
  3982. POSIX Safety Concepts::.
  3983. The function ‘ecvt’ converts the floating-point number VALUE to a
  3984. string with at most NDIGIT decimal digits. The returned string
  3985. contains no decimal point or sign. The first digit of the string
  3986. is non-zero (unless VALUE is actually zero) and the last digit is
  3987. rounded to nearest. ‘*DECPT’ is set to the index in the string of
  3988. the first digit after the decimal point. ‘*NEG’ is set to a
  3989. nonzero value if VALUE is negative, zero otherwise.
  3990. If NDIGIT decimal digits would exceed the precision of a ‘double’
  3991. it is reduced to a system-specific value.
  3992. The returned string is statically allocated and overwritten by each
  3993. call to ‘ecvt’.
  3994. If VALUE is zero, it is implementation defined whether ‘*DECPT’ is
  3995. ‘0’ or ‘1’.
  3996. For example: ‘ecvt (12.3, 5, &d, &n)’ returns ‘"12300"’ and sets D
  3997. to ‘2’ and N to ‘0’.
  3998. -- Function: char * fcvt (double VALUE, int NDIGIT, int *DECPT, int
  3999. *NEG)
  4000. Preliminary: | MT-Unsafe race:fcvt | AS-Unsafe heap | AC-Unsafe mem
  4001. | *Note POSIX Safety Concepts::.
  4002. The function ‘fcvt’ is like ‘ecvt’, but NDIGIT specifies the number
  4003. of digits after the decimal point. If NDIGIT is less than zero,
  4004. VALUE is rounded to the NDIGIT+1'th place to the left of the
  4005. decimal point. For example, if NDIGIT is ‘-1’, VALUE will be
  4006. rounded to the nearest 10. If NDIGIT is negative and larger than
  4007. the number of digits to the left of the decimal point in VALUE,
  4008. VALUE will be rounded to one significant digit.
  4009. If NDIGIT decimal digits would exceed the precision of a ‘double’
  4010. it is reduced to a system-specific value.
  4011. The returned string is statically allocated and overwritten by each
  4012. call to ‘fcvt’.
  4013. -- Function: char * gcvt (double VALUE, int NDIGIT, char *BUF)
  4014. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4015. Concepts::.
  4016. ‘gcvt’ is functionally equivalent to ‘sprintf(buf, "%*g", ndigit,
  4017. value)’. It is provided only for compatibility's sake. It returns
  4018. BUF.
  4019. If NDIGIT decimal digits would exceed the precision of a ‘double’
  4020. it is reduced to a system-specific value.
  4021. As extensions, the GNU C Library provides versions of these three
  4022. functions that take ‘long double’ arguments.
  4023. -- Function: char * qecvt (long double VALUE, int NDIGIT, int *DECPT,
  4024. int *NEG)
  4025. Preliminary: | MT-Unsafe race:qecvt | AS-Unsafe | AC-Safe | *Note
  4026. POSIX Safety Concepts::.
  4027. This function is equivalent to ‘ecvt’ except that it takes a ‘long
  4028. double’ for the first parameter and that NDIGIT is restricted by
  4029. the precision of a ‘long double’.
  4030. -- Function: char * qfcvt (long double VALUE, int NDIGIT, int *DECPT,
  4031. int *NEG)
  4032. Preliminary: | MT-Unsafe race:qfcvt | AS-Unsafe heap | AC-Unsafe
  4033. mem | *Note POSIX Safety Concepts::.
  4034. This function is equivalent to ‘fcvt’ except that it takes a ‘long
  4035. double’ for the first parameter and that NDIGIT is restricted by
  4036. the precision of a ‘long double’.
  4037. -- Function: char * qgcvt (long double VALUE, int NDIGIT, char *BUF)
  4038. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4039. Concepts::.
  4040. This function is equivalent to ‘gcvt’ except that it takes a ‘long
  4041. double’ for the first parameter and that NDIGIT is restricted by
  4042. the precision of a ‘long double’.
  4043. The ‘ecvt’ and ‘fcvt’ functions, and their ‘long double’ equivalents,
  4044. all return a string located in a static buffer which is overwritten by
  4045. the next call to the function. The GNU C Library provides another set
  4046. of extended functions which write the converted string into a
  4047. user-supplied buffer. These have the conventional ‘_r’ suffix.
  4048. ‘gcvt_r’ is not necessary, because ‘gcvt’ already uses a
  4049. user-supplied buffer.
  4050. -- Function: int ecvt_r (double VALUE, int NDIGIT, int *DECPT, int
  4051. *NEG, char *BUF, size_t LEN)
  4052. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4053. Concepts::.
  4054. The ‘ecvt_r’ function is the same as ‘ecvt’, except that it places
  4055. its result into the user-specified buffer pointed to by BUF, with
  4056. length LEN. The return value is ‘-1’ in case of an error and zero
  4057. otherwise.
  4058. This function is a GNU extension.
  4059. -- Function: int fcvt_r (double VALUE, int NDIGIT, int *DECPT, int
  4060. *NEG, char *BUF, size_t LEN)
  4061. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4062. Concepts::.
  4063. The ‘fcvt_r’ function is the same as ‘fcvt’, except that it places
  4064. its result into the user-specified buffer pointed to by BUF, with
  4065. length LEN. The return value is ‘-1’ in case of an error and zero
  4066. otherwise.
  4067. This function is a GNU extension.
  4068. -- Function: int qecvt_r (long double VALUE, int NDIGIT, int *DECPT,
  4069. int *NEG, char *BUF, size_t LEN)
  4070. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4071. Concepts::.
  4072. The ‘qecvt_r’ function is the same as ‘qecvt’, except that it
  4073. places its result into the user-specified buffer pointed to by BUF,
  4074. with length LEN. The return value is ‘-1’ in case of an error and
  4075. zero otherwise.
  4076. This function is a GNU extension.
  4077. -- Function: int qfcvt_r (long double VALUE, int NDIGIT, int *DECPT,
  4078. int *NEG, char *BUF, size_t LEN)
  4079. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4080. Concepts::.
  4081. The ‘qfcvt_r’ function is the same as ‘qfcvt’, except that it
  4082. places its result into the user-specified buffer pointed to by BUF,
  4083. with length LEN. The return value is ‘-1’ in case of an error and
  4084. zero otherwise.
  4085. This function is a GNU extension.
  4086. 
  4087. File: libc.info, Node: Bit Manipulation, Next: Date and Time, Prev: Arithmetic, Up: Top
  4088. 21 Bit Manipulation
  4089. *******************
  4090. This chapter contains information about functions and macros for
  4091. determining the endianness of integer types and manipulating the bits of
  4092. unsigned integers. These functions and macros are from ISO C23 and are
  4093. declared in the header file ‘stdbit.h’.
  4094. The following macros describe the endianness of integer types. They
  4095. have values that are integer constant expressions.
  4096. -- Macro: __STDC_ENDIAN_LITTLE__
  4097. This macro represents little-endian storage.
  4098. -- Macro: __STDC_ENDIAN_BIG__
  4099. This macro represents big-endian storage.
  4100. -- Macro: __STDC_ENDIAN_NATIVE__
  4101. This macro equals ‘__STDC_ENDIAN_LITTLE__’ if integer types are
  4102. stored in memory in little-endian format, and equals
  4103. ‘__STDC_ENDIAN_BIG__’ if integer types are stored in memory in
  4104. big-endian format.
  4105. The following functions manipulate the bits of unsigned integers.
  4106. Each function family has functions for the types ‘unsigned char’,
  4107. ‘unsigned short’, ‘unsigned int’, ‘unsigned long int’ and ‘unsigned long
  4108. long int’. In addition, there is a corresponding type-generic macro
  4109. (not listed below), named the same as the functions but without any
  4110. suffix such as ‘_uc’. The type-generic macro can only be used with an
  4111. argument of an unsigned integer type with a width of 8, 16, 32 or 64
  4112. bits, or when using a compiler with support for
  4113. ‘__builtin_stdc_bit_ceil’
  4114. (https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html), etc., built-in
  4115. functions such as GCC 14.1 or later any unsigned integer type those
  4116. built-in functions support. In GCC 14.1 that includes support for
  4117. ‘unsigned __int128’ and ‘unsigned _BitInt(N)’ if supported by the
  4118. target.
  4119. -- Function: unsigned int stdc_leading_zeros_uc (unsigned char X)
  4120. -- Function: unsigned int stdc_leading_zeros_us (unsigned short X)
  4121. -- Function: unsigned int stdc_leading_zeros_ui (unsigned int X)
  4122. -- Function: unsigned int stdc_leading_zeros_ul (unsigned long int X)
  4123. -- Function: unsigned int stdc_leading_zeros_ull (unsigned long long
  4124. int X)
  4125. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4126. Concepts::.
  4127. The ‘stdc_leading_zeros’ functions count the number of leading
  4128. (most significant) zero bits in X, starting from the most
  4129. significant bit of the argument type. If X is zero, they return
  4130. the width of X in bits.
  4131. -- Function: unsigned int stdc_leading_ones_uc (unsigned char X)
  4132. -- Function: unsigned int stdc_leading_ones_us (unsigned short X)
  4133. -- Function: unsigned int stdc_leading_ones_ui (unsigned int X)
  4134. -- Function: unsigned int stdc_leading_ones_ul (unsigned long int X)
  4135. -- Function: unsigned int stdc_leading_ones_ull (unsigned long long int
  4136. X)
  4137. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4138. Concepts::.
  4139. The ‘stdc_leading_ones’ functions count the number of leading (most
  4140. significant) one bits in X, starting from the most significant bit
  4141. of the argument type.
  4142. -- Function: unsigned int stdc_trailing_zeros_uc (unsigned char X)
  4143. -- Function: unsigned int stdc_trailing_zeros_us (unsigned short X)
  4144. -- Function: unsigned int stdc_trailing_zeros_ui (unsigned int X)
  4145. -- Function: unsigned int stdc_trailing_zeros_ul (unsigned long int X)
  4146. -- Function: unsigned int stdc_trailing_zeros_ull (unsigned long long
  4147. int X)
  4148. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4149. Concepts::.
  4150. The ‘stdc_trailing_zeros’ functions count the number of trailing
  4151. (least significant) zero bits in X, starting from the least
  4152. significant bit of the argument type. If X is zero, they return
  4153. the width of X in bits.
  4154. -- Function: unsigned int stdc_trailing_ones_uc (unsigned char X)
  4155. -- Function: unsigned int stdc_trailing_ones_us (unsigned short X)
  4156. -- Function: unsigned int stdc_trailing_ones_ui (unsigned int X)
  4157. -- Function: unsigned int stdc_trailing_ones_ul (unsigned long int X)
  4158. -- Function: unsigned int stdc_trailing_ones_ull (unsigned long long
  4159. int X)
  4160. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4161. Concepts::.
  4162. The ‘stdc_trailing_ones’ functions count the number of trailing
  4163. (least significant) one bits in X, starting from the least
  4164. significant bit of the argument type.
  4165. -- Function: unsigned int stdc_first_leading_zero_uc (unsigned char X)
  4166. -- Function: unsigned int stdc_first_leading_zero_us (unsigned short X)
  4167. -- Function: unsigned int stdc_first_leading_zero_ui (unsigned int X)
  4168. -- Function: unsigned int stdc_first_leading_zero_ul (unsigned long int
  4169. X)
  4170. -- Function: unsigned int stdc_first_leading_zero_ull (unsigned long
  4171. long int X)
  4172. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4173. Concepts::.
  4174. The ‘stdc_first_leading_zero’ functions return the position of the
  4175. most significant zero bit in X, counting from the most significant
  4176. bit of X as 1, or zero if there is no zero bit in X.
  4177. -- Function: unsigned int stdc_first_leading_one_uc (unsigned char X)
  4178. -- Function: unsigned int stdc_first_leading_one_us (unsigned short X)
  4179. -- Function: unsigned int stdc_first_leading_one_ui (unsigned int X)
  4180. -- Function: unsigned int stdc_first_leading_one_ul (unsigned long int
  4181. X)
  4182. -- Function: unsigned int stdc_first_leading_one_ull (unsigned long
  4183. long int X)
  4184. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4185. Concepts::.
  4186. The ‘stdc_first_leading_one’ functions return the position of the
  4187. most significant one bit in X, counting from the most significant
  4188. bit of X as 1, or zero if there is no one bit in X.
  4189. -- Function: unsigned int stdc_first_trailing_zero_uc (unsigned char X)
  4190. -- Function: unsigned int stdc_first_trailing_zero_us (unsigned short
  4191. X)
  4192. -- Function: unsigned int stdc_first_trailing_zero_ui (unsigned int X)
  4193. -- Function: unsigned int stdc_first_trailing_zero_ul (unsigned long
  4194. int X)
  4195. -- Function: unsigned int stdc_first_trailing_zero_ull (unsigned long
  4196. long int X)
  4197. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4198. Concepts::.
  4199. The ‘stdc_first_trailing_zero’ functions return the position of the
  4200. least significant zero bit in X, counting from the least
  4201. significant bit of X as 1, or zero if there is no zero bit in X.
  4202. -- Function: unsigned int stdc_first_trailing_one_uc (unsigned char X)
  4203. -- Function: unsigned int stdc_first_trailing_one_us (unsigned short X)
  4204. -- Function: unsigned int stdc_first_trailing_one_ui (unsigned int X)
  4205. -- Function: unsigned int stdc_first_trailing_one_ul (unsigned long int
  4206. X)
  4207. -- Function: unsigned int stdc_first_trailing_one_ull (unsigned long
  4208. long int X)
  4209. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4210. Concepts::.
  4211. The ‘stdc_first_trailing_one’ functions return the position of the
  4212. least significant one bit in X, counting from the least significant
  4213. bit of X as 1, or zero if there is no one bit in X.
  4214. -- Function: unsigned int stdc_count_zeros_uc (unsigned char X)
  4215. -- Function: unsigned int stdc_count_zeros_us (unsigned short X)
  4216. -- Function: unsigned int stdc_count_zeros_ui (unsigned int X)
  4217. -- Function: unsigned int stdc_count_zeros_ul (unsigned long int X)
  4218. -- Function: unsigned int stdc_count_zeros_ull (unsigned long long int
  4219. X)
  4220. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4221. Concepts::.
  4222. The ‘stdc_count_zeros’ functions count the number of zero bits in
  4223. X.
  4224. -- Function: unsigned int stdc_count_ones_uc (unsigned char X)
  4225. -- Function: unsigned int stdc_count_ones_us (unsigned short X)
  4226. -- Function: unsigned int stdc_count_ones_ui (unsigned int X)
  4227. -- Function: unsigned int stdc_count_ones_ul (unsigned long int X)
  4228. -- Function: unsigned int stdc_count_ones_ull (unsigned long long int
  4229. X)
  4230. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4231. Concepts::.
  4232. The ‘stdc_count_ones’ functions count the number of one bits in X.
  4233. -- Function: _Bool stdc_has_single_bit_uc (unsigned char X)
  4234. -- Function: _Bool stdc_has_single_bit_us (unsigned short X)
  4235. -- Function: _Bool stdc_has_single_bit_ui (unsigned int X)
  4236. -- Function: _Bool stdc_has_single_bit_ul (unsigned long int X)
  4237. -- Function: _Bool stdc_has_single_bit_ull (unsigned long long int X)
  4238. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4239. Concepts::.
  4240. The ‘stdc_has_single_bit’ functions return whether X has exactly
  4241. one bit set to one.
  4242. -- Function: unsigned int stdc_bit_width_uc (unsigned char X)
  4243. -- Function: unsigned int stdc_bit_width_us (unsigned short X)
  4244. -- Function: unsigned int stdc_bit_width_ui (unsigned int X)
  4245. -- Function: unsigned int stdc_bit_width_ul (unsigned long int X)
  4246. -- Function: unsigned int stdc_bit_width_ull (unsigned long long int X)
  4247. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4248. Concepts::.
  4249. The ‘stdc_bit_width’ functions return the minimum number of bits
  4250. needed to store X, not counting leading zero bits. If X is zero,
  4251. they return zero.
  4252. -- Function: unsigned char stdc_bit_floor_uc (unsigned char X)
  4253. -- Function: unsigned short stdc_bit_floor_us (unsigned short X)
  4254. -- Function: unsigned int stdc_bit_floor_ui (unsigned int X)
  4255. -- Function: unsigned long int stdc_bit_floor_ul (unsigned long int X)
  4256. -- Function: unsigned long long int stdc_bit_floor_ull (unsigned long
  4257. long int X)
  4258. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4259. Concepts::.
  4260. The ‘stdc_bit_floor’ functions return the largest integer power of
  4261. two that is less than or equal to X. If X is zero, they return
  4262. zero.
  4263. -- Function: unsigned char stdc_bit_ceil_uc (unsigned char X)
  4264. -- Function: unsigned short stdc_bit_ceil_us (unsigned short X)
  4265. -- Function: unsigned int stdc_bit_ceil_ui (unsigned int X)
  4266. -- Function: unsigned long int stdc_bit_ceil_ul (unsigned long int X)
  4267. -- Function: unsigned long long int stdc_bit_ceil_ull (unsigned long
  4268. long int X)
  4269. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4270. Concepts::.
  4271. The ‘stdc_bit_ceil’ functions return the smallest integer power of
  4272. two that is greater than or equal to X. If this cannot be
  4273. represented in the return type, they return zero.
  4274. 
  4275. File: libc.info, Node: Date and Time, Next: Resource Usage And Limitation, Prev: Bit Manipulation, Up: Top
  4276. 22 Date and Time
  4277. ****************
  4278. This chapter describes functions for manipulating dates and times,
  4279. including functions for determining what time it is and conversion
  4280. between different time representations.
  4281. * Menu:
  4282. * Time Basics:: Concepts and definitions.
  4283. * Time Types:: Data types to represent time.
  4284. * Calculating Elapsed Time:: How to calculate the length of an interval.
  4285. * Processor And CPU Time:: Time a program has spent executing.
  4286. * Calendar Time:: Manipulation of "real" dates and times.
  4287. * Setting an Alarm:: Sending a signal after a specified time.
  4288. * Sleeping:: Waiting for a period of time.
  4289. 
  4290. File: libc.info, Node: Time Basics, Next: Time Types, Up: Date and Time
  4291. 22.1 Time Basics
  4292. ================
  4293. Discussing time in a technical manual can be difficult because the word
  4294. "time" in English refers to lots of different things. In this manual,
  4295. we use a rigorous terminology to avoid confusion, and the only thing we
  4296. use the simple word "time" for is to talk about the abstract concept.
  4297. A “calendar time”, sometimes called "absolute time", is a point in
  4298. the Earth's time continuum, for example June 9, 2024, at 13:50:06.5
  4299. Coordinated Universal Time (UTC). UTC, formerly called Greenwich Mean
  4300. Time, is the primary time standard on Earth, and is the basis for civil
  4301. time and time zones.
  4302. We don't speak of a "date", because that is inherent in a calendar
  4303. time.
  4304. An “interval” is a contiguous part of the time continuum between two
  4305. calendar times, for example the hour on June 9, 2024, between 13:00 and
  4306. 14:00 UTC.
  4307. An “elapsed time” is the length of an interval, for example, 35
  4308. minutes. People sometimes sloppily use the word "interval" to refer to
  4309. the elapsed time of some interval.
  4310. An “amount of time” is a sum of elapsed times, which need not be of
  4311. any specific intervals. For example, the amount of time it takes to
  4312. read a book might be 9 hours, independently of when and in how many
  4313. sittings it is read.
  4314. A “period” is the elapsed time of an interval between two events,
  4315. especially when they are part of a sequence of regularly repeating
  4316. events.
  4317. A “simple calendar time” is a calendar time represented as an elapsed
  4318. time since a fixed, implementation-specific calendar time called the
  4319. “epoch”. This representation is convenient for doing calculations on
  4320. calendar times, such as finding the elapsed time between two calendar
  4321. times. Simple calendar times are independent of time zone; they
  4322. represent the same instant in time regardless of where on the globe the
  4323. computer is.
  4324. POSIX says that simple calendar times do not include leap seconds,
  4325. but some (otherwise POSIX-conformant) systems can be configured to
  4326. include leap seconds in simple calendar times.
  4327. A “broken-down time” is a calendar time represented by its components
  4328. in the Gregorian calendar: year, month, day, hour, minute, and second.
  4329. A broken-down time value is relative to a specific time zone, and so it
  4330. is also sometimes called a “local time”. Broken-down times are most
  4331. useful for input and output, as they are easier for people to
  4332. understand, but more difficult to calculate with.
  4333. A “time zone” is a single fixed offset from UTC, along with a “time
  4334. zone abbreviation” that is a string of characters that can include ASCII
  4335. alphanumerics, ‘+’, and ‘-’. For example, the current time zone in
  4336. Japan is 9 hours ahead (east) of the Prime Meridian with abbreviation
  4337. "JST".
  4338. A “time zone ruleset” maps each simple calendar time to a single time
  4339. zone. For example, Paris's time zone ruleset might list over a dozen
  4340. time zones that Paris has experienced during its history.
  4341. “CPU time” measures the amount of time that a single process has
  4342. actively used a CPU to perform computations. It does not include the
  4343. time that process has spent waiting for external events. The system
  4344. tracks the CPU time used by each process separately.
  4345. “Processor time” measures the amount of time _any_ CPU has been in
  4346. use by _any_ process. It is a basic system resource, since there's a
  4347. limit to how much can exist in any given interval (the elapsed time of
  4348. the interval times the number of CPUs in the computer)
  4349. People often call this CPU time, but we reserve the latter term in
  4350. this manual for the definition above.
  4351. 
  4352. File: libc.info, Node: Time Types, Next: Calculating Elapsed Time, Prev: Time Basics, Up: Date and Time
  4353. 22.2 Time Types
  4354. ===============
  4355. ISO C and POSIX define several data types for representing elapsed
  4356. times, simple calendar times, and broken-down times.
  4357. -- Data Type: clock_t
  4358. ‘clock_t’ is used to measure processor and CPU time. It may be an
  4359. integer or a floating-point type. Its values are counts of “clock
  4360. ticks” since some arbitrary event in the past. The number of clock
  4361. ticks per second is system-specific. *Note Processor And CPU
  4362. Time::, for further detail.
  4363. -- Data Type: time_t
  4364. ‘time_t’ is the simplest data type used to represent simple
  4365. calendar time.
  4366. In ISO C, ‘time_t’ can be either an integer or a real floating
  4367. type, and the meaning of ‘time_t’ values is not specified. The
  4368. only things a strictly conforming program can do with ‘time_t’
  4369. values are: pass them to ‘difftime’ to get the elapsed time between
  4370. two simple calendar times (*note Calculating Elapsed Time::), and
  4371. pass them to the functions that convert them to broken-down time
  4372. (*note Broken-down Time::).
  4373. On POSIX-conformant systems, ‘time_t’ is an integer type and its
  4374. values represent the number of seconds elapsed since the “POSIX
  4375. Epoch”, which is January 1, 1970, at 00:00:00 Coordinated Universal
  4376. Time (UTC). The count of seconds ignores leap seconds.
  4377. Additionally, POSIX.1-2024 added the requirement that ‘time_t’ be
  4378. at least 64 bits wide.
  4379. The GNU C Library additionally guarantees that ‘time_t’ is a signed
  4380. type, and that all of its functions operate correctly on negative
  4381. ‘time_t’ values, which are interpreted as times before the POSIX
  4382. Epoch. Functions like ‘localtime’ assume the Gregorian calendar
  4383. and UTC even though this is historically inaccurate for dates
  4384. before 1582, for times before 1960, and for timestamps after the
  4385. Gregorian calendar and UTC will become obsolete. The GNU C Library
  4386. also supports leap seconds as an option, in which case ‘time_t’
  4387. counts leap seconds instead of ignoring them. Currently the
  4388. ‘time_t’ type is 64 bits wide on all platforms supported by the GNU
  4389. C Library, except that it is 32 bits wide on a few older platforms
  4390. unless you define ‘_TIME_BITS’ to 64. *Note Feature Test Macros::.
  4391. -- Data Type: struct timespec
  4392. ‘struct timespec’ represents a simple calendar time, or an elapsed
  4393. time, with sub-second resolution. It is declared in ‘time.h’ and
  4394. has the following members:
  4395. ‘time_t tv_sec’
  4396. The number of whole seconds elapsed since the epoch (for a
  4397. simple calendar time) or since some other starting point (for
  4398. an elapsed time).
  4399. ‘long int tv_nsec’
  4400. The number of nanoseconds elapsed since the time given by the
  4401. ‘tv_sec’ member.
  4402. When ‘struct timespec’ values are produced by GNU C Library
  4403. functions, the value in this field will always be greater than
  4404. or equal to zero, and less than 1,000,000,000. When ‘struct
  4405. timespec’ values are supplied to GNU C Library functions, the
  4406. value in this field must be in the same range.
  4407. -- Data Type: struct timeval
  4408. ‘struct timeval’ is an older type for representing a simple
  4409. calendar time, or an elapsed time, with sub-second resolution. It
  4410. is almost the same as ‘struct timespec’, but provides only
  4411. microsecond resolution. It is declared in ‘sys/time.h’ and has the
  4412. following members:
  4413. ‘time_t tv_sec’
  4414. The number of whole seconds elapsed since the epoch (for a
  4415. simple calendar time) or since some other starting point (for
  4416. an elapsed time).
  4417. ‘long int tv_usec’
  4418. The number of microseconds elapsed since the time given by the
  4419. ‘tv_sec’ member.
  4420. When ‘struct timeval’ values are produced by GNU C Library
  4421. functions, the value in this field will always be greater than
  4422. or equal to zero, and less than 1,000,000. When ‘struct
  4423. timeval’ values are supplied to GNU C Library functions, the
  4424. value in this field must be in the same range.
  4425. -- Data Type: struct tm
  4426. This is the data type used to represent a broken-down time. It has
  4427. separate fields for year, month, day, and so on. *Note Broken-down
  4428. Time::, for further details.
  4429. 
  4430. File: libc.info, Node: Calculating Elapsed Time, Next: Processor And CPU Time, Prev: Time Types, Up: Date and Time
  4431. 22.3 Calculating Elapsed Time
  4432. =============================
  4433. Often, one wishes to calculate an elapsed time as the difference between
  4434. two simple calendar times. The GNU C Library provides only one function
  4435. for this purpose.
  4436. -- Function: double difftime (time_t END, time_t BEGIN)
  4437. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4438. Concepts::.
  4439. The ‘difftime’ function returns the number of seconds of elapsed
  4440. time from calendar time BEGIN to calendar time END, as a value of
  4441. type ‘double’.
  4442. On POSIX-conformant systems, the advantage of using ‘difftime (END,
  4443. BEGIN)’ over ‘END - BEGIN’ is that it will not overflow even if END
  4444. and BEGIN are so far apart that a simple subtraction would
  4445. overflow. However, if they are so far apart that a ‘double’ cannot
  4446. exactly represent the difference, the result will be inexact.
  4447. On other systems, ‘time_t’ values might be encoded in a way that
  4448. prevents subtraction from working directly, and then ‘difftime’
  4449. would be the only way to compute their difference.
  4450. The GNU C Library does not provide any functions for computing the
  4451. difference between two values of type ‘struct timespec’ or
  4452. ‘struct timeval’. Here is one way to do this calculation by hand. It
  4453. works even on peculiar operating systems where the ‘tv_sec’ member has
  4454. an unsigned type.
  4455. #include <stdckdint.h>
  4456. #include <time.h>
  4457. /* Put into *R the difference between X and Y.
  4458. Return true if overflow occurs, false otherwise. */
  4459. bool
  4460. timespec_subtract (struct timespec *r,
  4461. struct timespec x, struct timespec y)
  4462. {
  4463. /* Compute nanoseconds, setting BORROW to 1 or 0
  4464. for propagation into seconds. */
  4465. long int nsec_diff = x.tv_nsec - y.tv_nsec;
  4466. bool borrow = nsec_diff < 0;
  4467. r->tv_nsec = nsec_diff + 1000000000 * borrow;
  4468. /* Compute seconds, returning true if this overflows. */
  4469. bool v = ckd_sub (&r->tv_sec, x.tv_sec, y.tv_sec);
  4470. return v ^ ckd_sub (&r->tv_sec, r->tv_sec, borrow);
  4471. }
  4472. 
  4473. File: libc.info, Node: Processor And CPU Time, Next: Calendar Time, Prev: Calculating Elapsed Time, Up: Date and Time
  4474. 22.4 Processor And CPU Time
  4475. ===========================
  4476. If you're trying to optimize your program or measure its efficiency,
  4477. it's very useful to know how much processor time it uses. For that,
  4478. calendar time and elapsed times are useless because a process may spend
  4479. time waiting for I/O or for other processes to use the CPU. However,
  4480. you can get the information with the functions in this section.
  4481. CPU time (*note Time Basics::) is represented by the data type
  4482. ‘clock_t’, which is a number of “clock ticks”. It gives the total
  4483. amount of time a process has actively used a CPU since some arbitrary
  4484. event. On GNU systems, that event is the creation of the process.
  4485. While arbitrary in general, the event is always the same event for any
  4486. particular process, so you can always measure how much time on the CPU a
  4487. particular computation takes by examining the process' CPU time before
  4488. and after the computation.
  4489. -- Macro: CLOCKS_PER_SEC
  4490. The number of clock ticks per second.
  4491. On GNU/Linux and GNU/Hurd systems, ‘clock_t’ is equivalent to ‘long
  4492. int’ and ‘CLOCKS_PER_SEC’ is an integer value. But in other systems,
  4493. both ‘clock_t’ and the macro ‘CLOCKS_PER_SEC’ can be either integer or
  4494. floating-point types. Converting CPU time values to ‘double’ can help
  4495. code be more portable no matter what the underlying representation is.
  4496. Note that the clock can wrap around. On a 32bit system with
  4497. ‘CLOCKS_PER_SEC’ set to one million this function will return the same
  4498. value approximately every 72 minutes.
  4499. For additional functions to examine a process' use of processor time,
  4500. and to control it, see *note Resource Usage And Limitation::.
  4501. * Menu:
  4502. * CPU Time:: The ‘clock’ function.
  4503. * Processor Time:: The ‘times’ function.
  4504. 
  4505. File: libc.info, Node: CPU Time, Next: Processor Time, Up: Processor And CPU Time
  4506. 22.4.1 CPU Time Inquiry
  4507. -----------------------
  4508. To get a process' CPU time, you can use the ‘clock’ function. This
  4509. facility is declared in the header file ‘time.h’.
  4510. In typical usage, you call the ‘clock’ function at the beginning and
  4511. end of the interval you want to time, subtract the values, and then
  4512. divide by ‘CLOCKS_PER_SEC’ (the number of clock ticks per second) to get
  4513. processor time, like this:
  4514. #include <time.h>
  4515. clock_t start, end;
  4516. double cpu_time_used;
  4517. start = clock();
  4518. ... /* Do the work. */
  4519. end = clock();
  4520. cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;
  4521. Do not use a single CPU time as an amount of time; it doesn't work
  4522. that way. Either do a subtraction as shown above or query processor
  4523. time directly. *Note Processor Time::.
  4524. Different computers and operating systems vary wildly in how they
  4525. keep track of CPU time. It's common for the internal processor clock to
  4526. have a resolution somewhere between a hundredth and millionth of a
  4527. second.
  4528. -- Macro: int CLOCKS_PER_SEC
  4529. The value of this macro is the number of clock ticks per second
  4530. measured by the ‘clock’ function. POSIX requires that this value
  4531. be one million independent of the actual resolution.
  4532. -- Function: clock_t clock (void)
  4533. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4534. Concepts::.
  4535. This function returns the calling process' current CPU time. If
  4536. the CPU time is not available or cannot be represented, ‘clock’
  4537. returns the value ‘(clock_t)(-1)’.
  4538. 
  4539. File: libc.info, Node: Processor Time, Prev: CPU Time, Up: Processor And CPU Time
  4540. 22.4.2 Processor Time Inquiry
  4541. -----------------------------
  4542. The ‘times’ function returns information about a process' consumption of
  4543. processor time in a ‘struct tms’ object, in addition to the process' CPU
  4544. time. *Note Time Basics::. You should include the header file
  4545. ‘sys/times.h’ to use this facility.
  4546. -- Data Type: struct tms
  4547. The ‘tms’ structure is used to return information about process
  4548. times. It contains at least the following members:
  4549. ‘clock_t tms_utime’
  4550. This is the total processor time the calling process has used
  4551. in executing the instructions of its program.
  4552. ‘clock_t tms_stime’
  4553. This is the processor time the system has used on behalf of
  4554. the calling process.
  4555. ‘clock_t tms_cutime’
  4556. This is the sum of the ‘tms_utime’ values and the ‘tms_cutime’
  4557. values of all terminated child processes of the calling
  4558. process, whose status has been reported to the parent process
  4559. by ‘wait’ or ‘waitpid’; see *note Process Completion::. In
  4560. other words, it represents the total processor time used in
  4561. executing the instructions of all the terminated child
  4562. processes of the calling process, excluding child processes
  4563. which have not yet been reported by ‘wait’ or ‘waitpid’.
  4564. ‘clock_t tms_cstime’
  4565. This is similar to ‘tms_cutime’, but represents the total
  4566. processor time the system has used on behalf of all the
  4567. terminated child processes of the calling process.
  4568. All of the times are given in numbers of clock ticks. Unlike CPU
  4569. time, these are the actual amounts of time; not relative to any
  4570. event. *Note Creating a Process::.
  4571. -- Macro: int CLK_TCK
  4572. This is an obsolete name for the number of clock ticks per second.
  4573. Use ‘sysconf (_SC_CLK_TCK)’ instead.
  4574. -- Function: clock_t times (struct tms *BUFFER)
  4575. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4576. Concepts::.
  4577. The ‘times’ function stores the processor time information for the
  4578. calling process in BUFFER.
  4579. The return value is the number of clock ticks since an arbitrary
  4580. point in the past, e.g. since system start-up. ‘times’ returns
  4581. ‘(clock_t)(-1)’ to indicate failure.
  4582. *Portability Note:* The ‘clock’ function described in *note CPU
  4583. Time:: is specified by the ISO C standard. The ‘times’ function is a
  4584. feature of POSIX.1. On GNU systems, the CPU time is defined to be
  4585. equivalent to the sum of the ‘tms_utime’ and ‘tms_stime’ fields returned
  4586. by ‘times’.
  4587. 
  4588. File: libc.info, Node: Calendar Time, Next: Setting an Alarm, Prev: Processor And CPU Time, Up: Date and Time
  4589. 22.5 Calendar Time
  4590. ==================
  4591. This section describes the functions for getting, setting, and
  4592. manipulating calendar times.
  4593. * Menu:
  4594. * Getting the Time:: Functions for finding out what time it is.
  4595. * Setting and Adjusting the Time::
  4596. Functions for setting and adjusting
  4597. the system clock.
  4598. * Broken-down Time:: Facilities for manipulating local time.
  4599. * Formatting Calendar Time:: Converting times to strings.
  4600. * Parsing Date and Time:: Convert textual time and date information back
  4601. into broken-down time values.
  4602. * TZ Variable:: How users specify the time zone ruleset.
  4603. * Time Zone State:: Time zone state variables.
  4604. * Time Functions Example:: An example program showing use of some of
  4605. the time functions.
  4606. 
  4607. File: libc.info, Node: Getting the Time, Next: Setting and Adjusting the Time, Up: Calendar Time
  4608. 22.5.1 Getting the Time
  4609. -----------------------
  4610. The GNU C Library provides several functions for getting the current
  4611. calendar time, with different levels of resolution.
  4612. -- Function: time_t time (time_t *RESULT)
  4613. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4614. Concepts::.
  4615. This is the simplest function for getting the current calendar
  4616. time. It returns the calendar time as a value of type ‘time_t’; on
  4617. POSIX systems, that means it has a resolution of one second. It
  4618. uses the same clock as ‘clock_gettime (CLOCK_REALTIME_COARSE)’,
  4619. when the clock is available or ‘clock_gettime (CLOCK_REALTIME)’
  4620. otherwise.
  4621. If the argument RESULT is not a null pointer, the calendar time
  4622. value is also stored in ‘*RESULT’.
  4623. This function cannot fail.
  4624. Some applications need more precise timekeeping than is possible with
  4625. a ‘time_t’ alone. Some applications also need more control over what is
  4626. meant by "the current time." For these applications, POSIX and ISO C
  4627. provide functions to retrieve the time with up to nanosecond precision,
  4628. from a variety of different clocks. Clocks can be system-wide,
  4629. measuring time the same for all processes; or they can be per-process or
  4630. per-thread, measuring CPU time consumed by a particular process, or some
  4631. other similar resource. Each clock has its own resolution and epoch.
  4632. POSIX and ISO C also provide functions for finding the resolution of a
  4633. clock. There is no function to get the epoch for a clock; either it is
  4634. fixed and documented, or the clock is not meant to be used to measure
  4635. absolute times.
  4636. -- Data Type: clockid_t
  4637. The type ‘clockid_t’ is used for constants that indicate which of
  4638. several POSIX system clocks one wishes to use.
  4639. All systems that support the POSIX functions will define at least
  4640. this clock constant:
  4641. -- Macro: clockid_t CLOCK_REALTIME
  4642. This POSIX clock uses the POSIX Epoch, 1970-01-01 00:00:00 UTC. It
  4643. is close to, but not necessarily in lock-step with, the clocks of
  4644. ‘time’ (above) and of ‘gettimeofday’ (below).
  4645. A second clock constant which is not universal, but still very
  4646. common, is for a clock measuring “monotonic time”. Monotonic time is
  4647. useful for measuring elapsed times, because it guarantees that those
  4648. measurements are not affected by changes to the system clock.
  4649. -- Macro: clockid_t CLOCK_MONOTONIC
  4650. This system-wide POSIX clock continuously measures the advancement
  4651. of calendar time, ignoring discontinuous changes to the system's
  4652. setting for absolute calendar time.
  4653. The epoch for this clock is an unspecified point in the past. The
  4654. epoch may change if the system is rebooted or suspended.
  4655. Therefore, ‘CLOCK_MONOTONIC’ cannot be used to measure absolute
  4656. time, only elapsed time.
  4657. The following clocks are defined by POSIX, but may not be supported
  4658. by all POSIX systems:
  4659. -- Macro: clockid_t CLOCK_PROCESS_CPUTIME_ID
  4660. This POSIX clock measures the amount of CPU time used by the
  4661. calling process.
  4662. -- Macro: clockid_t CLOCK_THREAD_CPUTIME_ID
  4663. This POSIX clock measures the amount of CPU time used by the
  4664. calling thread.
  4665. The following clocks are Linux extensions:
  4666. -- Macro: clockid_t CLOCK_MONOTONIC_RAW
  4667. -- Macro: clockid_t CLOCK_REALTIME_COARSE
  4668. -- Macro: clockid_t CLOCK_MONOTONIC_COARSE
  4669. -- Macro: clockid_t CLOCK_BOOTTIME
  4670. -- Macro: clockid_t CLOCK_REALTIME_ALARM
  4671. -- Macro: clockid_t CLOCK_BOOTTIME_ALARM
  4672. -- Macro: clockid_t CLOCK_TAI
  4673. For details of these clocks, see the manual page clock_gettime(2)
  4674. (Latest, online:
  4675. <https://man7.org/linux/man-pages/man2/clock_gettime.2.html>) *Note
  4676. Linux Kernel::.
  4677. Systems may support additional clocks beyond those listed here.
  4678. -- Function: int clock_gettime (clockid_t CLOCK, struct timespec *TS)
  4679. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4680. Concepts::.
  4681. Get the current time according to the clock identified by CLOCK,
  4682. storing it as seconds and nanoseconds in ‘*TS’. *Note Time
  4683. Types::, for a description of ‘struct timespec’.
  4684. The return value is ‘0’ on success and ‘-1’ on failure. The
  4685. following ‘errno’ error condition is defined for this function:
  4686. ‘EINVAL’
  4687. The clock identified by CLOCK is not supported.
  4688. ‘clock_gettime’ reports the time scaled to seconds and nanoseconds,
  4689. but the actual resolution of each clock may not be as fine as one
  4690. nanosecond, and may not be the same for all clocks. POSIX also provides
  4691. a function for finding out the actual resolution of a clock:
  4692. -- Function: int clock_getres (clockid_t CLOCK, struct timespec *RES)
  4693. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4694. Concepts::.
  4695. Get the actual resolution of the clock identified by CLOCK, storing
  4696. it in ‘*TS’.
  4697. For instance, if the clock hardware for ‘CLOCK_REALTIME’ uses a
  4698. quartz crystal that oscillates at 32.768 kHz, then its resolution
  4699. would be 30.518 microseconds, and
  4700. ‘clock_getres (CLOCK_REALTIME, &r)’ would set ‘r.tv_sec’ to 0 and
  4701. ‘r.tv_nsec’ to 30518.
  4702. The return value is ‘0’ on success and ‘-1’ on failure. The
  4703. following ‘errno’ error condition is defined for this function:
  4704. ‘EINVAL’
  4705. The clock identified by CLOCK is not supported.
  4706. *Portability Note:* On some systems, including systems that use older
  4707. versions of the GNU C Library, programs that use ‘clock_gettime’ or
  4708. ‘clock_setres’ must be linked with the ‘-lrt’ library. This has not
  4709. been necessary with the GNU C Library since version 2.17.
  4710. The following ISO C macros and functions for higher-resolution
  4711. timestamps were standardized more recently than the POSIX functions, so
  4712. they are less portable to older POSIX systems. However, the ISO C
  4713. functions are portable to C platforms that do not support POSIX.
  4714. -- Macro: int TIME_UTC
  4715. This is a positive integer constant designating a simple calendar
  4716. time base. In the GNU C Library and other POSIX systems, this is
  4717. equivalent to the POSIX ‘CLOCK_REALTIME’ clock. On non-POSIX
  4718. systems, though, the epoch is implementation-defined.
  4719. Systems may support more than just this ISO C clock.
  4720. -- Function: int timespec_get (struct timespec *TS, int BASE)
  4721. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4722. Concepts::.
  4723. Store into ‘*TS’ the current time according to the ISO C time BASE.
  4724. The base ‘TIME_UTC’ returns the time since the epoch. It
  4725. corresponds to ‘CLOCK_REALTIME’.
  4726. The base ‘TIME_MONOTONIC’ returns a monotonically nondecreasing
  4727. time since an unspecified point in the past that may change if the
  4728. system is rebooted or suspended. It corresponds to
  4729. ‘CLOCK_MONOTONIC’.
  4730. The base ‘TIME_ACTIVE’ returns the CPU time consumed by the process
  4731. (including all threads). It corresponds to
  4732. ‘CLOCK_PROCESS_CPUTIME_ID’.
  4733. The base ‘TIME_THREAD_ACTIVE’ returns the CPU time consumed by the
  4734. calling thread. It corresponds to ‘CLOCK_THREAD_CPUTIME_ID’.
  4735. The return value is BASE on success and ‘0’ on failure.
  4736. -- Function: int timespec_getres (struct timespec *RES, int BASE)
  4737. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4738. Concepts::.
  4739. If TS is non-null, store into ‘*TS’ the resolution of the time
  4740. provided by ‘timespec_get’ function for the ISO C time BASE.
  4741. The return value is BASE on success and ‘0’ on failure.
  4742. The previous functions, data types and constants are declared in
  4743. ‘time.h’. The GNU C Library also provides an older function for getting
  4744. the current time with a resolution of microseconds. This function is
  4745. declared in ‘sys/time.h’.
  4746. -- Function: int gettimeofday (struct timeval *TP, void *TZP)
  4747. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4748. Concepts::.
  4749. Get the current calendar time, storing it as seconds and
  4750. microseconds in ‘*TP’. *Note Time Types::, for a description of
  4751. ‘struct timeval’. The clock of ‘gettimeofday’ is close to, but not
  4752. necessarily in lock-step with, the clocks of ‘time’ and of
  4753. ‘clock_gettime (CLOCK_REALTIME)’ (see above).
  4754. On some historic systems, if TZP was not a null pointer,
  4755. information about a system-wide time zone would be written to
  4756. ‘*TZP’. This feature is obsolete and not supported on GNU systems.
  4757. You should always supply a null pointer for this argument.
  4758. Instead, use the facilities described in *note Broken-down Time::
  4759. for working with time zones.
  4760. This function cannot fail, and its return value is always ‘0’.
  4761. *Portability Note:* POSIX.1-2024 removed this function. Although
  4762. the GNU C Library will continue to provide it indefinitely,
  4763. portable programs should use ‘clock_gettime’ or ‘timespec_get’
  4764. instead.
  4765. 
  4766. File: libc.info, Node: Setting and Adjusting the Time, Next: Broken-down Time, Prev: Getting the Time, Up: Calendar Time
  4767. 22.5.2 Setting and Adjusting the Time
  4768. -------------------------------------
  4769. The clock hardware inside a modern computer is quite reliable, but it
  4770. can still be wrong. The functions in this section allow one to set the
  4771. system's idea of the current calendar time, and to adjust the rate at
  4772. which the system counts seconds, so that the calendar time will both be
  4773. accurate, and remain accurate.
  4774. The functions in this section require special privileges to use.
  4775. *Note Users and Groups::.
  4776. -- Function: int clock_settime (clockid_t CLOCK, const struct timespec
  4777. *TS)
  4778. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4779. Concepts::.
  4780. Change the current calendar time, according to the clock identified
  4781. by CLOCK, to be the simple calendar time in ‘*TS’.
  4782. Not all of the system's clocks can be changed. For instance, the
  4783. ‘CLOCK_REALTIME’ clock can be changed (with the appropriate
  4784. privileges), but the ‘CLOCK_MONOTONIC’ clock cannot.
  4785. Because simple calendar times are independent of time zone, this
  4786. function should not be used when the time zone changes (e.g. if the
  4787. computer is physically moved from one zone to another). Instead,
  4788. use the facilities described in *note Time Zone State::.
  4789. ‘clock_settime’ causes the clock to jump forwards or backwards,
  4790. which can cause a variety of problems. Changing the
  4791. ‘CLOCK_REALTIME’ clock with ‘clock_settime’ does not affect when
  4792. timers expire (*note Setting an Alarm::) or when sleeping processes
  4793. wake up (*note Sleeping::), which avoids some of the problems.
  4794. Still, for small changes made while the system is running, it is
  4795. better to use ‘ntp_adjtime’ (below) to make a smooth transition
  4796. from one time to another.
  4797. The return value is ‘0’ on success and ‘-1’ on failure. The
  4798. following ‘errno’ error conditions are defined for this function:
  4799. ‘EINVAL’
  4800. The clock identified by CLOCK is not supported or cannot be
  4801. set at all, or the simple calendar time in ‘*TS’ is invalid
  4802. (for instance, ‘ts->tv_nsec’ is negative or greater than
  4803. 999,999,999).
  4804. ‘EPERM’
  4805. This process does not have the privileges required to set the
  4806. clock identified by CLOCK.
  4807. *Portability Note*: On some systems, including systems that use
  4808. older versions of the GNU C Library, programs that use
  4809. ‘clock_settime’ must be linked with the ‘-lrt’ library. This has
  4810. not been necessary with the GNU C Library since version 2.17.
  4811. For systems that remain up and running for long periods, it is not
  4812. enough to set the time once; one should also “discipline” the clock so
  4813. that it does not drift away from the true calendar time.
  4814. The ‘ntp_gettime’ and ‘ntp_adjtime’ functions provide an interface to
  4815. monitor and discipline the system clock. For example, you can fine-tune
  4816. the rate at which the clock "ticks," and make small adjustments to the
  4817. current reported calendar time smoothly, by temporarily speeding up or
  4818. slowing down the clock.
  4819. These functions' names begin with ‘ntp_’ because they were designed
  4820. for use by programs implementing the Network Time Protocol to
  4821. synchronize a system's clock with other systems' clocks and/or with
  4822. external high-precision clock hardware.
  4823. These functions, and the constants and structures they use, are
  4824. declared in ‘sys/timex.h’.
  4825. -- Data Type: struct ntptimeval
  4826. This structure is used to report information about the system
  4827. clock. It contains the following members:
  4828. ‘struct timeval time’
  4829. The current calendar time, as if retrieved by ‘gettimeofday’.
  4830. The ‘struct timeval’ data type is described in *note Time
  4831. Types::.
  4832. ‘long int maxerror’
  4833. This is the maximum error, measured in microseconds. Unless
  4834. updated via ‘ntp_adjtime’ periodically, this value will reach
  4835. some platform-specific maximum value.
  4836. ‘long int esterror’
  4837. This is the estimated error, measured in microseconds. This
  4838. value can be set by ‘ntp_adjtime’ to indicate the estimated
  4839. offset of the system clock from the true calendar time.
  4840. -- Function: int ntp_gettime (struct ntptimeval *TPTR)
  4841. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4842. Concepts::.
  4843. The ‘ntp_gettime’ function sets the structure pointed to by TPTR to
  4844. current values. The elements of the structure afterwards contain
  4845. the values the timer implementation in the kernel assumes. They
  4846. might or might not be correct. If they are not, an ‘ntp_adjtime’
  4847. call is necessary.
  4848. The return value is ‘0’ on success and other values on failure.
  4849. The following ‘errno’ error conditions are defined for this
  4850. function:
  4851. ‘TIME_ERROR’
  4852. The precision clock model is not properly set up at the
  4853. moment, thus the clock must be considered unsynchronized, and
  4854. the values should be treated with care.
  4855. -- Data Type: struct timex
  4856. This structure is used to control and monitor the system clock. It
  4857. contains the following members:
  4858. ‘unsigned int modes’
  4859. This variable controls whether and which values are set.
  4860. Several symbolic constants have to be combined with _binary
  4861. or_ to specify the effective mode. These constants start with
  4862. ‘MOD_’.
  4863. ‘long int offset’
  4864. This value indicates the current offset of the system clock
  4865. from the true calendar time. The value is given in
  4866. microseconds. If bit ‘MOD_OFFSET’ is set in ‘modes’, the
  4867. offset (and possibly other dependent values) can be set. The
  4868. offset's absolute value must not exceed ‘MAXPHASE’.
  4869. ‘long int frequency’
  4870. This value indicates the difference in frequency between the
  4871. true calendar time and the system clock. The value is
  4872. expressed as scaled PPM (parts per million, 0.0001%). The
  4873. scaling is ‘1 << SHIFT_USEC’. The value can be set with bit
  4874. ‘MOD_FREQUENCY’, but the absolute value must not exceed
  4875. ‘MAXFREQ’.
  4876. ‘long int maxerror’
  4877. This is the maximum error, measured in microseconds. A new
  4878. value can be set using bit ‘MOD_MAXERROR’. Unless updated via
  4879. ‘ntp_adjtime’ periodically, this value will increase steadily
  4880. and reach some platform-specific maximum value.
  4881. ‘long int esterror’
  4882. This is the estimated error, measured in microseconds. This
  4883. value can be set using bit ‘MOD_ESTERROR’.
  4884. ‘int status’
  4885. This variable reflects the various states of the clock
  4886. machinery. There are symbolic constants for the significant
  4887. bits, starting with ‘STA_’. Some of these flags can be
  4888. updated using the ‘MOD_STATUS’ bit.
  4889. ‘long int constant’
  4890. This value represents the bandwidth or stiffness of the PLL
  4891. (phase locked loop) implemented in the kernel. The value can
  4892. be changed using bit ‘MOD_TIMECONST’.
  4893. ‘long int precision’
  4894. This value represents the accuracy or the maximum error when
  4895. reading the system clock. The value is expressed in
  4896. microseconds.
  4897. ‘long int tolerance’
  4898. This value represents the maximum frequency error of the
  4899. system clock in scaled PPM. This value is used to increase
  4900. the ‘maxerror’ every second.
  4901. ‘struct timeval time’
  4902. The current calendar time.
  4903. ‘long int tick’
  4904. The elapsed time between clock ticks in microseconds. A clock
  4905. tick is a periodic timer interrupt on which the system clock
  4906. is based.
  4907. ‘long int ppsfreq’
  4908. This is the first of a few optional variables that are present
  4909. only if the system clock can use a PPS (pulse per second)
  4910. signal to discipline the system clock. The value is expressed
  4911. in scaled PPM and it denotes the difference in frequency
  4912. between the system clock and the PPS signal.
  4913. ‘long int jitter’
  4914. This value expresses a median filtered average of the PPS
  4915. signal's dispersion in microseconds.
  4916. ‘int shift’
  4917. This value is a binary exponent for the duration of the PPS
  4918. calibration interval, ranging from ‘PPS_SHIFT’ to
  4919. ‘PPS_SHIFTMAX’.
  4920. ‘long int stabil’
  4921. This value represents the median filtered dispersion of the
  4922. PPS frequency in scaled PPM.
  4923. ‘long int jitcnt’
  4924. This counter represents the number of pulses where the jitter
  4925. exceeded the allowed maximum ‘MAXTIME’.
  4926. ‘long int calcnt’
  4927. This counter reflects the number of successful calibration
  4928. intervals.
  4929. ‘long int errcnt’
  4930. This counter represents the number of calibration errors
  4931. (caused by large offsets or jitter).
  4932. ‘long int stbcnt’
  4933. This counter denotes the number of calibrations where the
  4934. stability exceeded the threshold.
  4935. -- Function: int ntp_adjtime (struct timex *TPTR)
  4936. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4937. Concepts::.
  4938. The ‘ntp_adjtime’ function sets the structure specified by TPTR to
  4939. current values.
  4940. In addition, ‘ntp_adjtime’ updates some settings to match what you
  4941. pass to it in ‘*TPTR’. Use the ‘modes’ element of ‘*TPTR’ to
  4942. select what settings to update. You can set ‘offset’, ‘freq’,
  4943. ‘maxerror’, ‘esterror’, ‘status’, ‘constant’, and ‘tick’.
  4944. ‘modes’ = zero means set nothing.
  4945. Only the superuser can update settings.
  4946. The return value is ‘0’ on success and other values on failure.
  4947. The following ‘errno’ error conditions are defined for this
  4948. function:
  4949. ‘TIME_ERROR’
  4950. The high accuracy clock model is not properly set up at the
  4951. moment, thus the clock must be considered unsynchronized, and
  4952. the values should be treated with care. Another reason could
  4953. be that the specified new values are not allowed.
  4954. ‘EPERM’
  4955. The process specified a settings update, but is not superuser.
  4956. For more details see RFC 5905 (Network Time Protocol, Version 4)
  4957. and related documents.
  4958. *Portability note:* Early versions of the GNU C Library did not
  4959. have this function, but did have the synonymous ‘adjtimex’.
  4960. -- Function: int adjtime (const struct timeval *DELTA, struct timeval
  4961. *OLDDELTA)
  4962. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4963. Concepts::.
  4964. This simpler version of ‘ntp_adjtime’ speeds up or slows down the
  4965. system clock for a short time, in order to correct it by a small
  4966. amount. This avoids a discontinuous change in the calendar time
  4967. reported by the ‘CLOCK_REALTIME’ clock, at the price of having to
  4968. wait longer for the time to become correct.
  4969. The DELTA argument specifies a relative adjustment to be made to
  4970. the clock time. If negative, the system clock is slowed down for a
  4971. while until it has lost this much elapsed time. If positive, the
  4972. system clock is sped up for a while.
  4973. If the OLDDELTA argument is not a null pointer, the ‘adjtime’
  4974. function returns information about any previous time adjustment
  4975. that has not yet completed.
  4976. The return value is ‘0’ on success and ‘-1’ on failure. The
  4977. following ‘errno’ error condition is defined for this function:
  4978. ‘EPERM’
  4979. This process does not have the privileges required to adjust
  4980. the ‘CLOCK_REALTIME’ clock.
  4981. For compatibility, the GNU C Library also provides several older
  4982. functions for controlling the system time. New programs should prefer
  4983. to use the functions above.
  4984. -- Function: int stime (const time_t *NEWTIME)
  4985. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4986. Concepts::.
  4987. Change the ‘CLOCK_REALTIME’ calendar time to be the simple calendar
  4988. time in ‘*NEWTIME’. Calling this function is exactly the same as
  4989. calling ‘clock_settime (CLOCK_REALTIME)’, except that the new time
  4990. can only be set to a precision of one second.
  4991. This function is no longer available on GNU systems, but it may be
  4992. the _only_ way to set the time on very old Unix systems, so we
  4993. continue to document it. If it is available, it is declared in
  4994. ‘time.h’.
  4995. The return value is ‘0’ on success and ‘-1’ on failure. The
  4996. following ‘errno’ error condition is defined for this function:
  4997. ‘EPERM’
  4998. This process does not have the privileges required to adjust
  4999. the ‘CLOCK_REALTIME’ clock.
  5000. -- Function: int adjtimex (struct timex *TIMEX)
  5001. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5002. Concepts::.
  5003. ‘adjtimex’ is an older name for ‘ntp_adjtime’. This function is
  5004. only available on GNU/Linux systems. It is declared in
  5005. ‘sys/timex.h’.
  5006. -- Function: int settimeofday (const struct timeval *TP, const void
  5007. *TZP)
  5008. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  5009. Concepts::.
  5010. Change the ‘CLOCK_REALTIME’ calendar time to be the simple calendar
  5011. time in ‘*NEWTIME’. This function is declared in ‘sys/time.h’.
  5012. When TZP is a null pointer, calling this function is exactly the
  5013. same as calling ‘clock_settime (CLOCK_REALTIME)’, except that the
  5014. new time can only be set to a precision of one microsecond.
  5015. When TZP is not a null pointer, the data it points to _may_ be used
  5016. to set a system-wide idea of the current time zone. This feature
  5017. is obsolete and not supported on GNU systems. Instead, use the
  5018. facilities described in *note Time Zone State:: and in *note
  5019. Broken-down Time:: for working with time zones.
  5020. The return value is ‘0’ on success and ‘-1’ on failure. The
  5021. following ‘errno’ error conditions are defined for this function:
  5022. ‘EPERM’
  5023. This process does not have the privileges required to set the
  5024. ‘CLOCK_REALTIME’ clock.
  5025. ‘EINVAL’
  5026. Neither TP nor TZP is a null pointer. (For historical
  5027. reasons, it is not possible to set the current time and the
  5028. current time zone in the same call.)
  5029. ‘ENOSYS’
  5030. The operating system does not support setting time zone
  5031. information, and TZP is not a null pointer.
  5032. 
  5033. File: libc.info, Node: Broken-down Time, Next: Formatting Calendar Time, Prev: Setting and Adjusting the Time, Up: Calendar Time
  5034. 22.5.3 Broken-down Time
  5035. -----------------------
  5036. Simple calendar times represent absolute times as elapsed times since an
  5037. epoch. This is convenient for computation, but has no relation to the
  5038. way people normally think of calendar time. By contrast, “broken-down
  5039. time” is a binary representation of calendar time separated into year,
  5040. month, day, and so on. Although broken-down time values are painful to
  5041. calculate with, they are useful for printing human readable time
  5042. information.
  5043. A broken-down time value is always relative to a choice of time zone,
  5044. and it also indicates which time zone that is.
  5045. The symbols in this section are declared in the header file ‘time.h’.
  5046. -- Data Type: struct tm
  5047. This is the data type used to represent a broken-down time. The
  5048. structure contains at least the following members, which can appear
  5049. in any order.
  5050. ‘int tm_sec’
  5051. This is the number of full seconds since the top of the minute
  5052. (normally in the range ‘0’ through ‘59’, but the actual upper
  5053. limit is ‘60’, to allow for leap seconds if leap second
  5054. support is available).
  5055. ‘int tm_min’
  5056. This is the number of full minutes since the top of the hour
  5057. (in the range ‘0’ through ‘59’).
  5058. ‘int tm_hour’
  5059. This is the number of full hours past midnight (in the range
  5060. ‘0’ through ‘23’).
  5061. ‘int tm_mday’
  5062. This is the ordinal day of the month (in the range ‘1’ through
  5063. ‘31’). Watch out for this one! As the only ordinal number in
  5064. the structure, it is inconsistent with the rest of the
  5065. structure.
  5066. ‘int tm_mon’
  5067. This is the number of full calendar months since the beginning
  5068. of the year (in the range ‘0’ through ‘11’). Watch out for
  5069. this one! People usually use ordinal numbers for
  5070. month-of-year (where January = 1).
  5071. ‘int tm_year’
  5072. This is the number of full calendar years since 1900.
  5073. ‘int tm_wday’
  5074. This is the number of full days since Sunday (in the range ‘0’
  5075. through ‘6’).
  5076. ‘int tm_yday’
  5077. This is the number of full days since the beginning of the
  5078. year (in the range ‘0’ through ‘365’).
  5079. ‘int tm_isdst’
  5080. This is a flag that indicates whether daylight saving time is
  5081. (or was, or will be) in effect at the time described. The
  5082. value is positive if daylight saving time is in effect, zero
  5083. if it is not, and negative if the information is not
  5084. available. Although this flag is useful when passing a
  5085. broken-down time to the ‘mktime’ function, for other uses this
  5086. flag should be ignored and the ‘tm_gmtoff’ and ‘tm_zone’
  5087. fields should be inspected instead.
  5088. ‘long int tm_gmtoff’
  5089. This field describes the time zone that was used to compute
  5090. this broken-down time value, including any adjustment for
  5091. daylight saving; it is the number of seconds that you must add
  5092. to UTC to get local time. You can also think of this as the
  5093. number of seconds east of the Prime Meridian. For example,
  5094. for U.S. Eastern Standard Time, the value is ‘-5*60*60’.
  5095. ‘const char *tm_zone’
  5096. This field is the abbreviation for the time zone that was used
  5097. to compute this broken-down time value.
  5098. *Portability note:* The ‘tm_gmtoff’ and ‘tm_zone’ fields are
  5099. derived from BSD and are POSIX extensions to ISO C. Code intended
  5100. to be portable to operating systems that lack these fields can
  5101. instead use time zone state variables, although those variables are
  5102. unreliable when the ‘TZ’ environment variable has a geographical
  5103. format. *Note Time Zone State::.
  5104. -- Function: struct tm * localtime (const time_t *TIME)
  5105. Preliminary: | MT-Unsafe race:tmbuf env locale | AS-Unsafe heap
  5106. lock | AC-Unsafe lock mem fd | *Note POSIX Safety Concepts::.
  5107. The ‘localtime’ function converts the simple time pointed to by
  5108. TIME to broken-down time representation, expressed relative to the
  5109. user's specified time zone.
  5110. The return value is a pointer to a static broken-down time
  5111. structure, which might be overwritten by subsequent calls to
  5112. ‘gmtime’ or ‘localtime’. (No other library function overwrites the
  5113. contents of this object.) In the GNU C Library, the structure's
  5114. ‘tm_zone’ points to a string with a storage lifetime that lasts
  5115. indefinitely; on other platforms, the lifetime may expire when the
  5116. ‘TZ’ environment variable is changed.
  5117. The return value is the null pointer if TIME cannot be represented
  5118. as a broken-down time; typically this is because the year cannot
  5119. fit into an ‘int’.
  5120. Calling ‘localtime’ also sets the time zone state as if ‘tzset’
  5121. were called. *Note Time Zone State::.
  5122. Using the ‘localtime’ function is a big problem in multi-threaded
  5123. programs. The result is returned in a static buffer and this is used in
  5124. all threads. A variant function avoids this problem.
  5125. -- Function: struct tm * localtime_r (const time_t *TIME, struct tm
  5126. *RESULTP)
  5127. Preliminary: | MT-Safe env locale | AS-Unsafe heap lock | AC-Unsafe
  5128. lock mem fd | *Note POSIX Safety Concepts::.
  5129. The ‘localtime_r’ function works just like the ‘localtime’
  5130. function. It takes a pointer to a variable containing a simple
  5131. time and converts it to the broken-down time format.
  5132. But the result is not placed in a static buffer. Instead it is
  5133. placed in the object of type ‘struct tm’ to which the parameter
  5134. RESULTP points. Also, the time zone state is not necessarily set
  5135. as if ‘tzset’ were called.
  5136. If the conversion is successful the function returns a pointer to
  5137. the object the result was written into, i.e., it returns RESULTP.
  5138. -- Function: struct tm * gmtime (const time_t *TIME)
  5139. Preliminary: | MT-Unsafe race:tmbuf env locale | AS-Unsafe heap
  5140. lock | AC-Unsafe lock mem fd | *Note POSIX Safety Concepts::.
  5141. This function is similar to ‘localtime’, except that the
  5142. broken-down time is expressed as UTC rather than relative to a
  5143. local time zone. The broken-down time's ‘tm_gmtoff’ is 0, and its
  5144. ‘tm_zone’ is a string "UTC" with static storage duration.
  5145. As for the ‘localtime’ function we have the problem that the result
  5146. is placed in a static variable. A thread-safe replacement is also
  5147. provided for ‘gmtime’.
  5148. -- Function: struct tm * gmtime_r (const time_t *TIME, struct tm
  5149. *RESULTP)
  5150. Preliminary: | MT-Safe env locale | AS-Unsafe heap lock | AC-Unsafe
  5151. lock mem fd | *Note POSIX Safety Concepts::.
  5152. This function is similar to ‘localtime_r’, except that it converts
  5153. just like ‘gmtime’ the given time as UTC.
  5154. If the conversion is successful the function returns a pointer to
  5155. the object the result was written into, i.e., it returns RESULTP.
  5156. -- Function: time_t mktime (struct tm *BROKENTIME)
  5157. Preliminary: | MT-Safe env locale | AS-Unsafe heap lock | AC-Unsafe
  5158. lock mem fd | *Note POSIX Safety Concepts::.
  5159. The ‘mktime’ function converts a broken-down time structure to a
  5160. simple time representation. It also normalizes the contents of the
  5161. broken-down time structure, and fills in some components based on
  5162. the values of the others.
  5163. The ‘mktime’ function ignores the specified contents of the
  5164. ‘tm_wday’, ‘tm_yday’, ‘tm_gmtoff’, and ‘tm_zone’ members of the
  5165. broken-down time structure. It uses the values of the other
  5166. components to determine the calendar time; it's permissible for
  5167. these components to have unnormalized values outside their normal
  5168. ranges. The last thing that ‘mktime’ does is adjust the components
  5169. of the BROKENTIME structure, including the members that were
  5170. initially ignored.
  5171. If the specified broken-down time cannot be represented as a simple
  5172. time, ‘mktime’ returns a value of ‘(time_t)(-1)’ and does not
  5173. modify the contents of BROKENTIME.
  5174. Calling ‘mktime’ also sets the time zone state as if ‘tzset’ were
  5175. called; ‘mktime’ uses this information instead of BROKENTIME's
  5176. initial ‘tm_gmtoff’ and ‘tm_zone’ members. *Note Time Zone
  5177. State::.
  5178. -- Function: time_t timelocal (struct tm *BROKENTIME)
  5179. Preliminary: | MT-Safe env locale | AS-Unsafe heap lock | AC-Unsafe
  5180. lock mem fd | *Note POSIX Safety Concepts::.
  5181. ‘timelocal’ is functionally identical to ‘mktime’, but more
  5182. mnemonically named. Note that it is the inverse of the ‘localtime’
  5183. function.
  5184. *Portability note:* ‘mktime’ is essentially universally available.
  5185. ‘timelocal’ is rather rare.
  5186. -- Function: time_t timegm (struct tm *BROKENTIME)
  5187. Preliminary: | MT-Safe env locale | AS-Unsafe heap lock | AC-Unsafe
  5188. lock mem fd | *Note POSIX Safety Concepts::.
  5189. ‘timegm’ is functionally identical to ‘mktime’ except it always
  5190. takes the input values to be UTC regardless of any local time zone
  5191. setting.
  5192. Note that ‘timegm’ is the inverse of ‘gmtime’.
  5193. *Portability note:* ‘mktime’ is essentially universally available.
  5194. Although ‘timegm’ is standardized by C23, some other systems lack
  5195. it; to be portable to them, you can set the ‘TZ’ environment
  5196. variable to UTC, call ‘mktime’, then set ‘TZ’ back.
  5197. 
  5198. File: libc.info, Node: Formatting Calendar Time, Next: Parsing Date and Time, Prev: Broken-down Time, Up: Calendar Time
  5199. 22.5.4 Formatting Calendar Time
  5200. -------------------------------
  5201. The functions described in this section format calendar time values as
  5202. strings. These functions are declared in the header file ‘time.h’.
  5203. -- Function: size_t strftime (char *S, size_t SIZE, const char
  5204. *TEMPLATE, const struct tm *BROKENTIME)
  5205. Preliminary: | MT-Safe env locale | AS-Unsafe corrupt heap lock
  5206. dlopen | AC-Unsafe corrupt lock mem fd | *Note POSIX Safety
  5207. Concepts::.
  5208. This function is similar to the ‘sprintf’ function (*note Formatted
  5209. Input::), but the conversion specifications that can appear in the
  5210. format template TEMPLATE are specialized for printing components of
  5211. BROKENTIME according to the locale currently specified for time
  5212. conversion (*note Locales::) and the current time zone (*note Time
  5213. Zone State::).
  5214. Ordinary characters appearing in the TEMPLATE are copied to the
  5215. output string S; this can include multibyte character sequences.
  5216. Conversion specifiers are introduced by a ‘%’ character, followed
  5217. by an optional flag which can be one of the following. These flags
  5218. are all GNU extensions. The first three affect only the output of
  5219. numbers:
  5220. ‘_’
  5221. The number is padded with spaces.
  5222. ‘-’
  5223. The number is not padded at all.
  5224. ‘0’
  5225. The number is padded with zeros even if the format specifies
  5226. padding with spaces.
  5227. ‘^’
  5228. The output uses uppercase characters, but only if this is
  5229. possible (*note Case Conversion::).
  5230. The default action is to pad the number with zeros to keep it a
  5231. constant width. Numbers that do not have a range indicated below
  5232. are never padded, since there is no natural width for them.
  5233. Following the flag an optional specification of the width is
  5234. possible. This is specified in decimal notation. If the natural
  5235. size of the output of the field has less than the specified number
  5236. of characters, the result is written right adjusted and space
  5237. padded to the given size.
  5238. An optional modifier can follow the optional flag and width
  5239. specification. The modifiers are:
  5240. ‘E’
  5241. Use the locale's alternative representation for date and time.
  5242. This modifier applies to the ‘%c’, ‘%C’, ‘%x’, ‘%X’, ‘%y’ and
  5243. ‘%Y’ format specifiers. In a Japanese locale, for example,
  5244. ‘%Ex’ might yield a date format based on the Japanese
  5245. Emperors' reigns.
  5246. ‘O’
  5247. With all format specifiers that produce numbers: use the
  5248. locale's alternative numeric symbols.
  5249. With ‘%B’, ‘%b’, and ‘%h’: use the grammatical form for month
  5250. names that is appropriate when the month is named by itself,
  5251. rather than the form that is appropriate when the month is
  5252. used as part of a complete date. The ‘%OB’ and ‘%Ob’ formats
  5253. are a C23 feature, specified in C23 to use the locale's
  5254. 'alternative' month name; the GNU C Library extends this
  5255. specification to say that the form used in a complete date is
  5256. the default and the form naming the month by itself is the
  5257. alternative.
  5258. If the format supports the modifier but no alternative
  5259. representation is available, it is ignored.
  5260. The conversion specifier ends with a format specifier taken from
  5261. the following list. The whole ‘%’ sequence is replaced in the
  5262. output string as follows:
  5263. ‘%a’
  5264. The abbreviated weekday name according to the current locale.
  5265. ‘%A’
  5266. The full weekday name according to the current locale.
  5267. ‘%b’
  5268. The abbreviated month name according to the current locale, in
  5269. the grammatical form used when the month is part of a complete
  5270. date. As a C23 feature (with a more detailed specification in
  5271. the GNU C Library), the ‘O’ modifier can be used (‘%Ob’) to
  5272. get the grammatical form used when the month is named by
  5273. itself.
  5274. ‘%B’
  5275. The full month name according to the current locale, in the
  5276. grammatical form used when the month is part of a complete
  5277. date. As a C23 feature (with a more detailed specification in
  5278. the GNU C Library), the ‘O’ modifier can be used (‘%OB’) to
  5279. get the grammatical form used when the month is named by
  5280. itself.
  5281. Note that not all languages need two different forms of the
  5282. month names, so the text produced by ‘%B’ and ‘%OB’, and by
  5283. ‘%b’ and ‘%Ob’, may or may not be the same, depending on the
  5284. locale.
  5285. ‘%c’
  5286. The preferred calendar time representation for the current
  5287. locale.
  5288. ‘%C’
  5289. The century of the year. This is equivalent to the greatest
  5290. integer not greater than the year divided by 100.
  5291. If the ‘E’ modifier is specified (‘%EC’), instead produces the
  5292. name of the period for the year (e.g. an era name) in the
  5293. locale's alternative calendar.
  5294. ‘%d’
  5295. The day of the month as a decimal number (range ‘01’ through
  5296. ‘31’).
  5297. ‘%D’
  5298. The date using the format ‘%m/%d/%y’.
  5299. ‘%e’
  5300. The day of the month like with ‘%d’, but padded with spaces
  5301. (range ‘ 1’ through ‘31’).
  5302. ‘%F’
  5303. The date using the format ‘%Y-%m-%d’. This is the form
  5304. specified in the ISO 8601 standard and is the preferred form
  5305. for all uses.
  5306. ‘%g’
  5307. The year corresponding to the ISO week number, but without the
  5308. century (range ‘00’ through ‘99’). This has the same format
  5309. and value as ‘%y’, except that if the ISO week number (see
  5310. ‘%V’) belongs to the previous or next year, that year is used
  5311. instead.
  5312. ‘%G’
  5313. The year corresponding to the ISO week number. This has the
  5314. same format and value as ‘%Y’, except that if the ISO week
  5315. number (see ‘%V’) belongs to the previous or next year, that
  5316. year is used instead.
  5317. ‘%h’
  5318. The abbreviated month name according to the current locale.
  5319. The action is the same as for ‘%b’.
  5320. ‘%H’
  5321. The hour as a decimal number, using a 24-hour clock (range
  5322. ‘00’ through ‘23’).
  5323. ‘%I’
  5324. The hour as a decimal number, using a 12-hour clock (range
  5325. ‘01’ through ‘12’).
  5326. ‘%j’
  5327. The day of the year as a decimal number (range ‘001’ through
  5328. ‘366’).
  5329. ‘%k’
  5330. The hour as a decimal number, using a 24-hour clock like ‘%H’,
  5331. but padded with spaces (range ‘ 0’ through ‘23’).
  5332. This format is a GNU extension.
  5333. ‘%l’
  5334. The hour as a decimal number, using a 12-hour clock like ‘%I’,
  5335. but padded with spaces (range ‘ 1’ through ‘12’).
  5336. This format is a GNU extension.
  5337. ‘%m’
  5338. The month as a decimal number (range ‘01’ through ‘12’).
  5339. ‘%M’
  5340. The minute as a decimal number (range ‘00’ through ‘59’).
  5341. ‘%n’
  5342. A single ‘\n’ (newline) character.
  5343. ‘%p’
  5344. Either ‘AM’ or ‘PM’, according to the given time value; or the
  5345. corresponding strings for the current locale. Noon is treated
  5346. as ‘PM’ and midnight as ‘AM’. In most locales ‘AM’/‘PM’
  5347. format is not supported, in such cases "%p" yields an empty
  5348. string.
  5349. ‘%P’
  5350. Either ‘am’ or ‘pm’, according to the given time value; or the
  5351. corresponding strings for the current locale, printed in
  5352. lowercase characters. Noon is treated as ‘pm’ and midnight as
  5353. ‘am’. In most locales ‘AM’/‘PM’ format is not supported, in
  5354. such cases "%P" yields an empty string.
  5355. This format is a GNU extension.
  5356. ‘%r’
  5357. The complete calendar time using the AM/PM format of the
  5358. current locale.
  5359. In the POSIX locale, this format is equivalent to ‘%I:%M:%S
  5360. %p’.
  5361. ‘%R’
  5362. The hour and minute in decimal numbers using the format
  5363. ‘%H:%M’.
  5364. ‘%s’
  5365. The number of seconds since the POSIX Epoch, i.e., since
  5366. 1970-01-01 00:00:00 UTC. Leap seconds are not counted unless
  5367. leap second support is available.
  5368. This format is a GNU extension.
  5369. ‘%S’
  5370. The seconds as a decimal number (range ‘00’ through ‘60’).
  5371. ‘%t’
  5372. A single ‘\t’ (tabulator) character.
  5373. ‘%T’
  5374. The time of day using decimal numbers using the format
  5375. ‘%H:%M:%S’.
  5376. ‘%u’
  5377. The day of the week as a decimal number (range ‘1’ through
  5378. ‘7’), Monday being ‘1’.
  5379. ‘%U’
  5380. The week number of the current year as a decimal number (range
  5381. ‘00’ through ‘53’), starting with the first Sunday as the
  5382. first day of the first week. Days preceding the first Sunday
  5383. in the year are considered to be in week ‘00’.
  5384. ‘%V’
  5385. The ISO 8601 week number as a decimal number (range ‘01’
  5386. through ‘53’). ISO weeks start with Monday and end with
  5387. Sunday. Week ‘01’ of a year is the first week which has the
  5388. majority of its days in that year; this is equivalent to the
  5389. week containing the year's first Thursday, and it is also
  5390. equivalent to the week containing January 4. Week ‘01’ of a
  5391. year can contain days from the previous year. The week before
  5392. week ‘01’ of a year is the last week (‘52’ or ‘53’) of the
  5393. previous year even if it contains days from the new year.
  5394. ‘%w’
  5395. The day of the week as a decimal number (range ‘0’ through
  5396. ‘6’), Sunday being ‘0’.
  5397. ‘%W’
  5398. The week number of the current year as a decimal number (range
  5399. ‘00’ through ‘53’), starting with the first Monday as the
  5400. first day of the first week. All days preceding the first
  5401. Monday in the year are considered to be in week ‘00’.
  5402. ‘%x’
  5403. The preferred date representation for the current locale.
  5404. ‘%X’
  5405. The preferred time of day representation for the current
  5406. locale.
  5407. ‘%y’
  5408. The year without a century as a decimal number (range ‘00’
  5409. through ‘99’). This is equivalent to the year modulo 100.
  5410. If the ‘E’ modifier is specified (‘%Ey’), instead produces the
  5411. year number according to a locale-specific alternative
  5412. calendar. Unlike ‘%y’, the number is _not_ reduced modulo
  5413. 100. However, by default it is zero-padded to a minimum of
  5414. two digits (this can be overridden by an explicit field width
  5415. or by the ‘_’ and ‘-’ flags).
  5416. ‘%Y’
  5417. The year as a decimal number, using the Gregorian calendar.
  5418. Years before the year ‘1’ are numbered ‘0’, ‘-1’, and so on.
  5419. If the ‘E’ modifier is specified (‘%EY’), instead produces a
  5420. complete representation of the year according to the locale's
  5421. alternative calendar. Generally this will be some combination
  5422. of the information produced by ‘%EC’ and ‘%Ey’. As a GNU
  5423. extension, the formatting flags ‘_’ or ‘-’ may be used with
  5424. this conversion specifier; they affect how the year number is
  5425. printed.
  5426. ‘%z’
  5427. RFC 5322/ISO 8601 style numeric time zone (e.g., ‘-0600’ or
  5428. ‘+0100’), or nothing if no time zone is determinable.
  5429. In the POSIX locale, a full RFC 5322 timestamp is generated by
  5430. the format "%a, %d %b %Y %H:%M:%S %z" (or the equivalent
  5431. "%a, %d %b %Y %T %z").
  5432. ‘%Z’
  5433. The time zone abbreviation (empty if the time zone can't be
  5434. determined).
  5435. ‘%%’
  5436. A literal ‘%’ character.
  5437. The SIZE parameter can be used to specify the maximum number of
  5438. characters to be stored in the array S, including the terminating
  5439. null character. If the formatted time requires more than SIZE
  5440. characters, ‘strftime’ returns zero and the contents of the array S
  5441. are undefined. Otherwise the return value indicates the number of
  5442. characters placed in the array S, not including the terminating
  5443. null character.
  5444. _Warning:_ This convention for the return value which is prescribed
  5445. in ISO C can lead to problems in some situations. For certain
  5446. format strings and certain locales the output really can be the
  5447. empty string and this cannot be discovered by testing the return
  5448. value only. E.g., in most locales the AM/PM time format is not
  5449. supported (most of the world uses the 24 hour time representation).
  5450. In such locales "%p" will return the empty string, i.e., the return
  5451. value is zero. To detect situations like this something similar to
  5452. the following code should be used:
  5453. buf[0] = '\1';
  5454. len = strftime (buf, bufsize, format, tp);
  5455. if (len == 0 && buf[0] != '\0')
  5456. {
  5457. /* Something went wrong in the strftime call. */
  5458. ...
  5459. }
  5460. If S is a null pointer, ‘strftime’ does not actually write
  5461. anything, but instead returns the number of characters it would
  5462. have written.
  5463. Calling ‘strftime’ also sets the time zone state as if ‘tzset’ were
  5464. called. *Note Time Zone State::.
  5465. For an example of ‘strftime’, see *note Time Functions Example::.
  5466. -- Function: size_t strftime_l (char *restrict S, size_t SIZE, const
  5467. char *restrict TEMPLATE, const struct tm *BROKENTIME, locale_t
  5468. LOCALE)
  5469. Preliminary: | MT-Safe env locale | AS-Unsafe corrupt heap lock
  5470. dlopen | AC-Unsafe corrupt lock mem fd | *Note POSIX Safety
  5471. Concepts::.
  5472. The ‘strftime_l’ function is equivalent to the ‘strftime’ function
  5473. except that it operates in LOCALE rather than in the current
  5474. locale.
  5475. -- Function: size_t wcsftime (wchar_t *S, size_t SIZE, const wchar_t
  5476. *TEMPLATE, const struct tm *BROKENTIME)
  5477. Preliminary: | MT-Safe env locale | AS-Unsafe corrupt heap lock
  5478. dlopen | AC-Unsafe corrupt lock mem fd | *Note POSIX Safety
  5479. Concepts::.
  5480. The ‘wcsftime’ function is equivalent to the ‘strftime’ function
  5481. with the difference that it operates on wide character strings.
  5482. The buffer where the result is stored, pointed to by S, must be an
  5483. array of wide characters. The parameter SIZE which specifies the
  5484. size of the output buffer gives the number of wide characters, not
  5485. the number of bytes.
  5486. Also the format string TEMPLATE is a wide character string. Since
  5487. all characters needed to specify the format string are in the basic
  5488. character set it is portably possible to write format strings in
  5489. the C source code using the ‘L"..."’ notation. The parameter
  5490. BROKENTIME has the same meaning as in the ‘strftime’ call.
  5491. The ‘wcsftime’ function supports the same flags, modifiers, and
  5492. format specifiers as the ‘strftime’ function.
  5493. The return value of ‘wcsftime’ is the number of wide characters
  5494. stored in ‘s’. When more characters would have to be written than
  5495. can be placed in the buffer S the return value is zero, with the
  5496. same problems indicated in the ‘strftime’ documentation.
  5497. -- Deprecated function: char * asctime (const struct tm *BROKENTIME)
  5498. Preliminary: | MT-Unsafe race:asctime locale | AS-Unsafe | AC-Safe
  5499. | *Note POSIX Safety Concepts::.
  5500. The ‘asctime’ function converts the broken-down time value that
  5501. BROKENTIME points to into a string in a standard format:
  5502. "Tue May 21 13:46:22 1991\n"
  5503. The abbreviations for the days of week are: ‘Sun’, ‘Mon’, ‘Tue’,
  5504. ‘Wed’, ‘Thu’, ‘Fri’, and ‘Sat’.
  5505. The abbreviations for the months are: ‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’,
  5506. ‘May’, ‘Jun’, ‘Jul’, ‘Aug’, ‘Sep’, ‘Oct’, ‘Nov’, and ‘Dec’.
  5507. Behavior is undefined if the calculated year would be less than
  5508. 1000 or greater than 9999.
  5509. The return value points to a statically allocated string, which
  5510. might be overwritten by subsequent calls to ‘asctime’ or ‘ctime’.
  5511. (No other library function overwrites the contents of this string.)
  5512. *Portability note:* This obsolescent function is deprecated in C23.
  5513. Programs should instead use ‘strftime’ or even ‘sprintf’.
  5514. -- Deprecated function: char * asctime_r (const struct tm *BROKENTIME,
  5515. char *BUFFER)
  5516. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  5517. Safety Concepts::.
  5518. This function is similar to ‘asctime’ but instead of placing the
  5519. result in a static buffer it writes the string in the buffer
  5520. pointed to by the parameter BUFFER. This buffer should have room
  5521. for at least 26 bytes, including the terminating null. Behavior is
  5522. undefined if the calculated year would be less than 1000 or greater
  5523. than 9999.
  5524. If no error occurred the function returns a pointer to the string
  5525. the result was written into, i.e., it returns BUFFER. Otherwise it
  5526. returns ‘NULL’.
  5527. *Portability Note:* POSIX.1-2024 removed this obsolescent function.
  5528. Programs should instead use ‘strftime’ or even ‘sprintf’.
  5529. -- Deprecated function: char * ctime (const time_t *TIME)
  5530. Preliminary: | MT-Unsafe race:tmbuf race:asctime env locale |
  5531. AS-Unsafe heap lock | AC-Unsafe lock mem fd | *Note POSIX Safety
  5532. Concepts::.
  5533. The ‘ctime’ function is similar to ‘asctime’, except that you
  5534. specify the calendar time argument as a ‘time_t’ simple time value
  5535. rather than in broken-down local time format. It is equivalent to
  5536. asctime (localtime (TIME))
  5537. Behavior is undefined if the calculated year would be less than
  5538. 1000 or greater than 9999.
  5539. Calling ‘ctime’ also sets the time zone state as if ‘tzset’ were
  5540. called. *Note Time Zone State::.
  5541. *Portability note:* This obsolescent function is deprecated in C23.
  5542. Programs should instead use ‘strftime’ or even ‘sprintf’.
  5543. -- Deprecated function: char * ctime_r (const time_t *TIME, char
  5544. *BUFFER)
  5545. Preliminary: | MT-Safe env locale | AS-Unsafe heap lock | AC-Unsafe
  5546. lock mem fd | *Note POSIX Safety Concepts::.
  5547. This function is similar to ‘ctime’, but places the result in the
  5548. string pointed to by BUFFER, and the time zone state is not
  5549. necessarily set as if ‘tzset’ were called. It is equivalent to:
  5550. asctime_r (localtime_r (TIME, &(struct tm) {0}), BUFFER)
  5551. Behavior is undefined if the calculated year would be less than
  5552. 1000 or greater than 9999.
  5553. If no error occurred the function returns a pointer to the string
  5554. the result was written into, i.e., it returns BUFFER. Otherwise it
  5555. returns ‘NULL’.
  5556. *Portability Note:* POSIX.1-2024 removed this obsolescent function.
  5557. Programs should instead use ‘strftime’ or even ‘sprintf’.
  5558. 
  5559. File: libc.info, Node: Parsing Date and Time, Next: TZ Variable, Prev: Formatting Calendar Time, Up: Calendar Time
  5560. 22.5.5 Convert textual time and date information back
  5561. -----------------------------------------------------
  5562. The ISO C standard does not specify any functions which can convert the
  5563. output of the ‘strftime’ function back into a binary format. This led
  5564. to a variety of more-or-less successful implementations with different
  5565. interfaces over the years. Then the Unix standard was extended by the
  5566. addition of two functions: ‘strptime’ and ‘getdate’. Both have strange
  5567. interfaces but at least they are widely available.
  5568. * Menu:
  5569. * Low-Level Time String Parsing:: Interpret string according to given format.
  5570. * General Time String Parsing:: User-friendly function to parse data and
  5571. time strings.
  5572. 
  5573. File: libc.info, Node: Low-Level Time String Parsing, Next: General Time String Parsing, Up: Parsing Date and Time
  5574. 22.5.5.1 Interpret string according to given format
  5575. ...................................................
  5576. The first function is rather low-level. It is nevertheless frequently
  5577. used in software since it is better known. Its interface and
  5578. implementation are heavily influenced by the ‘getdate’ function, which
  5579. is defined and implemented in terms of calls to ‘strptime’.
  5580. -- Function: char * strptime (const char *S, const char *FMT, struct tm
  5581. *TP)
  5582. Preliminary: | MT-Safe env locale | AS-Unsafe heap lock | AC-Unsafe
  5583. lock mem fd | *Note POSIX Safety Concepts::.
  5584. The ‘strptime’ function parses the input string S according to the
  5585. format string FMT and stores its results in the structure TP.
  5586. The input string could be generated by a ‘strftime’ call or
  5587. obtained any other way. It does not need to be in a
  5588. human-recognizable format; e.g. a date passed as "02:1999:9" is
  5589. acceptable, even though it is ambiguous without context. As long
  5590. as the format string FMT matches the input string the function will
  5591. succeed.
  5592. The user has to make sure, though, that the input can be parsed in
  5593. a unambiguous way. The string "1999112" can be parsed using the
  5594. format "%Y%m%d" as 1999-1-12, 1999-11-2, or even 19991-1-2. It is
  5595. necessary to add appropriate separators to reliably get results.
  5596. The format string consists of the same components as the format
  5597. string of the ‘strftime’ function. The only difference is that the
  5598. flags ‘_’, ‘-’, ‘0’, and ‘^’ are not allowed. Several of the
  5599. distinct formats of ‘strftime’ do the same work in ‘strptime’ since
  5600. differences like case of the input do not matter. For reasons of
  5601. symmetry all formats are supported, though.
  5602. The modifiers ‘E’ and ‘O’ are also allowed everywhere the
  5603. ‘strftime’ function allows them.
  5604. The formats are:
  5605. ‘%a’
  5606. ‘%A’
  5607. The weekday name according to the current locale, in
  5608. abbreviated form or the full name.
  5609. ‘%b’
  5610. ‘%B’
  5611. ‘%h’
  5612. A month name according to the current locale. All three
  5613. specifiers will recognize both abbreviated and full month
  5614. names. If the locale provides two different grammatical forms
  5615. of month names, all three specifiers will recognize both
  5616. forms.
  5617. As a GNU extension, the ‘O’ modifier can be used with these
  5618. specifiers; it has no effect, as both grammatical forms of
  5619. month names are recognized.
  5620. ‘%c’
  5621. The date and time representation for the current locale.
  5622. ‘%Ec’
  5623. Like ‘%c’ but the locale's alternative date and time format is
  5624. used.
  5625. ‘%C’
  5626. The century of the year.
  5627. It makes sense to use this format only if the format string
  5628. also contains the ‘%y’ format.
  5629. ‘%EC’
  5630. The locale's representation of the period.
  5631. Unlike ‘%C’ it sometimes makes sense to use this format since
  5632. some cultures represent years relative to the beginning of
  5633. eras instead of using the Gregorian years.
  5634. ‘%d’
  5635. ‘%e’
  5636. The day of the month as a decimal number (range ‘1’ through
  5637. ‘31’). Leading zeroes are permitted but not required.
  5638. ‘%Od’
  5639. ‘%Oe’
  5640. Same as ‘%d’ but using the locale's alternative numeric
  5641. symbols.
  5642. Leading zeroes are permitted but not required.
  5643. ‘%D’
  5644. Equivalent to ‘%m/%d/%y’.
  5645. ‘%F’
  5646. Equivalent to ‘%Y-%m-%d’, which is the ISO 8601 date format.
  5647. This is a GNU extension following an ISO C99 extension to
  5648. ‘strftime’.
  5649. ‘%g’
  5650. The year corresponding to the ISO week number, but without the
  5651. century (range ‘00’ through ‘99’).
  5652. _Note:_ Currently, this is not fully implemented. The format
  5653. is recognized, input is consumed but no field in TM is set.
  5654. This format is a GNU extension following a GNU extension of
  5655. ‘strftime’.
  5656. ‘%G’
  5657. The year corresponding to the ISO week number.
  5658. _Note:_ Currently, this is not fully implemented. The format
  5659. is recognized, input is consumed but no field in TM is set.
  5660. This format is a GNU extension following a GNU extension of
  5661. ‘strftime’.
  5662. ‘%H’
  5663. ‘%k’
  5664. The hour as a decimal number, using a 24-hour clock (range
  5665. ‘00’ through ‘23’).
  5666. ‘%k’ is a GNU extension following a GNU extension of
  5667. ‘strftime’.
  5668. ‘%OH’
  5669. Same as ‘%H’ but using the locale's alternative numeric
  5670. symbols.
  5671. ‘%I’
  5672. ‘%l’
  5673. The hour as a decimal number, using a 12-hour clock (range
  5674. ‘01’ through ‘12’).
  5675. ‘%l’ is a GNU extension following a GNU extension of
  5676. ‘strftime’.
  5677. ‘%OI’
  5678. Same as ‘%I’ but using the locale's alternative numeric
  5679. symbols.
  5680. ‘%j’
  5681. The day of the year as a decimal number (range ‘1’ through
  5682. ‘366’).
  5683. Leading zeroes are permitted but not required.
  5684. ‘%m’
  5685. The month as a decimal number (range ‘1’ through ‘12’).
  5686. Leading zeroes are permitted but not required.
  5687. ‘%Om’
  5688. Same as ‘%m’ but using the locale's alternative numeric
  5689. symbols.
  5690. ‘%M’
  5691. The minute as a decimal number (range ‘0’ through ‘59’).
  5692. Leading zeroes are permitted but not required.
  5693. ‘%OM’
  5694. Same as ‘%M’ but using the locale's alternative numeric
  5695. symbols.
  5696. ‘%n’
  5697. ‘%t’
  5698. Matches any whitespace.
  5699. ‘%p’
  5700. ‘%P’
  5701. The locale-dependent equivalent to ‘AM’ or ‘PM’.
  5702. This format is not useful unless ‘%I’ or ‘%l’ is also used.
  5703. Another complication is that the locale might not define these
  5704. values at all and therefore the conversion fails.
  5705. ‘%P’ is a GNU extension following a GNU extension to
  5706. ‘strftime’.
  5707. ‘%r’
  5708. The complete time using the AM/PM format of the current
  5709. locale.
  5710. A complication is that the locale might not define this format
  5711. at all and therefore the conversion fails.
  5712. ‘%R’
  5713. The hour and minute in decimal numbers using the format
  5714. ‘%H:%M’.
  5715. ‘%R’ is a GNU extension following a GNU extension to
  5716. ‘strftime’.
  5717. ‘%s’
  5718. The number of seconds since the POSIX Epoch, i.e., since
  5719. 1970-01-01 00:00:00 UTC. Leap seconds are not counted unless
  5720. leap second support is available.
  5721. ‘%s’ is a GNU extension following a GNU extension to
  5722. ‘strftime’.
  5723. ‘%S’
  5724. The seconds as a decimal number (range ‘0’ through ‘60’).
  5725. Leading zeroes are permitted but not required.
  5726. *NB:* The Unix specification says the upper bound on this
  5727. value is ‘61’, a result of a decision to allow double leap
  5728. seconds. You will not see the value ‘61’ because no minute
  5729. has more than one leap second, but the myth persists.
  5730. ‘%OS’
  5731. Same as ‘%S’ but using the locale's alternative numeric
  5732. symbols.
  5733. ‘%T’
  5734. Equivalent to the use of ‘%H:%M:%S’ in this place.
  5735. ‘%u’
  5736. The day of the week as a decimal number (range ‘1’ through
  5737. ‘7’), Monday being ‘1’.
  5738. Leading zeroes are permitted but not required.
  5739. _Note:_ Currently, this is not fully implemented. The format
  5740. is recognized, input is consumed but no field in TM is set.
  5741. ‘%U’
  5742. The week number of the current year as a decimal number (range
  5743. ‘0’ through ‘53’).
  5744. Leading zeroes are permitted but not required.
  5745. ‘%OU’
  5746. Same as ‘%U’ but using the locale's alternative numeric
  5747. symbols.
  5748. ‘%V’
  5749. The ISO 8601 week number as a decimal number (range ‘1’
  5750. through ‘53’).
  5751. Leading zeroes are permitted but not required.
  5752. _Note:_ Currently, this is not fully implemented. The format
  5753. is recognized, input is consumed but no field in TM is set.
  5754. ‘%w’
  5755. The day of the week as a decimal number (range ‘0’ through
  5756. ‘6’), Sunday being ‘0’.
  5757. Leading zeroes are permitted but not required.
  5758. _Note:_ Currently, this is not fully implemented. The format
  5759. is recognized, input is consumed but no field in TM is set.
  5760. ‘%Ow’
  5761. Same as ‘%w’ but using the locale's alternative numeric
  5762. symbols.
  5763. ‘%W’
  5764. The week number of the current year as a decimal number (range
  5765. ‘0’ through ‘53’).
  5766. Leading zeroes are permitted but not required.
  5767. _Note:_ Currently, this is not fully implemented. The format
  5768. is recognized, input is consumed but no field in TM is set.
  5769. ‘%OW’
  5770. Same as ‘%W’ but using the locale's alternative numeric
  5771. symbols.
  5772. ‘%x’
  5773. The date using the locale's date format.
  5774. ‘%Ex’
  5775. Like ‘%x’ but the locale's alternative data representation is
  5776. used.
  5777. ‘%X’
  5778. The time using the locale's time format.
  5779. ‘%EX’
  5780. Like ‘%X’ but the locale's alternative time representation is
  5781. used.
  5782. ‘%y’
  5783. The year without a century as a decimal number (range ‘0’
  5784. through ‘99’).
  5785. Leading zeroes are permitted but not required.
  5786. Note that it is questionable to use this format without the
  5787. ‘%C’ format. The ‘strptime’ function does regard input values
  5788. in the range 68 to 99 as the years 1969 to 1999 and the values
  5789. 0 to 68 as the years 2000 to 2068. But maybe this heuristic
  5790. fails for some input data.
  5791. Therefore it is best to avoid ‘%y’ completely and use ‘%Y’
  5792. instead.
  5793. ‘%Ey’
  5794. The offset from ‘%EC’ in the locale's alternative
  5795. representation.
  5796. ‘%Oy’
  5797. The offset of the year (from ‘%C’) using the locale's
  5798. alternative numeric symbols.
  5799. ‘%Y’
  5800. The year as a decimal number, using the Gregorian calendar.
  5801. ‘%EY’
  5802. The full alternative year representation.
  5803. ‘%z’
  5804. The offset from UTC in ISO 8601/RFC 5322 format.
  5805. ‘%Z’
  5806. The time zone abbreviation.
  5807. _Note:_ Currently, this is not fully implemented. The format
  5808. is recognized, input is consumed but no field in TM is set.
  5809. ‘%%’
  5810. A literal ‘%’ character.
  5811. All other characters in the format string must have a matching
  5812. character in the input string. Exceptions are whitespace
  5813. characters in the input string which can match zero or more
  5814. whitespace characters in the format string.
  5815. *Portability Note:* The XPG standard advises applications to use at
  5816. least one whitespace character (as specified by ‘isspace’) or other
  5817. non-alphanumeric characters between any two conversion
  5818. specifications. The GNU C Library does not have this limitation
  5819. but other libraries might have trouble parsing formats like
  5820. "%d%m%Y%H%M%S".
  5821. The ‘strptime’ function processes the input string from right to
  5822. left. Each of the three possible input elements (whitespace,
  5823. literal, or format) are handled one after the other. If the input
  5824. cannot be matched to the format string the function stops. The
  5825. remainder of the format and input strings are not processed.
  5826. The function returns a pointer to the first character it was unable
  5827. to process. If the input string contains more characters than
  5828. required by the format string the return value points right after
  5829. the last consumed input character. If the whole input string is
  5830. consumed the return value points to the ‘NULL’ byte at the end of
  5831. the string. If an error occurs, i.e., ‘strptime’ fails to match
  5832. all of the format string, the function returns ‘NULL’.
  5833. The specification of the function in the XPG standard is rather
  5834. vague, leaving out a few important pieces of information. Most
  5835. importantly, it does not specify what happens to those elements of TM
  5836. which are not directly initialized by the different formats. The
  5837. implementations on different Unix systems vary here.
  5838. The GNU C Library implementation does not touch those fields which
  5839. are not directly initialized. Exceptions are the ‘tm_wday’ and
  5840. ‘tm_yday’ elements, which are recomputed if any of the year, month, or
  5841. date elements changed. This has two implications:
  5842. • Before calling the ‘strptime’ function for a new input string, you
  5843. should prepare the TM structure you pass. Normally this will mean
  5844. initializing all values to zero. Alternatively, you can set all
  5845. fields to values like ‘INT_MAX’, allowing you to determine which
  5846. elements were set by the function call. Zero does not work here
  5847. since it is a valid value for many of the fields.
  5848. Careful initialization is necessary if you want to find out whether
  5849. a certain field in TM was initialized by the function call.
  5850. • You can construct a ‘struct tm’ value with several consecutive
  5851. ‘strptime’ calls. A useful application of this is e.g. the
  5852. parsing of two separate strings, one containing date information
  5853. and the other time information. By parsing one after the other
  5854. without clearing the structure in-between, you can construct a
  5855. complete broken-down time.
  5856. The following example shows a function which parses a string which
  5857. contains the date information in either US style or ISO 8601 form:
  5858. const char *
  5859. parse_date (const char *input, struct tm *tm)
  5860. {
  5861. const char *cp;
  5862. /* First clear the result structure. */
  5863. memset (tm, '\0', sizeof (*tm));
  5864. /* Try the ISO format first. */
  5865. cp = strptime (input, "%F", tm);
  5866. if (cp == NULL)
  5867. {
  5868. /* Does not match. Try the US form. */
  5869. cp = strptime (input, "%D", tm);
  5870. }
  5871. return cp;
  5872. }
  5873. 
  5874. File: libc.info, Node: General Time String Parsing, Prev: Low-Level Time String Parsing, Up: Parsing Date and Time
  5875. 22.5.5.2 A More User-friendly Way to Parse Times and Dates
  5876. ..........................................................
  5877. The Unix standard defines another function for parsing date strings.
  5878. The interface is weird, but if the function happens to suit your
  5879. application it is just fine. It is problematic to use this function in
  5880. multi-threaded programs or libraries, since it returns a pointer to a
  5881. static variable, and uses a global variable and global state based on an
  5882. environment variable.
  5883. -- Variable: getdate_err
  5884. This variable of type ‘int’ contains the error code of the last
  5885. unsuccessful call to ‘getdate’. Defined values are:
  5886. 1
  5887. The environment variable ‘DATEMSK’ is not defined or null.
  5888. 2
  5889. The template file denoted by the ‘DATEMSK’ environment
  5890. variable cannot be opened.
  5891. 3
  5892. Information about the template file cannot retrieved.
  5893. 4
  5894. The template file is not a regular file.
  5895. 5
  5896. An I/O error occurred while reading the template file.
  5897. 6
  5898. Not enough memory available to execute the function.
  5899. 7
  5900. The template file contains no matching template.
  5901. 8
  5902. The input date is invalid, but would match a template
  5903. otherwise. This includes dates like February 31st, and dates
  5904. which cannot be represented in a ‘time_t’ variable.
  5905. -- Function: struct tm * getdate (const char *STRING)
  5906. Preliminary: | MT-Unsafe race:getdate env locale | AS-Unsafe heap
  5907. lock | AC-Unsafe lock mem fd | *Note POSIX Safety Concepts::.
  5908. The interface to ‘getdate’ is the simplest possible for a function
  5909. to parse a string and return the value. STRING is the input string
  5910. and the result is returned in a statically-allocated variable.
  5911. The details about how the string is processed are hidden from the
  5912. user. In fact, they can be outside the control of the program.
  5913. Which formats are recognized is controlled by the file named by the
  5914. environment variable ‘DATEMSK’. This file should contain lines of
  5915. valid format strings which could be passed to ‘strptime’.
  5916. The ‘getdate’ function reads these format strings one after the
  5917. other and tries to match the input string. The first line which
  5918. completely matches the input string is used.
  5919. Elements not initialized through the format string retain the
  5920. values present at the time of the ‘getdate’ function call.
  5921. The formats recognized by ‘getdate’ are the same as for ‘strptime’.
  5922. See above for an explanation. There are only a few extensions to
  5923. the ‘strptime’ behavior:
  5924. • If the ‘%Z’ format is given the broken-down time is based on
  5925. the current time of the time zone matched, not of the current
  5926. time zone of the runtime environment.
  5927. _Note_: This is not implemented (currently). The problem is
  5928. that time zone abbreviations are not unique. If a fixed time
  5929. zone is assumed for a given string (say ‘EST’ meaning US East
  5930. Coast time), then uses for countries other than the USA will
  5931. fail. So far we have found no good solution to this.
  5932. • If only the weekday is specified the selected day depends on
  5933. the current date. If the current weekday is greater than or
  5934. equal to the ‘tm_wday’ value the current week's day is chosen,
  5935. otherwise the day next week is chosen.
  5936. • A similar heuristic is used when only the month is given and
  5937. not the year. If the month is greater than or equal to the
  5938. current month, then the current year is used. Otherwise it
  5939. wraps to next year. The first day of the month is assumed if
  5940. one is not explicitly specified.
  5941. • The current hour, minute, and second are used if the
  5942. appropriate value is not set through the format.
  5943. • If no date is given tomorrow's date is used if the time is
  5944. smaller than the current time. Otherwise today's date is
  5945. taken.
  5946. It should be noted that the format in the template file need not
  5947. only contain format elements. The following is a list of possible
  5948. format strings (taken from the Unix standard):
  5949. %m
  5950. %A %B %d, %Y %H:%M:%S
  5951. %A
  5952. %B
  5953. %m/%d/%y %I %p
  5954. %d,%m,%Y %H:%M
  5955. at %A the %dst of %B in %Y
  5956. run job at %I %p,%B %dnd
  5957. %A den %d. %B %Y %H.%M Uhr
  5958. As you can see, the template list can contain very specific strings
  5959. like ‘run job at %I %p,%B %dnd’. Using the above list of templates
  5960. and assuming the current time is Mon Sep 22 12:19:47 EDT 1986, we
  5961. can obtain the following results for the given input.
  5962. Input Match Result
  5963. Mon %a Mon Sep 22 12:19:47 EDT 1986
  5964. Sun %a Sun Sep 28 12:19:47 EDT 1986
  5965. Fri %a Fri Sep 26 12:19:47 EDT 1986
  5966. September %B Mon Sep 1 12:19:47 EDT 1986
  5967. January %B Thu Jan 1 12:19:47 EST 1987
  5968. December %B Mon Dec 1 12:19:47 EST 1986
  5969. Sep Mon %b %a Mon Sep 1 12:19:47 EDT 1986
  5970. Jan Fri %b %a Fri Jan 2 12:19:47 EST 1987
  5971. Dec Mon %b %a Mon Dec 1 12:19:47 EST 1986
  5972. Jan Wed 1989 %b %a %Y Wed Jan 4 12:19:47 EST 1989
  5973. Fri 9 %a %H Fri Sep 26 09:00:00 EDT 1986
  5974. Feb 10:30 %b %H:%S Sun Feb 1 10:00:30 EST 1987
  5975. 10:30 %H:%M Tue Sep 23 10:30:00 EDT 1986
  5976. 13:30 %H:%M Mon Sep 22 13:30:00 EDT 1986
  5977. The return value of the function is a pointer to a static variable
  5978. of type ‘struct tm’, or a null pointer if an error occurred. The
  5979. result is only valid until the next ‘getdate’ call, making this
  5980. function unusable in multi-threaded applications.
  5981. The ‘errno’ variable is _not_ changed. Error conditions are stored
  5982. in the global variable ‘getdate_err’. See the description above
  5983. for a list of the possible error values.
  5984. _Warning:_ The ‘getdate’ function should _never_ be used in
  5985. SUID-programs. The reason is obvious: using the ‘DATEMSK’
  5986. environment variable you can get the function to open any arbitrary
  5987. file and chances are high that with some bogus input (such as a
  5988. binary file) the program will crash.
  5989. -- Function: int getdate_r (const char *STRING, struct tm *TP)
  5990. Preliminary: | MT-Safe env locale | AS-Unsafe heap lock | AC-Unsafe
  5991. lock mem fd | *Note POSIX Safety Concepts::.
  5992. The ‘getdate_r’ function is the reentrant counterpart of ‘getdate’.
  5993. It does not use the global variable ‘getdate_err’ to signal an
  5994. error, but instead returns an error code. The same error codes as
  5995. described in the ‘getdate_err’ documentation above are used, with 0
  5996. meaning success.
  5997. Moreover, ‘getdate_r’ stores the broken-down time in the variable
  5998. of type ‘struct tm’ pointed to by the second argument, rather than
  5999. in a static variable.
  6000. This function is not defined in the Unix standard. Nevertheless it
  6001. is available on some other Unix systems as well.
  6002. The warning against using ‘getdate’ in SUID-programs applies to
  6003. ‘getdate_r’ as well.
  6004. 
  6005. File: libc.info, Node: TZ Variable, Next: Time Zone State, Prev: Parsing Date and Time, Up: Calendar Time
  6006. 22.5.6 Specifying the Time Zone with ‘TZ’
  6007. -----------------------------------------
  6008. In POSIX systems, a user can specify the time zone by means of the ‘TZ’
  6009. environment variable. For information about how to set environment
  6010. variables, see *note Environment Variables::. The functions for
  6011. accessing the time zone are declared in ‘time.h’.
  6012. You should not normally need to set ‘TZ’. If the system is
  6013. configured properly, the default time zone will be correct. You might
  6014. set ‘TZ’ if you are using a computer over a network from a different
  6015. time zone, and would like times reported to you in the time zone local
  6016. to you, rather than what is local to the computer.
  6017. The value of ‘TZ’ can be in one of the following formats:
  6018. • The “geographical format” specifies a location that stands for the
  6019. past and future time zones observed in that location. *Note
  6020. Geographical TZ::. Here are some examples:
  6021. Asia/Tokyo
  6022. America/New_York
  6023. /usr/share/zoneinfo/America/Nuuk
  6024. • The “proleptic format” represents a time zone that has always been
  6025. and always will be the same offset from UTC, optionally with a
  6026. simple daylight saving scheme that has always been (and always will
  6027. be) used every year. *Note Proleptic TZ::. Here are some
  6028. examples:
  6029. JST-9
  6030. EST+5EDT,M3.2.0/2,M11.1.0/2
  6031. <-02>+2<-01>,M3.5.0/-1,M10.5.0/0
  6032. • The “colon format” begins with ‘:’. Here is an example.
  6033. :/etc/localtime
  6034. Each operating system can interpret this format differently; in the
  6035. GNU C Library, the ‘:’ is ignored and CHARACTERS are treated as if
  6036. they specified the geographical or proleptic format.
  6037. • As an extension to POSIX, when the value of ‘TZ’ is the empty
  6038. string, the GNU C Library uses UTC.
  6039. If the ‘TZ’ environment variable does not have a value, the
  6040. implementation chooses a time zone by default. In the GNU C Library,
  6041. the default time zone is like the specification ‘TZ=/etc/localtime’ (or
  6042. ‘TZ=/usr/local/etc/localtime’, depending on how the GNU C Library was
  6043. configured; *note Installation::). Other C libraries use their own rule
  6044. for choosing the default time zone, so there is little we can say about
  6045. them.
  6046. * Menu:
  6047. * Geographical TZ:: ‘TZ’ settings like ‘America/New_York’.
  6048. * Proleptic TZ:: ‘TZ’ settings like ‘EST+5EDT,M3.2.0/2,M11.1.0/2’.
  6049. 
  6050. File: libc.info, Node: Geographical TZ, Next: Proleptic TZ, Up: TZ Variable
  6051. 22.5.6.1 Geographical Format for ‘TZ’
  6052. .....................................
  6053. The geographical format names a time zone ruleset maintained by the Time
  6054. Zone Database (http://www.iana.org/time-zones) of time zone and daylight
  6055. saving time information for most regions of the world. This
  6056. public-domain database is maintained by a community of volunteers.
  6057. If the format's CHARACTERS begin with ‘/’ it is an absolute file
  6058. name; otherwise the library looks for the file
  6059. ‘/usr/share/zoneinfo/CHARACTERS’. The ‘zoneinfo’ directory contains
  6060. data files describing time zone rulesets in many different parts of the
  6061. world. The names represent major cities, with subdirectories for
  6062. geographical areas; for example, ‘America/New_York’, ‘Europe/London’,
  6063. ‘Asia/Tokyo’. These data files are installed by the system
  6064. administrator, who also sets ‘/etc/localtime’ to point to the data file
  6065. for the local time zone ruleset.
  6066. If the file corresponding to CHARACTERS cannot be read or has invalid
  6067. data, and CHARACTERS are not in the proleptic format, then the GNU C
  6068. Library silently defaults to UTC. However, applications should not
  6069. depend on this, as ‘TZ’ formats may be extended in the future.
  6070. 
  6071. File: libc.info, Node: Proleptic TZ, Prev: Geographical TZ, Up: TZ Variable
  6072. 22.5.6.2 Proleptic Format for ‘TZ’
  6073. ..................................
  6074. Although the proleptic format is cumbersome and inaccurate for old
  6075. timestamps, POSIX.1-2017 and earlier specified details only for the
  6076. proleptic format, and you may need to use it on small systems that lack
  6077. a time zone information database.
  6078. The proleptic format is:
  6079. STDOFFSET[DST[OFFSET][,START[/TIME],END[/TIME]]]
  6080. The STD string specifies the time zone abbreviation, which must be at
  6081. least three bytes long, and which can appear in unquoted or quoted form.
  6082. The unquoted form can contain only ASCII alphabetic characters. The
  6083. quoted form can also contain ASCII digits, ‘+’, and ‘-’; it is quoted by
  6084. surrounding it by ‘<’ and ‘>’, which are not part of the abbreviation.
  6085. There is no space character separating the time zone abbreviation from
  6086. the OFFSET, so these restrictions are necessary to parse the
  6087. specification correctly.
  6088. The OFFSET specifies the time value you must add to the local time to
  6089. get a UTC value. It has syntax like:
  6090. [+|-]HH[:MM[:SS]]
  6091. This is positive if the local time zone is west of the Prime Meridian
  6092. and negative if it is east; this is opposite from the usual convention
  6093. that positive time zone offsets are east of the Prime Meridian. The
  6094. hour HH must be between 0 and 24 and may be a single digit, and the
  6095. minutes MM and seconds SS, if present, must be between 0 and 59.
  6096. For example, to specify time in Panama, which is Eastern Standard
  6097. Time without any daylight saving time alternative:
  6098. EST+5
  6099. When daylight saving time is used, the proleptic format is more
  6100. complicated. The initial STD and OFFSET specify the standard time zone,
  6101. as described above. The DST string and OFFSET are the abbreviation and
  6102. offset for the corresponding daylight saving time zone; if the OFFSET is
  6103. omitted, it defaults to one hour ahead of standard time.
  6104. The remainder of the proleptic format, which starts with the first
  6105. comma, describes when daylight saving time is in effect. This remainder
  6106. is optional and if omitted, the GNU C Library defaults to the daylight
  6107. saving rules that would be used if ‘TZ’ had the value "posixrules".
  6108. However, other POSIX implementations default to different daylight
  6109. saving rules, so portable ‘TZ’ settings should not omit the remainder.
  6110. In the remainder, the START field is when daylight saving time goes
  6111. into effect and the END field is when the change is made back to
  6112. standard time. The following formats are recognized for these fields:
  6113. ‘JN’
  6114. This specifies the Julian day, with N between ‘1’ and ‘365’.
  6115. February 29 is never counted, even in leap years.
  6116. ‘N’
  6117. This specifies the Julian day, with N between ‘0’ and ‘365’.
  6118. February 29 is counted in leap years.
  6119. ‘MM.W.D’
  6120. This specifies day D of week W of month M. The day D must be
  6121. between ‘0’ (Sunday) and ‘6’. The week W must be between ‘1’ and
  6122. ‘5’; week ‘1’ is the first week in which day D occurs, and week ‘5’
  6123. specifies the _last_ D day in the month. The month M should be
  6124. between ‘1’ and ‘12’.
  6125. The TIME fields specify when, in the local time currently in effect,
  6126. the change to the other time occurs. They have the same format as
  6127. OFFSET except the hours part can range from −167 through 167; for
  6128. example, ‘-22:30’ stands for 01:30 the previous day and ‘25:30’ stands
  6129. for 01:30 the next day. If omitted, TIME defaults to ‘02:00:00’.
  6130. Here are example ‘TZ’ values with daylight saving time rules.
  6131. ‘EST+5EDT,M3.2.0/2,M11.1.0/2’
  6132. In North American Eastern Standard Time (EST) and Eastern Daylight
  6133. Time (EDT), the normal offset from UTC is 5 hours; since this is
  6134. west of the Prime Meridian, the sign is positive. Summer time
  6135. begins on March's second Sunday at 2:00am, and ends on November's
  6136. first Sunday at 2:00am.
  6137. ‘IST-2IDT,M3.4.4/26,M10.5.0’
  6138. Israel Standard Time (IST) and Israel Daylight Time (IDT) are 2
  6139. hours ahead of the prime meridian in winter, springing forward an
  6140. hour on March's fourth Thursday at 26:00 (i.e., 02:00 on the first
  6141. Friday on or after March 23), and falling back on October's last
  6142. Sunday at 02:00.
  6143. ‘IST-1GMT0,M10.5.0,M3.5.0/1’
  6144. Irish Standard Time (IST) is 1 hour behind the Prime Meridian in
  6145. summer, falling forward to Greenwich Mean Time (GMT, the Prime
  6146. Meridian's time), on October's last Sunday at 00:00 and springing
  6147. back on March's last Sunday at 01:00. This is an example of
  6148. "negative daylight saving"; here, daylight saving time is one hour
  6149. west of standard time instead of the more usual one hour east.
  6150. ‘<-02>+2<-01>,M3.5.0/-1,M10.5.0/0’
  6151. Most of Greenland is 2 hours behind UTC in winter. Clocks follow
  6152. the European Union rules of springing forward by one hour on
  6153. March's last Sunday at 01:00 UTC (−01:00 local time) and falling
  6154. back on October's last Sunday at 01:00 UTC (00:00 local time). The
  6155. numeric abbreviations ‘-02’ and ‘-01’ stand for standard and
  6156. daylight saving time, respectively.
  6157. The schedule of daylight saving time in any particular jurisdiction
  6158. has changed over the years. To be strictly correct, the conversion of
  6159. dates and times in the past should be based on the schedule that was in
  6160. effect then. However, the proleptic format does not let you specify how
  6161. the schedule has changed from year to year. The most you can do is
  6162. specify one particular schedule--usually the present day schedule--and
  6163. this is used to convert any date, no matter when. For precise time zone
  6164. specifications, it is best to use the geographical format. *Note
  6165. Geographical TZ::.