[sane-devel] Sane Compile - Parse Error

2007-06-12 Thread Hugh McMaster
Hi Allan,

On 09/06/07, m. allan noah wrote:
 but i though there was one in /mingw/include? if you remove that one,
 does it find the compiler one? you are getting out of my league here,
 can you tell? :)

No, stddef.h is not included in /mingw/include.  But, by adding
#include stddef.h
to the file, the compile gets past this stage.

Hugh



[sane-devel] Sane Compile - Parse Error

2007-06-09 Thread Hugh McMaster
Hi Allan,

On 08/06/07, m. wrote:
 On 6/8/07, Hugh McMaster wrote:
  I have heard from the MinGW lists.  The macro is not in the general
  stddef.h header, but in the header from the GCC package.  It is
  located in /mingw/lib/gcc/mingw32/3.4.5/include/stddef.h, not in
  /mingw/include.

 ask them how you can #include that file, and should it be in addition
 or instead of their 'regular' stddef.h?

The MinGW list response was:

It's a standard header, and is meant to be used simply as #include
stddef.h.  There is no need for it to be in /mingw/include.  The
compiler knows how to find its own headers.

Hugh



[sane-devel] Sane Compile - Parse Error

2007-06-09 Thread m. allan noah
On 6/9/07, Hugh McMaster dasjournal at gmail.com wrote:
 Hi Allan,

 On 08/06/07, m. wrote:
  On 6/8/07, Hugh McMaster wrote:
   I have heard from the MinGW lists.  The macro is not in the general
   stddef.h header, but in the header from the GCC package.  It is
   located in /mingw/lib/gcc/mingw32/3.4.5/include/stddef.h, not in
   /mingw/include.
 
  ask them how you can #include that file, and should it be in addition
  or instead of their 'regular' stddef.h?

 The MinGW list response was:

 It's a standard header, and is meant to be used simply as #include
 stddef.h.  There is no need for it to be in /mingw/include.  The
 compiler knows how to find its own headers.

but i though there was one in /mingw/include? if you remove that one,
does it find the compiler one? you are getting out of my league here,
can you tell? :)

allan

-- 
The truth is an offense, but not a sin



[sane-devel] Sane Compile - Parse Error

2007-06-08 Thread Hugh McMaster
I'll find out.

Hugh

On 07/06/07, m. allan noah wrote:
 weird. can you ask around on the mingw lists and see where they put
 offsetof? we should get it from them instead of defining it
 ourselves...



[sane-devel] Sane Compile - Parse Error

2007-06-08 Thread Hugh McMaster
Hi Allan,

On 07/06/07, m. allan noah wrote:
 weird. can you ask around on the mingw lists and see where they put
 offsetof? we should get it from them instead of defining it ourselves...

I have heard from the MinGW lists.  The macro is not in the general
stddef.h header, but in the header from the GCC package.  It is
located in /mingw/lib/gcc/mingw32/3.4.5/include/stddef.h, not in
/mingw/include.

What should happen now?

Hugh



[sane-devel] Sane Compile - Parse Error

2007-06-08 Thread m. allan noah
On 6/8/07, Hugh McMaster dasjournal at gmail.com wrote:
 Hi Allan,

 On 07/06/07, m. allan noah wrote:
  weird. can you ask around on the mingw lists and see where they put
  offsetof? we should get it from them instead of defining it ourselves...

 I have heard from the MinGW lists.  The macro is not in the general
 stddef.h header, but in the header from the GCC package.  It is
 located in /mingw/lib/gcc/mingw32/3.4.5/include/stddef.h, not in
 /mingw/include.

ask them how you can #include that file, and should it be in addition
or instead of their 'regular' stddef.h?

allan


 What should happen now?

 Hugh



-- 
The truth is an offense, but not a sin



[sane-devel] Sane Compile - Parse Error

2007-06-07 Thread Hugh McMaster
Hi Allan,

On 05/06/07, m. allan noah wrote:
 hmm, no offsetof macro in mingw's c lib? or maybe the correct header
 is not included on mingw build (usually stddef.h)?

 if you cant find it, you could try adding this to sanei-scsi.h

 #define offsetof(TYPE, MEMBER) ((size_t)  (((TYPE*) 0)-MEMBER))

 just to see if that works.


The header stddef.h was already in the appropriate location.  Adding
the #define got it to work past the error.

