more of the same, goto and switch skipping initializations.
attached gets as far as:
gcc -c -D__CRTDLL__ -U__MSVCRT__ -g -O2 -I/src/cygwin-snapshot-20080822-1/wins
up/mingw/include -I/src/cygwin-snapshot-20080822-1/winsup/mingw/../include -nost
dinc -iwithprefixbefore include -I /src/cygwin-snapshot-20080822-1/winsup/mingw/
../w32api/include -mno-cygwin /src/cygwin-snapshot-20080822-1/winsup/mingw/crt1.
c -o crt1.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[3]: *** [crt1.o] Error 1
make[3]: Leaving directory `/obj/cygwin.1/i686-pc-cygwin/winsup/mingw'
make[2]: *** [mingw] Error 1
make[2]: Leaving directory `/obj/cygwin.1/i686-pc-cygwin/winsup'
make[1]: *** [all-target-winsup] Error 2
make[1]: Leaving directory `/obj/cygwin.1'
make: *** [all] Error 2
[EMAIL PROTECTED] /obj/cygwin.1
which I understand, different problem. I need to go build that compiler.
The .dll seems to "basically" work.
I can
cd /obj/bash.1
make clean
make
Haven't waited for it to finish.
using the dll:
Huh? No /etc/fstab file in \??\D:\cygwin\etc\fstab.d\jay? Using default root a
nd cygdrive prefix...
bash: /usr/bin/tr: No such file or directory
bash: /usr/bin/sed: No such file or directory
probably for lack of running 1.7 setup?
Maybe the default mount should include /bin => /usr/bin and /lib => /usr/lib?
And this incorrect command line gives an incorrect warning:
$ mount /bin /usr/bin
cygwin warning:
MS-DOS style path detected: D:\cygwin\usr\bin
Preferred POSIX equivalent is: /usr/bin
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
mount: /usr/bin: Invalid argument
I couldn't /quickly/ find how to fix the mount stuff I added to /etc/profile
mount d:/cygwin/lib /usr/lib
mount d:/cygwin/bin /usr/bin
mount d:/obj /obj
mount d:/src /src
mount d:/net /net
mount d:/cm3 /cm3
mount d:/dev2 /dev2
I'll go reread the 1.7 stuff.
- Jay
Common subdirectories:
/src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/config and
/src/cygwin-snapshot-20080822-1/winsup/cygwin/config
diff -u /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/dtable.cc
/src/cygwin-snapshot-20080822-1/winsup/cygwin/dtable.cc
--- /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/dtable.cc
2008-05-21 18:34:09.000000000 -0700
+++ /src/cygwin-snapshot-20080822-1/winsup/cygwin/dtable.cc 2008-08-26
09:51:19.296875000 -0700
@@ -851,6 +851,14 @@
WCHAR *maxmatchdos = NULL;
int maxmatchlen = 0;
+// This is to here avoid goto crossing initialization.
+ if (0)
+ {
+unknown:
+ strcpy (posix_fn, unknown_file);
+ return false;
+ }
+
NtQueryObject (h, ObjectNameInformation, &dummy_oni, sizeof (dummy_oni),
&len);
if (!len)
{
@@ -969,8 +977,4 @@
debug_printf ("derived path '%W', posix '%s'", w32, posix_fn);
return false;
-
-unknown:
- strcpy (posix_fn, unknown_file);
- return false;
}
diff -u /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/fhandler_fifo.cc
/src/cygwin-snapshot-20080822-1/winsup/cygwin/fhandler_fifo.cc
--- /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/fhandler_fifo.cc
2008-08-21 21:06:49.000000000 -0700
+++ /src/cygwin-snapshot-20080822-1/winsup/cygwin/fhandler_fifo.cc
2008-08-26 09:41:36.328125000 -0700
@@ -131,11 +131,13 @@
switch (wait_state)
{
case fifo_wait_for_client:
- bool res = ConnectNamedPipe (get_handle (), get_overlapped ());
- DWORD dummy_bytes;
- if (res || GetLastError () == ERROR_PIPE_CONNECTED)
- return true;
- return wait_overlapped (res, iswrite, &dummy_bytes);
+ {
+ bool res = ConnectNamedPipe (get_handle (), get_overlapped ());
+ DWORD dummy_bytes;
+ if (res || GetLastError () == ERROR_PIPE_CONNECTED)
+ return true;
+ return wait_overlapped (res, iswrite, &dummy_bytes);
+ }
default:
break;
}
diff -u /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/hookapi.cc
/src/cygwin-snapshot-20080822-1/winsup/cygwin/hookapi.cc
--- /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/hookapi.cc
2008-05-10 10:08:41.000000000 -0700
+++ /src/cygwin-snapshot-20080822-1/winsup/cygwin/hookapi.cc 2008-08-26
09:54:30.218750000 -0700
@@ -160,7 +160,8 @@
/* Find first missing dll in a given executable.
FIXME: This is not foolproof since it doesn't look for dlls in the
same directory as the given executable, like Windows. Instead it
- searches for dlls in the context of the current executable. */
+ searches for dlls in the context of the current executable.
+ This is not thread safe, but only used by strace. */
const char *
find_first_notloaded_dll (path_conv& pc)
{
@@ -172,6 +173,15 @@
HANDLE h;
NTSTATUS status;
+// This is here to avoid goto crossing initialization.
+ if (0)
+ {
+out:
+ if (hm)
+ UnmapViewOfFile (hm);
+ return res;
+ }
+
status = NtOpenFile (&h, SYNCHRONIZE | GENERIC_READ,
pc.get_object_attr (attr, sec_none_nih),
&io, FILE_SHARE_READ | FILE_SHARE_WRITE,
@@ -194,6 +204,9 @@
if (!pExeNTHdr)
goto out;
+ if (IMAGE_DIRECTORY_ENTRY_IMPORT >=
pExeNTHdr->OptionalHeader.NumberOfRvaAndSizes)
+ goto out;
+
DWORD importRVA;
importRVA =
pExeNTHdr->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress;
if (!importRVA)
@@ -209,19 +222,14 @@
for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++)
{
const char *lib = rva (PSTR, hm, pd->Name - delta);
- if (!LoadLibraryEx (lib, NULL, DONT_RESOLVE_DLL_REFERENCES
- | LOAD_LIBRARY_AS_DATAFILE))
+ if (!LoadLibraryEx (lib, NULL, LOAD_LIBRARY_AS_DATAFILE))
{
static char buf[NT_MAX_PATH];
res = strcpy (buf, lib);
}
}
-out:
- if (hm)
- UnmapViewOfFile (hm);
-
- return res;
+ goto out;
}
// Top level routine to find the EXE's imports and redirect them
Common subdirectories:
/src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/include and
/src/cygwin-snapshot-20080822-1/winsup/cygwin/include
Common subdirectories: /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/lib
and /src/cygwin-snapshot-20080822-1/winsup/cygwin/lib
Common subdirectories: /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/libc
and /src/cygwin-snapshot-20080822-1/winsup/cygwin/libc
diff -u /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/path.cc
/src/cygwin-snapshot-20080822-1/winsup/cygwin/path.cc
--- /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/path.cc 2008-08-21
21:06:49.000000000 -0700
+++ /src/cygwin-snapshot-20080822-1/winsup/cygwin/path.cc 2008-08-26
09:46:01.312500000 -0700
@@ -2775,22 +2775,24 @@
switch (what)
{
case CCP_POSIX_TO_WIN_A:
- p.check ((const char *) from,
- PC_POSIX | PC_SYM_FOLLOW | PC_NO_ACCESS_CHECK | PC_NOWARN
- | (relative ? PC_NOFULL : 0));
- if (p.error)
- return_with_errno (p.error);
- PUNICODE_STRING up = p.get_nt_native_path ();
- buf = tp.c_get ();
- sys_wcstombs (buf, NT_MAX_PATH, up->Buffer, up->Length / sizeof (WCHAR));
- /* Convert native path to standard DOS path. */
- if (!strncmp (buf, "\\??\\", 4))
- {
- buf += 4;
- if (buf[1] != ':') /* native UNC path */
- *(buf += 2) = '\\';
- }
- lsiz = strlen (buf) + 1;
+ {
+ p.check ((const char *) from,
+ PC_POSIX | PC_SYM_FOLLOW | PC_NO_ACCESS_CHECK | PC_NOWARN
+ | (relative ? PC_NOFULL : 0));
+ if (p.error)
+ return_with_errno (p.error);
+ PUNICODE_STRING up = p.get_nt_native_path ();
+ buf = tp.c_get ();
+ sys_wcstombs (buf, NT_MAX_PATH, up->Buffer, up->Length / sizeof
(WCHAR));
+ /* Convert native path to standard DOS path. */
+ if (!strncmp (buf, "\\??\\", 4))
+ {
+ buf += 4;
+ if (buf[1] != ':') /* native UNC path */
+ *(buf += 2) = '\\';
+ }
+ lsiz = strlen (buf) + 1;
+ }
break;
case CCP_POSIX_TO_WIN_W:
p.check ((const char *) from,
diff -u /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/pipe.cc
/src/cygwin-snapshot-20080822-1/winsup/cygwin/pipe.cc
--- /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/pipe.cc 2008-08-21
21:06:49.000000000 -0700
+++ /src/cygwin-snapshot-20080822-1/winsup/cygwin/pipe.cc 2008-08-26
09:50:05.921875000 -0700
@@ -112,8 +112,20 @@
}
pipesync::pipesync (HANDLE f, DWORD is_reader):
- reader (false), ret_handle (NULL)
+ reader (false), ret_handle (NULL), ev(NULL)
{
+// This is here to avoid goto crossing initialization.
+ if (0)
+ {
+out:
+ if (ev)
+ {
+ CloseHandle (ev);
+ ev = NULL;
+ }
+ return;
+ }
+
ev = CreateEvent (&sec_none_nih, true, false, NULL);
if (!ev)
{
@@ -141,13 +153,7 @@
break;
}
-out:
- if (ev)
- {
- CloseHandle (ev);
- ev = NULL;
- }
- return;
+ goto out;
}
void
Common subdirectories: /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/regex
and /src/cygwin-snapshot-20080822-1/winsup/cygwin/regex
diff -u /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/sec_auth.cc
/src/cygwin-snapshot-20080822-1/winsup/cygwin/sec_auth.cc
--- /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/sec_auth.cc
2008-08-01 12:13:23.000000000 -0700
+++ /src/cygwin-snapshot-20080822-1/winsup/cygwin/sec_auth.cc 2008-08-26
10:03:36.390625000 -0700
@@ -1103,10 +1103,12 @@
authinf->checksum = CYGWIN_VERSION_MAGIC (CYGWIN_VERSION_DLL_MAJOR,
CYGWIN_VERSION_DLL_MINOR);
- PDWORD csp = (PDWORD) &authinf->username;
- PDWORD csp_end = (PDWORD) ((PBYTE) authinf + authinf_size);
- while (csp < csp_end)
- authinf->checksum += *csp++;
+ {
+ PDWORD csp = (PDWORD) &authinf->username;
+ PDWORD csp_end = (PDWORD) ((PBYTE) authinf + authinf_size);
+ while (csp < csp_end)
+ authinf->checksum += *csp++;
+ }
/* Try to logon... */
ret = LsaLogonUser (lsa_hdl, (PLSA_STRING) &origin, Interactive, package_id,
diff -u /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/shared_info.h
/src/cygwin-snapshot-20080822-1/winsup/cygwin/shared_info.h
--- /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/shared_info.h
2008-07-27 15:33:26.000000000 -0700
+++ /src/cygwin-snapshot-20080822-1/winsup/cygwin/shared_info.h 2008-08-26
02:53:31.312500000 -0700
@@ -95,7 +95,7 @@
private:
void sort ();
void mount_slash ();
- void mount_info::create_root_entry (const PWCHAR root);
+ void create_root_entry (const PWCHAR root);
bool from_fstab_line (char *line, bool user);
bool from_fstab (bool user, WCHAR [], PWCHAR);
diff -u /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/syscalls.cc
/src/cygwin-snapshot-20080822-1/winsup/cygwin/syscalls.cc
--- /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/syscalls.cc
2008-08-17 09:46:23.000000000 -0700
+++ /src/cygwin-snapshot-20080822-1/winsup/cygwin/syscalls.cc 2008-08-26
10:05:50.203125000 -0700
@@ -3476,6 +3476,16 @@
if (pipe (fds) < 0)
return NULL;
+ if (0)
+ {
+err:
+ int save_errno = get_errno ();
+ close (fds[0]);
+ close (fds[1]);
+ set_errno (save_errno);
+ return NULL;
+ }
+
switch (rw)
{
case 'r':
@@ -3525,13 +3535,6 @@
fh->set_popen_pid (pid);
return fp;
-
-err:
- int save_errno = get_errno ();
- close (fds[0]);
- close (fds[1]);
- set_errno (save_errno);
- return NULL;
}
int
diff -u /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/uinfo.cc
/src/cygwin-snapshot-20080822-1/winsup/cygwin/uinfo.cc
--- /src/cygwin-snapshot-20080822-1.orig/winsup/cygwin/uinfo.cc 2008-07-26
10:01:24.000000000 -0700
+++ /src/cygwin-snapshot-20080822-1/winsup/cygwin/uinfo.cc 2008-08-26
10:08:37.890625000 -0700
@@ -577,9 +577,11 @@
goto out;
}
buf[fsi.EndOfFile.LowPart] = '\0';
- char *eptr = buf;
- while ((eptr = add_line (eptr)))
- continue;
+ {
+ char *eptr = buf;
+ while ((eptr = add_line (eptr)))
+ continue;
+ }
debug_printf ("%W curr_lines %d", rel_path, curr_lines);
res = succeeded;
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/