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

From: Oliver Rauch (oliver.rauch@Wolfsburg.DE)
Date: Wed Nov 01 2000 - 09:03:08 PST

- Next message: Oliver Rauch: "Re: sane-config"
  - Previous message: William L. Sebok: "Re: [snapscan] Core testing group"
  - Next in thread: Jochen Eisinger: "Re: #include <sane...> instead of "sane...""
  - Reply: Jochen Eisinger: "Re: #include <sane...> instead of "sane...""
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  Petter Reinholdtsen wrote:
  >
  > [Oliver Rauch]
  > > 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).
  >
  > Eh, I am pretty sure they are searched in the order they are specified
  > on the command line. A simple test shows this to be true on Linux /
  > GCC at least. I believe this to be true for all Unix C compilers, and
  > probably all sensible C compilers. Where did users have problems
  > because of another include search order?
  >
  > I suggest making sure "-I../include/sane " is the first -I statement
  > when compiling, and leave it at that.
  >

  Hi Petter,

  it may be right that the path is searched in the order of the -I options,
  but it looks like some compilers do use at first the system include paths
  and after that the ones given by -I.
  I don`t remember it exactly, it has been about 1 year ago.
  The users were not able to compile sane and after they removed
  /usr/local/include/sane everything worked fine.

  It does not look like a problem that does occur often, but
  I also do not see a problem to change all to
  #include "../include/sane/sane*"

  It has another side effect: The one who reads the sourcecode
  knows which file is wanted, when I read a
  #include "sane/sane*"
  I expect at first that a system file is included

  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

  - Next message: Oliver Rauch: "Re: sane-config"
  - Previous message: William L. Sebok: "Re: [snapscan] Core testing group"
  - Next in thread: Jochen Eisinger: "Re: #include <sane...> instead of "sane...""
  - Reply: Jochen Eisinger: "Re: #include <sane...> instead of "sane...""
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Wed Nov 01 2000 - 09:01:41 PST