Thankyou.

Hugh



[sane-devel] Sane Compile - Parse Error

2007-06-07 Thread m. allan noah
On 6/7/07, Hugh McMaster dasjournal at gmail.com wrote:
 Hi Allan,

 On 05/06/07, m. allan noah wrote:
  hmm, no offsetof macro in mingw's c lib? or maybe the correct header
  is not included on mingw build (usually stddef.h)?
 
  if you cant find it, you could try adding this to sanei-scsi.h
 
  #define offsetof(TYPE, MEMBER) ((size_t)  (((TYPE*) 0)-MEMBER))
 
  just to see if that works.


 The header stddef.h was already in the appropriate location.  Adding
 the #define got it to work past the error.

 Thankyou.


weird. can you ask around on the mingw lists and see where they put
offsetof? we should get it from them instead of defining it
ourselves...

allan

-- 
The truth is an offense, but not a sin



[sane-devel] Sane Compile - Parse Error

2007-06-05 Thread Hugh McMaster
Hi Allan,

On 04/06/07, m. allan noah wrote:
 platform/compiler/clibrary version info?

Platform: MinGW (from Cygwin)
Compiler: GCC 3.4.4

I'm not sure what you mean by C library version.

Hugh

 On 6/4/07, Hugh McMaster wrote:
  Hi everyone,
 
  I am trying to compile Sane, and everything is working, until the
  compiler exits during the 'make' process with:
 
  sanei_scsi.c: In function `sanei_scsi_open':
  sanei_scsi.c:1220: warning: assignment makes integer from pointer without a 
  cast
  sanei_scsi.c:1222: warning: comparison between pointer and integer
  sanei_scsi.c:855: warning: unused variable `real_dev'
  sanei_scsi.c: In function `sanei_scsi_close':
  sanei_scsi.c:1572: warning: passing arg 1 of `CloseHandle' makes
  pointer from integer without a cast
  sanei_scsi.c: In function `sanei_scsi_cmd2':
  sanei_scsi.c:4755: warning: assignment discards qualifiers from
  pointer target type
  sanei_scsi.c:4763: warning: implicit declaration of function `offsetof'
  sanei_scsi.c:4763: error: parse error before struct
  sanei_scsi.c:4770: warning: passing arg 1 of `DeviceIoControl' makes
  pointer from integer without a cast
  sanei_scsi.c: At top level:
  sanei_scsi.c:5833: warning: unused parameter 'fd'
  sanei_scsi.c:5824: warning: unused parameter 'id'
  sanei_scsi.c:5819: warning: unused parameter 'idp'
  sanei_scsi.c:4809: warning: unused parameter 'findtype'
 
  I'm not worried about the unused parameters, as those often come up
  during compiling of any sources.  I'm just concerned about the error.
  I'm using the CVS version from June 17 2007.



[sane-devel] Sane Compile - Parse Error

2007-06-05 Thread m. allan noah
hmm, no offsetof macro in mingw's c lib? or maybe the correct header
is not included on mingw build (usually stddef.h)?

if you cant find it, you could try adding this to sanei-scsi.h

#define offsetof(TYPE, MEMBER) ((size_t)  (((TYPE*) 0)-MEMBER))

just to see if that works.

allan

On 6/5/07, Hugh McMaster dasjournal at gmail.com wrote:
 Hi Allan,

 On 04/06/07, m. allan noah wrote:
  platform/compiler/clibrary version info?

 Platform: MinGW (from Cygwin)
 Compiler: GCC 3.4.4

 I'm not sure what you mean by C library version.

 Hugh

  On 6/4/07, Hugh McMaster wrote:
   Hi everyone,
  
   I am trying to compile Sane, and everything is working, until the
   compiler exits during the 'make' process with:
  
   sanei_scsi.c: In function `sanei_scsi_open':
   sanei_scsi.c:1220: warning: assignment makes integer from pointer without 
   a cast
   sanei_scsi.c:1222: warning: comparison between pointer and integer
   sanei_scsi.c:855: warning: unused variable `real_dev'
   sanei_scsi.c: In function `sanei_scsi_close':
   sanei_scsi.c:1572: warning: passing arg 1 of `CloseHandle' makes
   pointer from integer without a cast
   sanei_scsi.c: In function `sanei_scsi_cmd2':
   sanei_scsi.c:4755: warning: assignment discards qualifiers from
   pointer target type
   sanei_scsi.c:4763: warning: implicit declaration of function `offsetof'
   sanei_scsi.c:4763: error: parse error before struct
   sanei_scsi.c:4770: warning: passing arg 1 of `DeviceIoControl' makes
   pointer from integer without a cast
   sanei_scsi.c: At top level:
   sanei_scsi.c:5833: warning: unused parameter 'fd'
   sanei_scsi.c:5824: warning: unused parameter 'id'
   sanei_scsi.c:5819: warning: unused parameter 'idp'
   sanei_scsi.c:4809: warning: unused parameter 'findtype'
  
   I'm not worried about the unused parameters, as those often come up
   during compiling of any sources.  I'm just concerned about the error.
   I'm using the CVS version from June 17 2007.



