public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: compiling file 3.26
       [not found] <Pine.GSU.4.05.9903070052510.15188-100000@viking.cris.com>
@ 1999-03-07  8:37 ` Corinna Vinschen
       [not found]   ` < 36E29663.7B7D74A8@cityweb.de >
  1999-03-31 19:45   ` Corinna Vinschen
  0 siblings, 2 replies; 12+ messages in thread
From: Corinna Vinschen @ 1999-03-07  8:37 UTC (permalink / raw)
  To: John Zheng, cygwin

John Zheng wrote:
> 
> Corinna,
> 
> I downloaded file-3.26.tar.gz from ftp.astron.com, and tried to compile it.
> 
> Near the end of compilation, I get the error:
> [...]
> /a/cygnus/file-3.26/file.c:202: undefined reference to `errno'
> [...]
> Do you know what the problem is?  errno appears to be defined as:
> 
> extern int errno;               /* Some unixes don't define this..      */

The `extern' declaration of errno must be substituted with

#include <errno.h>

Cygwin defines errno not as a global variable, but as a
#define to a function call. This is needed, because it
wouldn't be reentrant else.

Regards,
Corinna



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
       [not found]   ` < 36E29663.7B7D74A8@cityweb.de >
@ 1999-03-07 11:35     ` John Zheng
  1999-03-07 11:42       ` Corinna Vinschen
  1999-03-31 19:45       ` John Zheng
  0 siblings, 2 replies; 12+ messages in thread
From: John Zheng @ 1999-03-07 11:35 UTC (permalink / raw)
  To: Corinna Vinschen; +Cc: cygwin

Ah yes,

Adding the line

#include <errno.h>

to the file file.h did the trick.  It also worked, and may be more "correct,"
to add the line to the files file.c, fsmagic.c, and compress.c.  Perhaps the
need to make one of these changes should be documented at
http://aquarius.franken.de/docs/develop/gnuwin32/GNUWin32.txt ?

Also, do you know if there is a version of gnu tar for win32 that supports
writing to remote unix tape devices that run rmt?  I would like to be able
to do something like

tar -cf tapeserver.domain.com:/dev/rst0 c:\

and have tar write to my tape drive residing on the machine tapeserver.

Thanks again for your help.

John

On Sun, 7 Mar 1999, Corinna Vinschen wrote:

> John Zheng wrote:
> > 
> > Corinna,
> > 
> > I downloaded file-3.26.tar.gz from ftp.astron.com, and tried to compile it.
> > 
> > Near the end of compilation, I get the error:
> > [...]
> > /a/cygnus/file-3.26/file.c:202: undefined reference to `errno'
> > [...]
> > Do you know what the problem is?  errno appears to be defined as:
> > 
> > extern int errno;               /* Some unixes don't define this..      */
> 
> The `extern' declaration of errno must be substituted with
> 
> #include <errno.h>
> 
> Cygwin defines errno not as a global variable, but as a
> #define to a function call. This is needed, because it
> wouldn't be reentrant else.
> 
> Regards,
> Corinna
> 
> 
> 


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
  1999-03-07 11:35     ` John Zheng
@ 1999-03-07 11:42       ` Corinna Vinschen
  1999-03-07 11:48         ` Corinna Vinschen
  1999-03-31 19:45         ` Corinna Vinschen
  1999-03-31 19:45       ` John Zheng
  1 sibling, 2 replies; 12+ messages in thread
From: Corinna Vinschen @ 1999-03-07 11:42 UTC (permalink / raw)
  To: John Zheng; +Cc: cygwin

John Zheng wrote:
> 
> Ah yes,
> 
> Adding the line
> 
> #include <errno.h>
> 
> to the file file.h did the trick.  It also worked, and may be more "correct,"
> to add the line to the files file.c, fsmagic.c, and compress.c.  Perhaps the
> need to make one of these changes should be documented at
> http://aquarius.franken.de/docs/develop/gnuwin32/GNUWin32.txt ?

Yes, should be done so.

> Also, do you know if there is a version of gnu tar for win32 that supports
> writing to remote unix tape devices that run rmt?  I would like to be able
> to do something like
> 
> tar -cf tapeserver.domain.com:/dev/rst0 c:\

