diff --git a/Makefile b/Makefile deleted file mode 100644 index dbadd5cd71..0000000000 --- a/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -.PHONY: build build-all install cross release test pills ropsten-pills clean - -build: - nix-build -A urbit --no-out-link - -install: - nix-env -f . -iA urbit - -release: - sh/release - -test: - nix-build -A urbit-tests --no-out-link - -pills: - sh/update-solid-pill - sh/update-brass-pill - sh/update-ivory-pill - -ropsten-pills: - sh/create-ropsten-pills - -interface: - sh/build-interface - -clean: - rm -rf ./out ./work - rm -f result result-* - -fmt: - sh/fmt diff --git a/doc/spec/flw.txt b/doc/spec/flw.txt deleted file mode 100644 index 2d0d87e41c..0000000000 --- a/doc/spec/flw.txt +++ /dev/null @@ -1,1090 +0,0 @@ -AAHS AALS ABAC ABAS ABBA ABBE ABBS ABED ABET ABID ABLE ABLY ABOS ABRI ABUT ABYE ABYS ACAI ACCA ACED ACER ACES ACHE ACHY ACID ACME ACNE ACRE ACTA ACTS ACYL ADAW ADDS ADDY ADIT ADOS ADRY ADZE AEON AERO AERY AESC AFAR AFFY AFRO AGAR AGAS AGED AGEE AGEN AGER AGES AGHA AGIN AGIO AGLU AGLY AGMA AGOG AGON AGUE AHED AHEM AHIS AHOY AIAS AIDA AIDE AIDS AIGA AILS AIMS AINE AINS AIRN AIRS AIRT AIRY AITS AITU AJAR AJEE AKAS AKED AKEE AKES AKIN ALAE ALAN ALAP ALAR ALAS ALAY ALBA ALBE ALBS ALCO ALEC ALEE ALEF ALES ALEW ALFA ALFS ALGA ALIF ALIT ALKO ALKY ALLS ALLY ALMA ALME ALMS ALOD ALOE ALOO ALOW ALPS ALSO ALTO ALTS ALUM ALUS AMAH AMAS AMBO AMEN AMES AMIA AMID AMIE AMIN AMIR AMIS AMLA AMMO AMOK AMPS AMUS AMYL ANAL ANAN ANAS ANCE ANDS ANES ANEW ANGA ANIL ANIS ANKH ANNA ANNO ANNS ANOA ANON ANOW ANSA ANTA ANTE ANTI ANTS ANUS APAY APED APER APES APEX APOD APOS APPS APSE APSO APTS AQUA ARAK ARAR ARBA ARBS ARCH ARCO ARCS ARDS AREA ARED AREG ARES ARET AREW ARFS ARGH ARIA ARID ARIL ARIS ARKS ARLE ARMS ARMY ARNA AROW ARPA ARSE ARSY ARTI ARTS ARTY ARUM ARVO ARYL ASAR ASCI ASEA ASHY ASKS ASPS ATAP ATES ATMA ATOC ATOK ATOM ATOP ATUA AUAS AUFS AUKS AULA AULD AUNE AUNT AURA AUTO AVAL AVAS AVEL AVER AVES AVID AVOS AVOW AWAY AWDL AWED AWEE AWES AWFY AWKS AWLS AWNS AWNY AWOL AWRY AXAL AXED AXEL AXES AXIL AXIS AXLE AXON AYAH AYES AYIN AYRE AYUS AZAN AZON AZYM - -BAAL BAAS BABA BABE BABU BABY BACH BACK BACS BADE BADS BAEL BAFF BAFT BAGH BAGS BAHT BAHU BAIL BAIT BAJU BAKE BALD BALE BALK BALL BALM BALS BALU BAMS BANC BAND BANE BANG BANI BANK BANS BANT BAPS BAPU BARB BARD BARE BARF BARK BARM BARN BARP BARS BASE BASH BASK BASS BAST BATE BATH BATS BATT BAUD BAUK BAUR BAWD BAWL BAWN BAWR BAYE BAYS BAYT BEAD BEAK BEAM BEAN BEAR BEAT BEAU BECK BEDE BEDS BEDU BEEF BEEN BEEP BEER BEES BEET BEGO BEGS BEIN BELL BELS BELT BEMA BEND BENE BENI BENJ BENS BENT BERE BERG BERK BERM BEST BETA BETE BETH BETS BEVY BEYS BHAI BHAT BHEL BHUT BIAS BIBB BIBS BICE BIDE BIDI BIDS BIEN BIER BIFF BIGA BIGG BIGS BIKE BILE BILK BILL BIMA BIND BINE BING BINK BINS BINT BIOG BIOS BIRD BIRK BIRL BIRO BIRR BISE BISH BISK BIST BITE BITO BITS BITT BIZE BLAB BLAD BLAE BLAG BLAH BLAM BLAT BLAW BLAY BLEB BLED BLEE BLET BLEW BLEY BLIN BLIP BLIT BLOB BLOC BLOG BLOT BLOW BLUB BLUE BLUR BOAB BOAK BOAR BOAS BOAT BOBA BOBS BOCK BODE BODS BODY BOEP BOET BOFF BOGS BOGY BOHO BOHS BOIL BOIS BOKE BOKO BOKS BOLA BOLD BOLE BOLL BOLO BOLT BOMA BOMB BONA BOND BONE BONG BONK BONY BOOB BOOH BOOK BOOL BOOM BOON BOOR BOOS BOOT BOPS BORA BORD BORE BORK BORM BORN BORS BORT BOSH BOSK BOSS BOTA BOTE BOTH BOTS BOTT BOUK BOUN BOUT BOWL BOWR BOWS BOXY BOYF BOYG BOYO BOYS BOZO BRAD BRAE BRAG BRAK BRAN BRAS BRAT BRAW BRAY BRED BREE BREI BREN BRER BREW BREY BRIE BRIG BRIK BRIM BRIN BRIO BRIS BRIT BROD BROG BROO BROS BROW BRRR BRUS BRUT BRUX BUAT BUBA BUBO BUBS BUBU BUCK BUDA BUDI BUDO BUDS BUFF BUFO BUGS BUHL BUHR BUIK BUKE BULB BULK BULL BUMF BUMP BUMS BUNA BUND BUNG BUNK BUNN BUNS BUNT BUOY BURA BURB BURD BURG BURK BURL BURN BURP BURR BURS BURY BUSH BUSK BUSS BUST BUSY BUTE BUTS BUTT BUYS BUZZ BYDE BYES BYKE BYRE BYRL BYTE - -CAAS CABA CABS CACA CACK CADE CADI CADS CAFE CAFF CAGE CAGS CAGY CAID CAIN CAKE CAKY CALF CALK CALL CALM CALO CALP CALX CAMA CAME CAMO CAMP CAMS CANE CANG CANN CANS CANT CANY CAPA CAPE CAPH CAPI CAPO CAPS CARB CARD CARE CARK CARL CARN CARP CARR CARS CART CASA CASE CASH CASK CAST CATE CATS CAUF CAUK CAUL CAUM CAUP CAVA CAVE CAVY CAWK CAWS CAYS CEAS CECA CEDE CEDI CEES CEIL CELL CELS CELT CENS CENT CEPE CEPS CERE CERO CERT CESS CETE CHAD CHAI CHAL CHAM CHAO CHAP CHAR CHAS CHAT CHAV CHAW CHAY CHEF CHER CHEW CHEZ CHIA CHIB CHIC CHID CHIK CHIN CHIP CHIS CHIT CHIV CHIZ CHOC CHOG CHON CHOP CHOU CHOW CHUB CHUG CHUM CHUR CHUT CIAO CIDE CIDS CIEL CIGS CILL CINE CION CIRE CIRL CIST CITE CITO CITS CITY CIVE CLAD CLAG CLAM CLAN CLAP CLAT CLAW CLAY CLEF CLEG CLEM CLEW CLIP CLIT CLOD CLOG CLON CLOP CLOT CLOU CLOW CLOY CLUB CLUE COAL COAT COAX COBB COBS COCA COCH COCK COCO CODA CODE CODS COED COFF COFT COGS COHO COIF COIL COIN COIR COIT COKE COKY COLA COLD COLE COLL COLS COLT COLY COMA COMB COME COMM COMP COMS COND CONE CONF CONI CONK CONN CONS CONY COOF COOK COOL COOM COON COOP COOS COOT COPE COPS COPY CORD CORE CORF CORK CORM CORN CORS CORY COSE COSH COSS COST COSY COTE COTH COTS COTT COUP COUR COVE COWK COWL COWP COWS COWY COXA COXY COYS COZE COZY CRAB CRAG CRAM CRAN CRAP CRAW CRAY CRED CREE CREM CREW CRIA CRIB CRIM CRIS CRIT CROC CROG CROP CROW CRUD CRUE CRUS CRUX CUBE CUBS CUDS CUED CUES CUFF CUIF CUIT CUKE CULL CULM CULT CUMS CUNT CUPS CURB CURD CURE CURF CURL CURN CURR CURS CURT CUSH CUSK CUSP CUSS CUTE CUTS CWMS CYAN CYMA CYME CYST CYTE CZAR - -DAAL DABS DACE DACK DADA DADO DADS DAES DAFF DAFT DAGO DAGS DAHL DAHS DAIS DAKS DALE DALI DALS DALT DAME DAMN DAMP DAMS DANG DANK DANS DANT DAPS DARB DARE DARG DARI DARK DARN DART DASH DATA DATE DATO DAUB DAUD DAUR DAUT DAVY DAWD DAWK DAWN DAWS DAWT DAYS DAZE DEAD DEAF DEAL DEAN DEAR DEAW DEBE DEBS DEBT DECK DECO DEED DEEK DEEM DEEN DEEP DEER DEES DEET DEEV DEFI DEFO DEFT DEFY DEGS DEGU DEID DEIF DEIL DEKE DELE DELF DELI DELL DELO DELS DELT DEME DEMO DEMY DENE DENI DENS DENT DENY DERE DERM DERN DERO DERV DESI DESK DEUS DEVA DEVS DEWS DEWY DEXY DEYS DHAK DHAL DHOL DHOW DIAL DIBS DICE DICH DICK DICT DIDO DIDY DIEB DIED DIEL DIES DIET DIFF DIFS DIGS DIKA DIKE DILL DIME DIMP DIMS DINE DING DINK DINO DINS DINT DIOL DIPS DIPT DIRE DIRK DIRL DIRT DISA DISC DISH DISK DISS DITA DITE DITS DITT DITZ DIVA DIVE DIVI DIVO DIVS DIXI DIXY DIYA DJIN DOAB DOAT DOBS DOBY DOCK DOCO DOCS DODO DODS DOEK DOEN DOER DOES DOFF DOGE DOGS DOGY DOHS DOIT DOJO DOLE DOLL DOLS DOLT DOME DOMS DOMY DONA DONE DONG DONS DOOB DOOK DOOL DOOM DOON DOOR DOOS DOPA DOPE DOPS DOPY DORB DORE DORK DORM DORP DORR DORS DORT DORY DOSE DOSH DOSS DOST DOTE DOTH DOTS DOTY DOUC DOUK DOUM DOUN DOUP DOUR DOUT DOUX DOVE DOWD DOWF DOWL DOWN DOWP DOWS DOWT DOXY DOYS DOZE DOZY DRAB DRAC DRAD DRAG DRAM DRAP DRAT DRAW DRAY DREE DREG DREK DREW DREY DRIB DRIP DROP DROW DRUB DRUG DRUM DRYS DSOS DUAD DUAL DUAN DUAR DUBS DUCE DUCI DUCK DUCT DUDE DUDS DUED DUEL DUES DUET DUFF DUGS DUIT DUKA DUKE DULE DULL DULY DUMA DUMB DUMP DUNE DUNG DUNK DUNS DUNT DUOS DUPE DUPS DURA DURE DURN DURO DURR DUSH DUSK DUST DUTY DWAM DYAD DYED DYER DYES DYKE DYNE DZHO DZOS - -EACH EALE EANS EARD EARL EARN EARS EASE EAST EASY EATH EATS EAUS EAUX EAVE EBBS EBON ECAD ECCE ECCO ECHE ECHO ECHT ECOD ECOS ECRU ECUS EDDO EDDY EDGE EDGY EDHS EDIT EECH EELS EELY EERY EEVN EFFS EFTS EGAD EGAL EGER EGGS EGGY EGIS EGMA EGOS EHED EIDE EIKS EILD EINA EINE EISH EKED EKES EKKA ELAN ELDS ELFS ELHI ELKS ELLS ELMS ELMY ELSE ELTS EMES EMEU EMIC EMIR EMIT EMMA EMMY EMOS EMPT EMUS EMYD EMYS ENDS ENES ENEW ENGS ENOL ENOW ENUF ENVY EOAN EONS EORL EPEE EPHA EPIC EPOS ERAS ERED ERES EREV ERGO ERGS ERHU ERIC ERKS ERNE ERNS EROS ERRS ERST ERUV ESES ESKY ESNE ESPY ESSE ESTS ETAS ETAT ETCH ETEN ETHE ETHS ETIC ETNA ETUI EUGE EUGH EUKS EUOI EURO EVEN EVER EVES EVET EVIL EVOE EVOS EWER EWES EWKS EWTS EXAM EXEC EXED EXES EXIT EXON EXPO EXUL EYAS EYED EYEN EYER EYES EYNE EYOT EYRA EYRE EYRY - -FAAN FAAS FABS FACE FACT FADE FADO FADS FADY FAFF FAGS FAHS FAIK FAIL FAIN FAIR FAIX FAKE FALL FALX FAME FAND FANE FANG FANK FANO FANS FARD FARE FARL FARM FARO FARS FART FASH FAST FATE FATS FAUN FAUR FAUT FAUX FAVA FAVE FAWN FAWS FAYS FAZE FEAL FEAR FEAT FECK FEDS FEEB FEED FEEL FEEN FEER FEES FEET FEGS FEHM FEHS FEIS FELL FELT FEME FEMS FEND FENI FENS FENT FEOD FERE FERM FERN FESS FEST FETA FETE FETS FETT FEUD FEUS FEWS FEYS FIAR FIAT FIBS FICE FICO FIDO FIDS FIEF FIER FIFE FIGO FIGS FIKE FIKY FILA FILE FILL FILM FILO FILS FIND FINE FINI FINK FINO FINS FIQH FIRE FIRK FIRM FIRN FIRS FISC FISH FISK FIST FITS FITT FIVE FIXT FIZZ FLAB FLAG FLAK FLAM FLAN FLAP FLAT FLAW FLAX FLAY FLEA FLED FLEE FLEG FLEW FLEX FLEY FLIC FLIM FLIP FLIR FLIT FLIX FLOB FLOC FLOE FLOG FLOP FLOR FLOW FLOX FLUB FLUE FLUS FLUX FOAL FOAM FOBS FOCI FOEN FOES FOGS FOGY FOHN FOID FOIL FOIN FOLD FOLK FOND FONE FONS FONT FOOD FOOL FOOT FOPS FORA FORB FORD FORE FORK FORM FORT FOSS FOUD FOUL FOUR FOUS FOWL FOXY FOYS FOZY FRAB FRAE FRAG FRAP FRAS FRAT FRAU FRAY FREE FRET FRIB FRIG FRIS FRIT FRIZ FROE FROG FROM FROS FROW FRUG FUBS FUCI FUCK FUDS FUEL FUFF FUGS FUGU FUJI FULL FUME FUMS FUMY FUND FUNG FUNK FUNS FURL FURR FURS FURY FUSC FUSE FUSS FUST FUTZ FUZE FUZZ FYCE FYKE FYLE FYRD - -GABS GABY GADE GADI GADS GAED GAEN GAES GAFF GAGA GAGE GAGS GAID GAIN GAIR GAIT GAJO GAKS GALA GALE GALL GALS GAMA GAMB GAME GAMP GAMS GAMY GANE GANG GANS GANT GAOL GAPE GAPO GAPS GAPY GARB GARE GARI GARS GART GASH GASP GAST GATE GATH GATS GAUD GAUM GAUN GAUP GAUR GAUS GAVE GAWD GAWK GAWP GAWS GAYS GAZE GAZY GEAL GEAN GEAR GEAT GECK GEDS GEED GEEK GEEP GEES GEEZ GEIT GELD GELS GELT GEMS GENA GENE GENS GENT GENU GEOS GERE GERM GERS GERT GEST GETA GETS GEUM GHAT GHEE GHIS GIBE GIBS GIDS GIED GIEN GIES GIFT GIGA GIGS GILA GILD GILL GILT GIMP GING GINK GINN GINS GIOS GIPS GIRD GIRL GIRN GIRO GIRR GIRT GISM GIST GITE GITS GIVE GIZZ GJUS GLAD GLAM GLED GLEE GLEG GLEI GLEN GLEY GLIA GLIB GLID GLIM GLIT GLOB GLOM GLOP GLOW GLUE GLUG GLUM GLUT GNAR GNAT GNAW GNOW GNUS GOAD GOAF GOAL GOAS GOAT GOBI GOBO GOBS GOBY GODS GOEL GOER GOES GOEY GOFF GOGO GOJI GOLD GOLE GOLF GOLP GONE GONG GONK GONS GOOD GOOF GOOG GOOK GOOL GOON GOOP GOOR GOOS GORA GORE GORI GORM GORP GORY GOSH GOSS GOTH GOUK GOUT GOVS GOWD GOWF GOWK GOWL GOWN GOYS GRAB GRAD GRAM GRAN GRAT GRAV GRAY GREE GREN GREW GREX GREY GRID GRIG GRIM GRIN GRIP GRIS GRIT GROG GROK GROT GROW GRRL GRUB GRUE GRUM GUAN GUAR GUBS GUCK GUDE GUES GUFF GUGA GUID GULA GULE GULF GULL GULP GULS GULY GUMP GUMS GUNG GUNK GUNS GUPS GURL GURN GURS GURU GUSH GUST GUTS GUVS GUYS GYAL GYBE GYMP GYMS GYNY GYPS GYRE GYRI GYRO GYTE GYVE - -HAAF HAAR HABU HACK HADE HADJ HADS HAED HAEM HAEN HAES HAET HAFF HAFT HAGG HAGS HAHA HAHS HAIK HAIL HAIN HAIR HAJI HAJJ HAKA HAKE HAKU HALE HALF HALL HALM HALO HALT HAME HAMS HAND HANG HANK HANT HAOS HAPS HAPU HARD HARE HARK HARL HARM HARN HARO HARP HART HASH HASK HASP HASS HAST HATE HATH HATS HAUD HAUF HAUL HAUT HAVE HAWK HAWM HAWS HAYS HAZE HAZY HEAD HEAL HEAP HEAR HEAT HEBE HECH HECK HEED HEEL HEFT HEHS HEID HEIL HEIR HELD HELE HELL HELM HELO HELP HEME HEMP HEMS HEND HENS HENT HEPS HEPT HERB HERD HERE HERL HERM HERN HERO HERS HERY HESP HEST HETE HETH HETS HEWN HEWS HEYS HICK HIDE HIED HIES HIGH HIKE HILA HILD HILI HILL HILT HIMS HIND HING HINS HINT HIOI HIPS HIPT HIRE HISH HISN HISS HIST HITS HIVE HIYA HIZZ HOAR HOAS HOAX HOBO HOBS HOCK HODS HOED HOER HOES HOGG HOGH HOGS HOHA HOHS HOIK HOKA HOKE HOKI HOLD HOLE HOLK HOLM HOLP HOLS HOLT HOLY HOMA HOME HOMO HOMS HOMY HOND HONE HONG HONK HONS HOOD HOOF HOOK HOON HOOP HOOR HOOT HOPE HOPS HORA HORE HORI HORN HORS HOSE HOSS HOST HOTE HOTS HOUF HOUR HOUT HOVE HOWE HOWF HOWK HOWL HOWS HOYA HOYS HUBS HUCK HUED HUER HUES HUFF HUGE HUGS HUGY HUHU HUIA HUIC HUIS HULA HULE HULK HULL HUMA HUMF HUMP HUMS HUNG HUNH HUNK HUNS HUNT HUPS HURL HURT HUSH HUSK HUSO HUSS HUTS HWAN HWYL HYED HYEN HYES HYKE HYLA HYLE HYMN HYPE HYPO HYPS HYTE - -IAMB IBEX IBIS ICED ICER ICES ICHS ICKY ICON IDEA IDEE IDEM IDES IDLE IDLY IDOL IDYL IFFY IGAD IGGS IGLU IKAN IKAT IKON ILEA ILEX ILIA ILKA ILKS ILLS ILLY IMAM IMID IMMY IMPI IMPS INBY INCH INFO INGO INGS INIA INKS INKY INLY INNS INRO INTI INTO IONS IOTA IRED IRES IRID IRIS IRKS IRON ISBA ISIT ISLE ISMS ISNA ISOS ITAS ITCH ITEM IURE IWIS IXIA IZAR - -JAAP JABS JACK JADE JAFA JAGA JAGG JAGS JAIL JAKE JAKS JAMB JAMS JANE JANN JAPE JAPS JARK JARL JARP JARS JASP JASS JASY JATO JAUK JAUP JAVA JAWS JAXY JAYS JAZY JAZZ JEAN JEAT JEDI JEED JEEL JEEP JEER JEES JEEZ JEFE JEFF JEHU JELL JEON JERK JESS JEST JETE JETS JEUX JEWS JIAO JIBB JIBE JIBS JIFF JIGS JILL JILT JIMP JINK JINN JINS JINX JIRD JISM JIVE JIVY JIZZ JOBE JOBS JOCK JOCO JOES JOEY JOGS JOHN JOIN JOKE JOKY JOLE JOLL JOLS JOLT JOMO JONG JOOK JORS JOSH JOSS JOTA JOTS JOUK JOUR JOWL JOWS JOYS JUBA JUBE JUCO JUDO JUDS JUDY JUGA JUGS JUJU JUKE JUKU JUMP JUNK JUPE JURA JURE JURY JUST JUTE JUTS JUVE JYNX - -KAAL KAAS KABS KACK KADE KADI KAED KAES KAFS KAGO KAGU KAID KAIE KAIF KAIK KAIL KAIM KAIN KAIS KAKA KAKI KAKS KALE KALI KAMA KAME KAMI KANA KANE KANG KANS KANT KAON KAPA KAPH KARA KARK KARN KARO KART KATA KATI KATS KAVA KAWA KAWS KAYO KAYS KAZI KBAR KEAS KEBS KECK KEDS KEEF KEEK KEEL KEEN KEEP KEET KEFS KEGS KEIR KEKS KELL KELP KELT KEMB KEMP KENO KENS KENT KEPI KEPS KEPT KERB KERF KERN KERO KESH KEST KETA KETE KETO KETS KEWL KEYS KHAF KHAN KHAT KHET KHIS KHOR KHUD KIBE KICK KIDS KIEF KIER KIEV KIFF KIFS KIKE KILD KILL KILN KILO KILP KILT KINA KIND KINE KING KINK KINO KINS KIPE KIPP KIPS KIRK KIRN KIRS KISH KISS KIST KITE KITH KITS KIVA KIWI KLAP KLIK KNAG KNAP KNAR KNEE KNEW KNIT KNOB KNOP KNOT KNOW KNUB KNUR KNUT KOAN KOAP KOAS KOBO KOBS KOEL KOFF KOHA KOHL KOIS KOJI KOKA KOLA KOLO KOND KONK KONS KOOK KOPH KOPS KORA KORE KORO KORS KORU KOSS KOTO KOWS KRAB KRIS KSAR KUDO KUDU KUEH KUES KUFI KUIA KUKU KULA KUNA KUNE KURI KURU KUTA KUTI KUTU KUZU KVAS KYAK KYAR KYAT KYBO KYES KYLE KYND KYNE KYPE KYTE KYUS - -LABS LACE LACK LACS LACY LADE LADS LADY LAER LAGS LAHS LAIC LAID LAIK LAIN LAIR LAKE LAKH LAKY LALL LAMA LAMB LAME LAMP LAMS LANA LAND LANE LANG LANK LANT LANX LAPS LARD LARE LARI LARK LARN LARS LASE LASH LASS LAST LATE LATH LATI LATS LATU LAUD LAUF LAVA LAVE LAVS LAWK LAWN LAWS LAYS LAZE LAZO LAZY LEAD LEAF LEAK LEAL LEAM LEAN LEAP LEAR LEAS LEAT LECH LEED LEEK LEEP LEER LEES LEET LEFT LEGS LEHR LEIR LEIS LEKE LEKS LEKU LEME LEND LENG LENO LENS LENT LEPS LEPT LERE LERP LESS LEST LETS LEUD LEVA LEVE LEVO LEVY LEWD LEYS LEZZ LIAR LIAS LIBS LICE LICH LICK LIDO LIDS LIED LIEF LIEN LIER LIES LIEU LIFE LIFT LIGS LIKE LILL LILO LILT LILY LIMA LIMB LIME LIMN LIMO LIMP LIMY LIND LINE LING LINK LINN LINO LINS LINT LINY LION LIPA LIPE LIPO LIPS LIRA LIRE LIRI LIRK LISK LISP LIST LITE LITH LITS LITU LIVE LOAD LOAF LOAM LOAN LOBE LOBI LOBO LOBS LOCA LOCH LOCI LOCK LOCO LODE LODS LOFT LOGE LOGO LOGS LOGY LOID LOIN LOIR LOKE LOLL LOMA LOME LONE LONG LOOF LOOK LOOM LOON LOOP LOOR LOOS LOOT LOPE LOPS LORD LORE LORN LORY LOSE LOSH LOSS LOST LOTA LOTE LOTH LOTI LOTO LOTS LOUD LOUN LOUP LOUR LOUS LOUT LOVE LOWE LOWN LOWP LOWS LOWT LOYS LUAU LUBE LUCE LUCK LUDE LUDO LUDS LUES LUFF LUGE LUGS LUIT LUKE LULL LULU LUMA LUMP LUMS LUNA LUNE LUNG LUNK LUNT LUNY LURE LURK LURS LUSH LUSK LUST LUTE LUTZ LUVS LUXE LWEI LYAM LYCH LYES LYME LYMS LYNE LYNX LYRA LYRE LYSE LYTE - -MAAR MAAS MABE MACE MACH MACK MACS MADE MADS MAES MAGE MAGG MAGI MAGS MAHA MAID MAIK MAIL MAIM MAIN MAIR MAKE MAKI MAKO MAKS MALA MALE MALI MALL MALM MALS MALT MAMA MAMS MANA MAND MANE MANG MANI MANO MANS MANY MAPS MARA MARC MARD MARE MARG MARK MARL MARM MARS MART MARY MASA MASE MASH MASK MASS MAST MASU MATE MATH MATS MATT MATY MAUD MAUL MAUN MAUT MAWK MAWN MAWR MAWS MAXI MAYA MAYO MAYS MAZE MAZY MEAD MEAL MEAN MEAT MECK MEDS MEED MEEK MEER MEES MEET MEFF MEGA MEGS MEIN MELA MELD MELL MELS MELT MEME MEMO MEMS MEND MENE MENG MENO MENT MENU MEOU MEOW MERC MERE MERI MERK MERL MESA MESE MESH MESS META METE METH METS MEUS MEVE MEWL MEWS MEZE MEZZ MHOS MIBS MICA MICE MICH MICK MICO MICS MIDI MIDS MIEN MIFF MIGG MIGS MIHA MIHI MIKE MILD MILE MILF MILK MILL MILO MILS MILT MIME MINA MIND MINE MING MINI MINK MINO MINT MINX MINY MIPS MIRE MIRI MIRK MIRO MIRS MIRV MIRY MISE MISO MISS MIST MITE MITT MITY MIXT MIXY MIZZ MNAS MOAI MOAN MOAS MOAT MOBE MOBS MOBY MOCH MOCK MOCS MODE MODI MODS MOER MOES MOFO MOGS MOHR MOIL MOIT MOJO MOKE MOKI MOKO MOLA MOLD MOLE MOLL MOLS MOLT MOLY MOME MOMI MOMS MONA MONG MONK MONO MONS MONY MOOD MOOI MOOK MOOL MOON MOOP MOOR MOOS MOOT MOPE MOPS MOPY MORA MORE MORN MORS MORT MOSE MOSH MOSK MOSS MOST MOTE MOTH MOTI MOTS MOTT MOTU MOUE MOUP MOUS MOVE MOWA MOWN MOWS MOXA MOYA MOYL MOYS MOZE MOZO MOZZ MUCH MUCK MUDS MUFF MUGG MUGS MUID MUIL MUIR MULE MULL MUMM MUMP MUMS MUMU MUNG MUNI MUNS MUNT MUON MURA MURE MURK MURL MURR MUSE MUSH MUSK MUSO MUSS MUST MUTE MUTI MUTS MUTT MUZZ MWAH MYAL MYCS MYNA MYTH MYXO MZEE - -NAAM NAAN NABE NABK NABS NACH NADA NADS NAFF NAGA NAGS NAIF NAIK NAIL NAIN NALA NAME NAMS NAMU NANA NANE NANG NANS NAOI NAOS NAPA NAPE NAPS NARC NARD NARE NARK NARY NATS NAVE NAVY NAYS NAZE NAZI NEAL NEAP NEAR NEAT NEBS NECK NEDS NEED NEEM NEEP NEFS NEGS NEIF NEKS NEMA NEMN NENE NEON NEPS NERD NERK NESH NESS NEST NETE NETS NETT NEUK NEUM NEVE NEVI NEWS NEWT NEXT NGAI NIBS NICE NICK NIDE NIDI NIDS NIED NIEF NIES NIFE NIFF NIGH NILL NILS NIMB NIMS NINE NIPA NIPS NIRL NISH NISI NITE NITS NIXE NIXY NOAH NOBS NOCK NODE NODI NODS NOEL NOES NOGG NOGS NOIL NOIR NOLE NOLL NOLO NOMA NOME NOMS NONA NONE NONG NONI NOOB NOOK NOON NOOP NOPE NORI NORK NORM NOSE NOSH NOSY NOTA NOTE NOTT NOUL NOUN NOUP NOUS NOUT NOVA NOWL NOWN NOWS NOWT NOWY NOYS NUBS NUDE NUFF NUKE NULL NUMB NUNS NURD NURL NURR NURS NUTS NYAS NYED NYES - -OAFS OAKS OAKY OARS OARY OAST OATH OATS OATY OBAS OBES OBEY OBIA OBIS OBIT OBOE OBOL OBOS OCAS OCCY OCHE OCTA ODAH ODAL ODAS ODDS ODEA ODES ODIC ODOR ODSO ODYL OFAY OFFS OFFY OGAM OGEE OGLE OGRE OHED OHIA OHMS OIKS OILS OILY OINK OINT OKAS OKAY OKEH OKES OKRA OKTA OLDE OLDS OLDY OLEA OLEO OLES OLID OLIO OLLA OLMS OLPE OMBU OMEN OMER OMIT OMOV ONCE ONER ONES ONIE ONLY ONOS ONST ONTO ONUS ONYX OOFS OOFY OOHS OOMS OONS OONT OOPS OOSE OOSY OOTS OOZE OOZY OPAH OPAL OPED OPEN OPES OPPO OPTS OPUS ORAD ORAL ORBS ORBY ORCA ORCS ORDO ORDS ORES ORFE ORFS ORGY ORLE ORRA ORTS ORYX ORZO OSAR OSES OSSA OTIC OTTO OUCH OUDS OUKS OULD OULK OUMA OUPA OUPH OUPS OURN OURS OUST OUTS OUZO OVAL OVEL OVEN OVER OVUM OWED OWER OWES OWLS OWLY OWNS OWRE OWSE OWTS OXEN OXER OXES OXID OXIM OYER OYES OYEZ PAAL - -PAAN PACA PACE PACK PACO PACS PACT PACY PADI PADS PAGE PAHS PAID PAIK PAIL PAIN PAIR PAIS PALE PALL PALM PALP PALS PALY PAMS PAND PANE PANG PANS PANT PAPA PAPE PAPS PARA PARD PARE PARK PARP PARR PARS PART PASE PASH PASS PAST PATE PATH PATS PATU PATY PAUA PAUL PAVE PAVS PAWA PAWK PAWL PAWN PAWS PAYS PEAG PEAK PEAL PEAN PEAR PEAS PEAT PEBA PECH PECK PECS PEDS PEED PEEK PEEL PEEN PEEP PEER PEES PEGH PEGS PEHS PEIN PEKE PELA PELE PELF PELL PELS PELT PEND PENE PENI PENK PENS PENT PEON PEPO PEPS PERE PERI PERK PERM PERN PERP PERT PERV PESO PEST PETS PEWS PFFT PFUI PHAT PHEW PHIS PHIZ PHOH PHON PHOS PHOT PHUT PIAL PIAN PIAS PICA PICE PICK PICS PIED PIER PIES PIET PIGS PIKA PIKE PIKI PILA PILE PILI PILL PILY PIMA PIMP PINA PINE PING PINK PINS PINT PINY PION PIOY PIPA PIPE PIPI PIPS PIPY PIRL PIRN PIRS PISE PISH PISO PISS PITA PITH PITS PITY PIUM PIXY PIZE PLAN PLAP PLAT PLAY PLEA PLEB PLED PLEW PLEX PLIE PLIM PLOD PLOP PLOT PLOW PLOY PLUE PLUG PLUM PLUS POAS POCK POCO PODS POEM POEP POET POGO POGY POIS POKE POKY POLE POLK POLL POLO POLS POLT POLY POME POMO POMP POMS POND PONE PONG PONK PONS PONT PONY POOD POOF POOH POOK POOL POON POOP POOR POOS POOT POPE POPS PORE PORK PORN PORT PORY POSE POSH POSS POST POSY POTE POTS POTT POUF POUK POUR POUT POWN POWS POXY POZZ PRAD PRAM PRAO PRAT PRAU PRAY PREE PREM PREP PREX PREY PREZ PRIG PRIM PROA PROB PROD PROF PROG PROM PROO PROP PROS PROW PRUH PRYS PSIS PSST PTUI PUBE PUBS PUCE PUCK PUDS PUDU PUER PUFF PUGH PUGS PUHA PUIR PUJA PUKA PUKE PUKU PUKY PULA PULE PULI PULK PULL PULP PULS PULU PULY PUMA PUMP PUMY PUNA PUNG PUNK PUNS PUNT PUNY PUPA PUPS PUPU PURE PURI PURL PURR PURS PUSH PUSS PUTS PUTT PUTZ PUYS PYAS PYAT PYES PYET PYIC PYIN PYNE PYOT PYRE PYRO QADI - -QAID QATS QINS QOPH QUAD QUAG QUAI QUAT QUAY QUEP QUEY QUID QUIM QUIN QUIP QUIT QUIZ QUOD QUOP - -RABI RACA RACE RACH RACK RACY RADE RADS RAFF RAFT RAGA RAGE RAGG RAGI RAGS RAGU RAHS RAIA RAID RAIK RAIL RAIN RAIS RAIT RAJA RAKE RAKI RAKU RALE RAMI RAMP RAMS RANA RAND RANG RANI RANK RANT RAPE RAPS RAPT RARE RARK RASE RASH RASP RAST RATA RATE RATH RATO RATS RATU RAUN RAVE RAVS RAWN RAWS RAYA RAYS RAZE RAZZ READ REAK REAL REAM REAN REAP REAR REBS RECK RECS REDD REDE REDO REDS REED REEF REEK REEL REEN REES REFS REFT REGO REGS REHS REIF REIK REIN REIS REKE RELY REMS REND RENK RENS RENT RENY REOS REPO REPP REPS RESH REST RETE RETS REVS REWS RHEA RHOS RHUS RIAD RIAL RIAS RIBA RIBS RICE RICH RICK RICY RIDE RIDS RIEL RIEM RIFE RIFF RIFS RIFT RIGG RIGS RILE RILL RIMA RIME RIMS RIMU RIMY RIND RINE RING RINK RINS RIOT RIPE RIPP RIPS RIPT RISE RISK RISP RITE RITS RITT RITZ RIVA RIVE RIVO RIZA ROAD ROAM ROAN ROAR ROBE ROBS ROCH ROCK ROCS RODE RODS ROED ROES ROIL ROIN ROJI ROKE ROKS ROKY ROLE ROLF ROLL ROMA ROMP ROMS RONE RONG RONT RONZ ROOD ROOF ROOK ROOM ROON ROOP ROOS ROOT ROPE ROPY RORE RORT RORY ROSE ROST ROSY ROTA ROTE ROTI ROTL ROTO ROTS ROUE ROUL ROUM ROUP ROUT ROUX ROVE ROWS ROWT RUBE RUBS RUBY RUCK RUCS RUDD RUDE RUDS RUED RUER RUES RUFF RUGA RUGS RUIN RUKH RULE RULY RUME RUMP RUMS RUND RUNE RUNG RUNS RUNT RURP RURU RUSA RUSE RUSH RUSK RUST RUTH RUTS RYAL RYAS RYES RYFE RYKE RYND RYOT RYPE - -SAAG SABE SABS SACK SACS SADE SADI SADO SADS SAFE SAFT SAGA SAGE SAGO SAGS SAGY SAIC SAID SAIL SAIM SAIN SAIR SAIS SAKE SAKI SALE SALL SALP SALS SALT SAMA SAME SAMP SAMS SAND SANE SANG SANK SANS SANT SAPS SARD SARI SARK SARS SASH SASS SATE SATI SAUL SAUT SAVE SAVS SAWN SAWS SAXE SAYS SCAB SCAD SCAG SCAM SCAN SCAR SCAT SCAW SCOG SCOP SCOT SCOW SCRY SCUD SCUG SCUL SCUM SCUP SCUR SCUT SCYE SEAL SEAM SEAN SEAR SEAS SEAT SECH SECO SECS SECT SEED SEEK SEEL SEEM SEEN SEEP SEER SEES SEGO SEGS SEIF SEIK SEIL SEIR SEIS SEKT SELD SELE SELF SELL SELS SEME SEMI SENA SEND SENE SENS SENT SEPS SEPT SERA SERE SERF SERK SERR SERS SESE SESH SESS SETA SETS SETT SEWN SEWS SEXT SEXY SEYS SHAD SHAG SHAH SHAM SHAN SHAT SHAW SHAY SHEA SHED SHES SHET SHEW SHIM SHIN SHIP SHIR SHIT SHIV SHMO SHOD SHOE SHOG SHOO SHOP SHOT SHOW SHRI SHUL SHUN SHUT SHWA SIAL SIBB SIBS SICE SICH SICK SICS SIDA SIDE SIDH SIEN SIES SIFT SIGH SIGN SIJO SIKA SIKE SILD SILE SILK SILL SILO SILT SIMA SIMI SIMP SIMS SIND SINE SING SINH SINK SINS SIPE SIPS SIRE SIRI SIRS SISS SIST SITE SITH SITS SITZ SIZE SIZY SJOE SKAG SKAS SKAT SKAW SKEE SKEG SKEN SKEO SKEP SKER SKET SKEW SKID SKIM SKIN SKIO SKIP SKIS SKIT SKOL SKRY SKUA SKUG SKYF SKYR SLAB SLAE SLAG SLAM SLAP SLAT SLAW SLAY SLEB SLED SLEE SLEW SLEY SLID SLIM SLIP SLIT SLOB SLOE SLOG SLOP SLOT SLOW SLUB SLUE SLUG SLUM SLUR SLUT SMEE SMEW SMIR SMIT SMOG SMUG SMUR SMUT SNAB SNAG SNAP SNAR SNAW SNEB SNED SNEE SNIB SNIG SNIP SNIT SNOB SNOD SNOG SNOT SNOW SNUB SNUG SNYE SOAK SOAP SOAR SOBA SOBS SOCA SOCK SOCS SODA SODS SOFA SOFT SOGS SOHO SOHS SOIL SOJA SOKE SOLA SOLD SOLE SOLI SOLO SOLS SOMA SOME SOMS SOMY SONE SONG SONS SOOK SOOL SOOM SOON SOOP SOOT SOPH SOPS SORA SORB SORD SORE SORI SORN SORT SOSS SOTH SOTS SOUK SOUL SOUM SOUP SOUR SOUS SOUT SOVS SOWF SOWL SOWM SOWN SOWP SOWS SOYA SOYS SPAE SPAG SPAM SPAN SPAR SPAS SPAT SPAW SPAY SPAZ SPEC SPED SPEK SPET SPEW SPIC SPIE SPIF SPIK SPIM SPIN SPIT SPIV SPOD SPOT SPRY SPUD SPUE SPUG SPUN SPUR SRIS STAB STAG STAP STAR STAT STAW STAY STED STEM STEN STEP STET STEW STEY STIE STIM STIR STOA STOB STOP STOT STOW STUB STUD STUM STUN STYE SUBA SUBS SUCH SUCK SUDD SUDS SUED SUER SUES SUET SUGH SUGO SUGS SUID SUIT SUKH SUKS SULK SULU SUMO SUMP SUMS SUMY SUNG SUNI SUNK SUNN SUNS SUPE SUPS SUQS SURA SURD SURE SURF SUSS SUSU SWAB SWAD SWAG SWAM SWAN SWAP SWAT SWAY SWEE SWEY SWIG SWIM SWIZ SWOB SWOP SWOT SWUM SYBO SYCE SYED SYEN SYES SYKE SYLI SYNC SYND SYNE SYPE SYPH - -TAAL TABI TABS TABU TACE TACH TACK TACO TACT TADS TAED TAEL TAES TAGS TAHA TAHR TAIG TAIL TAIN TAIS TAIT TAKA TAKE TAKI TAKS TAKY TALA TALC TALE TALI TALK TALL TAME TAMP TAMS TANA TANE TANG TANH TANK TANS TAOS TAPA TAPE TAPS TAPU TARA TARE TARN TARO TARP TARS TART TASH TASK TASS TATE TATH TATS TATT TATU TAUS TAUT TAVA TAVS TAWA TAWS TAWT TAXA TAXI TAYS TEAD TEAK TEAL TEAM TEAR TEAS TEAT TECH TECS TEDS TEDY TEED TEEK TEEL TEEM TEEN TEER TEES TEFF TEFS TEGG TEGS TEGU TEHR TEIL TEIN TELA TELD TELE TELL TELS TELT TEME TEMP TEMS TEND TENE TENS TENT TEPA TERF TERM TERN TEST TETE TETH TETS TEWS TEXT THAE THAN THAR THAT THAW THEE THEM THEN THEW THEY THIG THIN THIO THIR THIS THON THOU THRO THRU THUD THUG THUS TIAN TIAR TICE TICH TICK TICS TIDE TIDS TIDY TIED TIER TIES TIFF TIFT TIGE TIGS TIKA TIKE TIKI TIKS TILE TILL TILS TILT TIME TINA TIND TINE TING TINK TINS TINT TINY TIPI TIPS TIPT TIRE TIRL TIRO TIRR TITE TITI TITS TIVY TIZZ TOAD TOBY TOCK TOCO TOCS TODS TODY TOEA TOED TOES TOEY TOFF TOFT TOFU TOGA TOGE TOGS TOHO TOIL TOIT TOKE TOKO TOLA TOLD TOLE TOLL TOLT TOLU TOMB TOME TOMO TOMS TONE TONG TONK TONS TONY TOOK TOOL TOOM TOON TOOT TOPE TOPH TOPI TOPO TOPS TORA TORC TORE TORI TORN TORO TORR TORS TORT TORY TOSA TOSE TOSH TOSS TOST TOTE TOTS TOUK TOUN TOUR TOUT TOWN TOWS TOWT TOWY TOYO TOYS TOZE TRAD TRAM TRAP TRAT TRAY TREE TREF TREK TRES TRET TREW TREY TREZ TRIE TRIG TRIM TRIN TRIO TRIP TROD TROG TRON TROP TROT TROW TROY TRUE TRUG TRYE TRYP TSAR TSKS TUAN TUBA TUBE TUBS TUCK TUFA TUFF TUFT TUGS TUIS TULE TUMP TUMS TUNA TUND TUNE TUNG TUNS TUNY TUPS TURD TURF TURK TURM TURN TUSH TUSK TUTS TUTU TUZZ TWAE TWAL TWAS TWAT TWAY TWEE TWIG TWIN TWIT TWOS TYDE TYED TYEE TYER TYES TYGS TYIN TYKE TYMP TYND TYNE TYPE TYPO TYPP TYPY TYRE TYRO TYTE TZAR - -UDAL UDON UDOS UEYS UFOS UGHS UGLY UKES ULAN ULES ULEX ULNA ULUS ULVA UMBO UMMA UMPH UMPS UMPY UMRA UMUS UNAI UNAU UNBE UNCE UNCI UNCO UNDE UNDO UNDY UNIS UNIT UNTO UPAS UPBY UPDO UPGO UPON UPSY UPTA URAO URBS URDE URDS URDY UREA URES URGE URIC URNS URPS URSA URUS URVA USED USER USES UTAS UTES UTIS UTUS UVAE UVAS UVEA - -VACS VADE VAES VAGI VAGS VAIL VAIN VAIR VALE VALI VAMP VANE VANG VANS VANT VARA VARE VARS VARY VASA VASE VAST VATS VATU VAUS VAUT VAVS VAWS VEAL VEEP VEER VEES VEGA VEGO VEHM VEIL VEIN VELA VELD VELE VELL VENA VEND VENT VERA VERB VERD VERS VERT VERY VEST VETO VETS VEXT VIAE VIAL VIAS VIBE VIBS VICE VIDE VIDS VIED VIER VIES VIEW VIGA VIGS VILD VILE VILL VIMS VINA VINE VINO VINS VINT VINY VIOL VIRE VIRL VISA VISE VITA VITE VIVA VIVE VIVO VIZY VLEI VLOG VOAR VOES VOID VOIP VOLA VOLE VOLK VOLS VOLT VORS VOTE VOWS VRIL VROT VROU VROW VUGG VUGH VUGS VULN VUMS - -WAAC WABS WACK WADD WADE WADI WADS WADT WADY WAES WAFF WAFT WAGE WAGS WAID WAIF WAIL WAIN WAIR WAIS WAIT WAKA WAKE WAKF WALD WALE WALI WALK WALL WALY WAME WAND WANE WANG WANK WANS WANT WANY WAPS WAQF WARB WARD WARE WARK WARM WARN WARP WARS WART WARY WASE WASH WASP WAST WATE WATS WATT WAUK WAUL WAUR WAVE WAVY WAWA WAWE WAWL WAWS WAXY WAYS WEAK WEAL WEAN WEAR WEBS WEDS WEED WEEK WEEL WEEM WEEN WEEP WEER WEES WEET WEFT WEID WEIL WEIR WEKA WELD WELK WELL WELS WELT WEMB WEMS WENA WEND WENS WENT WEPT WERE WERO WERT WEST WETA WETS WEXE WEYS WHAE WHAM WHAP WHAT WHEE WHEN WHET WHEW WHEY WHID WHIG WHIM WHIN WHIO WHIP WHIR WHIT WHIZ WHOA WHOM WHOP WHOT WHOW WHUP WHYS WICE WICH WICK WIDE WIEL WIFE WIGS WIKI WILD WILE WILI WILL WILT WILY WIMP WIND WINE WING WINK WINN WINO WINS WINY WIPE WIRE WIRY WISE WISH WISP WISS WIST WITE WITH WITS WIVE WOAD WOCK WOES WOFS WOGS WOKE WOKS WOLD WOLF WOMB WONK WONS WONT WOOD WOOF WOOL WOON WOOS WOOT WOPS WORD WORE WORK WORM WORN WORT WOST WOTS WOVE WOWF WOWS WRAP WREN WRIT WUDS WUDU WULL WUSS WYCH WYES WYLE WYND WYNN WYNS WYTE - -XRAY XYST - -YAAR YABA YACK YADS YAFF YAGI YAGS YAHS YAKS YALD YALE YAMS YANG YANK YAPP YAPS YARD YARE YARK YARN YARR YATE YAUD YAUP YAWL YAWN YAWP YAWS YAWY YAYS YBET YEAD YEAH YEAN YEAR YEAS YEBO YECH YEDE YEED YEGG YELD YELK YELL YELM YELP YELT YENS YEPS YERD YERK YESK YEST YETI YETT YEUK YEVE YEWS YGOE YIDS YIKE YILL YINS YIPE YIPS YIRD YIRK YIRR YITE YLEM YLKE YMPE YMPT YOBS YOCK YODE YODH YODS YOGA YOGH YOGI YOKE YOKS YOLD YOLK YOMP YOND YONI YONT YOOF YOOP YORE YORK YORP YOUK YOUR YOUS YOWE YOWL YOWS YUAN YUCA YUCH YUCK YUFT YUGA YUGS YUKE YUKO YUKS YUKY YULE YUMP YUNX YUPS YURT YUTZ YUZU YWIS - -ZACK ZAGS ZANY ZAPS ZARF ZARI ZATI ZEAL ZEAS ZEBU ZEDS ZEES ZEIN ZEKS ZELS ZEPS ZERK ZERO ZEST ZETA ZEZE ZHOS ZIFF ZIGS ZILA ZILL ZIMB ZINC ZINE ZING ZINS ZIPS ZITE ZITI ZITS ZIZZ ZOBO ZOBU ZOEA ZOIC ZOLS ZONA ZONE ZONK ZOOM ZOON ZOOS ZOOT ZORI ZOUK ZULU ZUPA ZURF ZYGA ZYME ZZZS - - -San Jose Scrabble(r) Club No. 21 - -Three-Letter Word List - -Effective March 1st, 2006. -Includes all 3-letter words acceptable in U.S. Club and -Tournament Play as of 2009. -Copyright (c) 1996-2009 San Jose Scrabble Club No. 21 - - -AAH to exclaim in delight -AAL East Indian shrub -AAS [aa] (rough, cindery lava) -ABA sleeveless garment -ABO aborigine {offensive} -ABS [ab] (abdominal muscle) {OSPD3} -ABY to pay the penalty for (abye) -ACE to make a perfect shot -ACT to perform by action -ADD to perform addition -ADO bustle -ADS [ad] (advertisement) -ADZ cutting tool (adze) -AFF off -AFT toward the stern -AGA Turkish military officer -AGE to grow old -AGO in the past -AGS [ag] (agriculture) {OSPD4} -AHA intj. expressing sudden realization -AHI tuna {OSPD4} -AHS [ah] (to exclaim in amazement) {OSPD4} -AID to help -AIL to suffer pain -AIM to point in a direction -AIN Hebrew letter (ayin) -AIR to broadcast -AIS [ai] (three-toed sloth) -AIT small island -ALA wing -ALB long-sleeved vestment -ALE alcoholic beverage -ALL everything one has -ALP high mountain -ALS [al] (East Indian tree) -ALT high-pitched note -AMA Oriental nurse (amah) -AMI friend -AMP unit of electric current strength (ampere) -AMU atomic mass unit -ANA collection of information on a subject -AND added condition -ANE one -ANI tropical American black cuckoo -ANT small insect -ANY one or another -APE to mimic -APO type of protein {OSPD4} -APP computer program (application) {OSPD4} -APT appropriate -ARB stock trader -ARC to travel a curved course -ARE unit of surface measure/conj. of be -ARF dog's bark -ARK large boat -ARM to supply with weapons -ARS [ar] (letter 'r') -ART skill acquired by experience -ASH tree/to burn into ashes -ASK to question -ASP venemous snake -ASS donkey -ATE reckless impulse driving one to ruin -ATT Laotian monetary unit {OSPD3} -AUK diving seabird -AVA at all -AVE expression of greeting -AVO monetary unit of Macau -AWA away -AWE to inspire with awe -AWL pointed punching tool -AWN bristlelike appendage of certain grasses -AXE to cut with an axe -AYE affirmative vote -AYS [ay] (affirmative vote) -AZO containing nitrogen -BAA [baa] (to bleat) -BAD something bad -BAG to put into a bag -BAH intj. expressing disgust -BAL type of shoe (balmoral) -BAM to strike with a dull sound -BAN to prohibit/Rumanian coin -BAP small roll {OSPD3} -BAR to exclude -BAS [ba] (eternal soul in Egyptian mythology) -BAT to hit a baseball -BAY to howl -BED to provide with a bed -BEE winged insect -BEG to plead -BEL unit of power -BEN inner room -BES Hebrew letter (beth) {OSPD4} -BET to wager -BEY Turkish ruler -BIB to drink alcohol -BID to make a bid -BIG large -BIN to store in a bin -BIO biography -BIS [bi] (bisexual) -BIT to restrain with a bit -BIZ business -BOA large snake -BOB to move up and down -BOD body -BOG to impede -BOO to deride -BOP to hit -BOS [bo] (pal) -BOT botfly larva -BOW to bend forward at the waist -BOX to put into a box -BOY male child -BRA brassiere -BRO brother {OSPD3} -BRR intj. used to indicate coldness (brrr) -BUB young fellow -BUD to grow buds -BUG to annoy -BUM to live idly -BUN small bread roll -BUR to remove a rough edge from (burr) -BUS to transport by bus -BUT flatfish -BUY to purchase -BYE free advance to next tournament round -BYS [by] (side issue) -CAB to drive a taxi -CAD ungentlemanly man -CAM rotating machine part -CAN to be able/to put into a can -CAP to put a cover onto -CAR automobile -CAT to anchor to a cathead -CAW to caw like a crow -CAY small low island -CEE letter 'c' -CEL drawn frame of animation {OSPD3} -CEP large mushroom (cepe) -CHI Greek letter -CIG cigarette {OSPD4} -CIS having certain atoms on same side of molecule -COB corncob -COD to fool -COG to cheat at dice -COL depression between two mountains -CON to swindle -COO to make the sound of a dove -COP to steal -COR intj. expressing surprise -COS lettuce variety -COT lightweight bed -COW to intimidate -COX to direct a racing boat (coxswain) -COY shy/to caress -COZ cousin -CRU French wine classification {OSPD4} -CRY to weep -CUB young of certain animals -CUD food portion to be chewed again -CUE to signal a start -CUM together with -CUP to place into a cup -CUR mongrel dog -CUT to make an incision -CWM circular basin with steep walls (cirque) -DAB to touch lightly -DAD father -DAG hanging shred -DAH dash in Morse code -DAK transportion by relay -DAL lentil dish -DAM to build a dam -DAN skill level in martial arts {OSPD4} -DAP to dip into water -DAW to dawn -DAY 24 hours -DEB debutante -DEE letter 'd' -DEF excellent {OSPD4} -DEL differential calculus operator -DEN to live in a lair -DEV Hindu god (deva) -DEW to wet with dew -DEX sulfate used as stimulant -DEY former North African ruler -DIB to fish -DID [do-conj] (to execute) -DIE to cease living/to make a die -DIF difference {OSPD4} -DIG to scoop earth from the ground -DIM obscure/to make obscure -DIN to make a loud noise -DIP to immerse briefly -DIS to disrespect {OSPD3} -DIT dot in Morse code -DOC doctor -DOE female deer -DOG to follow after like a dog -DOL unit of pain intensity -DOM title given to certain monks -DON to put on -DOR black European beetle -DOS [do] (first tone of diatonic musical scale) -DOT to cover with dots -DOW to prosper -DRY having no moisture/prohibitionist/to make dry - -DUB to confer knighthood upon -DUD bomb that fails to explode -DUE something owed -DUG teat, udder -DUH intj. expressing patent obviousness of a preceding statement -{OSPD4} -DUI [duo-pl] (instrumental duet) -DUN of a dull brown color/to demand payment -DUO instrumental duet -DUP to open -DYE to color -EAR hearing organ -EAT to consume -EAU water -EBB to recede -ECU old French coin -EDH Old English letter -EDS [ed] (education) {OSPD4} -EEK intj. expressing fright {OSPD4} -EEL snakelike fish -EFF letter 'f' (ef) -EFS [ef] (letter 'f') -EFT newt -EGG to throw eggs at -EGO conscious self -EKE to get with great difficulty -ELD old age -ELF small, often mischievous fairy -ELK large deer -ELL letter 'l' -ELM deciduous tree -ELS [el] (letter 'l') -EME uncle -EMS [em] (printer's measurement) -EMU large, flightless bird -END to terminate -ENG phonetic symbol -ENS entity -EON long period of time (aeon) -ERA chronological period (epoch) -ERE previous to; before -ERG unit of work or energy -ERN erne -ERR to make a mistake -ERS European climbing plant (ervil) - -ESS letter 's' (es) -ETA Greek letter -ETH Old English letter (edh) -EVE evening -EWE female sheep -EYE organ of sight/to watch closely -FAB fabulous/something fabricated {OSPD4} -FAD passing fancy -FAG to make weary by hard work -FAN to use a fan to cool -FAR at or to a great distance -FAS [fa] (fourth tone of diatonic musical scale) -FAT obese/to make fat -FAX to reproduce by electronic means -FAY to join closely -FED federal agent -FEE to pay a fee to -FEH Hebrew letter (pe) -FEM passive homosexual -FEN marsh -FER for -FES [fe] (Hebrew letter-feh) {OSPD4} -FET to fetch -FEU to grant land to under Scottish feudal law -FEW amounting to or consisting of a small number -FEY crazy -FEZ brimless cap worn by men in the Near East -FIB to tell a white lie -FID topmast support bar -FIE intj. expressing disapproval -FIG to adorn -FIL coin of Iraq, Jordan -FIN to equip with fins -FIR evergreen tree -FIT healthy/to be suitable for -FIX to repair -FIZ hissing or sputtering sound -FLU virus disease -FLY clever/to hit a ball high into the air in baseball/to move -through the air -FOB to deceive -FOE enemy -FOG to cover with fog -FOH intj. faugh -FON warm, dry wind (foehn) -FOP to deceive -FOR directed or sent to -FOU drunk -FOX to outwit -FOY farewell feast or gift -FRO away -FRY to cook over direct heat in hot fat or oil -FUB to fob -FUD old-fashioned person -FUG to make stuffy -FUN to act playfully -FUR to cover with fur -GAB to chatter -GAD to roam about restlessly -GAE to go -GAG to prevent from talking -GAL girl -GAM to visit socially -GAN [gin-conj] (to begin) -GAP to make an opening in -GAR to compel -GAS to supply with gas -GAT pistol -GAY merry/homosexual -GED food fish -GEE to turn right -GEL to become like jelly -GEM to adorn with gemstones -GEN knowledge obtained by investigation {OSPD3} -GET to obtain -GEY very -GHI liquid butter made in India (ghee) -GIB to fasten with a wedge -GID disease of sheep -GIE to give -GIG to catch fish with a pronged spear -GIN to begin/to remove seeds from cotton -GIP to gyp -GIT intj. used as an order of dismissal -GNU large antelope -GOA Asian gazelle -GOB to fill a pit with waste -GOD to treat as a god (a supernatural being) -GOO slimy stuff -GOR intj. used as a mild oath -GOS [go] (Japanese board game) {OSPD4} -GOT [get-conj] (to obtain) -GOX gaseous oxygen -GOY non-Jewish person -GUL design in oriental carpets -GUM to chew without teeth -GUN to shoot with a gun -GUT to remove the guts of -GUV governor -GUY to ridicule -GYM large room for sports activities -GYP to swindle -HAD [have-conj] (to possess) -HAE to have -HAG to hack -HAH ha -HAJ pilgrimage to Mecca (hadj) -HAM to overact -HAO Vietnamese monetary unit -HAP to happen -HAS [ha] (sound expressing triumph) -HAT to provide with a hat -HAW to turn left -HAY to make into hay -HEH Hebrew letter (heth) -HEM to add an edge to -HEN female chicken -HEP hip -HER objective or possessive case of the pronoun she -HES [he] (male person) -HET Hebrew letter (heth) -HEW to cut with an ax -HEX to cast an evil spell upon -HEY intj. used to attract attention -HIC intj. used to represent a hiccup -HID [hide-conj] (to conceal) -HIE to hurry -HIM objective case of the pronoun he -HIN Hebrew unit of liquid measure -HIP aware of the most current styles and trends/to build a type -of roof -HIS possessive form of the pronoun he -HIT to strike -HMM intj. expressing thought -HOB to provide with hobnails -HOD portable trough -HOE to use a hoe -HOG to take more than one's share -HON honeybun -HOP to move by jumping on one foot -HOT having a high temperature/to heat -HOW method of doing something -HOY heavy barge -HUB center of a wheel -HUE color -HUG to grasp with both arms -HUH intj. expressing surprise -HUM to sing without words -HUN barbarian -HUP intj. used to mark a marching cadence -HUT to live in a hut -HYP hypochondria -ICE to cover with ice -ICH fish disease -ICK intj. expressing distaste -ICY covered with ice -IDS [id] (part of psyche) -IFF if and only if {OSPD3} -IFS [if] (possible condition) -IGG to ignore {OSPD4} -ILK kind -ILL evil -IMP to graft feathers onto a bird's wing -INK to apply ink to -INN to house at an inn -INS [in] (influence) -ION electrically charged atom -IRE to anger -IRK to annoy -ISM doctrine -ITS possesive form of [it] -IVY climbing vine -JAB to poke -JAG to cut unevenly -JAM to force together tightly -JAR to cause to shake -JAW to jabber -JAY corvine bird -JEE to turn right (gee) -JET to fly in a jet -JEU game -JEW to bargain with {offensive} -JIB to refuse to proceed further -JIG to bob -JIN Muslim supernatural being (jinn) -JOB to work by the piece -JOE fellow -JOG to run slowly -JOT to write down quickly -JOW to toll -JOY to rejoice -JUG to put into a jug -JUN coin of North Korea -JUS legal right -JUT to protrude -KAB ancient Hebrew unit of measure -KAE crow-like bird -KAF Hebrew letter (kaph) -KAS large cupboard/pl. of ka -KAT evergreen shrub -KAY letter 'k' -KEA parrot -KEF marijuana -KEG small barrel -KEN to know -KEP to catch -KEX dry, hollow stalk -KEY to provide with a key -KHI Greek letter (chi) -KID to tease -KIF marijuana (kef) -KIN group of related people -KIP to sleep -KIR alcoholic beverage -KIS [ki] (vital life-sustaining energy force) {OSPD4} -KIT to equip -KOA timber tree -KOB reddish brown antelope -KOI large Japanese carp {OSPD3} -KOP hill -KOR Hebrew unit of measure -KOS land measure in India -KUE letter 'q' -KYE private Korean-American banking club {OSPD4} -LAB laboratory -LAC resinous substance secreted by insects -LAD boy -LAG to fall behind -LAM to flee -LAP to drink with the tongue -LAR Roman tutelary god -LAS [la] (sixth tone of diatonic musical scale) -LAT former Latvian monetary unit -LAV lavatory -LAW to sue -LAX not strict or stringent -LAY to place -LEA meadow -LED [lead-conj] (to show the way) -LEE shelter from the wind -LEG to walk hurriedly -LEI flower necklace -LEK Albanian monetary unit -LET to rent -LEU monetary unit of Rumania -LEV Bulgarian monetary unit -LEX law -LEY lea -LEZ lesbian -LIB liberation -LID to provide with a lid -LIE to become horizontal/to tell untruths -LIN waterfall (linn) -LIP to touch with the lips -LIS [li] (Chinese unit of distance) -LIT [light] (to illuminate)/former Lithuanian monetary unit -(litas) -LOB to throw in a high arc -LOG to cut down trees for timber -LOO to subject to a forfeit at the card game loo -LOP to chop off -LOT to distribute proportionately -LOW close to the ground/to make the sound of cattle -LOX to supply with lox (liquid oxygen) -LUG to pull with effort -LUM chimney -LUV sweetheart -LUX unit of illumination -LYE solution used to make soap -MAC raincoat -MAD insane/to madden -MAE more -MAG magazine -MAN adult human male/to supply with men -MAP to draw a map -MAR to destroy the perfection of -MAS [ma] (mother) -MAT to pack into a dense mass -MAW to mow -MAX maximum {OSPD3} -MAY to have permission/to gather flowers during Spring -MED medical -MEG megabyte {OSPD4} -MEL honey -MEM Hebrew letter -MEN [man] (adult human male) -MET [meet-conj] (to make the acquaintance of) -MEW to meow -MHO unit of electrical conductance -MIB playing marble -MIC microphone {OSPD4} -MID middle -MIG playing marble -MIL unit of length -MIM primly demure -MIR Russian peasant commune -MIS [mi] (third tone of diatonic musical scale) -MIX to combine -MOA extinct flightless bird -MOB to crowd about -MOC soft leather heelless shoe (moccasin) {OSPD3} -MOD one who wears boldly stylish clothes -MOG to move away -MOL unit of quantity in chemistry (mole) -MOM mother -MON man -MOO to make the sound of a cow -MOP to wipe with a mop -MOR forest humus -MOS [mo] (moment) -MOT witty saying -MOW to cut down grass -MUD to cover with mud -MUG to assault with intent to rob -MUM to act in disguise -MUN man -MUS [mu] (Greek letter) -MUT mutt -MYC gene that regulates other genes {OSPD4} -NAB to capture -NAE no; not -NAG to find fault incessantly -NAH no -NAM [nim-conj] (to steal) -NAN Indian flat round leavened bread {OSPD3} -NAP to sleep briefly -NAW no -NAY negative vote -NEB bird beak -NEE born with the name of -NEG photographic negative {OSPD4} -NET to catch in a net -NEW existing only a short time/something that is new -NIB to provide with a penpoint -NIL nothing -NIM to steal -NIP to bite quickly -NIT insect egg -NIX to veto/water sprite -NOB wealthy person -NOD to move the head downward -NOG strong ale/to fill space with bricks -NOH classical drama of Japan -NOM name -NOO now -NOR and not -NOS [no] (negative reply) -NOT in no way -NOW present time -NTH pert. to item number n -NUB protuberance -NUN woman belonging to a religious order -NUS [nu] (Greek letter) -NUT to gather nuts -OAF clumsy person -OAK hardwood tree -OAR to row with oars -OAT cereal grass -OBA hereditary African chief {OSPD4} -OBE African sorcery (obeah) -OBI African sorcery (obeah) -OCA South American herb -ODA harem room {OSPD4} -ODD one that is odd/unusual -ODE lyric poem -ODS [od] (hypothetical force of natural power) -OES [oe] (Faroean wind) -OFF to kill -OFT often -OHM unit of electrical resistance -OHO intj. expressing surprise -OHS [oh] (to exclaim "oh") -OIL to supply with oil -OKA Turkish unit of weight -OKE Turkish unit of weight (oka) -OLD individual of a specified age/living or existing for a -relatively long time -OLE shout of approval -OMS [om] (mantra used in meditation) -ONE number 1 -ONO large mackerel {OSPD4} -ONS [on] (side of wicket in cricket) -OOH to exclaim in amazement -OOT out -OPE to open -OPS [op] (style of abstract art) -OPT to choose -ORA [os-pl] (orifice) -ORB to form into a sphere -ORC marine mammal (orca) -ORE mineral or rock containing valuable metal -ORS [or] (heraldic color gold) -ORT table scrap -OSE ridge of sand (esker) -OUD stringed instrument of northern Africa -OUR belonging to us -OUT to be revealed -OVA [ovum-pl] (female reproductive cell) -OWE to be under obligation to pay -OWL nocturnal bird -OWN to possess -OXO containing oxygen -OXY containing oxygen -PAC shoe patterned after a moccasin -PAD to line with padding -PAH intj. used as an exclamation of disgust -PAL to hang around with as friends -PAM jack of clubs -PAN to criticize harshly -PAP soft food for infants -PAR to shoot par on a hole -PAS [pa] (father) -PAT to touch lightly -PAW to scrape at with a paw -PAX ceremonial embrace given to signify Christian love and unity -PAY to give money in order to buy something -PEA edible seed of an annual herb -PEC pectoral muscle {OSPD3} -PED natural soil aggregate -PEE to urinate {offensive} -PEG to nail (a wooden pin) -PEH Hebrew letter (pe) -PEN to write -PEP to fill with energy -PER for each -PES foot/pl. of pe (Hebrew letter) -PET to caress with the hand -PEW bench for seating people in church -PHI Greek letter -PHT intj. used as an expression of mild anger or annoyance -PIA brain membrane -PIC photograph -PIE to pi -PIG to bear pigs (cloven-hoofed mammals) -PIN to fasten with a pin -PIP to break through the shell of an egg -PIS [pi] (Greek letter) -PIT to mark with cavities or depressions -PIU more used as a musical direction -PIX container for the Eucharist (pyx) -PLY to supply with or offer repeatedly -POD to produce seed vessels -POH intj. expressing disgust -POI Hawaiian food -POL politician -POM English immigrant in Australia {offensive} -POP to make a sharp, explosive sound -POT to put into a pot -POW explosive sound -POX to infect with syphilis -PRO argument or vote in favor of something -PRY to inquire impertinently into private matters -PSI Greek letter -PST intj. used to attract attention (psst) {OSPD4} -PUB tavern -PUD pudding -PUG to fill in with clay or mortar -PUL coin of Afghanistan -PUN to make a pun (a play on words) -PUP to give birth to puppies -PUR to purr -PUS viscous fluid formed in infected tissue -PUT to place in a particular position -PYA copper coin of Burma -PYE book of ecclesiastical rules in the pre reformation english -church -PYX container for the Eucharist -QAT evergreen shrub (kat) -QIS [qi] (vital life-sustaining energy force) {OSPD4} -QUA in the capacity of -RAD to fear -RAG to scold -RAH intj. used to cheer on a team or player -RAI style of popular Algerian music {OSPD4} -RAJ dominion; sovereignty -RAM to strike with great force -RAN [run-conj] (to move by rapid steps) -RAP to strike sharply -RAS Ethiopian prince -RAT to hunt rats (long-tailed rodents) -RAW uncooked/sore or irritated spot -RAX to stretch out -RAY to emit rays -REB Confederate soldier -REC recreation -RED of the color red/to put into order -REE female Eurasian sandpiper -REF to referee -REG regulation -REI erroneous form of former Portuguese coin -REM quantity of ionizing radiation -REP cross-ribbed fabric -RES thing or matter -RET to soak in order to loosen the fiber from the woody tissue -REV to increase the speed of -REX animal with a single wavy layer of hair/king -RHO Greek letter -RIA long, narrow inlet -RIB to poke fun at -RID to free from something objectionable -RIF to lay off from employment -RIG to put in proper condition for use -RIM to provide with a rim (an outer edge) -RIN to run or melt -RIP to tear or cut apart roughly -ROB to take property from illegally -ROC lengendary bird of prey -ROD to provide with a rod -ROE mass of eggs within a female fish -ROM male gypsy -ROT to decompose -ROW to propel by means of oars -RUB to move along the surface of a body with pressure -RUE to feel sorrow or remorse for -RUG to tear roughly -RUM alcoholic liquor/odd -RUN to move by rapid steps -RUT to make ruts (grooves) in -RYA Scandinavian handwoven rug -RYE cereal grass -SAB to sob -SAC pouchlike structure in an animal or plant -SAD unhappy -SAE so -SAG to bend or sink downward from weight or pressure -SAL salt -SAP to weaken gradually -SAT [sit-conj] (to rest on the buttocks) -SAU xu -SAW to cut or divide with a saw -SAX saxophone -SAY to utter -SEA ocean -SEC secant -SEE to perceive with the eyes -SEG advocate of racial segregation -SEI large whale (rorqual) -SEL self -SEN monetary unit of Japan -SER unit of weight of India -SET to put in a particular position -SEW to mend or fasten with a needle and thread -SEX to determine the sex of -SHA intj. used to urge silence (shh) -SHE female person -SHH intj. used to urge silence -SHY timid/to move suddenly back in fear -SIB sibling -SIC to urge to attack -SIM simulation -SIN to commit a sin -SIP to drink in small quantities -SIR respectful form of address used to a man -SIS sister -SIT to rest on the buttocks -SIX number 6 -SKA Jamaican music -SKI to travel on skis -SKY to hit or throw toward the sky -SLY crafty -SOB to cry with a convulsive catching of the breath -SOD to cover with sod (turf) -SOL fifth tone of diatonic musical scale (so) -SOM Kyrgyzstan monetary unit {OSPD4} -SON male child -SOP to dip or soak in a liquid -SOS [so] (fifth tone of diatonic musical scale) -SOT habitual drunkard -SOU former French coin -SOW to scatter over land for growth, as seed -SOX [sock-pl] (knitted or woven covering for the foot) -SOY soybean -SPA mineral spring -SPY to watch secretly -SRI mister; sir used as a Hindu title of respect -STY to keep in a pigpen -SUB to act as a substitute -SUE to institute legal proceedings against -SUK marketplace (souk) {OSPD4} -SUM to add into one total -SUN to expose to the sun -SUP to eat supper -SUQ marketplace (souk) {OSPD3} -SYN syne -TAB to name or designate -TAD small boy -TAE to -TAG to provide with a tag -TAJ tall, conical cap worn in Muslim countries -TAM tight-fitting Scottish cap -TAN brown from the sun's rays/to convert hide into leather by -soaking in chemicals -TAO path of virtuous conduct according to a Chinese philosophy -TAP to strike gently -TAR to cover with tar -TAS [ta] (thanks) -TAT to make tatting -TAU greek letter -TAV Hebrew letter -TAW to convert into white leather by the application of minerals -TAX to place a tax on -TEA beverage made by infusing dried leaves in boiling water -TED to spread for drying -TEE to place a golf ball on a small peg -TEG yearling sheep -TEL ancient mound in the Middle East -TEN number 10 -TET Hebrew letter (teth) -TEW to work hard -THE article used to specify or make particular -THO though -THY possessive form of the pronoun thou -TIC involuntary muscular contraction -TIE to fasten with a cord or rope -TIL sesame plant -TIN to coat with tin -TIP to tilt -TIS [ti] (seventh tone of diatonic musical scale) -TIT small bird -TOD British unit of weight -TOE to touch with the toe -TOG to clothe -TOM male of various animals -TON unit of weight -TOO in addition -TOP to cut off the top -TOR high, craggy hill -TOT to total -TOW to pull by means of a rope or chain -TOY to amuse oneself as if with a toy -TRY to attempt -TSK to utter a scolding exclamation -TUB to wash in a tub -TUG to pull with force -TUI bird of New Zealand -TUN to store in a large cask -TUP to copulate with a ewe -TUT to utter an exclamation of impatience -TUX tuxedo -TWA two -TWO number 2 -TYE chain on a ship -UDO Japanese herb -UGH sound of a cough or grunt -UKE ukulele -ULU Eskimo knife -UMM intj. expressing hesitation (um) -UMP to umpire -UNS [un] (one) -UPO upon -UPS [up] (to raise) -URB urban area -URD annual bean grown in India -URN type of vase -URP to vomit {OSPD4} -USE to put into service -UTA large lizard -UTE utility vehicle {OSPD4} -UTS [ut] (musical tone) -VAC vacuum cleaner -VAN large motor vehicle -VAR unit of reactive power -VAS anatomical duct -VAT to put into a vat -VAU Hebrew letter (vav) -VAV Hebrew letter -VAW Hebrew letter (vav) -VEE letter 'v' -VEG vegetable -VET to treat animals medically -VEX to annoy -VIA by way of -VID video {OSPD4} -VIE to strive for superiority -VIG charge paid to a bookie on a bet (vigorish) -VIM energy -VIS force or power -VOE small bay, creek, or inlet -VOW to make a vow -VOX voice -VUG small cavity in a rock or lode -VUM intj. expressing surprise {OSPD4} -WAB web -WAD to form into a wad -WAE woe -WAG to move briskly up and down or to and fro -WAN to become wan/unnaturally pale -WAP to wrap -WAR to engage in war -WAS [be-conj] (to exist) -WAT hare/wet -WAW Hebrew letter (vav) -WAX to coat with wax -WAY method of doing something -WEB to provide with a web -WED to marry -WEE short time/very small -WEN benign skin tumor -WET soaked with a liquid/to make wet -WHA who -WHO what or which person or persons -WHY reason or cause of something -WIG to provide with a wig -WIN to be victorious/to winnow -WIS to know -WIT intelligence/to know -WIZ wizard -WOE tremendous grief -WOG dark-skinned foreigner -WOK cooking utensil -WON to dwell -WOO to seek the affection of -WOP Italian {offensive} -WOS [wo] (woe) -WOT to know -WOW to excite to enthusiastic approval -WRY contorted/to contort -WUD insane -WYE letter 'y' -WYN rune for 'W' (wynn) -XIS [xi] (Greek letter) -YAG synthetic garnet {OSPD4} -YAH intj. used as an exclamation of disgust -YAK to chatter -YAM plant having an edible root -YAP to bark shrilly -YAR yare -YAW to deviate from an intended course -YAY to this extent -YEA affirmative vote -YEH yeah -YEN to yearn -YEP yes -YES to give an affirmative reply to -YET up to now -YEW evergreen tree or shrub -YID Jew {offensive} -YIN feminine passive principle {Chinese} -YIP to yelp -YOB hoodlum -YOD Hebrew letter -YOK boisterous laugh -YOM day -YON yonder -YOU 2d person sing. or pl. pronoun -YOW to yowl -YUK to laugh loudly -YUM intj. expressing tasteful pleasure -YUP yep -ZAG to turn sharply -ZAP to kill or destroy -ZAS [za] (pizza) {OSPD4} -ZAX tool for cutting roof slates -ZED letter 'z' -ZEE letter 'z' -ZEK inmate in a Soviet labor camp -ZEP long sandwich {OSPD4} -ZIG to turn sharply -ZIN zinfandel {OSPD3} -ZIP to move rapidly -ZIT pimple -ZOA [zoon-pl] (whole product of a fertilized egg) -ZOO place where animals are kept for public exhibition -ZUZ ancient Hebrew silver coin {OSPD4} -ZZZ intj. representing the sound of snoring {OSPD4} - ----------------------------------------------------------------------- -San Jose Scrabble® Club No. 21 -Director: Rick Wong -Last modified: T2Q (26 Feb 2009) Clarified status of this list. -S5G (16 May 2008) Updated for TWL2006 diff --git a/pkg/urbit/.gitattributes b/pkg/urbit/.gitattributes deleted file mode 100644 index def025cbfc..0000000000 --- a/pkg/urbit/.gitattributes +++ /dev/null @@ -1,6 +0,0 @@ -.gitignore export-ignore -.gitattributes export-ignore -tests export-ignore -hashtable_tests export-ignore -shell.nix export-ignore -*.patch -text diff --git a/pkg/urbit/.gitignore b/pkg/urbit/.gitignore deleted file mode 100644 index 3a9050b38d..0000000000 --- a/pkg/urbit/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Configuration Result -/config.mk -/include/config.h -/include/ca-bundle.h -/include/ivory.h - -# indexing -/.cache/ -compile_commands.json -tags diff --git a/pkg/urbit/LICENSE.txt b/pkg/urbit/LICENSE.txt deleted file mode 100644 index 6404c00fb3..0000000000 --- a/pkg/urbit/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Urbit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/pkg/urbit/Makefile b/pkg/urbit/Makefile deleted file mode 100644 index 6b934bc790..0000000000 --- a/pkg/urbit/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -include config.mk -compat_mks := $(foreach dir,$(compat),$(wildcard compat/$(dir)/*.mk)) -include $(compat_mks) - -jets = jets/tree.c $(wildcard jets/*/*.c) -noun = $(wildcard noun/*.c) -ur = $(wildcard ur/*.c) -vere = $(wildcard vere/*.c) $(wildcard vere/*/*.c) -daemon = $(wildcard daemon/*.c) -worker = $(wildcard worker/*.c) -tests = $(wildcard tests/*.c) -bench = $(wildcard bench/*.c) - -compat := $(foreach dir,$(compat),$(wildcard compat/$(dir)/*.c)) - -common = $(jets) $(noun) $(ur) $(vere) $(compat) -headers = $(shell find include -type f) - -common_objs = $(shell echo $(common) | sed 's/\.c/.o/g') -daemon_objs = $(shell echo $(daemon) | sed 's/\.c/.o/g') -worker_objs = $(shell echo $(worker) | sed 's/\.c/.o/g') - -all_objs = $(common_objs) $(daemon_objs) $(worker_objs) -all_srcs = $(common) $(daemon) $(worker) - -test_exes = $(shell echo $(tests) | sed 's/tests\//.\/build\//g' | sed 's/\.c//g') -bench_exes = $(shell echo $(bench) | sed 's/bench\//.\/build\//g' | sed 's/\.c//g') -all_exes = $(test_exes) $(bench_exes) ./build/urbit - -# -Werror promotes all warnings that are enabled into errors (this is on) -# -Wall issues all types of errors. This is off (for now) -CFLAGS := $(CFLAGS) - -################################################################################ - -.PHONY: all bench test clean mrproper - -################################################################################ - -all: $(all_exes) - -test: $(test_exes) - @FAIL=0; \ - for x in $^; \ - do echo $$'\n'"$$x" && ./$$x; \ - if [ $$? != 0 ]; then FAIL=1; fi; \ - done; \ - if [ $$FAIL != 0 ]; then echo "\n" && exit 1; fi; - -bench: $(bench_exes) - build/ur_bench - -clean: - rm -f ./tags $(all_objs) $(all_exes) - -mrproper: clean - rm -f config.mk include/config.h compile_commands.json - -################################################################################ - -build/ur_bench: $(common_objs) bench/ur_bench.o - @echo CC -o $@ - @mkdir -p ./build - @$(CC) $^ $(LDFLAGS) -o $@ - -build/%_tests: $(common_objs) tests/%_tests.o - @echo CC -o $@ - @mkdir -p ./build - @$(CC) $^ $(LDFLAGS) -o $@ - -build/urbit: $(common_objs) $(daemon_objs) $(worker_objs) - @echo CC -o $@ - @mkdir -p ./build - @$(CC) $^ $(LDFLAGS) -o $@ - -# CCDEPS and CCEXTRA are empty except in MingW build, -# which uses them to inject a C source transform step -%.o: %.c $(headers) $(CCDEPS) - @echo CC $< - @$(CC) -I./include $(CFLAGS) $< $(CCEXTRA) -c -o $@ - -tags: $(all_srcs) $(headers) - ctags $^ - -compile_commands.json: Makefile config.mk $(compat_mks) - @echo "[" > $@ && sep= && \ - for src in $(all_srcs); do \ - echo "$$sep{" >> $@; \ - printf '"directory": "%s",\n' $$(pwd) >> $@; \ - printf '"command": "%s",\n' "$(CC) -I./include $(CFLAGS) $$src $(CCEXTRA) -c" >> $@; \ - printf '"file": "%s",\n' $$src >> $@; \ - echo "}" >> $@; \ - sep=','; \ - done && \ - echo "]" >> $@ diff --git a/pkg/urbit/compat/create-include-files.sh b/pkg/urbit/compat/create-include-files.sh deleted file mode 100755 index 34b87cb526..0000000000 --- a/pkg/urbit/compat/create-include-files.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# support running off a tarball that doesn't contain binary pills -(( $($1 ../../bin/ivory.pill) > 512 )) || curl -L https://github.com/urbit/urbit/raw/urbit-v$URBIT_VERSION/bin/ivory.pill > ../../bin/ivory.pill - -poor_mans_xxd () { - cch=0 - echo "unsigned char $2[] = {" - while IFS='' read line - do - for i in $line - do - echo -n " 0x$i," - cch=$((cch+1)) - done - echo - done < <(od -An -v -tx1 $1) - echo "};" - echo "unsigned int $2_len = $cch;" -} - -[ -e include/ca-bundle.h ] || poor_mans_xxd $2 include_ca_bundle_crt >include/ca-bundle.h -[ -e include/ivory_impl.h ] || poor_mans_xxd ../../bin/ivory.pill u3_Ivory_pill >include/ivory_impl.h diff --git a/pkg/urbit/compat/m1brew/compat.mk b/pkg/urbit/compat/m1brew/compat.mk deleted file mode 100644 index 5d612ba841..0000000000 --- a/pkg/urbit/compat/m1brew/compat.mk +++ /dev/null @@ -1,14 +0,0 @@ -# paths to brew packages -CFLAGS := $(CFLAGS) -I/opt/homebrew/include -LDFLAGS := $(LDFLAGS) -L/opt/homebrew/lib -# force linker to use static libraries -LDFLAGS := $(shell compat/m1brew/use-static-libs.sh $(LDFLAGS)) -# add extra osx libraries -LDFLAGS := $(LDFLAGS) -framework SystemConfiguration - -ifdef debug -CFLAGS := $(CFLAGS) -O0 -g -else -# clang hangs on noun/allocate.c if -g is specified with -O3 -CFLAGS := $(CFLAGS) -O3 -endif diff --git a/pkg/urbit/compat/m1brew/ent.patch b/pkg/urbit/compat/m1brew/ent.patch deleted file mode 100644 index f26edf7a83..0000000000 --- a/pkg/urbit/compat/m1brew/ent.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/configure b/configure ---- a/configure -+++ b/configure -@@ -15,7 +15,7 @@ do - log "Trying IMPL=$IMPL" - - if IMPL=$impl make >/dev/null 2>/dev/null -- then sed -i 's|$(error IMPL must be set)|IMPL='"$impl"'|' Makefile -+ then sed -i "" 's|$(error IMPL must be set)|IMPL='"$impl"'|' Makefile - log "IMPL=$IMPL works" - exit 0 - else log "IMPL=$IMPL failed" diff --git a/pkg/urbit/compat/m1brew/murmur3.patch b/pkg/urbit/compat/m1brew/murmur3.patch deleted file mode 100644 index cd83e9fdda..0000000000 --- a/pkg/urbit/compat/m1brew/murmur3.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/makefile b/makefile ---- a/makefile -+++ b/makefile -@@ -12,5 +12,9 @@ shared: murmur3.c murmur3.h - $(CC) -fPIC -O3 -c murmur3.c - $(CC) -shared -Wl,--export-dynamic murmur3.o -o libmurmur3.so - -+static: murmur3.c murmur3.h -+ $(CC) -fPIC -O3 -c murmur3.c -+ $(AR) rcs libmurmur3.a murmur3.o -+ - clean: - rm -rf example *.o *.so diff --git a/pkg/urbit/compat/m1brew/softfloat3.patch b/pkg/urbit/compat/m1brew/softfloat3.patch deleted file mode 100644 index 888d566f49..0000000000 --- a/pkg/urbit/compat/m1brew/softfloat3.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff --git a/build/template-FAST_INT64/Makefile b/build/template-FAST_INT64/Makefile ---- a/build/template-FAST_INT64/Makefile -+++ b/build/template-FAST_INT64/Makefile -@@ -34,28 +34,27 @@ - # - #============================================================================= - --# Edit lines marked with `==>'. See "SoftFloat-source.html". -+SOURCE_DIR ?= ../../source -+SPECIALIZE_TYPE ?= 8086-SSE - --==> SOURCE_DIR ?= ../../source --==> SPECIALIZE_TYPE ?= 8086 -+SOFTFLOAT_OPTS ?= \ -+ -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ -+ -DSOFTFLOAT_FAST_DIV64TO32 - --==> SOFTFLOAT_OPTS ?= \ --==> -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ --==> -DSOFTFLOAT_FAST_DIV64TO32 -+DELETE = rm -f -+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include -+COMPILE_C = \ -+ cc -c -DSOFTFLOAT_FAST_INT64 $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@ -+MAKELIB = ar crs $@ -+LIBNAME = libsoftfloat3 - --==> DELETE = rm -f --==> C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include --==> COMPILE_C = \ --==> cc -c -DSOFTFLOAT_FAST_INT64 $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@ --==> MAKELIB = ar crs $@ -+OBJ = .o -+LIB = .a - --==> OBJ = .o --==> LIB = .a -- --==> OTHER_HEADERS = -+OTHER_HEADERS = - - .PHONY: all --all: softfloat$(LIB) -+all: $(LIBNAME)$(LIB) - - OBJS_PRIMITIVES = \ - s_eq128$(OBJ) \ -@@ -381,11 +380,11 @@ $(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c - $(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - --softfloat$(LIB): $(OBJS_ALL) -+$(LIBNAME)$(LIB): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - - .PHONY: clean - clean: -- $(DELETE) $(OBJS_ALL) softfloat$(LIB) -+ $(DELETE) $(OBJS_ALL) $(LIBNAME)$(LIB) - -diff --git a/build/template-FAST_INT64/platform.h b/build/template-FAST_INT64/platform.h ---- a/build/template-FAST_INT64/platform.h -+++ b/build/template-FAST_INT64/platform.h -@@ -34,17 +34,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - =============================================================================*/ - --// Edit lines marked with `==>'. See "SoftFloat-source.html". -- - /*---------------------------------------------------------------------------- - *----------------------------------------------------------------------------*/ --==> #define LITTLEENDIAN 1 -+#define LITTLEENDIAN 1 - - /*---------------------------------------------------------------------------- - *----------------------------------------------------------------------------*/ --==> #define INLINE inline -+#define INLINE inline - - /*---------------------------------------------------------------------------- - *----------------------------------------------------------------------------*/ --==> #define THREAD_LOCAL _Thread_local -+#define THREAD_LOCAL _Thread_local - diff --git a/pkg/urbit/compat/m1brew/use-static-libs.sh b/pkg/urbit/compat/m1brew/use-static-libs.sh deleted file mode 100755 index 7f7cf83a1c..0000000000 --- a/pkg/urbit/compat/m1brew/use-static-libs.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -set -euo pipefail -declare -a ldirs -for i in $@ -do - case $i in - -L*) ldirs+=(${i:2});; - esac -done -for i in $@ -do - case $i in - -l*) - lib=$(find ${ldirs[@]} -name lib${i:2}.a) - if [ "$lib" != "" ] - then - echo $lib - else - echo $i - fi;; - *) echo $i;; - esac -done diff --git a/pkg/urbit/compat/mingw/compat.c b/pkg/urbit/compat/mingw/compat.c deleted file mode 100644 index ebef5041fe..0000000000 --- a/pkg/urbit/compat/mingw/compat.c +++ /dev/null @@ -1,377 +0,0 @@ -#include "c/portable.h" -#include -#include -#include - -// set default CRT file mode to binary -// note that mingw binmode.o does nothing -#undef _fmode -int _fmode = _O_BINARY; - -// set standard I/O fds to binary too, because -// MSVCRT creates them before MingW sets _fmode -static void __attribute__ ((constructor)) _set_stdio_to_binary() -{ - _setmode(0, _O_BINARY); - _setmode(1, _O_BINARY); - _setmode(2, _O_BINARY); -} - -// from https://github.com/git/git/blob/master/compat/mingw.c -// ----------------------------------------------------------------------- - -int err_win_to_posix(DWORD winerr) -{ - int error = ENOSYS; - switch(winerr) { - case ERROR_ACCESS_DENIED: error = EACCES; break; - case ERROR_ACCOUNT_DISABLED: error = EACCES; break; - case ERROR_ACCOUNT_RESTRICTION: error = EACCES; break; - case ERROR_ALREADY_ASSIGNED: error = EBUSY; break; - case ERROR_ALREADY_EXISTS: error = EEXIST; break; - case ERROR_ARITHMETIC_OVERFLOW: error = ERANGE; break; - case ERROR_BAD_COMMAND: error = EIO; break; - case ERROR_BAD_DEVICE: error = ENODEV; break; - case ERROR_BAD_DRIVER_LEVEL: error = ENXIO; break; - case ERROR_BAD_EXE_FORMAT: error = ENOEXEC; break; - case ERROR_BAD_FORMAT: error = ENOEXEC; break; - case ERROR_BAD_LENGTH: error = EINVAL; break; - case ERROR_BAD_PATHNAME: error = ENOENT; break; - case ERROR_BAD_PIPE: error = EPIPE; break; - case ERROR_BAD_UNIT: error = ENODEV; break; - case ERROR_BAD_USERNAME: error = EINVAL; break; - case ERROR_BROKEN_PIPE: error = EPIPE; break; - case ERROR_BUFFER_OVERFLOW: error = ENAMETOOLONG; break; - case ERROR_BUSY: error = EBUSY; break; - case ERROR_BUSY_DRIVE: error = EBUSY; break; - case ERROR_CALL_NOT_IMPLEMENTED: error = ENOSYS; break; - case ERROR_CANNOT_MAKE: error = EACCES; break; - case ERROR_CANTOPEN: error = EIO; break; - case ERROR_CANTREAD: error = EIO; break; - case ERROR_CANTWRITE: error = EIO; break; - case ERROR_CRC: error = EIO; break; - case ERROR_CURRENT_DIRECTORY: error = EACCES; break; - case ERROR_DEVICE_IN_USE: error = EBUSY; break; - case ERROR_DEV_NOT_EXIST: error = ENODEV; break; - case ERROR_DIRECTORY: error = EINVAL; break; - case ERROR_DIR_NOT_EMPTY: error = ENOTEMPTY; break; - case ERROR_DISK_CHANGE: error = EIO; break; - case ERROR_DISK_FULL: error = ENOSPC; break; - case ERROR_DRIVE_LOCKED: error = EBUSY; break; - case ERROR_ENVVAR_NOT_FOUND: error = EINVAL; break; - case ERROR_EXE_MARKED_INVALID: error = ENOEXEC; break; - case ERROR_FILENAME_EXCED_RANGE: error = ENAMETOOLONG; break; - case ERROR_FILE_EXISTS: error = EEXIST; break; - case ERROR_FILE_INVALID: error = ENODEV; break; - case ERROR_FILE_NOT_FOUND: error = ENOENT; break; - case ERROR_GEN_FAILURE: error = EIO; break; - case ERROR_HANDLE_DISK_FULL: error = ENOSPC; break; - case ERROR_INSUFFICIENT_BUFFER: error = ENOMEM; break; - case ERROR_INVALID_ACCESS: error = EACCES; break; - case ERROR_INVALID_ADDRESS: error = EFAULT; break; - case ERROR_INVALID_BLOCK: error = EFAULT; break; - case ERROR_INVALID_DATA: error = EINVAL; break; - case ERROR_INVALID_DRIVE: error = ENODEV; break; - case ERROR_INVALID_EXE_SIGNATURE: error = ENOEXEC; break; - case ERROR_INVALID_FLAGS: error = EINVAL; break; - case ERROR_INVALID_FUNCTION: error = ENOSYS; break; - case ERROR_INVALID_HANDLE: error = EBADF; break; - case ERROR_INVALID_LOGON_HOURS: error = EACCES; break; - case ERROR_INVALID_NAME: error = EINVAL; break; - case ERROR_INVALID_OWNER: error = EINVAL; break; - case ERROR_INVALID_PARAMETER: error = EINVAL; break; - case ERROR_INVALID_PASSWORD: error = EPERM; break; - case ERROR_INVALID_PRIMARY_GROUP: error = EINVAL; break; - case ERROR_INVALID_SIGNAL_NUMBER: error = EINVAL; break; - case ERROR_INVALID_TARGET_HANDLE: error = EIO; break; - case ERROR_INVALID_WORKSTATION: error = EACCES; break; - case ERROR_IO_DEVICE: error = EIO; break; - case ERROR_IO_INCOMPLETE: error = EINTR; break; - case ERROR_LOCKED: error = EBUSY; break; - case ERROR_LOCK_VIOLATION: error = EACCES; break; - case ERROR_LOGON_FAILURE: error = EACCES; break; - case ERROR_MAPPED_ALIGNMENT: error = EINVAL; break; - case ERROR_META_EXPANSION_TOO_LONG: error = E2BIG; break; - case ERROR_MORE_DATA: error = EPIPE; break; - case ERROR_NEGATIVE_SEEK: error = ESPIPE; break; - case ERROR_NOACCESS: error = EFAULT; break; - case ERROR_NONE_MAPPED: error = EINVAL; break; - case ERROR_NOT_ENOUGH_MEMORY: error = ENOMEM; break; - case ERROR_NOT_READY: error = EAGAIN; break; - case ERROR_NOT_SAME_DEVICE: error = EXDEV; break; - case ERROR_NO_DATA: error = EPIPE; break; - case ERROR_NO_MORE_SEARCH_HANDLES: error = EIO; break; - case ERROR_NO_PROC_SLOTS: error = EAGAIN; break; - case ERROR_NO_SUCH_PRIVILEGE: error = EACCES; break; - case ERROR_OPEN_FAILED: error = EIO; break; - case ERROR_OPEN_FILES: error = EBUSY; break; - case ERROR_OPERATION_ABORTED: error = EINTR; break; - case ERROR_OUTOFMEMORY: error = ENOMEM; break; - case ERROR_PASSWORD_EXPIRED: error = EACCES; break; - case ERROR_PATH_BUSY: error = EBUSY; break; - case ERROR_PATH_NOT_FOUND: error = ENOENT; break; - case ERROR_PIPE_BUSY: error = EBUSY; break; - case ERROR_PIPE_CONNECTED: error = EPIPE; break; - case ERROR_PIPE_LISTENING: error = EPIPE; break; - case ERROR_PIPE_NOT_CONNECTED: error = EPIPE; break; - case ERROR_PRIVILEGE_NOT_HELD: error = EACCES; break; - case ERROR_READ_FAULT: error = EIO; break; - case ERROR_SEEK: error = EIO; break; - case ERROR_SEEK_ON_DEVICE: error = ESPIPE; break; - case ERROR_SHARING_BUFFER_EXCEEDED: error = ENFILE; break; - case ERROR_SHARING_VIOLATION: error = EACCES; break; - case ERROR_STACK_OVERFLOW: error = ENOMEM; break; - case ERROR_SUCCESS: error = 0; break; - case ERROR_SWAPERROR: error = ENOENT; break; - case ERROR_TOO_MANY_MODULES: error = EMFILE; break; - case ERROR_TOO_MANY_OPEN_FILES: error = EMFILE; break; - case ERROR_UNRECOGNIZED_MEDIA: error = ENXIO; break; - case ERROR_UNRECOGNIZED_VOLUME: error = ENODEV; break; - case ERROR_WAIT_NO_CHILDREN: error = ECHILD; break; - case ERROR_WRITE_FAULT: error = EIO; break; - case ERROR_WRITE_PROTECT: error = EROFS; break; - } - return error; -} - -int link(const char *path1, const char *path2) -{ - if ( CreateHardLinkA(path2, path1, NULL) ) { - return 0; - } - - errno = err_win_to_posix(GetLastError()); - return -1; -} - -// from msys2 mingw-packages-dev patches -// ----------------------------------------------------------------------- - -static DWORD __map_mmap_prot_page(const int prot) -{ - DWORD protect = 0; - - if (prot == PROT_NONE) - return protect; - - if ((prot & PROT_EXEC) != 0) - { - protect = ((prot & PROT_WRITE) != 0) ? - PAGE_EXECUTE_READWRITE : PAGE_EXECUTE_READ; - } - else - { - protect = ((prot & PROT_WRITE) != 0) ? - PAGE_READWRITE : PAGE_READONLY; - } - - return protect; -} - -static DWORD __map_mmap_prot_file(const int prot) -{ - DWORD desiredAccess = 0; - - if (prot == PROT_NONE) - return desiredAccess; - - if ((prot & PROT_READ) != 0) - desiredAccess |= FILE_MAP_READ; - if ((prot & PROT_WRITE) != 0) - desiredAccess |= FILE_MAP_WRITE; - if ((prot & PROT_EXEC) != 0) - desiredAccess |= FILE_MAP_EXECUTE; - - return desiredAccess; -} - -void* mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off) -{ - HANDLE fm, h; - - void * map = MAP_FAILED; - - const DWORD dwFileOffsetLow = (sizeof(off_t) <= sizeof(DWORD)) ? - (DWORD)off : (DWORD)(off & 0xFFFFFFFFL); - const DWORD dwFileOffsetHigh = (sizeof(off_t) <= sizeof(DWORD)) ? - (DWORD)0 : (DWORD)((off >> 32) & 0xFFFFFFFFL); - const DWORD protect = __map_mmap_prot_page(prot); - const DWORD desiredAccess = __map_mmap_prot_file(prot); - - errno = 0; - - if (len == 0 - /* Usupported protection combinations */ - || prot == PROT_EXEC) - { - errno = EINVAL; - return MAP_FAILED; - } - - if ((flags & MAP_ANON) == 0) - { - h = (HANDLE)_get_osfhandle(fildes); - - if (h == INVALID_HANDLE_VALUE) - { - errno = EBADF; - return MAP_FAILED; - } - } - else h = INVALID_HANDLE_VALUE; - - fm = CreateFileMapping(h, NULL, protect, 0, len, NULL); - - if (fm == NULL) - { - errno = err_win_to_posix(GetLastError()); - return MAP_FAILED; - } - - map = MapViewOfFileEx(fm, desiredAccess, dwFileOffsetHigh, dwFileOffsetLow, len, addr); - errno = err_win_to_posix(GetLastError()); - - CloseHandle(fm); - - if (map == NULL) - return MAP_FAILED; - - if ((flags & MAP_FIXED) != 0 && map != addr) - { - UnmapViewOfFile(map); - errno = EEXIST; - return MAP_FAILED; - } - - return map; -} - -int munmap(void *addr, size_t len) -{ - if (UnmapViewOfFile(addr)) - return 0; - - errno = err_win_to_posix(GetLastError()); - return -1; -} - -int msync(void *addr, size_t len, int flags) -{ - if (FlushViewOfFile(addr, len)) - return 0; - - errno = err_win_to_posix(GetLastError()); - return -1; -} - -// ----------------------------------------------------------------------- - -// vere uses kill() only to kill lockfile owner with SIGTERM or SIGKILL -// Windows does not have signals, so I handle SIGKILL as TerminateProcess() -// and return an error in all other cases -int kill(pid_t pid, int sig) -{ - if (pid > 0 && sig == SIGKILL) { - HANDLE h = OpenProcess(PROCESS_TERMINATE, FALSE, pid); - - if (TerminateProcess(h, -1)) { - CloseHandle(h); - return 0; - } - - errno = err_win_to_posix(GetLastError()); - CloseHandle(h); - return -1; - } - - errno = EINVAL; - return -1; -} - -// libgcc built for mingw has included an implementation of mprotect -// via VirtualProtect since olden days, but it takes int rather than size_t -// and therefore fails or does unexpected things for >2GB blocks on 64-bit -// https://github.com/gcc-mirror/gcc/blob/master/libgcc/libgcc2.c -int mprotect (void *addr, size_t len, int prot) -{ - DWORD np, op; - - if (prot == (PROT_READ | PROT_WRITE | PROT_EXEC)) - np = PAGE_EXECUTE_READWRITE; - else if (prot == (PROT_READ | PROT_EXEC)) - np = PAGE_EXECUTE_READ; - else if (prot == (PROT_EXEC)) - np = PAGE_EXECUTE; - else if (prot == (PROT_READ | PROT_WRITE)) - np = PAGE_READWRITE; - else if (prot == (PROT_READ)) - np = PAGE_READONLY; - else if (prot == 0) - np = PAGE_NOACCESS; - else - { - errno = EINVAL; - return -1; - } - - if (VirtualProtect (addr, len, np, &op)) - return 0; - - // NB: return code of ntdll!RtlGetLastNtStatus() is useful - // for diagnosing obscure VirtualProtect failures - errno = err_win_to_posix(GetLastError()); - return -1; -} - -int utimes(const char *path, const struct timeval times[2]) -{ - struct _utimbuf utb = {.actime = times[0].tv_sec, .modtime = times[1].tv_sec}; - return _utime(path, &utb); -} - -int fdatasync(int fildes) -{ - HANDLE h = (HANDLE)_get_osfhandle(fildes); - - if (h == INVALID_HANDLE_VALUE) - { - errno = EBADF; - return -1; - } - - if (FlushFileBuffers(h)) - { - errno = 0; - return 0; - } - else - { - errno = err_win_to_posix(GetLastError()); - return -1; - } -} - -intmax_t mdb_get_filesize(HANDLE han_u) -{ - LARGE_INTEGER li; - GetFileSizeEx(han_u, &li); - return li.QuadPart; -} - -char *realpath(const char *path, char *resolved_path) -{ - // XX MAX_PATH - // - return _fullpath(resolved_path, path, MAX_PATH); -} - -long sysconf(int name) -{ - SYSTEM_INFO si; - - if ( _SC_PAGESIZE != name ) { - return -1; - } - GetNativeSystemInfo(&si); - return si.dwPageSize; -} diff --git a/pkg/urbit/compat/mingw/compat.h b/pkg/urbit/compat/mingw/compat.h deleted file mode 100644 index 56c35e90ae..0000000000 --- a/pkg/urbit/compat/mingw/compat.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _MINGW_IO_H -#define _MINGW_IO_H - -#define mkdir(A, B) mkdir(A) - -int link(const char *path1, const char *path2); -char *realpath(const char *path, char *resolved_path); -int fdatasync(int fd); -int utimes(const char *path, const struct timeval times[2]); -long sysconf(int name); - -int kill(pid_t pid, int signum); - -#define SIGUSR1 10 -#define SIGALRM 14 -#define SIGVTALRM 26 -#define SIGSTK 31 -#define SIG_COUNT 32 -#define _SC_PAGESIZE 29 - -#endif//_MINGW_IO_H diff --git a/pkg/urbit/compat/mingw/compat.mk b/pkg/urbit/compat/mingw/compat.mk deleted file mode 100644 index 8add2a3b6e..0000000000 --- a/pkg/urbit/compat/mingw/compat.mk +++ /dev/null @@ -1,17 +0,0 @@ -# increase default thread stack size and link Windows implibs -LDFLAGS := $(LDFLAGS) -static -Wl,--stack,67108864 -lbcrypt -lntdll -lws2_32 -# libcurl -CFLAGS := $(CFLAGS) -DCURL_STATICLIB -LDFLAGS := $(LDFLAGS) -lzstd -lcrypt32 -# libh2o -CFLAGS := $(CFLAGS) -DH2O_NO_UNIX_SOCKETS -# libuv -LDFLAGS := $(LDFLAGS) -luserenv -liphlpapi -lpsapi -# secp256k1, due to _FORTIFY_SOURCE -LDFLAGS := $(LDFLAGS) -lssp - -ifdef debug -CFLAGS := $(CFLAGS) -O0 -g -else -CFLAGS := $(CFLAGS) -O3 -g -endif diff --git a/pkg/urbit/compat/mingw/ctrlc.c b/pkg/urbit/compat/mingw/ctrlc.c deleted file mode 100644 index 9be57981b9..0000000000 --- a/pkg/urbit/compat/mingw/ctrlc.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -// initialize msvcrt signals early, otherwise Ctrl-C does nothing -static void __attribute__ ((constructor)) _init_crt_signals() -{ - signal(SIGINT, SIG_DFL); -} diff --git a/pkg/urbit/compat/mingw/daemon.c b/pkg/urbit/compat/mingw/daemon.c deleted file mode 100644 index 5fcb9e1865..0000000000 --- a/pkg/urbit/compat/mingw/daemon.c +++ /dev/null @@ -1,116 +0,0 @@ -#include "noun.h" -vere.h"/vere.h" - -/* _dup_std_handle(): creates an inheritable duplicate of a standard handle. -*/ -static BOOL -_dup_std_handle(HANDLE* new_u, DWORD typ_u) -{ - DWORD dum_u; - HANDLE han_u = GetStdHandle(typ_u); - BOOL con_u = GetConsoleMode(han_u, &dum_u); - if ( con_u ) { - han_u = (HANDLE)_get_osfhandle(c3_open(c3_dev_null, O_RDWR, 0)); - } - - if ( !DuplicateHandle(GetCurrentProcess(), han_u, GetCurrentProcess(), new_u, 0, TRUE, DUPLICATE_SAME_ACCESS) ) { - fprintf(stderr, "vere: DuplicateHandle(%d): %d\r\n", typ_u, GetLastError()); - exit(1); - } - - return con_u; -} - -/* _on_boot_completed_cb: invoked when the ship has finished booting. -*/ -static void _on_boot_completed_cb() { - HANDLE hin_u = GetStdHandle(STD_INPUT_HANDLE); - SetEvent(hin_u); - CloseHandle(hin_u); -} - -/* u3_daemon_init(): platform-specific daemon mode initialization. -*/ -void -u3_daemon_init() -{ - // detect if this process is the child daemon process - // - if ( ResetEvent(GetStdHandle(STD_INPUT_HANDLE)) ) { - u3_Host.bot_f = _on_boot_completed_cb; - return; - } - - STARTUPINFOW psi_u; - ZeroMemory(&psi_u, sizeof(psi_u)); - psi_u.cb = sizeof(psi_u); - psi_u.dwFlags = STARTF_USESTDHANDLES; - - // duplicate standard output and error handles for the child process, - // replacing any raw console handles with handles to /dev/null - // print a warning if raw console output detected - // - // On Windows, console handles become invalid once the console is - // detached. This will cause urbit terminal output to fail. libuv - // provides no way of changing the handle of an open uv_pipe_handle, - // and Windows has no equivalent of dup2() for handles, so I cannot - // substitute a /dev/null handle once the terminal is initialized. - // It is possible to create an anonymous pipe and have the child - // process take over its drain end after it signals that the ship - // has booted, but -d is intended for background operation anyway - // and does not seem to warrant the added complexity. - // - if ( _dup_std_handle(&psi_u.hStdOutput, STD_OUTPUT_HANDLE) | - _dup_std_handle(&psi_u.hStdError, STD_ERROR_HANDLE) ) - { - fprintf(stderr, "vere: -d used from a Windows console without redirection\r\n" - " no output from the daemon process will be visible\r\n"); - fflush(stderr); - } - - // create an event for the child process to signal - // the parent that the ship has finished booting - // pass the handle as "stdin" (otherwise unused with -d) - // - SECURITY_ATTRIBUTES sa_u = {sizeof (SECURITY_ATTRIBUTES), NULL, TRUE}; - if ( !(psi_u.hStdInput = CreateEvent(&sa_u, TRUE, FALSE, NULL)) ) { - fprintf(stderr, "vere: CreateEvent: %d\r\n", GetLastError()); - exit(1); - } - - // create the child process with the same command line as parent - // it will start, re-parse the command line, and call u3_daemon_init - // - PROCESS_INFORMATION ppi_u; - if ( !CreateProcessW(NULL, _wcsdup(GetCommandLineW()), NULL, NULL, TRUE, DETACHED_PROCESS, NULL, NULL, &psi_u, &ppi_u) ) { - fprintf(stderr, "vere: CreateProcess: %d\r\n", GetLastError()); - exit(1); - } - - CloseHandle(ppi_u.hThread); - - // wait for the child process to exit or to signal the event - // - DWORD exi_u; - HANDLE han_u[2] = {ppi_u.hProcess, psi_u.hStdInput}; - switch ( WaitForMultipleObjects(2, han_u, FALSE, INFINITE) ) { - case WAIT_OBJECT_0: - // the child process exited prematurely, propagate its exit code - // - if ( GetExitCodeProcess(ppi_u.hProcess, &exi_u) ) { - exit(exi_u); - } - - fprintf(stderr, "vere: GetExitCodeProcess: %d\r\n", GetLastError()); - exit(1); - - case WAIT_OBJECT_0 + 1: - // the child process has finished booting, exit normally - // - exit(0); - - default: - fprintf(stderr, "vere: WaitForMultipleObjects: %d\r\n", GetLastError()); - exit(1); - } -} diff --git a/pkg/urbit/compat/mingw/h2o.patch b/pkg/urbit/compat/mingw/h2o.patch deleted file mode 100644 index 1bfc90e4ad..0000000000 --- a/pkg/urbit/compat/mingw/h2o.patch +++ /dev/null @@ -1,1834 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5a04e1426..9ddad60d1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -69,6 +69,18 @@ OPTION(WITH_BUNDLED_SSL "whether or not to use the bundled libressl" ${WITH_BUND - - OPTION(WITHOUT_LIBS "skip building libs even when possible" OFF) - OPTION(BUILD_SHARED_LIBS "whether to build a shared library" OFF) -+OPTION(WITHOUT_FASTCGI "don't include fastcgi" OFF) -+OPTION(WITHOUT_MEMCACHED "don't include memcached" OFF) -+ -+IF (MINGW) -+ SET(WITHOUT_FASTCGI "ON") -+ SET(WITHOUT_MEMCACHED "ON") -+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE -DO_CLOEXEC=0 -DH2O_NO_UNIX_SOCKETS") -+ENDIF (MINGW) -+ -+IF (WITHOUT_MEMCACHED) -+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DH2O_NO_MEMCACHED") -+ENDIF (WITHOUT_MEMCACHED) - - FIND_PROGRAM(RUBY ruby) - FIND_PROGRAM(BISON bison) -@@ -228,16 +240,7 @@ SET(PICOTLS_SOURCE_FILES - deps/picotls/lib/openssl.c) - - SET(LIB_SOURCE_FILES -- deps/cloexec/cloexec.c - deps/libgkc/gkc.c -- deps/libyrmcds/close.c -- deps/libyrmcds/connect.c -- deps/libyrmcds/recv.c -- deps/libyrmcds/send.c -- deps/libyrmcds/send_text.c -- deps/libyrmcds/socket.c -- deps/libyrmcds/strerror.c -- deps/libyrmcds/text_mode.c - deps/picohttpparser/picohttpparser.c - - lib/common/cache.c -@@ -245,7 +248,6 @@ SET(LIB_SOURCE_FILES - lib/common/filecache.c - lib/common/hostinfo.c - lib/common/http1client.c -- lib/common/memcached.c - lib/common/memory.c - lib/common/multithread.c - lib/common/serverutil.c -@@ -272,7 +274,6 @@ SET(LIB_SOURCE_FILES - lib/handler/compress/gzip.c - lib/handler/errordoc.c - lib/handler/expires.c -- lib/handler/fastcgi.c - lib/handler/file.c - lib/handler/headers.c - lib/handler/mimemap.c -@@ -290,7 +291,6 @@ SET(LIB_SOURCE_FILES - lib/handler/configurator/compress.c - lib/handler/configurator/errordoc.c - lib/handler/configurator/expires.c -- lib/handler/configurator/fastcgi.c - lib/handler/configurator/file.c - lib/handler/configurator/headers.c - lib/handler/configurator/proxy.c -@@ -314,6 +314,33 @@ SET(LIB_SOURCE_FILES - lib/http2/stream.c - lib/http2/http2_debug_state.c) - -+IF (NOT MINGW) -+ SET(LIB_SOURCE_FILES -+ ${LIB_SOURCE_FILES} -+ deps/cloexec/cloexec.c) -+ENDIF (NOT MINGW) -+ -+IF (NOT WITHOUT_FASTCGI) -+ SET(LIB_SOURCE_FILES -+ ${LIB_SOURCE_FILES} -+ lib/handler/fastcgi.c -+ lib/handler/configurator/fastcgi.c) -+ENDIF (NOT WITHOUT_FASTCGI) -+ -+IF (NOT WITHOUT_MEMCACHED) -+ SET(LIB_SOURCE_FILES -+ ${LIB_SOURCE_FILES} -+ deps/libyrmcds/close.c -+ deps/libyrmcds/connect.c -+ deps/libyrmcds/recv.c -+ deps/libyrmcds/send.c -+ deps/libyrmcds/send_text.c -+ deps/libyrmcds/socket.c -+ deps/libyrmcds/strerror.c -+ deps/libyrmcds/text_mode.c -+ lib/common/memcached.c) -+ENDIF (NOT WITHOUT_MEMCACHED) -+ - SET(UNIT_TEST_SOURCE_FILES - ${LIB_SOURCE_FILES} - ${LIBYAML_SOURCE_FILES} -diff --git a/examples/libh2o/http1client.c b/examples/libh2o/http1client.c -index bcf9b94b2..592376759 100644 ---- a/examples/libh2o/http1client.c -+++ b/examples/libh2o/http1client.c -@@ -134,6 +134,11 @@ h2o_http1client_head_cb on_connect(h2o_http1client_t *client, const char *errstr - - int main(int argc, char **argv) - { -+#ifdef _WIN32 -+ WSADATA wsaData; -+ WSAStartup(MAKEWORD(2, 0), &wsaData); -+#endif -+ - h2o_multithread_queue_t *queue; - h2o_multithread_receiver_t getaddr_receiver; - h2o_timeout_t io_timeout; -diff --git a/examples/libh2o/simple.c b/examples/libh2o/simple.c -index bb72bf60c..be7045d1c 100644 ---- a/examples/libh2o/simple.c -+++ b/examples/libh2o/simple.c -@@ -21,11 +21,15 @@ - */ - #include - #include --#include - #include - #include - #include -+#ifdef _WIN32 -+#include -+#else -+#include - #include -+#endif - #include - #include "h2o.h" - #include "h2o/http1.h" -@@ -219,7 +223,12 @@ int main(int argc, char **argv) - { - h2o_hostconf_t *hostconf; - -+#ifdef _WIN32 -+ WSADATA wsaData; -+ WSAStartup(MAKEWORD(2, 0), &wsaData); -+#else - signal(SIGPIPE, SIG_IGN); -+#endif - - h2o_config_init(&config); - hostconf = h2o_config_register_host(&config, h2o_iovec_init(H2O_STRLIT("default")), 65535); -diff --git a/include/h2o.h b/include/h2o.h -index 57877bd12..84822b792 100644 ---- a/include/h2o.h -+++ b/include/h2o.h -@@ -32,7 +32,11 @@ extern "C" { - #include - #include - #include -+#ifdef _WIN32 -+#include -+#else - #include -+#endif - #include - #include - #include -diff --git a/include/h2o/configurator.h b/include/h2o/configurator.h -index d1a2e2515..d59d070dd 100644 ---- a/include/h2o/configurator.h -+++ b/include/h2o/configurator.h -@@ -145,7 +145,7 @@ int h2o_configurator_apply_commands(h2o_configurator_context_t *ctx, yoml_t *nod - * emits configuration error - */ - void h2o_configurator_errprintf(h2o_configurator_command_t *cmd, yoml_t *node, const char *reason, ...) -- __attribute__((format(printf, 3, 4))); -+ __attribute__((format(gnu_printf, 3, 4))); - /** - * interprets the configuration value using sscanf, or prints an error upon failure - * @param configurator configurator -@@ -154,7 +154,7 @@ void h2o_configurator_errprintf(h2o_configurator_command_t *cmd, yoml_t *node, c - * @return 0 if successful, -1 if not - */ - int h2o_configurator_scanf(h2o_configurator_command_t *cmd, yoml_t *node, const char *fmt, ...) -- __attribute__((format(scanf, 3, 4))); -+ __attribute__((format(gnu_scanf, 3, 4))); - /** - * interprets the configuration value and returns the index of the matched string within the candidate strings, or prints an error - * upon failure -diff --git a/include/h2o/filecache.h b/include/h2o/filecache.h -index a000c4c6d..494f61fb1 100644 ---- a/include/h2o/filecache.h -+++ b/include/h2o/filecache.h -@@ -61,6 +61,7 @@ void h2o_filecache_destroy(h2o_filecache_t *cache); - void h2o_filecache_clear(h2o_filecache_t *cache); - - h2o_filecache_ref_t *h2o_filecache_open_file(h2o_filecache_t *cache, const char *path, int oflag); -+ssize_t h2o_filecache_read_file(h2o_filecache_ref_t *ref, void *buf, size_t count, off_t offset); - void h2o_filecache_close_file(h2o_filecache_ref_t *ref); - struct tm *h2o_filecache_get_last_modified(h2o_filecache_ref_t *ref, char *outbuf); - size_t h2o_filecache_get_etag(h2o_filecache_ref_t *ref, char *outbuf); -diff --git a/include/h2o/hostinfo.h b/include/h2o/hostinfo.h -index 14ac30c6c..b39fea520 100644 ---- a/include/h2o/hostinfo.h -+++ b/include/h2o/hostinfo.h -@@ -22,13 +22,16 @@ - #ifndef h2o__hostinfo_h - #define h2o__hostinfo_h - --#include -+#ifdef _WIN32 -+#include -+#else - #include - #include - #include - #include - #include - #include -+#endif - #include "h2o/multithread.h" - - typedef struct st_h2o_hostinfo_getaddr_req_t h2o_hostinfo_getaddr_req_t; -diff --git a/include/h2o/memory.h b/include/h2o/memory.h -index 10c137c88..354fa4359 100644 ---- a/include/h2o/memory.h -+++ b/include/h2o/memory.h -@@ -78,8 +78,19 @@ typedef struct st_h2o_buffer_prototype_t h2o_buffer_prototype_t; - * buffer structure compatible with iovec - */ - typedef struct st_h2o_iovec_t { -+#ifdef __MINGW32__ -+#define H2O_IOVEC_NULL {0, NULL} -+#define H2O_IOVEC_EMPTY {0, ""} -+#define H2O_IOVEC_STRLIT(s) {sizeof(s) - 1, (s)} -+ unsigned int len; -+ char *base; -+#else -+#define H2O_IOVEC_NULL {NULL} -+#define H2O_IOVEC_EMPTY {"", 0} -+#define H2O_IOVEC_STRLIT(s) {(s), sizeof(s) - 1} - char *base; - size_t len; -+#endif - } h2o_iovec_t; - - typedef struct st_h2o_mem_recycle_t { -diff --git a/include/h2o/socket.h b/include/h2o/socket.h -index 58ada8509..268dd8a2e 100644 ---- a/include/h2o/socket.h -+++ b/include/h2o/socket.h -@@ -27,7 +27,11 @@ extern "C" { - #endif - - #include -+#ifdef _WIN32 -+#include -+#else - #include -+#endif - #include - #include "h2o/cache.h" - #include "h2o/memory.h" -diff --git a/include/h2o/socketpool.h b/include/h2o/socketpool.h -index cc4161df4..f1c4eb3c3 100644 ---- a/include/h2o/socketpool.h -+++ b/include/h2o/socketpool.h -@@ -26,8 +26,10 @@ - extern "C" { - #endif - -+#ifndef _WIN32 - #include - #include -+#endif - #include - #include "h2o/linklist.h" - #include "h2o/multithread.h" -diff --git a/include/h2o/url.h b/include/h2o/url.h -index 231c9a263..6a707a567 100644 ---- a/include/h2o/url.h -+++ b/include/h2o/url.h -@@ -22,7 +22,9 @@ - #ifndef h2o__url_h - #define h2o__url_h - -+#ifndef H2O_NO_UNIX_SOCKETS - #include -+#endif - #include "h2o/memory.h" - - typedef struct st_h2o_url_scheme_t { -@@ -92,11 +94,13 @@ static h2o_iovec_t h2o_url_stringify(h2o_mem_pool_t *pool, const h2o_url_t *url) - * copies a URL object (null-terminates all the string elements) - */ - void h2o_url_copy(h2o_mem_pool_t *pool, h2o_url_t *dest, const h2o_url_t *src); -+#ifndef H2O_NO_UNIX_SOCKETS - /** - * extracts sockaddr_un from host and returns NULL (or returns an error string if failed) - */ - const char *h2o_url_host_to_sun(h2o_iovec_t host, struct sockaddr_un *sa); - extern const char *h2o_url_host_to_sun_err_is_not_unix_socket; -+#endif - - /* inline definitions */ - -diff --git a/lib/common/file.c b/lib/common/file.c -index 3cf5ac5d1..d3e0048b6 100644 ---- a/lib/common/file.c -+++ b/lib/common/file.c -@@ -25,7 +25,6 @@ - #include - #include - #include --#include - #include - #include "h2o/file.h" - -@@ -33,7 +32,7 @@ h2o_iovec_t h2o_file_read(const char *fn) - { - int fd; - struct stat st; -- h2o_iovec_t ret = {NULL}; -+ h2o_iovec_t ret = H2O_IOVEC_NULL; - - /* open */ - if ((fd = open(fn, O_RDONLY | O_CLOEXEC)) == -1) -@@ -64,5 +63,5 @@ Error: - if (fd != -1) - close(fd); - free(ret.base); -- return (h2o_iovec_t){NULL}; -+ return (h2o_iovec_t)H2O_IOVEC_NULL; - } -diff --git a/lib/common/filecache.c b/lib/common/filecache.c -index 747a1ffa6..e37e1f498 100644 ---- a/lib/common/filecache.c -+++ b/lib/common/filecache.c -@@ -136,6 +136,24 @@ Exit: - return ref; - } - -+ssize_t h2o_filecache_read_file(h2o_filecache_ref_t *ref, void *buf, size_t count, off_t offset) -+{ -+ #ifdef _WIN32 -+ // h2o reads from h2o_filecache_ref_t.fd only with pread (comment it out to verify) -+ // this allows me to ignore the existence of the file pointer position maintained -+ // by Windows I/O manager and use NtReadFile() without opening extra file handles -+ /* -+ #include -+ IO_STATUS_BLOCK sb; -+ LARGE_INTEGER li; -+ NTSTATUS s = NtReadFile(_get_osfhandle(fd), NULL, NULL, NULL, &sb, buf, count, &li, NULL); -+ */ -+ return -1; -+ #else -+ return pread(ref->fd, buf, count, offset); -+ #endif -+} -+ - void h2o_filecache_close_file(h2o_filecache_ref_t *ref) - { - if (--ref->_refcnt != 0) -diff --git a/lib/common/http1client.c b/lib/common/http1client.c -index 8547ea817..a9de3d67d 100644 ---- a/lib/common/http1client.c -+++ b/lib/common/http1client.c -@@ -19,12 +19,18 @@ - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -+#ifdef _WIN32 -+#include -+#else - #include - #include - #include - #include -+#endif - #include -+#ifndef H2O_NO_UNIX_SOCKETS - #include -+#endif - #include "picohttpparser.h" - #include "h2o.h" - -@@ -535,6 +541,7 @@ void h2o_http1client_connect(h2o_http1client_t **_client, void *data, h2o_http1c - return; - } - } -+ #ifndef _WIN32 - { /* directly call connect(2) if `host` refers to an UNIX-domain socket */ - struct sockaddr_un sa; - const char *to_sa_err; -@@ -547,6 +554,7 @@ void h2o_http1client_connect(h2o_http1client_t **_client, void *data, h2o_http1c - return; - } - } -+ #endif - /* resolve destination and then connect */ - client->_getaddr_req = - h2o_hostinfo_getaddr(ctx->getaddr_receiver, host, h2o_iovec_init(serv, sprintf(serv, "%u", (unsigned)port)), AF_UNSPEC, -diff --git a/lib/common/memory.c b/lib/common/memory.c -index ba9f2dba2..3a505d8ea 100644 ---- a/lib/common/memory.c -+++ b/lib/common/memory.c -@@ -27,7 +27,9 @@ - #include - #include - #include -+#ifndef _WIN32 - #include -+#endif - #include - #include "h2o/memory.h" - -@@ -190,20 +192,24 @@ void h2o_mem_link_shared(h2o_mem_pool_t *pool, void *p) - link_shared(pool, H2O_STRUCT_FROM_MEMBER(struct st_h2o_mem_pool_shared_entry_t, bytes, p)); - } - -+#ifndef _WIN32 - static size_t topagesize(size_t capacity) - { - size_t pagesize = getpagesize(); - return (offsetof(h2o_buffer_t, _buf) + capacity + pagesize - 1) / pagesize * pagesize; - } -+#endif - - void h2o_buffer__do_free(h2o_buffer_t *buffer) - { - /* caller should assert that the buffer is not part of the prototype */ - if (buffer->capacity == buffer->_prototype->_initial_buf.capacity) { - h2o_mem_free_recycle(&buffer->_prototype->allocator, buffer); -+ #ifndef _WIN32 - } else if (buffer->_fd != -1) { - close(buffer->_fd); - munmap((void *)buffer, topagesize(buffer->capacity)); -+ #endif - } else { - free(buffer); - } -@@ -240,6 +246,7 @@ h2o_iovec_t h2o_buffer_reserve(h2o_buffer_t **_inbuf, size_t min_guarantee) - do { - new_capacity *= 2; - } while (new_capacity - inbuf->size < min_guarantee); -+ #ifndef _WIN32 - if (inbuf->_prototype->mmap_settings != NULL && inbuf->_prototype->mmap_settings->threshold <= new_capacity) { - size_t new_allocsize = topagesize(new_capacity); - int fd; -@@ -287,7 +294,9 @@ h2o_iovec_t h2o_buffer_reserve(h2o_buffer_t **_inbuf, size_t min_guarantee) - inbuf->capacity = new_capacity; - inbuf->bytes = newp->_buf + offset; - } -- } else { -+ } else -+ #endif -+ { - h2o_buffer_t *newp = h2o_mem_alloc(offsetof(h2o_buffer_t, _buf) + new_capacity); - newp->size = inbuf->size; - newp->bytes = newp->_buf; -@@ -306,10 +315,12 @@ h2o_iovec_t h2o_buffer_reserve(h2o_buffer_t **_inbuf, size_t min_guarantee) - - return ret; - -+#ifndef _WIN32 - MapError: - ret.base = NULL; - ret.len = 0; - return ret; -+#endif - } - - void h2o_buffer_consume(h2o_buffer_t **_inbuf, size_t delta) -diff --git a/lib/common/multithread.c b/lib/common/multithread.c -index b4e8ba836..9a3dbe7d4 100644 ---- a/lib/common/multithread.c -+++ b/lib/common/multithread.c -@@ -22,7 +22,6 @@ - */ - #include - #include --#include "cloexec.h" - #include "h2o/multithread.h" - - struct st_h2o_multithread_queue_t { -@@ -73,6 +72,7 @@ pthread_mutex_t h2o_conn_id_mutex = PTHREAD_MUTEX_INITIALIZER; - #if H2O_USE_LIBUV - #else - -+#include "cloexec.h" - #include - #include - #include -diff --git a/lib/common/serverutil.c b/lib/common/serverutil.c -index 8226f6efc..a599e7412 100644 ---- a/lib/common/serverutil.c -+++ b/lib/common/serverutil.c -@@ -21,26 +21,30 @@ - */ - #include - #include -+#ifndef _WIN32 - #include --#include - #include --#include - #include -+#include -+#if !defined(_SC_NPROCESSORS_ONLN) -+#include -+#endif -+#endif -+#include -+#include - #include - #include - #include - #include --#include - #include --#if !defined(_SC_NPROCESSORS_ONLN) --#include --#endif --#include "cloexec.h" - #include "h2o/memory.h" - #include "h2o/serverutil.h" - #include "h2o/socket.h" - #include "h2o/string_.h" -- -+#if !H2O_USE_LIBUV -+#include "cloexec.h" -+#endif -+#if 0 - void h2o_set_signal_handler(int signo, void (*cb)(int signo)) - { - struct sigaction action; -@@ -137,6 +141,7 @@ static char **build_spawn_env(void) - return newenv; - } - -+#ifndef _WIN32 - pid_t h2o_spawnp(const char *cmd, char *const *argv, const int *mapped_fds, int cloexec_mutex_is_locked) - { - #if defined(__linux__) -@@ -235,6 +240,7 @@ Error: - - #endif - } -+#endif - - int h2o_read_command(const char *cmd, char **argv, h2o_buffer_t **resp, int *child_status) - { -@@ -315,3 +321,4 @@ size_t h2o_numproc(void) - return 1; - #endif - } -+#endif -\ No newline at end of file -diff --git a/lib/common/socket.c b/lib/common/socket.c -index 5b1c37e04..86ebbd8b4 100644 ---- a/lib/common/socket.c -+++ b/lib/common/socket.c -@@ -23,11 +23,18 @@ - #include - #include - #include -+#ifdef _WIN32 -+#include -+#include -+#else - #include - #include - #include -+#endif - #include -+#ifndef H2O_NO_UNIX_SOCKETS - #include -+#endif - #include - #include - #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) -@@ -861,12 +868,7 @@ int h2o_socket_compare_address(struct sockaddr *x, struct sockaddr *y) - - CMP(x->sa_family, y->sa_family); - -- if (x->sa_family == AF_UNIX) { -- struct sockaddr_un *xun = (void *)x, *yun = (void *)y; -- int r = strcmp(xun->sun_path, yun->sun_path); -- if (r != 0) -- return r; -- } else if (x->sa_family == AF_INET) { -+ if (x->sa_family == AF_INET) { - struct sockaddr_in *xin = (void *)x, *yin = (void *)y; - CMP(ntohl(xin->sin_addr.s_addr), ntohl(yin->sin_addr.s_addr)); - CMP(ntohs(xin->sin_port), ntohs(yin->sin_port)); -@@ -878,6 +880,13 @@ int h2o_socket_compare_address(struct sockaddr *x, struct sockaddr *y) - CMP(ntohs(xin6->sin6_port), ntohs(yin6->sin6_port)); - CMP(xin6->sin6_flowinfo, yin6->sin6_flowinfo); - CMP(xin6->sin6_scope_id, yin6->sin6_scope_id); -+ #ifndef H2O_NO_UNIX_SOCKETS -+ } else if (x->sa_family == AF_UNIX) { -+ struct sockaddr_un *xun = (void *)x, *yun = (void *)y; -+ int r = strcmp(xun->sun_path, yun->sun_path); -+ if (r != 0) -+ return r; -+ #endif - } else { - assert(!"unknown sa_family"); - } -@@ -1015,7 +1024,7 @@ static void on_handshake_complete(h2o_socket_t *sock, const char *err) - - static void proceed_handshake(h2o_socket_t *sock, const char *err) - { -- h2o_iovec_t first_input = {NULL}; -+ h2o_iovec_t first_input = H2O_IOVEC_NULL; - int ret = 0; - - sock->_cb.write = NULL; -diff --git a/lib/common/socketpool.c b/lib/common/socketpool.c -index da69933f7..730d3d22f 100644 ---- a/lib/common/socketpool.c -+++ b/lib/common/socketpool.c -@@ -21,12 +21,18 @@ - */ - #include - #include -+#ifdef _WIN32 -+#include -+#else - #include -+#include - #include - #include -+#endif - #include -+#ifndef H2O_NO_UNIX_SOCKETS - #include --#include -+#endif - #include "h2o/hostinfo.h" - #include "h2o/linklist.h" - #include "h2o/socketpool.h" -@@ -110,11 +116,15 @@ void h2o_socketpool_init_by_address(h2o_socketpool_t *pool, struct sockaddr *sa, - assert(salen <= sizeof(pool->peer.sockaddr.bytes)); - - if ((host_len = h2o_socket_getnumerichost(sa, salen, host)) == SIZE_MAX) { -+ #ifndef H2O_NO_UNIX_SOCKETS - if (sa->sa_family != AF_UNIX) - h2o_fatal("failed to convert a non-unix socket address to a numerical representation"); - /* use the sockaddr_un::sun_path as the SNI indicator (is that the right thing to do?) */ - strcpy(host, ((struct sockaddr_un *)sa)->sun_path); - host_len = strlen(host); -+ #else -+ h2o_fatal("failed to convert a socket address to a numerical representation"); -+ #endif - } - - common_init(pool, H2O_SOCKETPOOL_TYPE_SOCKADDR, h2o_iovec_init(host, host_len), is_ssl, capacity); -diff --git a/lib/common/string.c b/lib/common/string.c -index 3c068f3ad..2c33624b7 100644 ---- a/lib/common/string.c -+++ b/lib/common/string.c -@@ -441,16 +441,21 @@ const char *h2o_next_token(h2o_iovec_t *iter, int separator, size_t *element_len - *iter = h2o_iovec_init(cur, end - cur); - *element_len = token_end - token_start; - if (value != NULL) -- *value = (h2o_iovec_t){NULL}; -+ *value = (h2o_iovec_t)H2O_IOVEC_NULL; - return token_start; - - FindValue: - *iter = h2o_iovec_init(cur, end - cur); - *element_len = token_end - token_start; -- if ((value->base = (char *)h2o_next_token(iter, separator, &value->len, NULL)) == NULL) { -- *value = (h2o_iovec_t){"", 0}; -- } else if (h2o_memis(value->base, value->len, H2O_STRLIT(","))) { -- *value = (h2o_iovec_t){"", 0}; -+ -+ size_t tmp; -+ if ((value->base = (char *)h2o_next_token(iter, separator, &tmp, NULL)) == NULL) { -+ *value = (h2o_iovec_t)H2O_IOVEC_EMPTY; -+ return token_start; -+ } -+ value->len = tmp; -+ if (h2o_memis(value->base, value->len, H2O_STRLIT(","))) { -+ *value = (h2o_iovec_t)H2O_IOVEC_EMPTY; - iter->base -= 1; - iter->len += 1; - } -@@ -499,7 +504,7 @@ h2o_iovec_t h2o_htmlescape(h2o_mem_pool_t *pool, const char *src, size_t len) - /* escape and return the result if necessary */ - if (add_size != 0) { - /* allocate buffer and fill in the chars that are known not to require escaping */ -- h2o_iovec_t escaped = {h2o_mem_alloc_pool(pool, len + add_size + 1), 0}; -+ h2o_iovec_t escaped = h2o_iovec_init(h2o_mem_alloc_pool(pool, len + add_size + 1), 0); - /* fill-in the rest */ - for (s = src; s != end; ++s) { - switch (*s) { -@@ -529,7 +534,7 @@ h2o_iovec_t h2o_htmlescape(h2o_mem_pool_t *pool, const char *src, size_t len) - - h2o_iovec_t h2o_concat_list(h2o_mem_pool_t *pool, h2o_iovec_t *list, size_t count) - { -- h2o_iovec_t ret = {NULL, 0}; -+ h2o_iovec_t ret = H2O_IOVEC_NULL; - size_t i; - - /* calc the length */ -diff --git a/lib/common/url.c b/lib/common/url.c -index d65d18fb5..9b9ec85bb 100644 ---- a/lib/common/url.c -+++ b/lib/common/url.c -@@ -19,15 +19,21 @@ - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -+#ifdef _WIN32 -+#include -+#else - #include -+#endif - #include -+#ifndef H2O_NO_UNIX_SOCKETS - #include -+#endif - #include "h2o/memory.h" - #include "h2o/string_.h" - #include "h2o/url.h" - --const h2o_url_scheme_t H2O_URL_SCHEME_HTTP = {{H2O_STRLIT("http")}, 80}; --const h2o_url_scheme_t H2O_URL_SCHEME_HTTPS = {{H2O_STRLIT("https")}, 443}; -+const h2o_url_scheme_t H2O_URL_SCHEME_HTTP = {H2O_IOVEC_STRLIT("http"), 80}; -+const h2o_url_scheme_t H2O_URL_SCHEME_HTTPS = {H2O_IOVEC_STRLIT("https"), 443}; - - static int decode_hex(int ch) - { -@@ -277,8 +283,8 @@ int h2o_url_parse_relative(const char *url, size_t url_len, h2o_url_t *parsed) - return parse_authority_and_path(p + 2, url_end, parsed); - - /* reset authority, host, port, and set path */ -- parsed->authority = (h2o_iovec_t){NULL}; -- parsed->host = (h2o_iovec_t){NULL}; -+ parsed->authority = (h2o_iovec_t)H2O_IOVEC_NULL; -+ parsed->host = (h2o_iovec_t)H2O_IOVEC_NULL; - parsed->_port = 65535; - parsed->path = h2o_iovec_init(p, url_end - p); - -@@ -324,7 +330,7 @@ h2o_iovec_t h2o_url_resolve(h2o_mem_pool_t *pool, const h2o_url_t *base, const h - h2o_url_resolve_path(&base_path, &relative_path); - } else { - assert(relative->path.len == 0); -- relative_path = (h2o_iovec_t){NULL}; -+ relative_path = (h2o_iovec_t)H2O_IOVEC_NULL; - } - - Build: -@@ -388,6 +394,7 @@ void h2o_url_copy(h2o_mem_pool_t *pool, h2o_url_t *dest, const h2o_url_t *src) - dest->_port = src->_port; - } - -+#ifndef H2O_NO_UNIX_SOCKETS - const char *h2o_url_host_to_sun(h2o_iovec_t host, struct sockaddr_un *sa) - { - #define PREFIX "unix:" -@@ -407,3 +414,4 @@ const char *h2o_url_host_to_sun(h2o_iovec_t host, struct sockaddr_un *sa) - } - - const char *h2o_url_host_to_sun_err_is_not_unix_socket = "supplied name does not look like an unix-domain socket"; -+#endif -diff --git a/lib/core/config.c b/lib/core/config.c -index ce1d32018..267708723 100644 ---- a/lib/core/config.c -+++ b/lib/core/config.c -@@ -246,7 +246,7 @@ h2o_hostconf_t *h2o_config_register_host(h2o_globalconf_t *config, h2o_iovec_t h - /* create hostconf */ - hostconf = create_hostconf(config); - hostconf->authority.host = host_lc; -- host_lc = (h2o_iovec_t){NULL}; -+ host_lc = (h2o_iovec_t)H2O_IOVEC_NULL; - hostconf->authority.port = port; - if (hostconf->authority.port == 65535) { - hostconf->authority.hostport = hostconf->authority.host; -diff --git a/lib/core/context.c b/lib/core/context.c -index 8d1101381..f472adbe6 100644 ---- a/lib/core/context.c -+++ b/lib/core/context.c -@@ -23,7 +23,6 @@ - #include - #include - #include "h2o.h" --#include "h2o/memcached.h" - - void h2o_context_init_pathconf_context(h2o_context_t *ctx, h2o_pathconf_t *pathconf) - { -@@ -194,7 +193,9 @@ void h2o_context_update_timestamp_cache(h2o_context_t *ctx) - if (ctx->_timestamp_cache.value != NULL) - h2o_mem_release_shared(ctx->_timestamp_cache.value); - ctx->_timestamp_cache.value = h2o_mem_alloc_shared(NULL, sizeof(h2o_timestamp_string_t), NULL); -- gmtime_r(&ctx->_timestamp_cache.tv_at.tv_sec, &gmt); -+ /* work around pointer type collision in MingW */ -+ time_t tmp = ctx->_timestamp_cache.tv_at.tv_sec; -+ gmtime_r(&tmp, &gmt); - h2o_time2str_rfc1123(ctx->_timestamp_cache.value->rfc1123, &gmt); - h2o_time2str_log(ctx->_timestamp_cache.value->log, ctx->_timestamp_cache.tv_at.tv_sec); - } -diff --git a/lib/core/logconf.c b/lib/core/logconf.c -index 4d79736cc..74c198ce7 100644 ---- a/lib/core/logconf.c -+++ b/lib/core/logconf.c -@@ -597,8 +597,11 @@ char *h2o_log_request(h2o_logconf_t *logconf, h2o_req_t *req, size_t *len, char - goto EmitNull; - { - size_t bufsz, len; -- if (localt.tm_year == 0) -- localtime_r(&req->processed_at.at.tv_sec, &localt); -+ if (localt.tm_year == 0) { -+ /* work around pointer type collision in MingW */ -+ time_t tmp = req->processed_at.at.tv_sec; -+ localtime_r(&tmp, &localt); -+ } - for (bufsz = 128;; bufsz *= 2) { - RESERVE(bufsz); - if ((len = strftime(pos, bufsz, element->data.name.base, &localt)) != 0) -diff --git a/lib/core/proxy.c b/lib/core/proxy.c -index edb4baf9d..448dc103d 100644 ---- a/lib/core/proxy.c -+++ b/lib/core/proxy.c -@@ -19,10 +19,14 @@ - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ --#include - #include - #include -+#ifdef _WIN32 -+#include -+#else -+#include - #include -+#endif - #include "picohttpparser.h" - #include "h2o.h" - #include "h2o/http1.h" -@@ -79,7 +83,7 @@ static h2o_iovec_t rewrite_location(h2o_mem_pool_t *pool, const char *location, - h2o_iovec_init(loc_parsed.path.base + match->path.len, loc_parsed.path.len - match->path.len)); - - NoRewrite: -- return (h2o_iovec_t){NULL}; -+ return (h2o_iovec_t)H2O_IOVEC_NULL; - } - - static h2o_iovec_t build_request_merge_headers(h2o_mem_pool_t *pool, h2o_iovec_t merged, h2o_iovec_t added, int seperator) -@@ -136,7 +140,7 @@ static h2o_iovec_t build_request(h2o_req_t *req, int keepalive, int is_websocket - char remote_addr[NI_MAXHOST]; - struct sockaddr_storage ss; - socklen_t sslen; -- h2o_iovec_t cookie_buf = {NULL}, xff_buf = {NULL}, via_buf = {NULL}; -+ h2o_iovec_t cookie_buf = H2O_IOVEC_NULL, xff_buf = H2O_IOVEC_NULL, via_buf = H2O_IOVEC_NULL; - int preserve_x_forwarded_proto = req->conn->ctx->globalconf->proxy.preserve_x_forwarded_proto; - int emit_x_forwarded_headers = req->conn->ctx->globalconf->proxy.emit_x_forwarded_headers; - int emit_via_header = req->conn->ctx->globalconf->proxy.emit_via_header; -@@ -202,7 +206,7 @@ static h2o_iovec_t build_request(h2o_req_t *req, int keepalive, int is_websocket - assert(offset <= buf.len); - if (req->entity.base != NULL || req_requires_content_length(req)) { - RESERVE(sizeof("content-length: " H2O_UINT64_LONGEST_STR) - 1); -- offset += sprintf(buf.base + offset, "content-length: %zu\r\n", req->entity.len); -+ offset += sprintf(buf.base + offset, "content-length: %zu\r\n", (size_t)req->entity.len); - } - - /* rewrite headers if necessary */ -diff --git a/lib/core/request.c b/lib/core/request.c -index 96aabb22d..65810ed91 100644 ---- a/lib/core/request.c -+++ b/lib/core/request.c -@@ -22,7 +22,9 @@ - #include - #include - #include -+#ifndef _WIN32 - #include -+#endif - #include "h2o.h" - - #ifndef IOV_MAX -@@ -595,10 +597,16 @@ void h2o_req_log_error(h2o_req_t *req, const char *module, const char *fmt, ...) - p += 3; - } - *p++ = ':'; -+ #ifdef _WIN32 -+ write(2, prefix, p - prefix); -+ write(2, errbuf, errlen); -+ write(2, "\n", 1); -+ #else - /* use writev(2) to emit error atomically */ - struct iovec vecs[] = {{prefix, p - prefix}, {errbuf, errlen}, {"\n", 1}}; - H2O_BUILD_ASSERT(sizeof(vecs) / sizeof(vecs[0]) < IOV_MAX); - writev(2, vecs, sizeof(vecs) / sizeof(vecs[0])); -+ #endif - } - } - -@@ -611,8 +619,8 @@ void h2o_send_redirect(h2o_req_t *req, int status, const char *reason, const cha - } - - static h2o_generator_t generator = {NULL, NULL}; -- static const h2o_iovec_t body_prefix = {H2O_STRLIT("Moved

