Re: #include <sane...> instead of "sane..."

From: Oliver Rauch (oliver.rauch@Wolfsburg.DE)
Date: Tue Oct 31 2000 - 10:45:35 PST

  • Next message: Henning Meier-Geinitz: "Re: #include <sane...> instead of "sane...""

    Petter Reinholdtsen wrote:
    >
    > If you check the cpp manual page, it will tell you changing <> to ""
    > only adds searching in the current directory. I can not see why this
    > gives any advantages when compiling SANE.
    >
    > What am I missing?
    >

    Hi Petter,

    you are right at that point and I see that we are still doing it wrong.

    The problem is the following:

    We have some files in the sourcepackage in sane*/include/sane/...
    some of these files (sane.h and saneopts.h) may also be installed
    in the system directory.

    In the moment we add the sane*/include directory with "-I../include"
    As far as I know it is not defined in which order the directories
    specified with "-I" and the system include directories are searched.
    (I know some users had problems because of that).
    This way it may happen that an old sane.h / saneopts.h file
    (and in the moment also a lot of sanei_* files that are installed
    although they should not be installed)
    from the system directory is used instead of the one included in the
    sane source package.

    This problem normally does not occur because the source header files
    normally are placed in the directory where the sourcecode (*.c)
    is placed. But we put the header files in an own directory.

    So a correct way would be to use
            #include "../include/sane/sane.h"
    this file/path is searched at first from the local directory
    so we can be sure that the file that comes with the sourcepackage
    is used.

    Bye
    Oliver

    -- 
    Homepage:	http://www.wolfsburg.de/~rauch
    sane-umax:	http://www.wolfsburg.de/~rauch/sane/sane-umax.html
    xsane:		http://www.wolfsburg.de/~rauch/sane/sane-xsane.html
    E-Mail:		mailto:Oliver.Rauch@Wolfsburg.DE
    

    -- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com



    This archive was generated by hypermail 2b29 : Tue Oct 31 2000 - 10:54:00 PST