AFAIK, gnu tar supports it anyway, `rmt' is part of the original package.
I've never used it.

Regards,
Corinna

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
  1999-03-07 11:42       ` Corinna Vinschen
@ 1999-03-07 11:48         ` Corinna Vinschen
       [not found]           ` < 36E2D7B7.CB124407@cityweb.de >
  1999-03-31 19:45           ` Corinna Vinschen
  1999-03-31 19:45         ` Corinna Vinschen
  1 sibling, 2 replies; 12+ messages in thread
From: Corinna Vinschen @ 1999-03-07 11:48 UTC (permalink / raw)
  To: John Zheng, cygwin

Corinna Vinschen wrote:
> 
> John Zheng wrote:
> >
> > Ah yes,
> >
> > Adding the line
> >
> > #include <errno.h>
> >
> > to the file file.h did the trick.  It also worked, and may be more "correct,"
> > to add the line to the files file.c, fsmagic.c, and compress.c.  Perhaps the
> > need to make one of these changes should be documented at
> > http://aquarius.franken.de/docs/develop/gnuwin32/GNUWin32.txt ?
> 
> Yes, should be done so.

BTW: On my ftp site, you already could find a `file3.26-patch'!
The README, which is also part of the GNUWin32.txt, contains the
lines: 

	- preliminaries
	  - patch file `file3.26-patch' included

Regards,
Corinna

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
       [not found]           ` < 36E2D7B7.CB124407@cityweb.de >
@ 1999-03-07 13:37             ` John Zheng
  1999-03-07 13:45               ` Corinna Vinschen
  1999-03-31 19:45               ` John Zheng
  0 siblings, 2 replies; 12+ messages in thread
From: John Zheng @ 1999-03-07 13:37 UTC (permalink / raw)
  To: Corinna Vinschen; +Cc: cygwin

Okay, I've figured it out now...

First, it should be clarified on the GNUWin32.txt page that the
file3.26-patch file is found at
ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Vinschen_Corinna/B20
and not at ftp.astron.com/pub/file.  Perhaps just a general note up top that
patch files done by Corinna are found at ftp.franken.de.

Also, I had problems applying the patch because <tab> in the original source
files were translated to <spaces> in the file3.26-patch file, and a couple
extra line feeds were added.  I've attached a modified file3.26-patch file
that works.

One more question.  When I compile file.exe, my resulting file.exe ends up
being 382,463 bytes.  The version you have on your ftp server is only 23,552
bytes.  How do you get the compile to make it so small?

John

On Sun, 7 Mar 1999, Corinna Vinschen wrote:

> Corinna Vinschen wrote:
> > 
> > John Zheng wrote:
> > >
> > > Ah yes,
> > >
> > > Adding the line
> > >
> > > #include <errno.h>
> > >
> > > to the file file.h did the trick.  It also worked, and may be more "correct,"
> > > to add the line to the files file.c, fsmagic.c, and compress.c.  Perhaps the
> > > need to make one of these changes should be documented at
> > > http://aquarius.franken.de/docs/develop/gnuwin32/GNUWin32.txt ?
> > 
> > Yes, should be done so.
> 
> BTW: On my ftp site, you already could find a `file3.26-patch'!
> The README, which is also part of the GNUWin32.txt, contains the
> lines: 
> 
> 	- preliminaries
> 	  - patch file `file3.26-patch' included
> 
> Regards,
> Corinna
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
  1999-03-07 13:37             ` John Zheng
@ 1999-03-07 13:45               ` Corinna Vinschen
  1999-03-31 19:45                 ` Corinna Vinschen
  1999-03-31 19:45               ` John Zheng
  1 sibling, 1 reply; 12+ messages in thread
From: Corinna Vinschen @ 1999-03-07 13:45 UTC (permalink / raw)
  To: John Zheng; +Cc: cygwin

John Zheng wrote:
> [...]
> One more question.  When I compile file.exe, my resulting file.exe ends up
> being 382,463 bytes.  The version you have on your ftp server is only 23,552
> bytes.  How do you get the compile to make it so small?

Erase the symbol table from the binary via

	strip file.exe

or call gcc with strip option `-s' in link stage.

Regards,
Corinna

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
  1999-03-07  8:37 ` compiling file 3.26 Corinna Vinschen
       [not found]   ` < 36E29663.7B7D74A8@cityweb.de >
@ 1999-03-31 19:45   ` Corinna Vinschen
  1 sibling, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 1999-03-31 19:45 UTC (permalink / raw)
  To: John Zheng, cygwin

John Zheng wrote:
> 
> Corinna,
> 
> I downloaded file-3.26.tar.gz from ftp.astron.com, and tried to compile it.
> 
> Near the end of compilation, I get the error:
> [...]
> /a/cygnus/file-3.26/file.c:202: undefined reference to `errno'
> [...]
> Do you know what the problem is?  errno appears to be defined as:
> 
> extern int errno;               /* Some unixes don't define this..      */

The `extern' declaration of errno must be substituted with

#include <errno.h>

Cygwin defines errno not as a global variable, but as a
#define to a function call. This is needed, because it
wouldn't be reentrant else.

Regards,
Corinna



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
  1999-03-07 11:48         ` Corinna Vinschen
       [not found]           ` < 36E2D7B7.CB124407@cityweb.de >
@ 1999-03-31 19:45           ` Corinna Vinschen
  1 sibling, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 1999-03-31 19:45 UTC (permalink / raw)
  To: John Zheng, cygwin

Corinna Vinschen wrote:
> 
> John Zheng wrote:
> >
> > Ah yes,
> >
> > Adding the line
> >
> > #include <errno.h>
> >
> > to the file file.h did the trick.  It also worked, and may be more "correct,"
> > to add the line to the files file.c, fsmagic.c, and compress.c.  Perhaps the
> > need to make one of these changes should be documented at
> > http://aquarius.franken.de/docs/develop/gnuwin32/GNUWin32.txt ?
> 
> Yes, should be done so.

BTW: On my ftp site, you already could find a `file3.26-patch'!
The README, which is also part of the GNUWin32.txt, contains the
lines: 

	- preliminaries
	  - patch file `file3.26-patch' included

Regards,
Corinna

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
  1999-03-07 13:45               ` Corinna Vinschen
@ 1999-03-31 19:45                 ` Corinna Vinschen
  0 siblings, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 1999-03-31 19:45 UTC (permalink / raw)
  To: John Zheng; +Cc: cygwin

John Zheng wrote:
> [...]
> One more question.  When I compile file.exe, my resulting file.exe ends up
> being 382,463 bytes.  The version you have on your ftp server is only 23,552
> bytes.  How do you get the compile to make it so small?

Erase the symbol table from the binary via

	strip file.exe

or call gcc with strip option `-s' in link stage.

Regards,
Corinna

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
  1999-03-07 11:35     ` John Zheng
  1999-03-07 11:42       ` Corinna Vinschen
@ 1999-03-31 19:45       ` John Zheng
  1 sibling, 0 replies; 12+ messages in thread
From: John Zheng @ 1999-03-31 19:45 UTC (permalink / raw)
  To: Corinna Vinschen; +Cc: cygwin

Ah yes,

Adding the line

#include <errno.h>

to the file file.h did the trick.  It also worked, and may be more "correct,"
to add the line to the files file.c, fsmagic.c, and compress.c.  Perhaps the
need to make one of these changes should be documented at
http://aquarius.franken.de/docs/develop/gnuwin32/GNUWin32.txt ?

Also, do you know if there is a version of gnu tar for win32 that supports
writing to remote unix tape devices that run rmt?  I would like to be able
to do something like

tar -cf tapeserver.domain.com:/dev/rst0 c:\

and have tar write to my tape drive residing on the machine tapeserver.

Thanks again for your help.

John

On Sun, 7 Mar 1999, Corinna Vinschen wrote:

> John Zheng wrote:
> > 
> > Corinna,
> > 
> > I downloaded file-3.26.tar.gz from ftp.astron.com, and tried to compile it.
> > 
> > Near the end of compilation, I get the error:
> > [...]
> > /a/cygnus/file-3.26/file.c:202: undefined reference to `errno'
> > [...]
> > Do you know what the problem is?  errno appears to be defined as:
> > 
> > extern int errno;               /* Some unixes don't define this..      */
> 
> The `extern' declaration of errno must be substituted with
> 
> #include <errno.h>
> 
> Cygwin defines errno not as a global variable, but as a
> #define to a function call. This is needed, because it
> wouldn't be reentrant else.
> 
> Regards,
> Corinna
> 
> 
> 


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
  1999-03-07 11:42       ` Corinna Vinschen
  1999-03-07 11:48         ` Corinna Vinschen
@ 1999-03-31 19:45         ` Corinna Vinschen
  1 sibling, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 1999-03-31 19:45 UTC (permalink / raw)
  To: John Zheng; +Cc: cygwin

