1#ifdef SG_KERNEL_INCLUDES
2  #include "/usr/src/linux/include/scsi/sg.h"
3  #include "/usr/src/linux/include/scsi/scsi.h"
4#else
5  #ifdef SG_TRICK_GNU_INCLUDES
6    #include <linux/../scsi/sg.h>
7    #include <linux/../scsi/scsi.h>
8  #else
9    #include <scsi/sg.h>
10    #include <scsi/scsi.h>
11  #endif
12#endif
13
14/*
15  Getting the correct include files for the sg interface can be an ordeal.
16  In a perfect world, one would just write:
17    #include <scsi/sg.h>
18    #include <scsi/scsi.h>
19  This would include the files found in the /usr/include/scsi directory.
20  Those files are maintained with the GNU library which may or may not
21  agree with the kernel and version of sg driver that is running. Any
22  many cases this will not matter. However in some it might, for example
23  glibc 2.1's include files match the sg driver found in the lk 2.2
24  series. Hence if glibc 2.1 is used with lk 2.4 then the additional
25  sg v3 interface will not be visible.
26  If this is a problem then defining SG_KERNEL_INCLUDES will access the
27  kernel supplied header files (assuming they are in the normal place).
28  The GNU library maintainers and various kernel people don't like
29  this approach (but it does work).
30  The technique selected by defining SG_TRICK_GNU_INCLUDES worked (and
31  was used) prior to glibc 2.2 . Prior to that version /usr/include/linux
32  was a symbolic link to /usr/src/linux/include/linux .
33
34  There are other approaches if this include "mixup" causes pain. These
35  would involve include files being copied or symbolic links being
36  introduced.
37
38  Sorry about the inconvenience. Typically neither SG_KERNEL_INCLUDES
39  nor SG_TRICK_GNU_INCLUDES is defined.
40
41  dpg 20010415
42*/
43