This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: MSYS mode (continue)
- From: Alexey Pavlov <alexpux at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 4 Jul 2013 13:09:08 +0400
- Subject: Re: MSYS mode (continue)
- References: <CABEPuQ+jEFJEQt=MGyn5m7Q+Ccs5A-i7vkk0McM=yyoCOw+Kgw at mail dot gmail dot com> <20130703181504 dot GA3182 at ednor dot casa dot cgf dot cx> <CABEPuQLW+TQ5VUVSYrCOzQ4Y5fdHNp=ymcb9r+xV7ROyYS=OBA at mail dot gmail dot com> <20130703195020 dot GC1705 at calimero dot vinschen dot de> <51D49188 dot 7000708 at cwilson dot fastmail dot fm> <20130703215716 dot GA1752 at ednor dot casa dot cgf dot cx> <51D4A7F4 dot 80507 at cwilson dot fastmail dot fm> <CABEPuQJ6V55nLo1hHO=xxAjjxsV5ahAuHj-jfWH-=Hk_hmk-eA at mail dot gmail dot com> <20130704085847 dot GK5118 at calimero dot vinschen dot de> <CABEPuQ+YxNF6LTAxRTVDQqQsKvGWGuaRxx1JAH62+wZZzgsC9w at mail dot gmail dot com>
2013-06-18 Alexey Pavlov
* mount.cc: Allow using a shortened version of mount points in /etc/fstab
* utsname.h: Increase sysname fiels size.
* uname.cc: Allow changing OS name by MSYSTEM environment variable.
Index: cygwin/mount.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/mount.cc,v
retrieving revision 1.100
diff -u -p -r1.100 mount.cc
--- cygwin/mount.cc 24 Apr 2013 10:16:12 -0000 1.100
+++ cygwin/mount.cc 18 Jun 2013 11:39:27 -0000
@@ -1125,8 +1125,16 @@ mount_info::from_fstab_line (char *line,
if (!*c)
return true;
cend = find_ws (c);
- *cend = '\0';
posix_path = conv_fstab_spaces (c);
+ if (!*cend)
+ {
+ unsigned mount_flags = MOUNT_SYSTEM | MOUNT_BINARY |
MOUNT_NOPOSIX | MOUNT_NOACL;
+ int res = mount_table->add_item (native_path, posix_path, mount_flags);
+ if (res && get_errno () == EMFILE)
+ return false;
+ return true;
+ }
+ *cend = '\0';
/* Third field: FS type. */
c = skip_ws (cend + 1);
if (!*c)
Index: cygwin/uname.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/uname.cc,v
retrieving revision 1.31
diff -u -p -r1.31 uname.cc
--- cygwin/uname.cc 21 Jan 2013 04:38:29 -0000 1.31
+++ cygwin/uname.cc 18 Jun 2013 11:39:27 -0000
@@ -29,7 +29,9 @@ uname (struct utsname *name)
char *snp = strstr (cygwin_version.dll_build_date, "SNP");
memset (name, 0, sizeof (*name));
- __small_sprintf (name->sysname, "CYGWIN_%s", wincap.osname ());
+ char* msystem = getenv("MSYSTEM");
+ const char *msystem_cyg = "CYGWIN";
+ __small_sprintf (name->sysname, "%s_%s", msystem ? msystem :
msystem_cyg, wincap.osname ());
#if 0
/* Recognition of the real 64 bit CPU inside of a WOW64 system, irritates
Index: cygwin/include/sys/utsname.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/sys/utsname.h,v
retrieving revision 1.3
diff -u -p -r1.3 utsname.h
--- cygwin/include/sys/utsname.h 21 Jan 2013 04:38:31 -0000 1.3
+++ cygwin/include/sys/utsname.h 18 Jun 2013 11:39:27 -0000
@@ -17,7 +17,7 @@ extern "C" {
struct utsname
{
- char sysname[20];
+ char sysname[21];
char nodename[20];
char release[20];
char version[20];
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple