An unexpected Windows?

by Matt 4. December 2007 11:07

Hey, good timing. I'd wanted to follow up on this and point out a few links and stuff, and hot on the heels of looking at how Windows can run UNIX programs comes the news that the UNIX-based OSX has some vestigial code to handle Windows programs. It doesn't seem to do anything too interesting at the moment, but it does recognise the Windows PE executable file format, and it even appear to try and load Windows dlls. Rumours abound that it's the first steps to getting OSX to be able to natively run Windows applications.

I love this idea - it's kinda obvious and counter-intuitive at the same time. Conventional wisdom states that you simply can't run a Windows binary on UNIX - they are different OS's, after all. But it's also just x86 code, so why shouldn't you be able to run it?

Of course, it's going to be more complicated than just running x86 code - there's a whole bunch of system services that need to be available, including COM, the registry, the file system layout, the clipboard, etc.

But it's not a new idea. Wine has been running Windows apps on UNIX-like machines for ages. Wine isn't like Interix. It's a compatibility layer, and works in a number of different ways. They have reimplemented a load of Win32 dlls that retarget the calls to the underlying UNIX OS, so you don't need Windows installed (they've even implemented DirectX!). Or you can optionally use native Windows dlls. Or simply recompile against their libs to get source code compatibility. But binary compatibility is the main draw.

A similarly herculean effort exists in the other direction - Cygwin. Their home page nicely states what it is, and what it isn't. It's different to Wine, in that it's a source code compatible UNIX environment. You can't take a UNIX binary and just run it (just as in Interix). And it's different to Interix in that it's a compatibility layer built on top of Win32, rather than it's own subsystem, and so it inherits the constraints of the Win32 platform, constraints that Interix can avoid. A nice example of which is fork. Fork creates a copy of a process, including address space. Win32 has no such concept, but (and Google is failing me for backup, here) Interix has full support for fork, because the Windows NT kernel has full support for fork. Similarly, NTFS was designed to support POSIX requirements, such as group ownership, hard links and of course, case sensitivity. These concepts aren't available to Win32, so also aren't available to Cygwin apps.

Cygwin has it's drawbacks, but it has good things too. By running in the Win32 subsystem, it has access to GDI, and so a port of the X Windows Server is possible. Interix can't display graphics, and so has to rely on a full Win32 port, such as Xming. But most important is the simple fact that Cygwin Actually Works. This is huge in and of itself. It's very popular, and has a massive range of ports, and autoconf support means porting should be very easy. In fact, it's so popular that it has better support of ported apps than Interix, and should really be considered the de facto standard for running UNIX apps on Windows.

So why do I prefer Interix? Well, that's easy. It's cooler in a far more geeky way. Cygwin's clearly done incredibly impressive stuff, but (with the greatest of respect) it's a big hack. Interix is a much cleaner way of doing things. Take how the Windows file system is exposed, for example. In Cygwin, you get to your standard driver letters (C:, D:) via /cygdrive/c or /cygdrive/d, and network paths, such as \\server\share\dir are available as //server/share/dir. Interix exposes them in a slightly more UNIX friendly /dev/fs/C, /dev/fs/D and /net/server/share/dir. A minor thing perhaps, but I like it.

(But then I also like Cygwin's /proc/registry.)

Right, quick link-fest. The Interop Community site is a semi-official site that has a bunch of forums, faqs, tech notes and provides a package management system for a whole heap of extra utilities, including recent versions of the GNU utilities (and it's managed by Rodney Roddick, one time Interix dev). Alternatively, you can download packages from NetBSD or Debian. Another previous dev has a great techy white paper for download. And there's even a blog.

And now I'm back off to my command line.

Ctrl-D.

Tags:

Comments (65) -

cabernet
cabernet
4/26/2011 3:06:03 AM #

I really love the information here on your website.

Reply

Kirby Richey
Kirby Richey
5/12/2011 2:50:48 PM #

It is a particularly appealing write-up.  It is very educational and also you have obviously done your preparation leading up to crafting this unique write-up.  I will need to keep coming back and browse your upcoming articles.

Reply

casinos en lignes
casinos en lignes France
7/19/2011 11:18:32 AM #

Aw, this was a in genuineness warm-hearted post. In hypothesis I would like to put in writing like this additionally � taking things and manifest venture to force a  very ample article� but what can I claim� I procrastinate alot and around no means seem to manipulate something done.

Reply

best suv reviews
best suv reviews
7/20/2011 10:32:37 PM #

Per il tuo bambino scegli Moncler. Una scelta di capi, estivi ed invernali, eccezionali. Tuo figlio sarà sempre alla moda e potrà muoversi in totale comodità.

Reply

suv comparison
suv comparison
7/20/2011 10:39:49 PM #

hi!,I like your writing so so much! proportion we communicate extra about your post on AOL? I require a specialist in this area to unravel my problem. May be that's you! Taking a look forward to see you.

Reply

best hybrid cars 2011
best hybrid cars 2011
7/22/2011 3:58:28 AM #

I wonder if he cheated on her? I remember he cheated on his previous wife with JLO so it wouldn’t be surprising.

Reply

direct loans consolidation
direct loans consolidation
8/2/2011 8:53:36 PM #

Is it ok if I quote your article in my monthly newsletter? I would think this article suits my topic perfectly. Well ya, thanks for posting this article.

Reply

philix
philix United States
11/20/2015 6:33:32 AM #

Good Web Site

Reply

Jared Teteak
Jared Teteak United States
1/15/2016 4:34:22 AM #

Well good for you! I have a lot but one I just thought of was when you lick a crease of paper so that it'll rip in a straight line and it actually tears in a frayed straight line rather than rips awkwardly. I love that bleachy taste and that bleachy satisfaction.

Reply

Cornelius Styborski
Cornelius Styborski United States
1/15/2016 4:58:42 AM #

Thaaaat IS awesome! lol hehe

Reply

Jose Bacone
Jose Bacone United States
1/15/2016 8:31:20 AM #

The dolphin saving you one is the best one!

Reply

Jamison Gerraro
Jamison Gerraro United States
1/15/2016 8:32:28 AM #

Congrats! This is such a great website, I know it will translate well into book form. Which is AWESOME!

Reply

Wilton Megeath
Wilton Megeath United States
1/15/2016 8:54:40 AM #

Congrats! So glad to see this site getting the recognition it deserves, the world can always use a little more awesome.

Reply

Lauren Krings
Lauren Krings United States
8/25/2016 4:13:46 AM #

Hi I'm appreciating the time and energy you put into your blog and informative information you did. It’s awesome to come across a post every once in a while that isn’t the same out of date rehashed information. Cool read! I’ve bookmarked your site and I’m including your RSS feeds to my Bing account.

Reply

Deetta Norat
Deetta Norat United States
3/27/2017 3:27:58 AM #

This is a awesome website with some great information

Reply

Luanne Chiem
Luanne Chiem United States
5/22/2017 7:52:23 PM #

Thank you for this video

Reply

Laurette Emmerich
Laurette Emmerich United States
5/22/2017 8:04:32 PM #

Thank you for this video

Reply

Jackie Paga
Jackie Paga United States
6/10/2017 6:29:35 PM #

check it out

Reply

eliminar acne
eliminar acne United States
10/14/2017 7:21:56 PM #

Thanks for sharing excellent informations. Your website is very cool. I'm impressed by the details that you've on this website. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for more articles. You, my pal, ROCK! I found simply the info I already searched everywhere and just couldn't come across. What a perfect website.

Reply

Carmen Milito
Carmen Milito United States
7/20/2018 8:18:21 AM #

good stuff. I will make sure to bookmark your blog.

Reply

Louise Heverin
Louise Heverin United States
7/21/2018 9:17:04 AM #

sound like you know what you?re talking about! Thanks

Reply

Aron Coppock
Aron Coppock United States
8/2/2018 9:43:28 AM #

Don’t wear seat belts lest you drown in you own urine?

Reply

Ollie Loughridge
Ollie Loughridge United States
8/2/2018 12:09:36 PM #

Black on black in the Charger I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Keturah Koeppe
Keturah Koeppe United States
8/2/2018 12:09:37 PM #

Don’t wear seat belts lest you drown in you own urine?

Reply

Coleman Jarret
Coleman Jarret United States
8/2/2018 12:48:34 PM #

With thanks! Valuable information!

Reply

Kizzy Cioffi
Kizzy Cioffi United States
8/2/2018 1:13:25 PM #

With thanks! Valuable information!

Reply

Pedro Pickersgill
Pedro Pickersgill United States
8/2/2018 1:25:28 PM #

Black on black in the Charg I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Lizeth Inch
Lizeth Inch United States
8/2/2018 4:10:15 PM #

With thanks! Valuable information!

Reply

Kasey Lagazo
Kasey Lagazo United States
8/2/2018 5:15:34 PM #

Don’t wear seat belts lest you drown in you own urine?

Reply

Monika Langworthy
Monika Langworthy United States
8/3/2018 12:43:37 AM #

Black on black in the Charger I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Micah Balmer
Micah Balmer United States
8/3/2018 5:03:50 AM #

With thanks! Valuable information!

Reply

Andrew Barklow
Andrew Barklow United States
8/3/2018 6:02:15 AM #

With thanks! Valuable information!

Reply

Lynell Connors
Lynell Connors United States
8/3/2018 6:41:58 AM #

Black on black in the Charger I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Robby Duplin
Robby Duplin United States
8/3/2018 7:56:27 AM #

Black on black in the Charg I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Gregorio Amormino
Gregorio Amormino United States
8/3/2018 8:19:57 AM #

Black on black in the Charg I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Merle Deangeles
Merle Deangeles United States
8/3/2018 9:53:46 AM #

With thanks! Valuable information!

Reply

Marion Yanik
Marion Yanik United States
8/3/2018 1:39:34 PM #

With thanks! Valuable information!

Reply

Chanda Mercury
Chanda Mercury United States
8/3/2018 4:06:58 PM #

Black on black in the Charg I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Dalton Sandburg
Dalton Sandburg United States
8/3/2018 5:03:03 PM #

Black on black in the Charg I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Leroy Rykaczewski
Leroy Rykaczewski United States
8/3/2018 6:43:19 PM #

Black on black in the Charg I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Newton Calkins
Newton Calkins United States
8/4/2018 10:09:16 AM #

Don’t wear seat belts lest you drown in you own urine?

Reply

Frederick Wentzell
Frederick Wentzell United States
8/4/2018 11:45:45 AM #

With thanks! Valuable information!

Reply

Sheila Kocurek
Sheila Kocurek United States
8/4/2018 1:28:23 PM #

Don’t wear seat belts lest you drown in your own urine?

Reply

Roland Heaton
Roland Heaton United States
8/4/2018 1:49:22 PM #

With thanks! Valuable information!

Reply

Hong Rostad
Hong Rostad United States
8/4/2018 2:54:31 PM #

Black on black in the Charger I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Marion Eubank
Marion Eubank United States
8/5/2018 1:21:39 PM #

Black on black in the Charger I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Javier Dolecki
Javier Dolecki United States
8/5/2018 3:48:15 PM #

Black on black in the Charg I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Myriam Zipperer
Myriam Zipperer United States
8/5/2018 3:48:16 PM #

Black on black in the Charger I'm creepin' Rub me the right way, you might get a genie B.o.B, black Houdini

Reply

Yahaira Arcoraci
Yahaira Arcoraci United States
8/5/2018 7:51:00 PM #

Don’t wear seat belts lest you drown in you own urine?

Reply

Jerilyn Dillaman
Jerilyn Dillaman United States
8/10/2018 2:33:46 PM #

I conceive this web site has got some real good information for everyone https://bzp65.com/

Reply

Lincoln Schneck
Lincoln Schneck United States
8/10/2018 3:48:52 PM #

I have been checking out many of your stories and i can state pretty https://php665.com/

Reply

Starla Vanderstappen
Starla Vanderstappen United States
8/10/2018 3:48:57 PM #

Awesome! Its in fact amazing paragraph, I have got much clear idea regarding from this piece of https://newone2017.com/

Reply

Lance Heinzle
Lance Heinzle United States
8/10/2018 5:03:17 PM #

What’s up, after reading this awesome piece https://miso7700.com/

Reply

Kanesha Tebbs
Kanesha Tebbs United States
8/11/2018 6:50:59 AM #

sound like you know what you?re talking about! Thanks http://casinossir.com

Reply

Leo Horky
Leo Horky United States
8/13/2018 3:42:25 PM #

This is a impressive story. Thanks! https://bzp65.com/

Reply

Rashad Mainz
Rashad Mainz United States
8/14/2018 6:28:36 AM #

What’s up, after reading this awesome piece https://bzp65.com/

Reply

Jessie Laskowski
Jessie Laskowski United States
8/14/2018 4:44:56 PM #

It?s hard to come by knowledgeable people on this subject, however, you https://bzp65.com/

Reply

Delaine Bluel
Delaine Bluel United States
8/15/2018 6:43:31 AM #

This is a impressive story. Thanks! https://bzp65.com/

Reply

Edwardo Taran
Edwardo Taran United States
8/17/2018 8:12:29 AM #

This is a impressive story. Thanks! https://php665.com/

Reply

Brett Lacerte
Brett Lacerte United States
8/17/2018 9:17:33 AM #

What’s up, after reading this awesome piece https://php665.com/

Reply

Kathe Bierbrauer
Kathe Bierbrauer United States
8/20/2018 9:42:20 AM #

With thanks! Valuable information! https://php665.com/

Reply

醫學美容 立體 cosmetic.wiki
醫學美容 立體 cosmetic.wiki United States
10/10/2018 10:32:08 PM #

有子女便是足?做媽媽也可以很美 - STYLE-TIPS.COM  昨日開學,如果你 fackbook 被開學洗版,見到不少幼稚園、小學生開學,証明...      

Reply

酵素
酵素 United States
10/11/2018 5:47:45 AM #

自體脂肪隆乳、隆乳手術、抽脂手術、脂肪存活、存活、自體脂肪移植、自體脂肪注射、義乳隆乳、冷凍脂肪等一些相關、似是而非或有爭議的事項的披露與討論。

Reply

商業貸款 擁有完善的財務安排應付資金需求及現金周轉,是您業務成功的關鍵。工銀亞洲可以為您度身訂造財務組合,讓您充分把握業務發展機會。為協助貴公司妥善理財,配合個別業務營運的不同需要,我們提供一應俱全的服務,從日常透支以至不同形式的融資安排等等,應有盡有。商業/工業融資 我們提供各類型的信貸服務,包括透支、商業/工業借貸、樓宇按揭貸款、履約保證金、各項擔保及發票及期票貼現等,並由資深的客戶服務經理提供個人跟進服務,全心全意與您建立長遠的合作關係。

Reply

醫學美容 健康 cosmetic.wiki
醫學美容 健康 cosmetic.wiki United States
10/20/2018 11:36:07 AM #

流行時尚: 為什麼有些人會有狐臭?那麼腋臭發病是有原因的有哪些呢?  流行時尚: 為什麼有些人會有狐臭?那麼腋臭發病是有原因的有哪些呢?      

Reply

Add comment

biuquote
  • Comment
  • Preview
Loading

Rel=Me

Month List

RecentComments

Comment RSS