-- 
The truth is an offense, but not a sin



[sane-devel] Sane Compile - Parse Error

2007-06-04 Thread Hugh McMaster
Hi everyone,

I am trying to compile Sane, and everything is working, until the
compiler exits during the 'make' process with:

sanei_scsi.c: In function `sanei_scsi_open':
sanei_scsi.c:1220: warning: assignment makes integer from pointer without a cast
sanei_scsi.c:1222: warning: comparison between pointer and integer
sanei_scsi.c:855: warning: unused variable `real_dev'
sanei_scsi.c: In function `sanei_scsi_close':
sanei_scsi.c:1572: warning: passing arg 1 of `CloseHandle' makes
pointer from integer without a cast
sanei_scsi.c: In function `sanei_scsi_cmd2':
sanei_scsi.c:4755: warning: assignment discards qualifiers from
pointer target type
sanei_scsi.c:4763: warning: implicit declaration of function `offsetof'
sanei_scsi.c:4763: error: parse error before struct
sanei_scsi.c:4770: warning: passing arg 1 of `DeviceIoControl' makes
pointer from integer without a cast
sanei_scsi.c: At top level:
sanei_scsi.c:5833: warning: unused parameter 'fd'
sanei_scsi.c:5824: warning: unused parameter 'id'
sanei_scsi.c:5819: warning: unused parameter 'idp'
sanei_scsi.c:4809: warning: unused parameter 'findtype'

I'm not worried about the unused parameters, as those often come up
during compiling of any sources.  I'm just concerned about the error.
I'm using the CVS version from June 17 2007.

Thankyou.

Hugh



[sane-devel] Sane Compile - Parse Error

2007-06-04 Thread m. allan noah
platform/compiler/clibrary version info?

allan

On 6/4/07, Hugh McMaster dasjournal at gmail.com wrote:
 Hi everyone,

 I am trying to compile Sane, and everything is working, until the
 compiler exits during the 'make' process with:

 sanei_scsi.c: In function `sanei_scsi_open':
 sanei_scsi.c:1220: warning: assignment makes integer from pointer without a 
 cast
 sanei_scsi.c:1222: warning: comparison between pointer and integer
 sanei_scsi.c:855: warning: unused variable `real_dev'
 sanei_scsi.c: In function `sanei_scsi_close':
 sanei_scsi.c:1572: warning: passing arg 1 of `CloseHandle' makes
 pointer from integer without a cast
 sanei_scsi.c: In function `sanei_scsi_cmd2':
 sanei_scsi.c:4755: warning: assignment discards qualifiers from
 pointer target type
 sanei_scsi.c:4763: warning: implicit declaration of function `offsetof'
 sanei_scsi.c:4763: error: parse error before struct
 sanei_scsi.c:4770: warning: passing arg 1 of `DeviceIoControl' makes
 pointer from integer without a cast
 sanei_scsi.c: At top level:
 sanei_scsi.c:5833: warning: unused parameter 'fd'
 sanei_scsi.c:5824: warning: unused parameter 'id'
 sanei_scsi.c:5819: warning: unused parameter 'idp'
 sanei_scsi.c:4809: warning: unused parameter 'findtype'

 I'm not worried about the unused parameters, as those often come up
 during compiling of any sources.  I'm just concerned about the error.
 I'm using the CVS version from June 17 2007.

 Thankyou.

 Hugh

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
  to sane-devel-request at lists.alioth.debian.org



-- 
The truth is an offense, but not a sin