require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&FBIO_H)) {
    eval 'sub FBIO_H () {1;}' unless defined(&FBIO_H);
    require 'sys/ioccom.ph';
    eval 'sub FBTYPE_SUN1BW () {0;}' unless defined(&FBTYPE_SUN1BW);
    eval 'sub FBTYPE_SUN1COLOR () {1;}' unless defined(&FBTYPE_SUN1COLOR);
    eval 'sub FBTYPE_SUN2BW () {2;}' unless defined(&FBTYPE_SUN2BW);
    eval 'sub FBTYPE_SUN2COLOR () {3;}' unless defined(&FBTYPE_SUN2COLOR);
    eval 'sub FBTYPE_SUN2GP () {4;}' unless defined(&FBTYPE_SUN2GP);
    eval 'sub FBTYPE_SUN5COLOR () {5;}' unless defined(&FBTYPE_SUN5COLOR);
    eval 'sub FBTYPE_SUN3COLOR () {6;}' unless defined(&FBTYPE_SUN3COLOR);
    eval 'sub FBTYPE_MEMCOLOR () {7;}' unless defined(&FBTYPE_MEMCOLOR);
    eval 'sub FBTYPE_SUN4COLOR () {8;}' unless defined(&FBTYPE_SUN4COLOR);
    eval 'sub FBTYPE_NOTSUN1 () {9;}' unless defined(&FBTYPE_NOTSUN1);
    eval 'sub FBTYPE_NOTSUN2 () {10;}' unless defined(&FBTYPE_NOTSUN2);
    eval 'sub FBTYPE_NOTSUN3 () {11;}' unless defined(&FBTYPE_NOTSUN3);
    eval 'sub FBTYPE_SUNFAST_COLOR () {12;}' unless defined(&FBTYPE_SUNFAST_COLOR);
    eval 'sub FBTYPE_SUNROP_COLOR () {13;}' unless defined(&FBTYPE_SUNROP_COLOR);
    eval 'sub FBTYPE_SUNFB_VIDEO () {14;}' unless defined(&FBTYPE_SUNFB_VIDEO);
    eval 'sub FBTYPE_RESERVED5 () {15;}' unless defined(&FBTYPE_RESERVED5);
    eval 'sub FBTYPE_RESERVED4 () {16;}' unless defined(&FBTYPE_RESERVED4);
    eval 'sub FBTYPE_RESERVED3 () {17;}' unless defined(&FBTYPE_RESERVED3);
    eval 'sub FBTYPE_SUNGP3 () {17;}' unless defined(&FBTYPE_SUNGP3);
    eval 'sub FBTYPE_SUNGT () {18;}' unless defined(&FBTYPE_SUNGT);
    eval 'sub FBTYPE_SUNLEO () {19;}' unless defined(&FBTYPE_SUNLEO);
    eval 'sub FBTYPE_MDICOLOR () {20;}' unless defined(&FBTYPE_MDICOLOR);
    eval 'sub FBTYPE_P9100 () {21;}' unless defined(&FBTYPE_P9100);
    eval 'sub FBTYPE_CREATOR () {22;}' unless defined(&FBTYPE_CREATOR);
    eval 'sub FBTYPE_GENERIC_PCI () {23;}' unless defined(&FBTYPE_GENERIC_PCI);
    eval 'sub FBTYPE_AG10E () {24;}' unless defined(&FBTYPE_AG10E);
    eval 'sub FBTYPE_TCXCOLOR () {25;}' unless defined(&FBTYPE_TCXCOLOR);
    eval 'sub FBTYPE_MGX () {26;}' unless defined(&FBTYPE_MGX);
    eval 'sub FBTYPE_LASTPLUSONE () {27;}' unless defined(&FBTYPE_LASTPLUSONE);
    eval 'sub PMAX_FBTYPE_PM_MONO () {1;}' unless defined(&PMAX_FBTYPE_PM_MONO);
    eval 'sub PMAX_FBTYPE_PM_COLOR () {2;}' unless defined(&PMAX_FBTYPE_PM_COLOR);
    eval 'sub PMAX_FBTYPE_CFB () {3;}' unless defined(&PMAX_FBTYPE_CFB);
    eval 'sub PMAX_FBTYPE_XCFB () {4;}' unless defined(&PMAX_FBTYPE_XCFB);
    eval 'sub PMAX_FBTYPE_MFB () {5;}' unless defined(&PMAX_FBTYPE_MFB);
    eval 'sub PMAX_FBTYPE_SFB () {6;}' unless defined(&PMAX_FBTYPE_SFB);
    eval 'sub PMAX_FBTYPE_PX () {7;}' unless defined(&PMAX_FBTYPE_PX);
    eval 'sub PMAX_FBTYPE_LASTPLUSONE () {8;}' unless defined(&PMAX_FBTYPE_LASTPLUSONE);
    eval 'sub FBIOGTYPE () { &_IOR(ord(\'F\'), 0, \'struct fbtype\');}' unless defined(&FBIOGTYPE);
    if(defined(&notdef)) {
	eval 'sub FBIOGINFO () { &_IOR(ord(\'F\'), 2, \'struct fbinfo\');}' unless defined(&FBIOGINFO);
    }
    eval 'sub FBIOPUTCMAP () { &_IOW(ord(\'F\'), 3, \'struct fbcmap\');}' unless defined(&FBIOPUTCMAP);
    eval 'sub FBIOGETCMAP () { &_IOW(ord(\'F\'), 4, \'struct fbcmap\');}' unless defined(&FBIOGETCMAP);
    eval 'sub FB_ATTR_NDEVSPECIFIC () {8;}' unless defined(&FB_ATTR_NDEVSPECIFIC);
    eval 'sub FB_ATTR_NEMUTYPES () {4;}' unless defined(&FB_ATTR_NEMUTYPES);
    eval 'sub FB_ATTR_AUTOINIT () {1;}' unless defined(&FB_ATTR_AUTOINIT);
    eval 'sub FB_ATTR_DEVSPECIFIC () {2;}' unless defined(&FB_ATTR_DEVSPECIFIC);
    eval 'sub FBIOGATTR () { &_IOR(ord(\'F\'), 6, \'struct fbgattr\');}' unless defined(&FBIOGATTR);
    eval 'sub FBVIDEO_OFF () {0;}' unless defined(&FBVIDEO_OFF);
    eval 'sub FBVIDEO_ON () {1;}' unless defined(&FBVIDEO_ON);
    eval 'sub FBIOSVIDEO () { &_IOW(ord(\'F\'), 7, \'int\');}' unless defined(&FBIOSVIDEO);
    eval 'sub FBIOGVIDEO () { &_IOR(ord(\'F\'), 8, \'int\');}' unless defined(&FBIOGVIDEO);
    eval 'sub FB_CUR_SETCUR () {0x1;}' unless defined(&FB_CUR_SETCUR);
    eval 'sub FB_CUR_SETPOS () {0x2;}' unless defined(&FB_CUR_SETPOS);
    eval 'sub FB_CUR_SETHOT () {0x4;}' unless defined(&FB_CUR_SETHOT);
    eval 'sub FB_CUR_SETCMAP () {0x8;}' unless defined(&FB_CUR_SETCMAP);
    eval 'sub FB_CUR_SETSHAPE () {0x10;}' unless defined(&FB_CUR_SETSHAPE);
    eval 'sub FB_CUR_SETALL () {0x1f;}' unless defined(&FB_CUR_SETALL);
    eval 'sub FBIOSCURSOR () { &_IOW(ord(\'F\'), 24, \'struct fbcursor\');}' unless defined(&FBIOSCURSOR);
    eval 'sub FBIOGCURSOR () { &_IOWR(ord(\'F\'), 25, \'struct fbcursor\');}' unless defined(&FBIOGCURSOR);
    eval 'sub FBIOSCURPOS () { &_IOW(ord(\'F\'), 26, \'struct fbcurpos\');}' unless defined(&FBIOSCURPOS);
    eval 'sub FBIOGCURPOS () { &_IOW(ord(\'F\'), 27, \'struct fbcurpos\');}' unless defined(&FBIOGCURPOS);
    eval 'sub FBIOGCURMAX () { &_IOR(ord(\'F\'), 28, \'struct fbcurpos\');}' unless defined(&FBIOGCURMAX);
}
1;
