require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&__MACH64_DRM_H__)) {
    eval 'sub __MACH64_DRM_H__ () {1;}' unless defined(&__MACH64_DRM_H__);
    unless(defined(&__MACH64_SAREA_DEFINES__)) {
	eval 'sub __MACH64_SAREA_DEFINES__ () {1;}' unless defined(&__MACH64_SAREA_DEFINES__);
	eval 'sub MACH64_UPLOAD_DST_OFF_PITCH () {0x1;}' unless defined(&MACH64_UPLOAD_DST_OFF_PITCH);
	eval 'sub MACH64_UPLOAD_Z_OFF_PITCH () {0x2;}' unless defined(&MACH64_UPLOAD_Z_OFF_PITCH);
	eval 'sub MACH64_UPLOAD_Z_ALPHA_CNTL () {0x4;}' unless defined(&MACH64_UPLOAD_Z_ALPHA_CNTL);
	eval 'sub MACH64_UPLOAD_SCALE_3D_CNTL () {0x8;}' unless defined(&MACH64_UPLOAD_SCALE_3D_CNTL);
	eval 'sub MACH64_UPLOAD_DP_FOG_CLR () {0x10;}' unless defined(&MACH64_UPLOAD_DP_FOG_CLR);
	eval 'sub MACH64_UPLOAD_DP_WRITE_MASK () {0x20;}' unless defined(&MACH64_UPLOAD_DP_WRITE_MASK);
	eval 'sub MACH64_UPLOAD_DP_PIX_WIDTH () {0x40;}' unless defined(&MACH64_UPLOAD_DP_PIX_WIDTH);
	eval 'sub MACH64_UPLOAD_SETUP_CNTL () {0x80;}' unless defined(&MACH64_UPLOAD_SETUP_CNTL);
	eval 'sub MACH64_UPLOAD_MISC () {0x100;}' unless defined(&MACH64_UPLOAD_MISC);
	eval 'sub MACH64_UPLOAD_TEXTURE () {0x200;}' unless defined(&MACH64_UPLOAD_TEXTURE);
	eval 'sub MACH64_UPLOAD_TEX0IMAGE () {0x400;}' unless defined(&MACH64_UPLOAD_TEX0IMAGE);
	eval 'sub MACH64_UPLOAD_TEX1IMAGE () {0x800;}' unless defined(&MACH64_UPLOAD_TEX1IMAGE);
	eval 'sub MACH64_UPLOAD_CLIPRECTS () {0x1000;}' unless defined(&MACH64_UPLOAD_CLIPRECTS);
	eval 'sub MACH64_UPLOAD_CONTEXT () {0xff;}' unless defined(&MACH64_UPLOAD_CONTEXT);
	eval 'sub MACH64_UPLOAD_ALL () {0x1fff;}' unless defined(&MACH64_UPLOAD_ALL);
	eval 'sub MACH64_BUFFER_SIZE () {16384;}' unless defined(&MACH64_BUFFER_SIZE);
	eval 'sub MACH64_MAX_QUEUED_FRAMES () {3;}' unless defined(&MACH64_MAX_QUEUED_FRAMES);
	eval 'sub MACH64_HOSTDATA_BLIT_OFFSET () {104;}' unless defined(&MACH64_HOSTDATA_BLIT_OFFSET);
	eval 'sub MACH64_NR_SAREA_CLIPRECTS () {8;}' unless defined(&MACH64_NR_SAREA_CLIPRECTS);
	eval 'sub MACH64_CARD_HEAP () {0;}' unless defined(&MACH64_CARD_HEAP);
	eval 'sub MACH64_AGP_HEAP () {1;}' unless defined(&MACH64_AGP_HEAP);
	eval 'sub MACH64_NR_TEX_HEAPS () {2;}' unless defined(&MACH64_NR_TEX_HEAPS);
	eval 'sub MACH64_NR_TEX_REGIONS () {64;}' unless defined(&MACH64_NR_TEX_REGIONS);
	eval 'sub MACH64_LOG_TEX_GRANULARITY () {16;}' unless defined(&MACH64_LOG_TEX_GRANULARITY);
	eval 'sub MACH64_TEX_MAXLEVELS () {1;}' unless defined(&MACH64_TEX_MAXLEVELS);
	eval 'sub MACH64_NR_CONTEXT_REGS () {15;}' unless defined(&MACH64_NR_CONTEXT_REGS);
	eval 'sub MACH64_NR_TEXTURE_REGS () {4;}' unless defined(&MACH64_NR_TEXTURE_REGS);
    }
    eval 'sub DRM_MACH64_INIT () {0x;}' unless defined(&DRM_MACH64_INIT);
    eval 'sub DRM_MACH64_IDLE () {0x1;}' unless defined(&DRM_MACH64_IDLE);
    eval 'sub DRM_MACH64_RESET () {0x2;}' unless defined(&DRM_MACH64_RESET);
    eval 'sub DRM_MACH64_SWAP () {0x3;}' unless defined(&DRM_MACH64_SWAP);
    eval 'sub DRM_MACH64_CLEAR () {0x4;}' unless defined(&DRM_MACH64_CLEAR);
    eval 'sub DRM_MACH64_VERTEX () {0x5;}' unless defined(&DRM_MACH64_VERTEX);
    eval 'sub DRM_MACH64_BLIT () {0x6;}' unless defined(&DRM_MACH64_BLIT);
    eval 'sub DRM_MACH64_FLUSH () {0x7;}' unless defined(&DRM_MACH64_FLUSH);
    eval 'sub DRM_MACH64_GETPARAM () {0x8;}' unless defined(&DRM_MACH64_GETPARAM);
    eval 'sub DRM_IOCTL_MACH64_INIT () { &DRM_IOW(  &DRM_COMMAND_BASE +  &DRM_MACH64_INIT,  &drm_mach64_init_t);}' unless defined(&DRM_IOCTL_MACH64_INIT);
    eval 'sub DRM_IOCTL_MACH64_IDLE () { &DRM_IO(  &DRM_COMMAND_BASE +  &DRM_MACH64_IDLE );}' unless defined(&DRM_IOCTL_MACH64_IDLE);
    eval 'sub DRM_IOCTL_MACH64_RESET () { &DRM_IO(  &DRM_COMMAND_BASE +  &DRM_MACH64_RESET );}' unless defined(&DRM_IOCTL_MACH64_RESET);
    eval 'sub DRM_IOCTL_MACH64_SWAP () { &DRM_IO(  &DRM_COMMAND_BASE +  &DRM_MACH64_SWAP );}' unless defined(&DRM_IOCTL_MACH64_SWAP);
    eval 'sub DRM_IOCTL_MACH64_CLEAR () { &DRM_IOW(  &DRM_COMMAND_BASE +  &DRM_MACH64_CLEAR,  &drm_mach64_clear_t);}' unless defined(&DRM_IOCTL_MACH64_CLEAR);
    eval 'sub DRM_IOCTL_MACH64_VERTEX () { &DRM_IOW(  &DRM_COMMAND_BASE +  &DRM_MACH64_VERTEX,  &drm_mach64_vertex_t);}' unless defined(&DRM_IOCTL_MACH64_VERTEX);
    eval 'sub DRM_IOCTL_MACH64_BLIT () { &DRM_IOW(  &DRM_COMMAND_BASE +  &DRM_MACH64_BLIT,  &drm_mach64_blit_t);}' unless defined(&DRM_IOCTL_MACH64_BLIT);
    eval 'sub DRM_IOCTL_MACH64_FLUSH () { &DRM_IO(  &DRM_COMMAND_BASE +  &DRM_MACH64_FLUSH );}' unless defined(&DRM_IOCTL_MACH64_FLUSH);
    eval 'sub DRM_IOCTL_MACH64_GETPARAM () { &DRM_IOWR(  &DRM_COMMAND_BASE +  &DRM_MACH64_GETPARAM,  &drm_mach64_getparam_t);}' unless defined(&DRM_IOCTL_MACH64_GETPARAM);
    eval 'sub MACH64_FRONT () {0x1;}' unless defined(&MACH64_FRONT);
    eval 'sub MACH64_BACK () {0x2;}' unless defined(&MACH64_BACK);
    eval 'sub MACH64_DEPTH () {0x4;}' unless defined(&MACH64_DEPTH);
    eval 'sub MACH64_PRIM_POINTS () {0x;}' unless defined(&MACH64_PRIM_POINTS);
    eval 'sub MACH64_PRIM_LINES () {0x1;}' unless defined(&MACH64_PRIM_LINES);
    eval 'sub MACH64_PRIM_LINE_LOOP () {0x2;}' unless defined(&MACH64_PRIM_LINE_LOOP);
    eval 'sub MACH64_PRIM_LINE_STRIP () {0x3;}' unless defined(&MACH64_PRIM_LINE_STRIP);
    eval 'sub MACH64_PRIM_TRIANGLES () {0x4;}' unless defined(&MACH64_PRIM_TRIANGLES);
    eval 'sub MACH64_PRIM_TRIANGLE_STRIP () {0x5;}' unless defined(&MACH64_PRIM_TRIANGLE_STRIP);
    eval 'sub MACH64_PRIM_TRIANGLE_FAN () {0x6;}' unless defined(&MACH64_PRIM_TRIANGLE_FAN);
    eval 'sub MACH64_PRIM_QUADS () {0x7;}' unless defined(&MACH64_PRIM_QUADS);
    eval 'sub MACH64_PRIM_QUAD_STRIP () {0x8;}' unless defined(&MACH64_PRIM_QUAD_STRIP);
    eval 'sub MACH64_PRIM_POLYGON () {0x9;}' unless defined(&MACH64_PRIM_POLYGON);
    eval("sub MACH64_MODE_DMA_ASYNC () { 0; }") unless defined(&MACH64_MODE_DMA_ASYNC);
    eval("sub MACH64_MODE_DMA_SYNC () { 1; }") unless defined(&MACH64_MODE_DMA_SYNC);
    eval("sub MACH64_MODE_MMIO () { 2; }") unless defined(&MACH64_MODE_MMIO);
    eval("sub DRM_MACH64_INIT_DMA () { 0x01; }") unless defined(&DRM_MACH64_INIT_DMA);
    eval("sub DRM_MACH64_CLEANUP_DMA () { 0x02; }") unless defined(&DRM_MACH64_CLEANUP_DMA);
    eval("sub MACH64_PARAM_FRAMES_QUEUED () { 0x01; }") unless defined(&MACH64_PARAM_FRAMES_QUEUED);
    eval("sub MACH64_PARAM_IRQ_NR () { 0x02; }") unless defined(&MACH64_PARAM_IRQ_NR);
}
1;
