Re: [Patch] cygcheck: More complete helptext on drive-list.

2004-10-26 Thread Bas van Gompel
Op Mon, 25 Oct 2004 17:28:07 -0400 schreef Christopher Faylor
in <[EMAIL PROTECTED]>:
:  On Mon, Oct 25, 2004 at 06:25:16PM +0200, Bas van Gompel wrote:
: > Op Mon, 25 Oct 2004 11:51:32 -0400 schreef Christopher Faylor

[Messed up ChangeLog-entry]

: > :   I fixed this and checked it in.  In general, you don't add ChangeLog entries
: > :  about the ChangeLog.
: >
: > Ok. (There are other instances...)
:
:   With the exception of the famous "subauth", the word "ChangeLog" does not show
:  up in any cygwin-specific ChangeLog that I can see.

You are of course correct.
The instances which fooled me into adding it are in w32api and cygwin-apps:

| w32api/ChangeLog:4225: * ChangeLog: Fix omission of name in recent entries.
| w32api/ChangeLog:4250: * ChangeLog: Fix typo in last entry.
| w32api/ChangeLog:4442: * ChangeLog: correct date in last entry.
| w32api/ChangeLog:4731: * ChangeLog: Fix typo in last entry.
| w32api/ChangeLog:8072: * ChangeLog started
| cygwin-apps/cygutils/ChangeLog:865:   * ChangeLog: fix tabs
| cygwin-apps/cygutils/ChangeLog:1682:  * ChangeLog: fix tabs
| cygwin-apps/setup/ChangeLog:258:  * ChangeLog: Fix broken line-wrapping throughout. 
Clarify that


L8r,

Buzz. (EOT|TITTTL?)
-- 
  ) |  | ---/ ---/  Yes, this | This message consists of true | I do not
--  |  |   //   really is |   and false bits entirely.| mail for
  ) |  |  //a 72 by 4 +---+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."| me. 4^re


[Patch] cygcheck: Warn about multiple or missing cygwin1.dlls.

2004-10-26 Thread Bas van Gompel
Hi,

Another (trivial, I think) patch, this time to warn about one of the
more common pitfalls: multiple or missing cygwin1.dlls.

2004-10-26  Bas van Gompel  <[EMAIL PROTECTED]>

* cygcheck.cc (dump_sysinfo): Warn about missing or multiple cygwin1
dlls.


--- src/winsup/utils-3/cygcheck.cc  25 Oct 2004 16:11:41 -  1.57
+++ src/winsup/utils-3/cygcheck.cc  26 Oct 2004 20:50:24 -
@@ -1222,6 +1222,7 @@ dump_sysinfo ()
 
   if (givehelp)
 printf ("Looking for various Cygnus DLLs...  (-v gives version info)\n");
+  int cygwin_dll_count = 0;
   for (i = 0; i < num_paths; i++)
 {
   WIN32_FIND_DATA ffinfo;
@@ -1238,7 +1239,10 @@ dump_sysinfo ()
{
  sprintf (tmp, "%s\\%s", paths[i], f);
  if (strcasecmp (f, "cygwin1.dll") == 0)
-   found_cygwin_dll = strdup (tmp);
+   {
+ cygwin_dll_count++;
+ found_cygwin_dll = strdup (tmp);
+   }
  else
ls (tmp);
}
@@ -1253,6 +1257,10 @@ dump_sysinfo ()
 
   FindClose (ff);
 }
+  if (cygwin_dll_count > 1)
+puts ("Warning: There are multiple cygwin1.dlls on your path");
+  if (!cygwin_dll_count)
+puts ("Warning: cygwin1.dll not found on your path");
 }
 
 static int



L8r,

Buzz.
-- 
  ) |  | ---/ ---/  Yes, this | This message consists of true | I do not
--  |  |   //   really is |   and false bits entirely.| mail for
  ) |  |  //a 72 by 4 +---+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."| me. 4^re


Re: [Patch] cygcheck: Warn about multiple or missing cygwin1.dlls.

2004-10-26 Thread Christopher Faylor
On Tue, Oct 26, 2004 at 11:34:13PM +0200, Bas van Gompel wrote:
>2004-10-26  Bas van Gompel  <[EMAIL PROTECTED]>
>
>   * cygcheck.cc (dump_sysinfo): Warn about missing or multiple cygwin1
>   dlls.

Please checkin.

Thanks.
cgf


Re: [Patch] cygcheck: Warn about multiple or missing cygwin1.dlls.

2004-10-26 Thread Bas van Gompel
Op Tue, 26 Oct 2004 19:03:00 -0400 schreef Christopher Faylor
in <[EMAIL PROTECTED]>:
:  On Tue, Oct 26, 2004 at 11:34:13PM +0200, Bas van Gompel wrote:
: > 2004-10-26  Bas van Gompel  <[EMAIL PROTECTED]>
: >
: > * cygcheck.cc (dump_sysinfo): Warn about missing or multiple cygwin1
: > dlls.
:
:   Please checkin.

Done.


L8r,

Buzz.
-- 
  ) |  | ---/ ---/  Yes, this | This message consists of true | I do not
--  |  |   //   really is |   and false bits entirely.| mail for
  ) |  |  //a 72 by 4 +---+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."| me. 4^re


sync(3)

2004-10-26 Thread Reini Urban
Why is this a bad idea?
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
2004-10-27  Reini Urban  <[EMAIL PROTECTED]>

* syscalls.cc (sync): Implement it via cygheap->fdtab and 
FlushFileBuffers. Better than a noop.

Index: syscalls.cc
===
RCS file: /cvs/src/src/winsup/cygwin/syscalls.cc,v
retrieving revision 1.345
diff -u -b -r1.345 syscalls.cc
--- syscalls.cc 3 Sep 2004 01:53:12 -   1.345
+++ syscalls.cc 27 Oct 2004 02:30:01 -
@@ -1082,6 +1082,24 @@
 extern "C" void
 sync ()
 {
+  int err = 0;
+  cygheap->fdtab.lock ();
+
+  fhandler_base *fh;
+  for (int i = 0; i < (int) cygheap->fdtab.size; i++)
+if ((fh = cygheap->fdtab[i]) != NULL)
+  {
+#ifdef DEBUGGING
+   debug_printf ("syncing fd %d", i);
+#endif
+   if (FlushFileBuffers (fh->get_handle ()) == 0)
+ {
+   __seterrno ();
+   err++;
+ }
+  }
+  cygheap->fdtab.unlock ();
+  return err ? 1 : 0;
 }
 
 /* Cygwin internal */


RE: sync(3)

2004-10-26 Thread Gary R. Van Sickle
Well, I don't know if it's a bad idea, but FlushFileBuffers isn't guaranteed
to do anything, and usually doesn't in the very instances that you need it
most.  But since sync(3) isn't guaranteed to do anything anyway, I guess it
cancels out.

I'd be sure to put comments in there saying that it really can't be relied
on to do anything though.  That will avoid people who come along later, see
that sync looks like it should be "working" but isn't, and wonder what's
wrong when there really isn't anything "wrong".

-- 
Gary R. Van Sickle
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Reini Urban
> Sent: Tuesday, October 26, 2004 9:36 PM
> To: cygwin-patches mailing-list
> Subject: sync(3)
> 
> Why is this a bad idea?
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/
> 
>