The document has moved here")}; -+ static const h2o_iovec_t body_prefix = H2O_IOVEC_STRLIT("Moved

The document has moved here"); - - /* build and send response */ - h2o_iovec_t bufs[3]; -diff --git a/lib/core/token_table.h b/lib/core/token_table.h -index ae26aa6c4..fa74f1e08 100644 ---- a/lib/core/token_table.h -+++ b/lib/core/token_table.h -@@ -21,68 +21,68 @@ - */ - - /* DO NOT EDIT! generated by tokens.pl */ --h2o_token_t h2o__tokens[] = {{{H2O_STRLIT(":authority")}, 1, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT(":method")}, 2, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT(":path")}, 4, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT(":scheme")}, 6, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT(":status")}, 8, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("accept")}, 19, 0, 0, 0, 0, 1, 0}, -- {{H2O_STRLIT("accept-charset")}, 15, 0, 0, 0, 0, 1, 0}, -- {{H2O_STRLIT("accept-encoding")}, 16, 0, 0, 0, 0, 1, 0}, -- {{H2O_STRLIT("accept-language")}, 17, 0, 0, 0, 0, 1, 0}, -- {{H2O_STRLIT("accept-ranges")}, 18, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("access-control-allow-origin")}, 20, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("age")}, 21, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("allow")}, 22, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("authorization")}, 23, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("cache-control")}, 24, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("cache-digest")}, 0, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("connection")}, 0, 1, 1, 0, 1, 0, 0}, -- {{H2O_STRLIT("content-disposition")}, 25, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("content-encoding")}, 26, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("content-language")}, 27, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("content-length")}, 28, 0, 0, 1, 0, 0, 0}, -- {{H2O_STRLIT("content-location")}, 29, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("content-range")}, 30, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("content-type")}, 31, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("cookie")}, 32, 0, 0, 0, 0, 0, 1}, -- {{H2O_STRLIT("date")}, 33, 0, 1, 0, 0, 0, 0}, -- {{H2O_STRLIT("etag")}, 34, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("expect")}, 35, 0, 0, 1, 0, 0, 0}, -- {{H2O_STRLIT("expires")}, 36, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("from")}, 37, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("host")}, 38, 0, 0, 1, 1, 0, 0}, -- {{H2O_STRLIT("http2-settings")}, 0, 1, 0, 0, 1, 0, 0}, -- {{H2O_STRLIT("if-match")}, 39, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("if-modified-since")}, 40, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("if-none-match")}, 41, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("if-range")}, 42, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("if-unmodified-since")}, 43, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("keep-alive")}, 0, 1, 1, 0, 0, 0, 0}, -- {{H2O_STRLIT("last-modified")}, 44, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("link")}, 45, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("location")}, 46, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("max-forwards")}, 47, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("proxy-authenticate")}, 48, 1, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("proxy-authorization")}, 49, 1, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("range")}, 50, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("referer")}, 51, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("refresh")}, 52, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("retry-after")}, 53, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("server")}, 54, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("set-cookie")}, 55, 0, 0, 0, 0, 0, 1}, -- {{H2O_STRLIT("strict-transport-security")}, 56, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("te")}, 0, 1, 0, 0, 1, 0, 0}, -- {{H2O_STRLIT("transfer-encoding")}, 57, 1, 1, 1, 1, 0, 0}, -- {{H2O_STRLIT("upgrade")}, 0, 1, 1, 1, 1, 0, 0}, -- {{H2O_STRLIT("user-agent")}, 58, 0, 0, 0, 0, 1, 0}, -- {{H2O_STRLIT("vary")}, 59, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("via")}, 60, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("www-authenticate")}, 61, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("x-compress-hint")}, 0, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("x-forwarded-for")}, 0, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("x-reproxy-url")}, 0, 0, 0, 0, 0, 0, 0}, -- {{H2O_STRLIT("x-traffic")}, 0, 0, 0, 0, 0, 0, 0}}; -+h2o_token_t h2o__tokens[] = {{H2O_IOVEC_STRLIT(":authority"), 1, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT(":method"), 2, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT(":path"), 4, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT(":scheme"), 6, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT(":status"), 8, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("accept"), 19, 0, 0, 0, 0, 1, 0}, -+ {H2O_IOVEC_STRLIT("accept-charset"), 15, 0, 0, 0, 0, 1, 0}, -+ {H2O_IOVEC_STRLIT("accept-encoding"), 16, 0, 0, 0, 0, 1, 0}, -+ {H2O_IOVEC_STRLIT("accept-language"), 17, 0, 0, 0, 0, 1, 0}, -+ {H2O_IOVEC_STRLIT("accept-ranges"), 18, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("access-control-allow-origin"), 20, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("age"), 21, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("allow"), 22, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("authorization"), 23, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("cache-control"), 24, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("cache-digest"), 0, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("connection"), 0, 1, 1, 0, 1, 0, 0}, -+ {H2O_IOVEC_STRLIT("content-disposition"), 25, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("content-encoding"), 26, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("content-language"), 27, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("content-length"), 28, 0, 0, 1, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("content-location"), 29, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("content-range"), 30, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("content-type"), 31, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("cookie"), 32, 0, 0, 0, 0, 0, 1}, -+ {H2O_IOVEC_STRLIT("date"), 33, 0, 1, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("etag"), 34, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("expect"), 35, 0, 0, 1, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("expires"), 36, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("from"), 37, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("host"), 38, 0, 0, 1, 1, 0, 0}, -+ {H2O_IOVEC_STRLIT("http2-settings"), 0, 1, 0, 0, 1, 0, 0}, -+ {H2O_IOVEC_STRLIT("if-match"), 39, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("if-modified-since"), 40, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("if-none-match"), 41, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("if-range"), 42, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("if-unmodified-since"), 43, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("keep-alive"), 0, 1, 1, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("last-modified"), 44, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("link"), 45, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("location"), 46, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("max-forwards"), 47, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("proxy-authenticate"), 48, 1, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("proxy-authorization"), 49, 1, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("range"), 50, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("referer"), 51, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("refresh"), 52, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("retry-after"), 53, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("server"), 54, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("set-cookie"), 55, 0, 0, 0, 0, 0, 1}, -+ {H2O_IOVEC_STRLIT("strict-transport-security"), 56, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("te"), 0, 1, 0, 0, 1, 0, 0}, -+ {H2O_IOVEC_STRLIT("transfer-encoding"), 57, 1, 1, 1, 1, 0, 0}, -+ {H2O_IOVEC_STRLIT("upgrade"), 0, 1, 1, 1, 1, 0, 0}, -+ {H2O_IOVEC_STRLIT("user-agent"), 58, 0, 0, 0, 0, 1, 0}, -+ {H2O_IOVEC_STRLIT("vary"), 59, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("via"), 60, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("www-authenticate"), 61, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("x-compress-hint"), 0, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("x-forwarded-for"), 0, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("x-reproxy-url"), 0, 0, 0, 0, 0, 0, 0}, -+ {H2O_IOVEC_STRLIT("x-traffic"), 0, 0, 0, 0, 0, 0, 0}}; - size_t h2o__num_tokens = 62; - - const h2o_token_t *h2o_lookup_token(const char *name, size_t len) -diff --git a/lib/core/util.c b/lib/core/util.c -index 50d2b2493..13c363ee1 100644 ---- a/lib/core/util.c -+++ b/lib/core/util.c -@@ -63,6 +63,7 @@ static void free_accept_data(struct st_h2o_accept_data_t *data) - free(data); - } - -+#ifndef H2O_NO_MEMCACHED - static struct { - h2o_memcached_context_t *memc; - unsigned expiration; -@@ -97,15 +98,18 @@ void h2o_accept_setup_async_ssl_resumption(h2o_memcached_context_t *memc, unsign - async_resumption_context.expiration = expiration; - h2o_socket_ssl_async_resumption_init(async_resumption_get, async_resumption_new); - } -+#endif - - void on_accept_timeout(h2o_timeout_entry_t *entry) - { - /* TODO log */ - struct st_h2o_accept_data_t *data = H2O_STRUCT_FROM_MEMBER(struct st_h2o_accept_data_t, timeout, entry); -+ #ifndef H2O_NO_MEMCACHED - if (data->async_resumption_get_req != NULL) { - h2o_memcached_cancel_get(async_resumption_context.memc, data->async_resumption_get_req); - data->async_resumption_get_req = NULL; - } -+ #endif - h2o_socket_t *sock = data->sock; - free_accept_data(data); - h2o_socket_close(sock); -@@ -158,7 +162,11 @@ static ssize_t parse_proxy_line(char *src, size_t len, struct sockaddr *sa, sock - - char *p = src, *end = p + len; - void *addr; -+ #if _WIN32 -+ u_short *port; -+ #else - in_port_t *port; -+ #endif - - /* "PROXY "*/ - EXPECT_CHAR('P'); -@@ -369,7 +377,7 @@ static void push_one_path(h2o_mem_pool_t *pool, h2o_iovec_vector_t *paths_to_pus - } - - /* check scheme and authority if given URL contains either of the two, or if base is specified */ -- h2o_url_t base = {input_scheme, input_authority, {NULL}, base_path, 65535}; -+ h2o_url_t base = {input_scheme, input_authority, H2O_IOVEC_NULL, base_path, 65535}; - if (base_scheme != NULL) { - base.scheme = base_scheme; - base.authority = *base_authority; -@@ -528,7 +536,7 @@ h2o_iovec_t h2o_build_destination(h2o_req_t *req, const char *prefix, size_t pre - if (req->path.base[0] != '/' && next_unnormalized == 1) { - next_unnormalized = 0; - } -- parts[num_parts++] = (h2o_iovec_t){req->path.base + next_unnormalized, req->path.len - next_unnormalized}; -+ parts[num_parts++] = h2o_iovec_init(req->path.base + next_unnormalized, req->path.len - next_unnormalized); - } - } - -@@ -536,10 +544,7 @@ h2o_iovec_t h2o_build_destination(h2o_req_t *req, const char *prefix, size_t pre - } - - /* h2-14 and h2-16 are kept for backwards compatibility, as they are often used */ --#define ALPN_ENTRY(s) \ -- { \ -- H2O_STRLIT(s) \ -- } -+#define ALPN_ENTRY(s) H2O_IOVEC_STRLIT(s) - #define ALPN_PROTOCOLS_CORE ALPN_ENTRY("h2"), ALPN_ENTRY("h2-16"), ALPN_ENTRY("h2-14") - #define NPN_PROTOCOLS_CORE \ - "\x02" \ -@@ -549,10 +554,10 @@ h2o_iovec_t h2o_build_destination(h2o_req_t *req, const char *prefix, size_t pre - "\x05" \ - "h2-14" - --static const h2o_iovec_t http2_alpn_protocols[] = {ALPN_PROTOCOLS_CORE, {NULL}}; -+static const h2o_iovec_t http2_alpn_protocols[] = {ALPN_PROTOCOLS_CORE, H2O_IOVEC_NULL}; - const h2o_iovec_t *h2o_http2_alpn_protocols = http2_alpn_protocols; - --static const h2o_iovec_t alpn_protocols[] = {ALPN_PROTOCOLS_CORE, {H2O_STRLIT("http/1.1")}, {NULL}}; -+static const h2o_iovec_t alpn_protocols[] = {ALPN_PROTOCOLS_CORE, H2O_IOVEC_STRLIT("http/1.1"), H2O_IOVEC_NULL}; - const h2o_iovec_t *h2o_alpn_protocols = alpn_protocols; - - const char *h2o_http2_npn_protocols = NPN_PROTOCOLS_CORE; -diff --git a/lib/handler/access_log.c b/lib/handler/access_log.c -index 4a7704174..d56c21add 100644 ---- a/lib/handler/access_log.c -+++ b/lib/handler/access_log.c -@@ -22,12 +22,16 @@ - #include - #include - #include -+#include -+#include -+#ifdef _WIN32 -+#include -+#else - #include - #include - #include --#include --#include - #include -+#endif - #include - #include "h2o.h" - #include "h2o/serverutil.h" -@@ -73,6 +77,7 @@ int h2o_access_log_open_log(const char *path) - { - int fd; - -+ #ifndef _WIN32 - if (path[0] == '|') { - int pipefds[2]; - pid_t pid; -@@ -96,7 +101,9 @@ int h2o_access_log_open_log(const char *path) - /* close the read side of the pipefds and return the write side */ - close(pipefds[0]); - fd = pipefds[1]; -- } else { -+ } else -+ #endif -+ { - if ((fd = open(path, O_CREAT | O_WRONLY | O_APPEND | O_CLOEXEC, 0644)) == -1) { - fprintf(stderr, "failed to open log file:%s:%s\n", path, strerror(errno)); - return -1; -diff --git a/lib/handler/configurator/headers_util.c b/lib/handler/configurator/headers_util.c -index c05b9b7c2..56e47842e 100644 ---- a/lib/handler/configurator/headers_util.c -+++ b/lib/handler/configurator/headers_util.c -@@ -87,7 +87,7 @@ static int on_config_header_unset(h2o_configurator_command_t *cmd, h2o_configura - h2o_configurator_errprintf(cmd, node, "invalid header name"); - return -1; - } -- if (add_cmd(cmd, node, H2O_HEADERS_CMD_UNSET, name, (h2o_iovec_t){NULL}, self->get_commands(self->child)) != 0) { -+ if (add_cmd(cmd, node, H2O_HEADERS_CMD_UNSET, name, (h2o_iovec_t)H2O_IOVEC_NULL, self->get_commands(self->child)) != 0) { - if (!h2o_iovec_is_token(name)) - free(name->base); - return -1; -diff --git a/lib/handler/file.c b/lib/handler/file.c -index 5d7c7a2a4..c0bc486ec 100644 ---- a/lib/handler/file.c -+++ b/lib/handler/file.c -@@ -128,7 +128,7 @@ static void do_proceed(h2o_generator_t *_self, h2o_req_t *req) - rlen = self->bytesleft; - if (rlen > MAX_BUF_SIZE) - rlen = MAX_BUF_SIZE; -- while ((rret = pread(self->file.ref->fd, self->buf, rlen, self->file.off)) == -1 && errno == EINTR) -+ while ((rret = h2o_filecache_read_file(self->file.ref, self->buf, rlen, self->file.off)) == -1 && errno == EINTR) - ; - if (rret == -1) { - h2o_send(req, NULL, 0, H2O_SEND_STATE_ERROR); -@@ -177,7 +177,7 @@ static void do_multirange_proceed(h2o_generator_t *_self, h2o_req_t *req) - rlen = self->bytesleft; - if (rlen + used_buf > MAX_BUF_SIZE) - rlen = MAX_BUF_SIZE - used_buf; -- while ((rret = pread(self->file.ref->fd, self->buf + used_buf, rlen, self->file.off)) == -1 && errno == EINTR) -+ while ((rret = h2o_filecache_read_file(self->file.ref, self->buf + used_buf, rlen, self->file.off)) == -1 && errno == EINTR) - ; - if (rret == -1) - goto Error; -@@ -213,7 +213,7 @@ static h2o_send_state_t do_pull(h2o_generator_t *_self, h2o_req_t *req, h2o_iove - - if (self->bytesleft < buf->len) - buf->len = self->bytesleft; -- while ((rret = pread(self->file.ref->fd, buf->base, buf->len, self->file.off)) == -1 && errno == EINTR) -+ while ((rret = h2o_filecache_read_file(self->file.ref, buf->base, buf->len, self->file.off)) == -1 && errno == EINTR) - ; - if (rret <= 0) { - buf->len = 0; -@@ -237,7 +237,7 @@ static struct st_h2o_sendfile_generator_t *create_generator(h2o_req_t *req, cons - { - struct st_h2o_sendfile_generator_t *self; - h2o_filecache_ref_t *fileref; -- h2o_iovec_t content_encoding = (h2o_iovec_t){NULL}; -+ h2o_iovec_t content_encoding = H2O_IOVEC_NULL; - unsigned gunzip = 0; - - *is_dir = 0; -diff --git a/lib/handler/proxy.c b/lib/handler/proxy.c -index 1d87225e1..7de3c4ec5 100644 ---- a/lib/handler/proxy.c -+++ b/lib/handler/proxy.c -@@ -19,7 +19,9 @@ - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -+#ifndef H2O_NO_UNIX_SOCKETS - #include -+#endif - #include "h2o.h" - #include "h2o/socketpool.h" - -@@ -136,29 +138,37 @@ static void on_handler_dispose(h2o_handler_t *_self) - - void h2o_proxy_register_reverse_proxy(h2o_pathconf_t *pathconf, h2o_url_t *upstream, h2o_proxy_config_vars_t *config) - { -- struct sockaddr_un sa; -+ #ifndef H2O_NO_UNIX_SOCKETS - const char *to_sa_err; -+ #endif - struct rp_handler_t *self = (void *)h2o_create_handler(pathconf, sizeof(*self)); - self->super.on_context_init = on_context_init; - self->super.on_context_dispose = on_context_dispose; - self->super.dispose = on_handler_dispose; - self->super.on_req = on_req; -- to_sa_err = h2o_url_host_to_sun(upstream->host, &sa); - if (config->keepalive_timeout != 0) { - self->sockpool = h2o_mem_alloc(sizeof(*self->sockpool)); - int is_ssl = upstream->scheme == &H2O_URL_SCHEME_HTTPS; -+ #ifndef H2O_NO_UNIX_SOCKETS -+ struct sockaddr_un sa; -+ to_sa_err = h2o_url_host_to_sun(upstream->host, &sa); - if (to_sa_err == h2o_url_host_to_sun_err_is_not_unix_socket) { -+ #endif - h2o_socketpool_init_by_hostport(self->sockpool, upstream->host, h2o_url_get_port(upstream), is_ssl, - SIZE_MAX /* FIXME */); -+ #ifndef H2O_NO_UNIX_SOCKETS - } else { - assert(to_sa_err == NULL); - h2o_socketpool_init_by_address(self->sockpool, (void *)&sa, sizeof(sa), is_ssl, SIZE_MAX /* FIXME */); - } -+ #endif - } - h2o_url_copy(NULL, &self->upstream, upstream); -+ #ifndef H2O_NO_UNIX_SOCKETS - if (to_sa_err) { - h2o_strtolower(self->upstream.host.base, self->upstream.host.len); - } -+ #endif - self->config = *config; - if (self->config.ssl_ctx != NULL) - SSL_CTX_up_ref(self->config.ssl_ctx); -diff --git a/lib/handler/redirect.c b/lib/handler/redirect.c -index c8b9c5086..9eb5d4552 100644 ---- a/lib/handler/redirect.c -+++ b/lib/handler/redirect.c -@@ -68,7 +68,7 @@ static void redirect_internally(h2o_redirect_handler_t *self, h2o_req_t *req, h2 - break; - default: - method = h2o_iovec_init(H2O_STRLIT("GET")); -- req->entity = (h2o_iovec_t){NULL}; -+ req->entity = (h2o_iovec_t)H2O_IOVEC_NULL; - break; - } - -diff --git a/lib/handler/reproxy.c b/lib/handler/reproxy.c -index 369386d27..2639045c6 100644 ---- a/lib/handler/reproxy.c -+++ b/lib/handler/reproxy.c -@@ -47,7 +47,7 @@ static void on_setup_ostream(h2o_filter_t *self, h2o_req_t *req, h2o_ostream_t * - break; - default: - method = h2o_iovec_init(H2O_STRLIT("GET")); -- req->entity = (h2o_iovec_t){NULL}; -+ req->entity = (h2o_iovec_t)H2O_IOVEC_NULL; - break; - } - -diff --git a/lib/handler/status.c b/lib/handler/status.c -index 93befed3b..95f9ce823 100644 ---- a/lib/handler/status.c -+++ b/lib/handler/status.c -@@ -95,7 +95,7 @@ static void send_response(struct st_h2o_status_collector_t *collector) - h2o_iovec_t resp[nr_resp]; - - memset(resp, 0, sizeof(resp[0]) * nr_resp); -- resp[cur_resp++] = (h2o_iovec_t){H2O_STRLIT("{\n")}; -+ resp[cur_resp++] = h2o_iovec_init(H2O_STRLIT("{\n")); - - int coma_removed = 0; - for (i = 0; i < req->conn->ctx->globalconf->statuses.size; i++) { -@@ -110,7 +110,7 @@ static void send_response(struct st_h2o_status_collector_t *collector) - coma_removed = 1; - } - } -- resp[cur_resp++] = (h2o_iovec_t){H2O_STRLIT("\n}\n")}; -+ resp[cur_resp++] = h2o_iovec_init(H2O_STRLIT("\n}\n")); - - req->res.status = 200; - h2o_add_header(&req->pool, &req->res.headers, H2O_TOKEN_CONTENT_TYPE, NULL, H2O_STRLIT("text/plain; charset=utf-8")); -@@ -213,7 +213,7 @@ static int on_req(h2o_handler_t *_self, h2o_req_t *req) - } else if (h2o_memis(local_path.base, local_path.len, H2O_STRLIT("/json"))) { - int ret; - /* "/json" maps to the JSON API */ -- h2o_iovec_t status_list = {NULL, 0}; /* NULL means we'll show all statuses */ -+ h2o_iovec_t status_list = H2O_IOVEC_NULL; /* NULL means we'll show all statuses */ - if (req->query_at != SIZE_MAX && (req->path.len - req->query_at > 6)) { - if (h2o_memis(&req->path.base[req->query_at], 6, "?show=", 6)) { - status_list = h2o_iovec_init(&req->path.base[req->query_at + 6], req->path.len - req->query_at - 6); -diff --git a/lib/handler/status/durations.c b/lib/handler/status/durations.c -index f011107bf..0e45e3eed 100644 ---- a/lib/handler/status/durations.c -+++ b/lib/handler/status/durations.c -@@ -203,5 +203,5 @@ void h2o_duration_stats_register(h2o_globalconf_t *conf) - } - - h2o_status_handler_t durations_status_handler = { -- {H2O_STRLIT("durations")}, durations_status_init, durations_status_per_thread, durations_status_final, -+ H2O_IOVEC_STRLIT("durations"), durations_status_init, durations_status_per_thread, durations_status_final, - }; -diff --git a/lib/handler/status/events.c b/lib/handler/status/events.c -index e6ed0b7c6..64fb6546f 100644 ---- a/lib/handler/status/events.c -+++ b/lib/handler/status/events.c -@@ -108,5 +108,5 @@ static h2o_iovec_t events_status_final(void *priv, h2o_globalconf_t *gconf, h2o_ - } - - h2o_status_handler_t events_status_handler = { -- {H2O_STRLIT("events")}, events_status_init, events_status_per_thread, events_status_final, -+ H2O_IOVEC_STRLIT("events"), events_status_init, events_status_per_thread, events_status_final, - }; -diff --git a/lib/handler/status/requests.c b/lib/handler/status/requests.c -index 4854e4a1f..56c28c36c 100644 ---- a/lib/handler/status/requests.c -+++ b/lib/handler/status/requests.c -@@ -123,7 +123,7 @@ static void *requests_status_init(void) - /* log format compilation error is an internal logic flaw, therefore we need not send the details to the client */ - fprintf(stderr, "[lib/handler/status/requests.c] failed to compile log format: %s", errbuf); - -- rsc->req_data = (h2o_iovec_t){NULL}; -+ rsc->req_data = (h2o_iovec_t)H2O_IOVEC_NULL; - pthread_mutex_init(&rsc->mutex, NULL); - - return rsc; -@@ -131,7 +131,7 @@ static void *requests_status_init(void) - - static h2o_iovec_t requests_status_final(void *priv, h2o_globalconf_t *gconf, h2o_req_t *req) - { -- h2o_iovec_t ret = {NULL}; -+ h2o_iovec_t ret = H2O_IOVEC_NULL; - struct st_requests_status_ctx_t *rsc = priv; - - if (rsc->logconf != NULL) { -@@ -147,5 +147,5 @@ static h2o_iovec_t requests_status_final(void *priv, h2o_globalconf_t *gconf, h2 - } - - h2o_status_handler_t requests_status_handler = { -- {H2O_STRLIT("requests")}, requests_status_init, requests_status_per_thread, requests_status_final, -+ H2O_IOVEC_STRLIT("requests"), requests_status_init, requests_status_per_thread, requests_status_final, - }; -diff --git a/lib/http1.c b/lib/http1.c -index 98c4e55ab..b765b8aae 100644 ---- a/lib/http1.c -+++ b/lib/http1.c -@@ -323,7 +323,7 @@ static ssize_t fixup_request(struct st_h2o_http1_conn_t *conn, struct phr_header - h2o_iovec_t *expect) - { - ssize_t entity_header_index; -- h2o_iovec_t connection = {NULL, 0}, host = {NULL, 0}, upgrade = {NULL, 0}; -+ h2o_iovec_t connection = H2O_IOVEC_NULL, host = H2O_IOVEC_NULL, upgrade = H2O_IOVEC_NULL; - - expect->base = NULL; - expect->len = 0; -@@ -406,12 +406,12 @@ static void send_bad_request_on_complete(h2o_socket_t *sock, const char *err) - - static void send_bad_request(struct st_h2o_http1_conn_t *conn) - { -- const static h2o_iovec_t resp = {H2O_STRLIT("HTTP/1.1 400 Bad Request\r\n" -+ const static h2o_iovec_t resp = H2O_IOVEC_STRLIT("HTTP/1.1 400 Bad Request\r\n" - "Content-Type: text/plain; charset=utf-8\r\n" - "Connection: close\r\n" - "Content-Length: 11\r\n" - "\r\n" -- "Bad Request")}; -+ "Bad Request"); - - assert(conn->req.version == 0 && "request has not been parsed successfully"); - assert(conn->req.http1_is_persistent == 0); -@@ -421,7 +421,7 @@ static void send_bad_request(struct st_h2o_http1_conn_t *conn) - - static void handle_incoming_request(struct st_h2o_http1_conn_t *conn) - { -- size_t inreqlen = conn->sock->input->size < H2O_MAX_REQLEN ? conn->sock->input->size : H2O_MAX_REQLEN; -+ size_t methodlen, pathlen, inreqlen = conn->sock->input->size < H2O_MAX_REQLEN ? conn->sock->input->size : H2O_MAX_REQLEN; - int reqlen, minor_version; - struct phr_header headers[H2O_MAX_HEADERS]; - size_t num_headers = H2O_MAX_HEADERS; -@@ -433,8 +433,10 @@ static void handle_incoming_request(struct st_h2o_http1_conn_t *conn) - conn->req.timestamps.request_begin_at = *h2o_get_timestamp(conn->super.ctx, NULL, NULL); - - reqlen = phr_parse_request(conn->sock->input->bytes, inreqlen, (const char **)&conn->req.input.method.base, -- &conn->req.input.method.len, (const char **)&conn->req.input.path.base, &conn->req.input.path.len, -+ &methodlen, (const char **)&conn->req.input.path.base, &pathlen, - &minor_version, headers, &num_headers, conn->_prevreqlen); -+ conn->req.input.method.len = methodlen; -+ conn->req.input.path.len = pathlen; - conn->_prevreqlen = inreqlen; - - switch (reqlen) { -@@ -455,7 +457,7 @@ static void handle_incoming_request(struct st_h2o_http1_conn_t *conn) - return; - } - if (expect.base != NULL) { -- static const h2o_iovec_t res = {H2O_STRLIT("HTTP/1.1 100 Continue\r\n\r\n")}; -+ static const h2o_iovec_t res = H2O_IOVEC_STRLIT("HTTP/1.1 100 Continue\r\n\r\n"); - h2o_socket_write(conn->sock, (void *)&res, 1, on_continue_sent); - /* processing of the incoming entity is postponed until the 100 response is sent */ - h2o_socket_read_stop(conn->sock); -@@ -477,7 +479,7 @@ static void handle_incoming_request(struct st_h2o_http1_conn_t *conn) - /* upgrade to HTTP/2 if the request starts with: PRI * HTTP/2 */ - if (conn->super.ctx->globalconf->http1.upgrade_to_http2) { - /* should check up to the first octet that phr_parse_request returns an error */ -- static const h2o_iovec_t HTTP2_SIG = {H2O_STRLIT("PRI * HTTP/2")}; -+ static const h2o_iovec_t HTTP2_SIG = H2O_IOVEC_STRLIT("PRI * HTTP/2"); - if (conn->sock->input->size >= HTTP2_SIG.len && memcmp(conn->sock->input->bytes, HTTP2_SIG.base, HTTP2_SIG.len) == 0) { - h2o_accept_ctx_t accept_ctx = {conn->super.ctx, conn->super.hosts}; - h2o_socket_t *sock = conn->sock; -@@ -638,7 +640,7 @@ static size_t flatten_headers(char *buf, h2o_req_t *req, const char *connection) - * - https://www.igvita.com/2013/05/01/deploying-webp-via-accept-content-negotiation/ - */ - if (is_msie(req)) { -- static h2o_header_t cache_control_private = {&H2O_TOKEN_CACHE_CONTROL->buf, NULL, {H2O_STRLIT("private")}}; -+ static h2o_header_t cache_control_private = {&H2O_TOKEN_CACHE_CONTROL->buf, NULL, H2O_IOVEC_STRLIT("private")}; - header = &cache_control_private; - } - } -@@ -660,11 +662,11 @@ static size_t flatten_headers(char *buf, h2o_req_t *req, const char *connection) - - static void proceed_pull(struct st_h2o_http1_conn_t *conn, size_t nfilled) - { -- h2o_iovec_t buf = {conn->_ostr_final.pull.buf, nfilled}; -+ h2o_iovec_t buf = h2o_iovec_init(conn->_ostr_final.pull.buf, nfilled); - h2o_send_state_t send_state; - - if (buf.len < MAX_PULL_BUF_SZ) { -- h2o_iovec_t cbuf = {buf.base + buf.len, MAX_PULL_BUF_SZ - buf.len}; -+ h2o_iovec_t cbuf = h2o_iovec_init(buf.base + buf.len, MAX_PULL_BUF_SZ - buf.len); - send_state = h2o_pull(&conn->req, conn->_ostr_final.pull.cb, &cbuf); - if (send_state == H2O_SEND_STATE_ERROR) { - conn->req.http1_is_persistent = 0; -diff --git a/lib/http2/casper.c b/lib/http2/casper.c -index 56e00d71f..e5c9a0ed7 100644 ---- a/lib/http2/casper.c -+++ b/lib/http2/casper.c -@@ -56,7 +56,7 @@ h2o_http2_casper_t *h2o_http2_casper_create(unsigned capacity_bits, unsigned rem - memset(&casper->keys, 0, sizeof(casper->keys)); - casper->capacity_bits = capacity_bits; - casper->remainder_bits = remainder_bits; -- casper->cookie_cache = (h2o_iovec_t){NULL}; -+ casper->cookie_cache = (h2o_iovec_t)H2O_IOVEC_NULL; - - return casper; - } -@@ -89,7 +89,7 @@ int h2o_http2_casper_lookup(h2o_http2_casper_t *casper, const char *path, size_t - - /* we need to set a new value */ - free(casper->cookie_cache.base); -- casper->cookie_cache = (h2o_iovec_t){NULL}; -+ casper->cookie_cache = (h2o_iovec_t)H2O_IOVEC_NULL; - h2o_vector_reserve(NULL, &casper->keys, casper->keys.size + 1); - memmove(casper->keys.entries + i + 1, casper->keys.entries + i, (casper->keys.size - i) * sizeof(casper->keys.entries[0])); - ++casper->keys.size; -@@ -99,7 +99,7 @@ int h2o_http2_casper_lookup(h2o_http2_casper_t *casper, const char *path, size_t - - void h2o_http2_casper_consume_cookie(h2o_http2_casper_t *casper, const char *cookie, size_t cookie_len) - { -- h2o_iovec_t binary = {NULL}; -+ h2o_iovec_t binary = H2O_IOVEC_NULL; - uint64_t tiny_keys_buf[128], *keys = tiny_keys_buf; - - /* check the name of the cookie */ -@@ -177,7 +177,7 @@ h2o_iovec_t h2o_http2_casper_get_cookie(h2o_http2_casper_t *casper) - return casper->cookie_cache; - - if (casper->keys.size == 0) -- return (h2o_iovec_t){NULL}; -+ return (h2o_iovec_t)H2O_IOVEC_NULL; - - /* encode as binary */ - char tiny_bin_buf[128], *bin_buf = tiny_bin_buf; -diff --git a/lib/http2/connection.c b/lib/http2/connection.c -index 2f8cad620..c7ba5d6b2 100644 ---- a/lib/http2/connection.c -+++ b/lib/http2/connection.c -@@ -27,7 +27,7 @@ - #include "h2o/http2.h" - #include "h2o/http2_internal.h" - --static const h2o_iovec_t CONNECTION_PREFACE = {H2O_STRLIT("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n")}; -+static const h2o_iovec_t CONNECTION_PREFACE = H2O_IOVEC_STRLIT("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"); - - const h2o_http2_priority_t h2o_http2_default_priority = { - 0, /* exclusive */ -@@ -43,7 +43,7 @@ const h2o_http2_settings_t H2O_HTTP2_SETTINGS_HOST = { - 16384 /* max_frame_size */ - }; - --static const h2o_iovec_t SETTINGS_HOST_BIN = {H2O_STRLIT("\x00\x00\x0c" /* frame size */ -+static const h2o_iovec_t SETTINGS_HOST_BIN = H2O_IOVEC_STRLIT("\x00\x00\x0c"/* frame size */ - "\x04" /* settings frame */ - "\x00" /* no flags */ - "\x00\x00\x00\x00" /* stream id */ -@@ -51,7 +51,7 @@ static const h2o_iovec_t SETTINGS_HOST_BIN = {H2O_STRLIT("\x00\x00\x0c" /* f - "\x00\x00\x00\x64" /* max_concurrent_streams = 100 */ - "\x00\x04" - "\x01\x00\x00\x00" /* initial_window_size = 16777216 */ -- )}; -+ ); - - static __thread h2o_buffer_prototype_t wbuf_buffer_prototype = {{16}, {H2O_HTTP2_DEFAULT_OUTBUF_SIZE}}; - -@@ -103,7 +103,7 @@ static void graceful_shutdown_resend_goaway(h2o_timeout_entry_t *entry) - for (node = ctx->http2._conns.next; node != &ctx->http2._conns; node = node->next) { - h2o_http2_conn_t *conn = H2O_STRUCT_FROM_MEMBER(h2o_http2_conn_t, _conns, node); - if (conn->state < H2O_HTTP2_CONN_STATE_HALF_CLOSED) { -- enqueue_goaway(conn, H2O_HTTP2_ERROR_NONE, (h2o_iovec_t){NULL}); -+ enqueue_goaway(conn, H2O_HTTP2_ERROR_NONE, (h2o_iovec_t)H2O_IOVEC_NULL); - do_close_stragglers = 1; - } - } -@@ -135,7 +135,7 @@ static void initiate_graceful_shutdown(h2o_context_t *ctx) - h2o_http2_conn_t *conn = H2O_STRUCT_FROM_MEMBER(h2o_http2_conn_t, _conns, node); - if (conn->state < H2O_HTTP2_CONN_STATE_HALF_CLOSED) { - h2o_http2_encode_goaway_frame(&conn->_write.buf, INT32_MAX, H2O_HTTP2_ERROR_NONE, -- (h2o_iovec_t){H2O_STRLIT("graceful shutdown")}); -+ (h2o_iovec_t)H2O_IOVEC_STRLIT("graceful shutdown")); - h2o_http2_conn_request_write(conn); - } - } -@@ -876,7 +876,7 @@ static int parse_input(h2o_http2_conn_t *conn) - } else if (ret < 0) { - if (ret != H2O_HTTP2_ERROR_PROTOCOL_CLOSE_IMMEDIATELY) { - enqueue_goaway(conn, (int)ret, -- err_desc != NULL ? (h2o_iovec_t){(char *)err_desc, strlen(err_desc)} : (h2o_iovec_t){NULL}); -+ err_desc != NULL ? h2o_iovec_init((char *)err_desc, strlen(err_desc)) : (h2o_iovec_t)H2O_IOVEC_NULL); - } - return close_connection(conn); - } -@@ -1046,7 +1046,7 @@ void do_emit_writereq(h2o_http2_conn_t *conn) - - if (conn->_write.buf->size != 0) { - /* write and wait for completion */ -- h2o_iovec_t buf = {conn->_write.buf->bytes, conn->_write.buf->size}; -+ h2o_iovec_t buf = h2o_iovec_init(conn->_write.buf->bytes, conn->_write.buf->size); - h2o_socket_write(conn->sock, &buf, 1, on_write_complete); - conn->_write.buf_in_flight = conn->_write.buf; - h2o_buffer_init(&conn->_write.buf, &wbuf_buffer_prototype); -@@ -1290,7 +1290,7 @@ static void push_path(h2o_req_t *src_req, const char *abspath, size_t abspath_le - h2o_http2_stream_prepare_for_request(conn, stream); - - /* setup request */ -- stream->req.input.method = (h2o_iovec_t){H2O_STRLIT("GET")}; -+ stream->req.input.method = (h2o_iovec_t)H2O_IOVEC_STRLIT("GET"); - stream->req.input.scheme = src_stream->req.input.scheme; - stream->req.input.authority = - h2o_strdup(&stream->req.pool, src_stream->req.input.authority.base, src_stream->req.input.authority.len); -diff --git a/lib/http2/hpack.c b/lib/http2/hpack.c -index 4adb15cd7..f4e4679e2 100644 ---- a/lib/http2/hpack.c -+++ b/lib/http2/hpack.c -@@ -902,7 +902,7 @@ void h2o_hpack_flatten_response(h2o_buffer_t **buf, h2o_hpack_header_table_t *he - if (server_name->len) { - dst = encode_header(header_table, dst, &H2O_TOKEN_SERVER->buf, server_name); - } -- h2o_iovec_t date_value = {ts->str->rfc1123, H2O_TIMESTR_RFC1123_LEN}; -+ h2o_iovec_t date_value = h2o_iovec_init(ts->str->rfc1123, H2O_TIMESTR_RFC1123_LEN); - dst = encode_header(header_table, dst, &H2O_TOKEN_DATE->buf, &date_value); - #endif - size_t i; -diff --git a/lib/http2/hpack_static_table.h b/lib/http2/hpack_static_table.h -index 4c1243103..fae748537 100644 ---- a/lib/http2/hpack_static_table.h -+++ b/lib/http2/hpack_static_table.h -@@ -23,65 +23,65 @@ - /* automatically generated by tokens.pl */ - - static const struct st_h2o_hpack_static_table_entry_t h2o_hpack_static_table[61] = { -- { H2O_TOKEN_AUTHORITY, { H2O_STRLIT("") } }, -- { H2O_TOKEN_METHOD, { H2O_STRLIT("GET") } }, -- { H2O_TOKEN_METHOD, { H2O_STRLIT("POST") } }, -- { H2O_TOKEN_PATH, { H2O_STRLIT("/") } }, -- { H2O_TOKEN_PATH, { H2O_STRLIT("/index.html") } }, -- { H2O_TOKEN_SCHEME, { H2O_STRLIT("http") } }, -- { H2O_TOKEN_SCHEME, { H2O_STRLIT("https") } }, -- { H2O_TOKEN_STATUS, { H2O_STRLIT("200") } }, -- { H2O_TOKEN_STATUS, { H2O_STRLIT("204") } }, -- { H2O_TOKEN_STATUS, { H2O_STRLIT("206") } }, -- { H2O_TOKEN_STATUS, { H2O_STRLIT("304") } }, -- { H2O_TOKEN_STATUS, { H2O_STRLIT("400") } }, -- { H2O_TOKEN_STATUS, { H2O_STRLIT("404") } }, -- { H2O_TOKEN_STATUS, { H2O_STRLIT("500") } }, -- { H2O_TOKEN_ACCEPT_CHARSET, { H2O_STRLIT("") } }, -- { H2O_TOKEN_ACCEPT_ENCODING, { H2O_STRLIT("gzip, deflate") } }, -- { H2O_TOKEN_ACCEPT_LANGUAGE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_ACCEPT_RANGES, { H2O_STRLIT("") } }, -- { H2O_TOKEN_ACCEPT, { H2O_STRLIT("") } }, -- { H2O_TOKEN_ACCESS_CONTROL_ALLOW_ORIGIN, { H2O_STRLIT("") } }, -- { H2O_TOKEN_AGE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_ALLOW, { H2O_STRLIT("") } }, -- { H2O_TOKEN_AUTHORIZATION, { H2O_STRLIT("") } }, -- { H2O_TOKEN_CACHE_CONTROL, { H2O_STRLIT("") } }, -- { H2O_TOKEN_CONTENT_DISPOSITION, { H2O_STRLIT("") } }, -- { H2O_TOKEN_CONTENT_ENCODING, { H2O_STRLIT("") } }, -- { H2O_TOKEN_CONTENT_LANGUAGE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_CONTENT_LENGTH, { H2O_STRLIT("") } }, -- { H2O_TOKEN_CONTENT_LOCATION, { H2O_STRLIT("") } }, -- { H2O_TOKEN_CONTENT_RANGE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_CONTENT_TYPE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_COOKIE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_DATE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_ETAG, { H2O_STRLIT("") } }, -- { H2O_TOKEN_EXPECT, { H2O_STRLIT("") } }, -- { H2O_TOKEN_EXPIRES, { H2O_STRLIT("") } }, -- { H2O_TOKEN_FROM, { H2O_STRLIT("") } }, -- { H2O_TOKEN_HOST, { H2O_STRLIT("") } }, -- { H2O_TOKEN_IF_MATCH, { H2O_STRLIT("") } }, -- { H2O_TOKEN_IF_MODIFIED_SINCE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_IF_NONE_MATCH, { H2O_STRLIT("") } }, -- { H2O_TOKEN_IF_RANGE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_IF_UNMODIFIED_SINCE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_LAST_MODIFIED, { H2O_STRLIT("") } }, -- { H2O_TOKEN_LINK, { H2O_STRLIT("") } }, -- { H2O_TOKEN_LOCATION, { H2O_STRLIT("") } }, -- { H2O_TOKEN_MAX_FORWARDS, { H2O_STRLIT("") } }, -- { H2O_TOKEN_PROXY_AUTHENTICATE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_PROXY_AUTHORIZATION, { H2O_STRLIT("") } }, -- { H2O_TOKEN_RANGE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_REFERER, { H2O_STRLIT("") } }, -- { H2O_TOKEN_REFRESH, { H2O_STRLIT("") } }, -- { H2O_TOKEN_RETRY_AFTER, { H2O_STRLIT("") } }, -- { H2O_TOKEN_SERVER, { H2O_STRLIT("") } }, -- { H2O_TOKEN_SET_COOKIE, { H2O_STRLIT("") } }, -- { H2O_TOKEN_STRICT_TRANSPORT_SECURITY, { H2O_STRLIT("") } }, -- { H2O_TOKEN_TRANSFER_ENCODING, { H2O_STRLIT("") } }, -- { H2O_TOKEN_USER_AGENT, { H2O_STRLIT("") } }, -- { H2O_TOKEN_VARY, { H2O_STRLIT("") } }, -- { H2O_TOKEN_VIA, { H2O_STRLIT("") } }, -- { H2O_TOKEN_WWW_AUTHENTICATE, { H2O_STRLIT("") } } -+ { H2O_TOKEN_AUTHORITY, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_METHOD, H2O_IOVEC_STRLIT("GET") }, -+ { H2O_TOKEN_METHOD, H2O_IOVEC_STRLIT("POST") }, -+ { H2O_TOKEN_PATH, H2O_IOVEC_STRLIT("/") }, -+ { H2O_TOKEN_PATH, H2O_IOVEC_STRLIT("/index.html") }, -+ { H2O_TOKEN_SCHEME, H2O_IOVEC_STRLIT("http") }, -+ { H2O_TOKEN_SCHEME, H2O_IOVEC_STRLIT("https") }, -+ { H2O_TOKEN_STATUS, H2O_IOVEC_STRLIT("200") }, -+ { H2O_TOKEN_STATUS, H2O_IOVEC_STRLIT("204") }, -+ { H2O_TOKEN_STATUS, H2O_IOVEC_STRLIT("206") }, -+ { H2O_TOKEN_STATUS, H2O_IOVEC_STRLIT("304") }, -+ { H2O_TOKEN_STATUS, H2O_IOVEC_STRLIT("400") }, -+ { H2O_TOKEN_STATUS, H2O_IOVEC_STRLIT("404") }, -+ { H2O_TOKEN_STATUS, H2O_IOVEC_STRLIT("500") }, -+ { H2O_TOKEN_ACCEPT_CHARSET, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_ACCEPT_ENCODING, H2O_IOVEC_STRLIT("gzip, deflate") }, -+ { H2O_TOKEN_ACCEPT_LANGUAGE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_ACCEPT_RANGES, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_ACCEPT, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_ACCESS_CONTROL_ALLOW_ORIGIN, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_AGE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_ALLOW, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_AUTHORIZATION, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_CACHE_CONTROL, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_CONTENT_DISPOSITION, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_CONTENT_ENCODING, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_CONTENT_LANGUAGE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_CONTENT_LENGTH, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_CONTENT_LOCATION, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_CONTENT_RANGE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_CONTENT_TYPE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_COOKIE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_DATE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_ETAG, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_EXPECT, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_EXPIRES, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_FROM, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_HOST, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_IF_MATCH, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_IF_MODIFIED_SINCE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_IF_NONE_MATCH, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_IF_RANGE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_IF_UNMODIFIED_SINCE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_LAST_MODIFIED, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_LINK, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_LOCATION, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_MAX_FORWARDS, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_PROXY_AUTHENTICATE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_PROXY_AUTHORIZATION, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_RANGE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_REFERER, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_REFRESH, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_RETRY_AFTER, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_SERVER, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_SET_COOKIE, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_STRICT_TRANSPORT_SECURITY, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_TRANSFER_ENCODING, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_USER_AGENT, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_VARY, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_VIA, H2O_IOVEC_STRLIT("") }, -+ { H2O_TOKEN_WWW_AUTHENTICATE, H2O_IOVEC_STRLIT("") } - }; -diff --git a/lib/http2/http2_debug_state.c b/lib/http2/http2_debug_state.c -index 3ef8de37f..e9245ddcd 100644 ---- a/lib/http2/http2_debug_state.c -+++ b/lib/http2/http2_debug_state.c -@@ -62,7 +62,7 @@ static const char *get_debug_state_string(h2o_http2_stream_t *stream) - return NULL; - } - --__attribute__((format(printf, 3, 4))) static void append_chunk(h2o_mem_pool_t *pool, h2o_iovec_vector_t *chunks, const char *fmt, -+__attribute__((format(gnu_printf, 3, 4))) static void append_chunk(h2o_mem_pool_t *pool, h2o_iovec_vector_t *chunks, const char *fmt, - ...) - { - va_list args; -diff --git a/misc/tokens.pl b/misc/tokens.pl -index 1fcf173fa..1407f6681 100755 ---- a/misc/tokens.pl -+++ b/misc/tokens.pl -@@ -94,7 +94,7 @@ print $fh render_mt(<< 'EOT', \@tokens, LICENSE)->as_string; - /* DO NOT EDIT! generated by tokens.pl */ - h2o_token_t h2o__tokens[] = { - ? for my $i (0..$#$tokens) { -- { { H2O_STRLIT("[$i][0] ?>") }, [$i][$_] } (1..$#{$tokens->[$i]})) ?> } -+ { H2O_IOVEC_STRLIT("[$i][0] ?>"), [$i][$_] } (1..$#{$tokens->[$i]})) ?> } - ? } - }; - size_t h2o__num_tokens = ; -@@ -135,7 +135,7 @@ print $fh render_mt(<< 'EOT', \@hpack, LICENSE)->as_string; - - static const struct st_h2o_hpack_static_table_entry_t h2o_hpack_static_table[] = { - ? for my $i (0..$#$entries) { -- { [$i][0]) ?>, { H2O_STRLIT("[$i][1] || "" ?>") } } -+ { [$i][0]) ?>, H2O_IOVEC_STRLIT("[$i][1] || "" ?>") } - ? } - }; - EOT -diff --git a/src/main.c b/src/main.c -index af0867f29..7c801755d 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -43,7 +43,9 @@ - #include - #include - #include -+#ifndef H2O_NO_UNIX_SOCKETS - #include -+#endif - #include - #include - #include -@@ -886,6 +888,7 @@ Found: - return conf.server_starter.fds[i]; - } - -+#ifndef H2O_NO_UNIX_SOCKETS - static int open_unix_listener(h2o_configurator_command_t *cmd, yoml_t *node, struct sockaddr_un *sa) - { - struct stat st; -@@ -948,6 +951,7 @@ ErrorExit: - close(fd); - return -1; - } -+#endif - - static int open_tcp_listener(h2o_configurator_command_t *cmd, yoml_t *node, const char *hostname, const char *servname, int domain, - int type, int protocol, struct sockaddr *addr, socklen_t addrlen) -@@ -1067,6 +1071,7 @@ static int on_config_listen(h2o_configurator_command_t *cmd, h2o_configurator_co - return -1; - } - -+ #ifndef H2O_NO_UNIX_SOCKETS - if (strcmp(type, "unix") == 0) { - - /* unix socket */ -@@ -1110,7 +1115,9 @@ static int on_config_listen(h2o_configurator_command_t *cmd, h2o_configurator_co - if (listener->hosts != NULL && ctx->hostconf != NULL) - h2o_append_to_null_terminated_list((void *)&listener->hosts, ctx->hostconf); - -- } else if (strcmp(type, "tcp") == 0) { -+ } else -+ #endif -+ if (strcmp(type, "tcp") == 0) { - - /* TCP socket */ - struct addrinfo hints, *res, *ai; -@@ -1712,11 +1719,13 @@ static char **build_server_starter_argv(const char *h2o_cmd, const char *config_ - sprintf(newarg, "--port=%s:%s", host, serv); - } - } break; -+ #ifndef H2O_NO_UNIX_SOCKETS - case AF_UNIX: { - struct sockaddr_un *sa = (void *)&conf.listeners[i]->addr; - newarg = h2o_mem_alloc(sizeof("--path=") + strlen(sa->sun_path)); - sprintf(newarg, "--path=%s", sa->sun_path); - } break; -+ #endif - } - h2o_vector_reserve(NULL, &args, args.size + 1); - args.entries[args.size++] = newarg; diff --git a/pkg/urbit/compat/mingw/lmdb.patch b/pkg/urbit/compat/mingw/lmdb.patch deleted file mode 100644 index e023a71330..0000000000 --- a/pkg/urbit/compat/mingw/lmdb.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff --git a/mdb.c b/mdb.c ---- a/mdb.c -+++ b/mdb.c -@@ -1707,28 +1707,27 @@ static char *const mdb_errstr[] = { - "MDB_PROBLEM: Unexpected problem - txn should abort", - }; - --char * --mdb_strerror(int err) -+void -+mdb_logerror(FILE* f, int err, const char* fmt, ...) - { --#ifdef _WIN32 -- /** HACK: pad 4KB on stack over the buf. Return system msgs in buf. -- * This works as long as no function between the call to mdb_strerror -- * and the actual use of the message uses more than 4K of stack. -- */ --#define MSGSIZE 1024 --#define PADSIZE 4096 -- char buf[MSGSIZE+PADSIZE], *ptr = buf; --#endif -+ va_list ap; -+ va_start(ap, fmt); -+ vfprintf(f, fmt, ap); -+ va_end(ap); -+ - int i; - if (!err) -- return ("Successful return: 0"); -+ { -+ fprintf(stderr, ": %s\r\n", "Successful return: 0"); -+ return; -+ } - - if (err >= MDB_KEYEXIST && err <= MDB_LAST_ERRCODE) { - i = err - MDB_KEYEXIST; -- return mdb_errstr[i]; -+ fprintf(stderr, ": %s\r\n", mdb_errstr[i]); -+ return; - } - --#ifdef _WIN32 - /* These are the C-runtime error codes we use. The comment indicates - * their numeric value, and the Win32 error they would correspond to - * if the error actually came from a Win32 API. A major mess, we should -@@ -1742,18 +1741,20 @@ mdb_strerror(int err) - case EBUSY: /* 16, CURRENT_DIRECTORY */ - case EINVAL: /* 22, BAD_COMMAND */ - case ENOSPC: /* 28, OUT_OF_PAPER */ -- return strerror(err); -+ fprintf(stderr, ": %s\r\n", strerror(err)); - default: - ; - } -- buf[0] = 0; -- FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | -+ LPSTR ptr; -+ if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | -+ FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_IGNORE_INSERTS, -- NULL, err, 0, ptr, MSGSIZE, (va_list *)buf+MSGSIZE); -- return ptr; --#else -- return strerror(err); --#endif -+ NULL, err, 0, (LPSTR)&ptr, sizeof (LPSTR), NULL)) -+ { -+ fprintf(stderr, ": %s\r\n", ptr); -+ LocalFree(ptr); -+ } else -+ fprintf(stderr, ": <%d>\r\n", err); - } - - /** assert(3) variant in cursor context */ diff --git a/pkg/urbit/compat/mingw/mman.h b/pkg/urbit/compat/mingw/mman.h deleted file mode 100644 index 965fecfd8c..0000000000 --- a/pkg/urbit/compat/mingw/mman.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _SYS_MMAN_H -#define _SYS_MMAN_H - -void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); -int munmap(void *addr, size_t length); -int msync(void *addr, size_t length, int flags); -int mprotect(void *addr, size_t len, int prot); - -#define PROT_NONE 0x00 /* No access. */ -#define PROT_READ 0x01 /* Pages can be read. */ -#define PROT_WRITE 0x02 /* Pages can be written. */ -#define PROT_EXEC 0x04 /* Pages can be executed. */ - -#define MAP_FILE 0x0001 /* Mapped from a file or device. */ -#define MAP_ANON 0x0002 /* Allocated from anonymous virtual memory. */ -#define MAP_TYPE 0x000f /* Mask for type field. */ -#define MAP_SHARED 0x0010 /* Share changes. */ -#define MAP_PRIVATE 0x0000 /* Changes private; copy pages on write. */ -#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */ -#define MAP_FAILED ((void *) -1) - -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 0 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -#endif//_SYS_MMAN_H diff --git a/pkg/urbit/compat/mingw/murmur3.patch b/pkg/urbit/compat/mingw/murmur3.patch deleted file mode 100644 index cd83e9fdda..0000000000 --- a/pkg/urbit/compat/mingw/murmur3.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/makefile b/makefile ---- a/makefile -+++ b/makefile -@@ -12,5 +12,9 @@ shared: murmur3.c murmur3.h - $(CC) -fPIC -O3 -c murmur3.c - $(CC) -shared -Wl,--export-dynamic murmur3.o -o libmurmur3.so - -+static: murmur3.c murmur3.h -+ $(CC) -fPIC -O3 -c murmur3.c -+ $(AR) rcs libmurmur3.a murmur3.o -+ - clean: - rm -rf example *.o *.so diff --git a/pkg/urbit/compat/mingw/ptty.c b/pkg/urbit/compat/mingw/ptty.c deleted file mode 100644 index 1b27a18ca0..0000000000 --- a/pkg/urbit/compat/mingw/ptty.c +++ /dev/null @@ -1,152 +0,0 @@ -/* compat/mingw/ptty.c -** -*/ -#include "noun.h" -vere.h"/vere.h" -#include - -/* _ptty_get_type(): detects tty type. -*/ -static DWORD -_ptty_get_type(int fd) -{ - HANDLE h = (HANDLE)_get_osfhandle(fd); - if (h == INVALID_HANDLE_VALUE) - return FILE_TYPE_UNKNOWN; - - DWORD t = GetFileType(h); - if (t != FILE_TYPE_PIPE) - return t ; - - // https://github.com/fusesource/jansi-native/commit/461068c67a38647d2890e96250636fc0117074f5 - ULONG result; - BYTE buffer[1024]; - POBJECT_NAME_INFORMATION nameinfo = (POBJECT_NAME_INFORMATION) buffer; - PWSTR name; - - /* get pipe name */ - if (!NT_SUCCESS(NtQueryObject(h, ObjectNameInformation, buffer, sizeof(buffer) - sizeof(WCHAR), &result))) - return FILE_TYPE_UNKNOWN; - - name = nameinfo->Name.Buffer; - name[nameinfo->Name.Length] = 0; - - // check for popular terminal emulators - // that use named pipes to communicate with subprocesses - if (wcsstr(name, L"\\ConEmu") || - (wcsstr(name, L"msys-") || wcsstr(name, L"cygwin-")) && wcsstr(name, L"-pty")) - return FILE_TYPE_PIPE; - - return FILE_TYPE_UNKNOWN; -} - -/* _ttyf_nop(): stub function. -*/ -static c3_o -_ttyf_nop(u3_utty* uty_u) -{ - return c3y; -} - -/* _ttyf_start_raw_input(): ends raw input on the tty. -*/ -static c3_o -_ttyf_set_normal(u3_utty* uty_u) -{ - c3_i e; - if ( 0 != (e = uv_tty_set_mode(&uty_u->pin_u.tty_u, UV_TTY_MODE_NORMAL)) ) { - fprintf(stderr, "uv_tty_set_mode(UV_TTY_MODE_NORMAL) -> %d\r\n", e); - return c3n; - } - return c3y; -} - -/* _ttyf_start_raw_input(): sets the tty to raw input. -*/ -static c3_o -_ttyf_set_raw(u3_utty* uty_u) -{ - c3_i e; - if ( 0 != (e = uv_tty_set_mode(&uty_u->pin_u.tty_u, UV_TTY_MODE_RAW)) ) { - fprintf(stderr, "uv_tty_set_mode(UV_TTY_MODE_RAW) -> %d\r\n", e); - return c3n; - } - return c3y; -} - -/* _ttyf_get_winsize(): gets the tty window size. -*/ -static c3_o -_ttyf_get_winsize(u3_utty* uty_u, c3_l* col_l, c3_l* row_l) -{ - c3_i col_i, row_i; - if ( 0 != uv_tty_get_winsize(&uty_u->pop_u.tty_u, &col_i, &row_i) ) { - return c3n; - } - - *col_l = col_i; - *row_l = row_i; - return c3y; -} - -/* _ttyf_get_winsize(): gets the tty window size. -*/ -static c3_o -_ttyf_nop_winsize(u3_utty* uty_u, c3_l* col_l, c3_l* row_l) -{ - return c3n; -} - -/* u3_ptty_init(): initialize platform-specific tty. -*/ -u3_utty* -u3_ptty_init(uv_loop_t* lup_u, const c3_c** err_c) -{ - DWORD pip_l = _ptty_get_type(0); - DWORD pop_l = _ptty_get_type(1); - if ( pip_l == FILE_TYPE_UNKNOWN || pop_l == FILE_TYPE_UNKNOWN) { - *err_c = "not a tty"; - return NULL; - } - - if ( pip_l != pop_l ) { - *err_c = "partly redirected"; - return NULL; - } - - c3_i e; - u3_utty* uty_u = c3_calloc(sizeof(u3_utty)); - if ( pip_l == FILE_TYPE_CHAR ) { - if ( 0 == (e = uv_tty_init(lup_u, &uty_u->pin_u.tty_u, 0, 0)) && - 0 == (e = uv_tty_init(lup_u, &uty_u->pop_u.tty_u, 1, 0)) ) - { - SetConsoleOutputCP(CP_UTF8); - uty_u->sta_f = _ttyf_set_raw; - uty_u->sto_f = _ttyf_set_normal; - uty_u->wsz_f = _ttyf_get_winsize; - } - } else { - if ( 0 == (e = uv_pipe_init(lup_u, &uty_u->pin_u.pip_u, 0)) && - 0 == (e = uv_pipe_init(lup_u, &uty_u->pop_u.pip_u, 0)) && - 0 == (e = uv_pipe_open(&uty_u->pin_u.pip_u, 0)) && - 0 == (e = uv_pipe_open(&uty_u->pop_u.pip_u, 1)) ) - { - fprintf(stderr, "vere: running interactive in a terminal emulator is experimental\r\n" - " use -t to disable interactivity or use native Windows console\r\n") ; - uty_u->sta_f = _ttyf_nop; - uty_u->sto_f = _ttyf_nop; - uty_u->wsz_f = _ttyf_nop_winsize; - } - } - - if ( e ) { - *err_c = uv_strerror(e); - c3_free(uty_u); - return NULL; - } - - uty_u->fid_i = 1; - uty_u->hij_f = _ttyf_nop; - uty_u->loj_f = _ttyf_nop; - return uty_u; -} diff --git a/pkg/urbit/compat/mingw/rsignal.c b/pkg/urbit/compat/mingw/rsignal.c deleted file mode 100644 index c62ce7e78b..0000000000 --- a/pkg/urbit/compat/mingw/rsignal.c +++ /dev/null @@ -1,167 +0,0 @@ -#include "noun.h" -#include "rsignal.h" -#include - -int err_win_to_posix(DWORD winerr); - -// The current implementation of rsignal_ is single-threaded, -// but it can be extended to multi-threaded by replacing these -// static variables with a thread id-based hash map. -// -static __p_sig_fn_t _fns[SIG_COUNT]; -static volatile DWORD _tid; -static HANDLE _hvt; - -void rsignal_install_handler(int sig, __p_sig_fn_t fn) -{ - if (sig < 0 || sig >= SIG_COUNT) - return; - - DWORD newtid = GetCurrentThreadId(); - DWORD oldtid = InterlockedExchange(&_tid, newtid); - if (oldtid != 0 && oldtid != newtid) { - fprintf(stderr, "\r\nrsignal_install_handler: %u -> %u\r\n", oldtid, newtid); - return; - } - - __p_sig_fn_t oldfn = InterlockedExchangePointer((PVOID*)&_fns[sig], fn); - if (fn != 0 && oldfn != 0 && oldfn != fn) { - fprintf(stderr, "\r\nrsignal_install_handler: %p -> %p\r\n", oldfn, fn); - } -} - -void rsignal_deinstall_handler(int sig) -{ - rsignal_install_handler(sig, 0); -} - -void rsignal_raise(int sig) -{ - if (sig < 0 || sig >= SIG_COUNT) - return; - - __p_sig_fn_t oldfn = InterlockedExchangePointer((PVOID*)&_fns[sig], 0); - if (oldfn == 0) - return; - - if (_tid == GetCurrentThreadId()) { - oldfn(sig); - return; - } - - HANDLE hthread = OpenThread(THREAD_ALL_ACCESS, FALSE, _tid); - if (!hthread) { - fprintf(stderr, "\r\nrsignal_raise: OpenThread(%u): %d\r\n", _tid, GetLastError()); - return; - } - - if (SuspendThread(hthread) < 0) { - fprintf(stderr, "\r\nrsignal_raise: SuspendThread(%u): %d\r\n", _tid, GetLastError()); - goto cleanup; - } - - oldfn(sig); - - if (!ResumeThread(hthread)) { - fprintf(stderr, "\r\nrsignal_raise: ResumeThread(%u): %d\r\n", _tid, GetLastError()); - - // abort because the main thread is stuck - abort(); - } - -cleanup: - CloseHandle(hthread); -} - -static void _rsignal_vt_cb(PVOID param, BOOLEAN timedOut) -{ - rsignal_raise(SIGVTALRM); -} - -int rsignal_setitimer(int type, struct itimerval *in, struct itimerval *out) -{ - if (in == 0) { - errno = EFAULT; - return -1; - } - - if (type != ITIMER_VIRTUAL || out != 0) { - errno = ENOTSUP; - return -1; - } - - if (_hvt != NULL) { - DeleteTimerQueueTimer(NULL, _hvt, NULL); - _hvt = NULL; - } - - if (timerisset(&in->it_value) && !CreateTimerQueueTimer(&_hvt, NULL, _rsignal_vt_cb, NULL, - in->it_value.tv_sec * 1000 + in->it_value.tv_usec / 1000, - in->it_interval.tv_sec * 1000 + in->it_interval.tv_usec / 1000, 0)) - { - errno = err_win_to_posix(GetLastError()); - return -1; - } else { - return 0; - } -} - -// direct import from ntdll.dll -extern DWORD64 __imp_KiUserExceptionDispatcher; - -static void _rsignal_longjmp(intptr_t* builtin_jb) -{ - __builtin_longjmp(builtin_jb, 1); -} - -void rsignal_post_longjmp(DWORD tid, intptr_t* builtin_jb) -{ - HANDLE hthread = OpenThread(THREAD_ALL_ACCESS, FALSE, tid); - if (!hthread) { - fprintf(stderr, "\r\nrsignal: OpenThread(%u): %d\r\n", tid, GetLastError()); - return; - } - - CONTEXT context; - context.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER; - if (!GetThreadContext(hthread, &context)) { - fprintf(stderr, "\r\nrsignal: GetThreadContext(%u): %d\r\n", tid, GetLastError()); - goto cleanup; - } - - // see if the thread is currently handling a structured exception - // if so, let the handler (usually the libsigsegv handler) finish - // and set up the the signal to run at the exception resume point - // otherwise, passing a parameter to fn is completely unreliable - // - DWORD64 kibase; - PRUNTIME_FUNCTION ki = RtlLookupFunctionEntry(__imp_KiUserExceptionDispatcher, &kibase, NULL); - CONTEXT c = context; - while (1) - { - DWORD64 base, frame; - PRUNTIME_FUNCTION f = RtlLookupFunctionEntry(c.Rip, &base, NULL); - if (!f) break; - if (f == ki) - { - // KiUserExceptionDispatcher has a "bare" frame - // with $rsp pointing to the CONTEXT structure - // - ((PCONTEXT)c.Rsp)->Rip = (DWORD64)_rsignal_longjmp; - ((PCONTEXT)c.Rsp)->Rcx = (DWORD64)builtin_jb; - goto cleanup; - } - PVOID handler_data; - RtlVirtualUnwind(0, base, c.Rip, f, &c, &handler_data, &frame, NULL); - } - - context.Rip = (DWORD64)_rsignal_longjmp; - context.Rcx = (DWORD64)builtin_jb; - if (!SetThreadContext(hthread, &context)) { - fprintf(stderr, "\r\nrsignal: SetThreadContext(%u): %d\r\n", tid, GetLastError()); - goto cleanup; - } - -cleanup: - CloseHandle(hthread); -} diff --git a/pkg/urbit/compat/mingw/rsignal.h b/pkg/urbit/compat/mingw/rsignal.h deleted file mode 100644 index 5af8e2dcd7..0000000000 --- a/pkg/urbit/compat/mingw/rsignal.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _RSIGNAL_H -#define _RSIGNAL_H - -typedef struct { - jmp_buf jb; - unsigned long tid; -} rsignal_jmpbuf; - -#define rsignal_setjmp(buf) (buf.tid = GetCurrentThreadId(), setjmp(buf.jb)) -#define rsignal_longjmp(buf, val) if (buf.tid != GetCurrentThreadId()) {buf.jb.retval = (val); rsignal_post_longjmp(buf.tid, buf.jb.buffer);} else longjmp(buf.jb, val) - -void rsignal_raise(int sig); -void rsignal_install_handler(int sig, __p_sig_fn_t fn); -void rsignal_deinstall_handler(int sig); -void rsignal_post_longjmp(unsigned long tid, intptr_t* builtin_jb); - -#define ITIMER_VIRTUAL 1 -struct itimerval { - struct timeval it_value, it_interval; -}; - -int rsignal_setitimer(int type, struct itimerval *in, struct itimerval *out); - -#endif//_RSIGNAL_H diff --git a/pkg/urbit/compat/mingw/seh_handler.c b/pkg/urbit/compat/mingw/seh_handler.c deleted file mode 100644 index 6f5cfe0986..0000000000 --- a/pkg/urbit/compat/mingw/seh_handler.c +++ /dev/null @@ -1,25 +0,0 @@ -#include "noun.h" -#include "rsignal.h" -vere.h"/vere.h" - -/* _mingw_exception_filter: replaces libsigsegv on MingW -*/ -EXCEPTION_DISPOSITION _mingw_exception_filter( - IN PEXCEPTION_RECORD ExceptionRecord, - IN ULONG64 EstablisherFrame, - IN OUT PCONTEXT ContextRecord, - IN OUT PDISPATCHER_CONTEXT DispatcherContext) -{ - if (ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && - ExceptionRecord->ExceptionInformation[0] == 1 && - u3e_fault((void*)ExceptionRecord->ExceptionInformation[1], 1)) - { - return ExceptionContinueExecution; - } - - if (ExceptionRecord->ExceptionCode == EXCEPTION_STACK_OVERFLOW) { - rsignal_raise(SIGSTK); - } - - return ExceptionContinueSearch; -} diff --git a/pkg/urbit/compat/mingw/seh_handler_decorator.cc b/pkg/urbit/compat/mingw/seh_handler_decorator.cc deleted file mode 100644 index acc97efcc3..0000000000 --- a/pkg/urbit/compat/mingw/seh_handler_decorator.cc +++ /dev/null @@ -1,65 +0,0 @@ -#include -#include - -enum { INIT, CPAR, DQ, DQS, SQ, SQS }; -char line[1 << 16]; - -/* seh_handler_decorator: registers u3_exception_handler for all functions in given source file -*/ -int main(int argc, const char* argv[]) -{ - if (argc != 2) - return 1; - - int c, state = INIT, curly = 0, emit = 0; - - while (fgets(line, sizeof(line), stdin)) - { - if (line[0] == '#') - { - emit = !!strstr(line, argv[1]); - fputs(line, stdout); - } - else - for (int i = 0; line[i]; i++) - { - switch (state) { - case INIT: - case CPAR: - switch (line[i]) { - case ' ': - case '\t': - case '\n': - case '\r': - case '\f': break; - case '{': curly++; if (emit && curly == 1 && state == CPAR) goto emit_handler; goto reset; - case '}': curly--; goto reset; - case '"': state = DQ; break; - case '\'': state = SQ; break; - case ')': state = CPAR; break; - reset: - default: state = INIT; break; - } break; - case DQ: - switch (line[i]) { - case '\\': state = DQS; break; - case '"': state = INIT; break; - } break; - case DQS: state = DQ; break; - case SQ: - switch (line[i]) { - case '\\': state = SQS; break; - case '\'': state = INIT; break; - } break; - case SQS: state = SQ; break; - } - fputc(line[i], stdout); - continue; - emit_handler: - fputs("{__asm__(\".seh_handler _mingw_exception_filter,@except\\n\");", stdout); - state = INIT; - } - } - - return 0; -} diff --git a/pkg/urbit/compat/mingw/seh_handler_decorator.mk b/pkg/urbit/compat/mingw/seh_handler_decorator.mk deleted file mode 100644 index aa2a4c37de..0000000000 --- a/pkg/urbit/compat/mingw/seh_handler_decorator.mk +++ /dev/null @@ -1,24 +0,0 @@ -# This include file injects a step that transforms vere C source to register -# a SEH exception handler for each function that is declared in a .c file. -# It inserts a .seh_handler directive into each function body with __asm__. -# This directive affects the x64 unwind tables (.pdata and .xdata sections) -# emitted by the compiler. -# -# See gas/config/obj-coff-seh.h in binutils source for .seh_handler, and -# https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64 -# for a description of how stack unwinding and SEH work in x64 Windows. -# -# When this file sets CCEXTRA, the first invocation of $(CC) in Makefile -# writes preprocessor output to stdout (-E -o -), which is piped to a simple -# parser that inserts __asm__ statements to each function in the .c file -# being compiled. The second invocation of $(CC) reads transformed source -# from stdin (-x cpp-output -). $< argument to $(sehdexe) tells the parser -# which .c file is being compiled. - -sehdexe := build/seh_handler_decorator.exe -CCDEPS := $(CCDEPS) $(sehdexe) -CCEXTRA = -E -o -|$(sehdexe) $<|$(CC) $(CFLAGS) -x cpp-output - - -$(sehdexe): compat/mingw/seh_handler_decorator.cc - @mkdir -p ./build - @$(CC) $< -o $@ diff --git a/pkg/urbit/compat/mingw/setjmp.h b/pkg/urbit/compat/mingw/setjmp.h deleted file mode 100644 index 497636872d..0000000000 --- a/pkg/urbit/compat/mingw/setjmp.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _MINGW_SETJMP_H -#define _MINGW_SETJMP_H - -// msvcrt setjmp/longjmp are broken on 64-bit systems, use gcc builtins -typedef struct jmp_buf { - intptr_t buffer[5]; - int retval; -} jmp_buf; - -#define _setjmp setjmp -#define _longjmp longjmp -#define longjmp(buf, val) {buf.retval = (val); __builtin_longjmp(buf.buffer, 1);} -#define setjmp(buf) (__builtin_setjmp(buf.buffer) ? (buf.retval) : 0) - -#endif//_MINGW_SETJMP_H diff --git a/pkg/urbit/compat/mingw/softfloat3.patch b/pkg/urbit/compat/mingw/softfloat3.patch deleted file mode 100644 index 9f0c5c5e7b..0000000000 --- a/pkg/urbit/compat/mingw/softfloat3.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/build/Win64-MinGW-w64/Makefile b/build/Win64-MinGW-w64/Makefile ---- a/build/Win64-MinGW-w64/Makefile -+++ b/build/Win64-MinGW-w64/Makefile -@@ -46,7 +46,8 @@ C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include - COMPILE_C = \ - x86_64-w64-mingw32-gcc -c -Werror-implicit-function-declaration \ - -DSOFTFLOAT_FAST_INT64 $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@ --MAKELIB = x86_64-w64-mingw32-ar crs $@ -+MAKELIB = x86_64-w64-mingw32-gcc-ar crs $@ -+LIBNAME = libsoftfloat3 - - OBJ = .o - LIB = .a -@@ -54,7 +55,7 @@ LIB = .a - OTHER_HEADERS = $(SOURCE_DIR)/include/opts-GCC.h - - .PHONY: all --all: softfloat$(LIB) -+all: $(LIBNAME)$(LIB) - - OBJS_PRIMITIVES = \ - s_eq128$(OBJ) \ -@@ -380,11 +381,11 @@ $(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c - $(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - --softfloat$(LIB): $(OBJS_ALL) -+$(LIBNAME)$(LIB): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - - .PHONY: clean - clean: -- $(DELETE) $(OBJS_ALL) softfloat$(LIB) -+ $(DELETE) $(OBJS_ALL) $(LIBNAME)$(LIB) - diff --git a/pkg/urbit/compat/mingw/uv.patch b/pkg/urbit/compat/mingw/uv.patch deleted file mode 100644 index 1a0a6d6941..0000000000 --- a/pkg/urbit/compat/mingw/uv.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/src/win/pipe.c b/src/win/pipe.c -index 0f2bb869b..f81245ec6 100644 ---- a/src/win/pipe.c -+++ b/src/win/pipe.c -@@ -270,6 +270,12 @@ static int uv_set_pipe_handle(uv_loop_t* loop, - - if (!SetNamedPipeHandleState(pipeHandle, &mode, NULL, NULL)) { - err = GetLastError(); -+ if ((err == ERROR_INVALID_FUNCTION || err == ERROR_INVALID_PARAMETER) && (duplex_flags & UV_HANDLE_WRITABLE)) { -+ /* -+ * it's not a pipe, but simple writes should be fine -+ * let's trust callers to know what they're doing -+ */ -+ } else - if (err == ERROR_ACCESS_DENIED) { - /* - * SetNamedPipeHandleState can fail if the handle doesn't have either -@@ -1054,7 +1054,6 @@ static DWORD WINAPI uv_pipe_writefile_thread_proc(void* parameter) { - assert(req != NULL); - assert(req->type == UV_WRITE); - assert(handle->type == UV_NAMED_PIPE); -- assert(req->write_buffer.base); - - result = WriteFile(handle->handle, - req->write_buffer.base, -diff --git a/src/win/tty.c b/src/win/tty.c -index c359d5601..1b9d4f853 100644 ---- a/src/win/tty.c -+++ b/src/win/tty.c -@@ -367,7 +367,7 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) { - flags = ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT; - break; - case UV_TTY_MODE_RAW: -- flags = ENABLE_WINDOW_INPUT; -+ flags = ENABLE_WINDOW_INPUT | ENABLE_PROCESSED_INPUT; - break; - case UV_TTY_MODE_IO: - return UV_ENOTSUP; diff --git a/pkg/urbit/compat/openbsd/lmdb.patch b/pkg/urbit/compat/openbsd/lmdb.patch deleted file mode 100644 index f997db9804..0000000000 --- a/pkg/urbit/compat/openbsd/lmdb.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/Makefile b/Makefile ---- a/Makefile -+++ b/Makefile -@@ -18,7 +18,7 @@ - # There may be other macros in mdb.c of interest. You should - # read mdb.c before changing any of them. - # --CC = gcc -+CC = cc - AR = ar - W = -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized - THREADS = -pthread diff --git a/pkg/urbit/compat/openbsd/murmur3.patch b/pkg/urbit/compat/openbsd/murmur3.patch deleted file mode 100644 index cd83e9fdda..0000000000 --- a/pkg/urbit/compat/openbsd/murmur3.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/makefile b/makefile ---- a/makefile -+++ b/makefile -@@ -12,5 +12,9 @@ shared: murmur3.c murmur3.h - $(CC) -fPIC -O3 -c murmur3.c - $(CC) -shared -Wl,--export-dynamic murmur3.o -o libmurmur3.so - -+static: murmur3.c murmur3.h -+ $(CC) -fPIC -O3 -c murmur3.c -+ $(AR) rcs libmurmur3.a murmur3.o -+ - clean: - rm -rf example *.o *.so diff --git a/pkg/urbit/compat/openbsd/softfloat3.patch b/pkg/urbit/compat/openbsd/softfloat3.patch deleted file mode 100644 index 278a7011e7..0000000000 --- a/pkg/urbit/compat/openbsd/softfloat3.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff --git a/build/template-FAST_INT64/Makefile b/build/template-FAST_INT64/Makefile ---- a/build/template-FAST_INT64/Makefile -+++ b/build/template-FAST_INT64/Makefile -@@ -34,28 +34,27 @@ - # - #============================================================================= - --# Edit lines marked with `==>'. See "SoftFloat-source.html". -+SOURCE_DIR ?= ../../source -+SPECIALIZE_TYPE ?= 8086-SSE - --==> SOURCE_DIR ?= ../../source --==> SPECIALIZE_TYPE ?= 8086 -+SOFTFLOAT_OPTS ?= \ -+ -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ -+ -DSOFTFLOAT_FAST_DIV64TO32 - --==> SOFTFLOAT_OPTS ?= \ --==> -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \ --==> -DSOFTFLOAT_FAST_DIV64TO32 -+DELETE = rm -f -+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include -+COMPILE_C = \ -+ cc -c -DSOFTFLOAT_FAST_INT64 $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@ -+MAKELIB = ar crs $@ -+LIBNAME = libsoftfloat3 - --==> DELETE = rm -f --==> C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include --==> COMPILE_C = \ --==> cc -c -DSOFTFLOAT_FAST_INT64 $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@ --==> MAKELIB = ar crs $@ -+OBJ = .o -+LIB = .a - --==> OBJ = .o --==> LIB = .a -- --==> OTHER_HEADERS = -+OTHER_HEADERS = - - .PHONY: all --all: softfloat$(LIB) -+all: $(LIBNAME)$(LIB) - - OBJS_PRIMITIVES = \ - s_eq128$(OBJ) \ -@@ -381,11 +380,11 @@ $(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c - $(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c - $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c - --softfloat$(LIB): $(OBJS_ALL) -+$(LIBNAME)$(LIB): $(OBJS_ALL) - $(DELETE) $@ - $(MAKELIB) $^ - - .PHONY: clean - clean: -- $(DELETE) $(OBJS_ALL) softfloat$(LIB) -+ $(DELETE) $(OBJS_ALL) $(LIBNAME)$(LIB) - -diff --git a/build/template-FAST_INT64/platform.h b/build/template-FAST_INT64/platform.h ---- a/build/template-FAST_INT64/platform.h -+++ b/build/template-FAST_INT64/platform.h -@@ -34,17 +34,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - =============================================================================*/ - --// Edit lines marked with `==>'. See "SoftFloat-source.html". -- - /*---------------------------------------------------------------------------- - *----------------------------------------------------------------------------*/ --==> #define LITTLEENDIAN 1 -+#define LITTLEENDIAN 1 - - /*---------------------------------------------------------------------------- - *----------------------------------------------------------------------------*/ --==> #define INLINE inline -+#define INLINE inline - - /*---------------------------------------------------------------------------- - *----------------------------------------------------------------------------*/ --==> #define THREAD_LOCAL _Thread_local -+#define THREAD_LOCAL - diff --git a/pkg/urbit/compat/poor-mans-nix-shell.sh b/pkg/urbit/compat/poor-mans-nix-shell.sh deleted file mode 100644 index 839a859d7b..0000000000 --- a/pkg/urbit/compat/poor-mans-nix-shell.sh +++ /dev/null @@ -1,159 +0,0 @@ -declare -a cdirs -declare -a ldirs -declare -a pdirs -declare -A hdeps -sources=(../../nix/sources.json ../../nix/sources-pmnsh.json) -[ "yes" == "${build_openssl-no}" ] && sources=(../../nix/sources-openssl.json ${sources[@]}) -patches=compat/$1 -deriver=urbit-$1-build -markfil=.$1~ -depdirs= -nixpath=${NIX_STORE-../build} - -: ${gnutar:=tar} -: ${gnumake:=make} -: ${sha256tool:=sha256sum} - -export MAKE=$gnumake - -# LDFLAGS doesn't like absolute paths -if [ "${nixpath:0:1}" == "/" ] -then - mkdir -p $nixpath - nixpath=$(realpath --relative-to=. $nixpath) -fi - -hex2nixbase32 () { - local digits='0123456789abcdfghijklmnpqrsvwxyz' - local bits=0 - local left=0 # number of bits left in $bits - local i=0 - while ((1)) - do - while ((left>=5)) - do - echo -n ${digits:$((bits&31)):1} - bits=$((bits>>5)) - left=$((left-5)) - done - if ((i == ${#1})) - then - break - fi - char=0x${1:i:2} - i=$((i+2)) - bits=$((bits|(char<<(left)))) - left=$((left+8)) - done - echo -n ${digits:$bits:1} -} - -buildnixdep () { - echo Building dependency $key... - local cache=https://app.cachix.org/api/v1/cache/${CACHIX_CACHE-} - local hash= - if [ -n "$url" ] - then - hash=${hdeps[$key]} - dir=$nixpath/$hash-$key - if [ -e $dir/$markfil ] - then - # dependency present, don't reupload - hash= - else - # dependency absent, check the binary cache if configured - if [ -n "${CACHIX_CACHE-}" ] - then - echo Checking binary cache for $hash-$key... - narinfo="$cache/${hash}.narinfo" - if curl -fLI "$narinfo" - then - url="$cache/$(curl -fL "$narinfo"|while IFS=: read k v; do if [ "$k" == "URL" ]; then echo $v; fi; done)" - echo Found $url - strip=0 - hash= - fi - fi - mkdir -p $dir - pushd $dir - curl -fL "$url"|($gnutar --strip $strip -xzf - || true) - popd - fi - else - # local dependency - dir=../$key - fi - - # patch and build the dependency if necessary - if [ ! -e $dir/$markfil ] - then - local patch=$patches/$key.patch - [ -e $patch ] && patch -d $dir -p 1 <$patch - pushd $dir - eval "$cmdprep" - eval $gnumake "$cmdmake" - touch $markfil - popd - fi - - # if configured, upload freshly built dependency to binary cache - if [ -n "$hash" -a -n "${CACHIX_AUTH_TOKEN-}" ] - then - ( - echo Uploading freshly built $hash-$key to binary cache... - tar -C $dir -czf $hash.tar . - local size=$(stat -c '%s' $hash.tar) - read filehash _ < <($sha256tool $hash.tar) - curl -fL -H "Content-Type: application/gzip" -H "Authorization: Bearer $CACHIX_AUTH_TOKEN" --data-binary @"$hash.tar" "$cache/nar" - curl -fL -H "Content-Type: application/json" -H "Authorization: Bearer $CACHIX_AUTH_TOKEN" --data-binary @- "$cache/${hash}.narinfo" <include/config.h - -defmacro () { - echo "#define $1 $2" >>include/config.h -} - -defmacro URBIT_VERSION "\"$URBIT_VERSION\"" -defmacro U3_VERE_PACE "\"${VERE_PACE:-once}\"" - -opt_debug= -opt_static= - -while test $# != 0 -do - case $1 in - --enable-debug) - opt_debug=1 - ;; - --disable-debug) - opt_debug= - ;; - --enable-static) - opt_static=1 - ;; - --enable-shared) - opt_static= - ;; - --disable-static) - opt_static= - ;; - --disable-shared) - opt_static=1 - ;; - *) - echo "unrecognized option: $1" - ;; - esac - shift -done - -[ -z "${NO_GUARD_PAGE-}" ] && defmacro U3_GUARD_PAGE 1 -[ -n "${MEMORY_DEBUG-}" ] && defmacro U3_MEMORY_DEBUG 1 -[ -n "${MEMORY_LOG-}" ] && defmacro U3_MEMORY_LOG 1 -[ -n "${CPU_DEBUG-}" ] && defmacro U3_CPU_DEBUG 1 -[ -n "${EVENT_TIME_DEBUG-}" ] && defmacro U3_EVENT_TIME_DEBUG 1 - -if [ -n "${HOST-}" ] -then os=$(sed 's$^[^-]*-\([^-]*\)-.*$\1$' <<< "$HOST") - cpu=$(sed 's$-.*$$' <<< ${HOST}) -else os=$(uname -s) - cpu=$(uname -m) -fi - -case $(tr A-Z a-z <<< $cpu) in - unknown) - defmacro U3_OS_ENDIAN_little 1 - ;; - i386) - defmacro U3_OS_ENDIAN_little 1 - ;; - i686) - defmacro U3_OS_ENDIAN_little 1 - ;; - x86_64 | amd64) - defmacro U3_OS_ENDIAN_little 1 - ;; - arm64|aarch64) - defmacro U3_OS_ENDIAN_little 1 - defmacro U3_CPU_aarch64 1 - ;; - *) - echo "Unknown or unsupported CPU: '$cpu'" >&2 - exit 1 - ;; -esac - -# TODO Determine if the target cpu is little or big endian. -case $(tr A-Z a-z <<< $os) in - *mingw*) - # mingw builds are static-only - # - opt_static=1 - - # ensure required mingw packages are installed - mpkgs=(cmake curl gcc jq make) - pacman -S --needed autoconf automake-wrapper libtool patch ${mpkgs[@]/#/mingw-w64-x86_64-} - - gnumake=mingw32-make - - . compat/poor-mans-nix-shell.sh mingw - compat/create-include-files.sh 'stat -c %s' /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt - - defmacro U3_OS_mingw 1 - - deps="${deps/sigsegv}" - compat="${compat-} mingw" - ;; - m1brew) - # ensure required packages are installed - brew install -q autoconf automake bash cmake coreutils gmp jq libsigsegv libtool libuv openssl pkgconfig - - if (( ${BASH_VERSION%%.*} < 5 )) - then - echo Running bash version $BASH_VERSION is too low, please restart bash to use freshly installed one - exit 1 - fi - - # for some reason pkg-config does not pick up openssl - export PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig:${PKG_CONFIG_PATH-}" - - . compat/poor-mans-nix-shell.sh m1brew - compat/create-include-files.sh 'stat -f %z' /etc/ssl/cert.pem - - defmacro U3_OS_osx 1 - - compat="${compat-} posix m1brew" - ;; - *linux*) - defmacro U3_OS_linux 1 - defmacro U3_OS_PROF 1 - ;; - *darwin*) - defmacro U3_OS_osx 1 - defmacro U3_OS_PROF 1 - ;; - *apple*) - defmacro U3_OS_osx 1 - defmacro U3_OS_PROF 1 - ;; - *freebsd*) - defmacro U3_OS_bsd 1 - deps="$deps kvm" # XX use new compat.mk pattern - ;; - *openbsd*) - # pkg_add bash automake libtool jq gtar cmake gmake libsigsegv gmp - # Tested versions: - # bash-5.1.8 automake-1.16.3 (autoconf-2.69p3) libtool-2.4.2p2 - # jq-1.6p0 gtar-1.34-static cmake-3.20.3p0v0 gmake-4.3 libsigsegv-2.12 - # gmp-6.2.1p0 - - gnutar=gtar - gnumake=gmake - sha256tool=sha256 - build_openssl=yes - export AUTOCONF_VERSION="${AUTOCONF_VERSION-2.69}" - export AUTOMAKE_VERSION="${AUTOMAKE_VERSION-1.16}" - . compat/poor-mans-nix-shell.sh openbsd - compat/create-include-files.sh 'stat -f %z' /etc/ssl/cert.pem - - defmacro U3_OS_bsd 1 - defmacro U3_OS_no_ubc 1 - - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH-}" - deps="$deps aes_siv secp256k1" - - compat="${compat-} posix openbsd" - ;; - *) - echo "Unknown or unsupported OS: '$os'" >&2 - exit 1 - ;; -esac - -PKG_CONFIG="${PKG_CONFIG-pkg-config}" - -if [ -n "${opt_static-}" ] -then - CFLAGS="${CFLAGS-} -static" - # XX can't set -static here due libuv's -ldl on MacOS - # - # LDFLAGS="${LDFLAGS-} -static" - PKG_CONFIG="$PKG_CONFIG --static" -fi - -CFLAGS="${CFLAGS-} $($PKG_CONFIG --cflags $pkgc_deps)" -LDFLAGS="${LDFLAGS-} $($PKG_CONFIG --libs $pkgc_deps)" - -for dep in $deps; do - LDFLAGS="${LDFLAGS-} -l$dep" -done - -compat="${compat-posix}" -for citem in $compat; do - CFLAGS="${CFLAGS-} -Icompat/$citem" -done - -cat >config.mk <&2 -cat config.mk >&2 - -echo == include/config.h == >&2 -cat include/config.h >&2 diff --git a/pkg/urbit/tests/nock_tests.c b/pkg/urbit/tests/nock_tests.c deleted file mode 100644 index c58aff6884..0000000000 --- a/pkg/urbit/tests/nock_tests.c +++ /dev/null @@ -1,86 +0,0 @@ -#include "noun.h" - -/* _setup(): prepare for tests. -*/ -static void -_setup(void) -{ - // XX at 1<<24, this succeeds on mac, but bail:exit's on linux. - // investigate possible u3n_prog corruption - // - u3m_init(1 << 25); - u3m_pave(c3y); - u3e_init(); -} - -static u3_noun -_nock_fol(u3_noun fol) -{ - return u3n_nock_on(u3_nul, fol); -} - -static c3_i -_test_nock_meme(void) -{ - // (jam !=(=(~ =|(i=@ |-(?:(=(i ^~((bex 32))) ~ [i $(i +(i))])))))) - // - const c3_y buf_y[] = { - 0xe1, 0x16, 0x1b, 0x4, 0x1b, 0xe1, 0x20, 0x58, 0x1c, 0x76, 0x4d, 0x96, 0xd8, - 0x31, 0x60, 0x0, 0x0, 0x0, 0x0, 0xd8, 0x8, 0x37, 0xce, 0xd, 0x92, 0x21, - 0x83, 0x68, 0x61, 0x87, 0x39, 0xce, 0x4d, 0xe, 0x92, 0x21, 0x87, 0x19, 0x8 - }; - u3_noun fol = u3s_cue_bytes(sizeof(buf_y), buf_y); - u3_noun gon; - c3_w i_w; - c3_i ret_i = 1; - - for ( i_w = 0; i_w < 3; i_w++ ) { - gon = u3m_soft(0, _nock_fol, u3k(fol)); - - if ( c3n == u3r_p(gon, c3__meme, 0) ) { - u3m_p("nock meme unexpected mote", u3h(gon)); - ret_i = 0; - u3z(gon); - break; - } - - u3z(gon); - } - - u3z(fol); - - return ret_i; -} - -static c3_i -_test_nock(void) -{ - c3_i ret_i = 1; - - if ( !_test_nock_meme() ) { - fprintf(stderr, "test nock meme: failed\r\n"); - ret_i = 0; - } - - return ret_i; -} - -/* main(): run all test cases. -*/ -int -main(int argc, char* argv[]) -{ - _setup(); - - if ( !_test_nock() ) { - fprintf(stderr, "test nock: failed\r\n"); - exit(1); - } - - // GC - // - u3m_grab(u3_none); - - fprintf(stderr, "test nock: ok\r\n"); - return 0; -} diff --git a/pkg/urbit/version b/pkg/urbit/version deleted file mode 100644 index 07fe6f6c9f..0000000000 --- a/pkg/urbit/version +++ /dev/null @@ -1 +0,0 @@ -1.15 \ No newline at end of file