From: <ph...@bo...> - 2000-09-02 05:50:56
|
[ David Dawes writes ] > ... > I've already made the change to share some files (like kernel/dri.h) > between bsd and linux in XFree86 4.0.1c (which will get folded into > the DRI CVS soon). This needs some more work, and ideally the files > that are largely OS-independent could be moved to somewhere more > appropriate. Hopefuly, you also mean most of the top level files like os-support/{bsd,linux/drm/xf*.c All the userland stuff. Looks like it really belongs in a separate subdirectory, "libDRI" or something like that. os-support/shared/dri, perhaps? A "diff " between each versions results in: zaphod$ ls -l *diff -rw-r--r-- 1 phil other 8670 Sep 1 22:44 xf86drm.c.diff -rw-r--r-- 1 phil other 509 Sep 1 22:44 xf86drmHash.c.diff -rw-r--r-- 1 phil other 55 Sep 1 22:44 xf86drmI810.c.diff -rw-r--r-- 1 phil other 55 Sep 1 22:44 xf86drmMga.c.diff -rw-r--r-- 1 phil other 747 Sep 1 22:44 xf86drmR128.c.diff -rw-r--r-- 1 phil other 515 Sep 1 22:44 xf86drmRandom.c.diff -rw-r--r-- 1 phil other 503 Sep 1 22:44 xf86drmSL.c.diff zaphod$ wc -l *diff 323 xf86drm.c.diff 10 xf86drmHash.c.diff 2 xf86drmI810.c.diff 2 xf86drmMga.c.diff 33 xf86drmR128.c.diff 10 xf86drmRandom.c.diff 10 xf86drmSL.c.diff Some things in there are highly os-dependant, merely because linux chooses to be different, eg: /proc/dri. So thats why xf86drm.c is the big difference. But on 90% of other UNIXen, all that stuff will be identical. So it should be common code, IMO. comments? (volunteers? :-) I'd volunteer to do the merge, but I dont have the hardware to do the validation testing on the results |