John Zheng wrote:
> 
> Ah yes,
> 
> Adding the line
> 
> #include <errno.h>
> 
> to the file file.h did the trick.  It also worked, and may be more "correct,"
> to add the line to the files file.c, fsmagic.c, and compress.c.  Perhaps the
> need to make one of these changes should be documented at
> http://aquarius.franken.de/docs/develop/gnuwin32/GNUWin32.txt ?

Yes, should be done so.

> Also, do you know if there is a version of gnu tar for win32 that supports
> writing to remote unix tape devices that run rmt?  I would like to be able
> to do something like
> 
> tar -cf tapeserver.domain.com:/dev/rst0 c:\

AFAIK, gnu tar supports it anyway, `rmt' is part of the original package.
I've never used it.

Regards,
Corinna

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compiling file 3.26
  1999-03-07 13:37             ` John Zheng
  1999-03-07 13:45               ` Corinna Vinschen
@ 1999-03-31 19:45               ` John Zheng
  1 sibling, 0 replies; 12+ messages in thread
From: John Zheng @ 1999-03-31 19:45 UTC (permalink / raw)
  To: Corinna Vinschen; +Cc: cygwin

Okay, I've figured it out now...

First, it should be clarified on the GNUWin32.txt page that the
file3.26-patch file is found at
ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Vinschen_Corinna/B20
and not at ftp.astron.com/pub/file.  Perhaps just a general note up top that
patch files done by Corinna are found at ftp.franken.de.

Also, I had problems applying the patch because <tab> in the original source
files were translated to <spaces> in the file3.26-patch file, and a couple
extra line feeds were added.  I've attached a modified file3.26-patch file
that works.

One more question.  When I compile file.exe, my resulting file.exe ends up
being 382,463 bytes.  The version you have on your ftp server is only 23,552
bytes.  How do you get the compile to make it so small?

John

On Sun, 7 Mar 1999, Corinna Vinschen wrote:

> Corinna Vinschen wrote:
> > 
> > John Zheng wrote:
> > >
> > > Ah yes,
> > >
> > > Adding the line
> > >
> > > #include <errno.h>
> > >
> > > to the file file.h did the trick.  It also worked, and may be more "correct,"
> > > to add the line to the files file.c, fsmagic.c, and compress.c.  Perhaps the
> > > need to make one of these changes should be documented at
> > > http://aquarius.franken.de/docs/develop/gnuwin32/GNUWin32.txt ?
> > 
> > Yes, should be done so.
> 
> BTW: On my ftp site, you already could find a `file3.26-patch'!
> The README, which is also part of the GNUWin32.txt, contains the
> lines: 
> 
> 	- preliminaries
> 	  - patch file `file3.26-patch' included
> 
> Regards,
> Corinna
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~1999-03-31 19:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.GSU.4.05.9903070052510.15188-100000@viking.cris.com>
1999-03-07  8:37 ` compiling file 3.26 Corinna Vinschen
     [not found]   ` < 36E29663.7B7D74A8@cityweb.de >
1999-03-07 11:35     ` John Zheng
1999-03-07 11:42       ` Corinna Vinschen
1999-03-07 11:48         ` Corinna Vinschen
     [not found]           ` < 36E2D7B7.CB124407@cityweb.de >
1999-03-07 13:37             ` John Zheng
1999-03-07 13:45               ` Corinna Vinschen
1999-03-31 19:45                 ` Corinna Vinschen
1999-03-31 19:45               ` John Zheng
1999-03-31 19:45           ` Corinna Vinschen
1999-03-31 19:45         ` Corinna Vinschen
1999-03-31 19:45       ` John Zheng
1999-03-31 19:45   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).