I needed a copy of unsquashfs.exe to run under Cygwin, which took a couple patches. These patches are against the squashfs-tools4.0 source from sourceforge. The patches are directly derived from the changes for 3.4 by CHNRXN, and don’t really represent any original work of my own. A copy is also available on pastebin.com/R9EQcbQY.
diff -rupN squashfs4.0_org/squashfs-tools/global.h squashfs4.0/squashfs-tools/global.h
--- squashfs4.0_org/squashfs-tools/global.h 2009-03-16 00:03:54.000000000 -0400
+++ squashfs4.0/squashfs-tools/global.h 2010-09-02 14:46:26.732375000 -0400
@@ -44,4 +44,9 @@ typedef long long squashfs_fragment_inde
typedef squashfs_inode_t squashfs_inode;
typedef squashfs_block_t squashfs_block;
+#ifdef __CYGWIN__
+#include
+#define FNM_EXTMATCH (1 << 5)
+#endif
+
#endif
diff -rupN squashfs4.0_org/squashfs-tools/mksquashfs.c squashfs4.0/squashfs-tools/mksquashfs.c
--- squashfs4.0_org/squashfs-tools/mksquashfs.c 2009-04-05 17:22:48.000000000 -0400
+++ squashfs4.0/squashfs-tools/mksquashfs.c 2010-09-02 14:57:08.435500000 -0400
@@ -49,10 +49,14 @@
#include
#ifndef linux
+#ifndef __CYGWIN__
#define __BYTE_ORDER BYTE_ORDER
#define __BIG_ENDIAN BIG_ENDIAN
#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#endif
+#ifndef __CYGWIN__
#include
+#endif
#else
#include
#include
@@ -3687,6 +3691,9 @@ void initialise_threads()
signal(SIGUSR1, sigusr1_handler);
+#ifdef __CYGWIN__
+ processors = atoi(getenv("NUMBER_OF_PROCESSORS"));
+#else
if(processors == -1) {
#ifndef linux
int mib[2];
@@ -3708,6 +3715,7 @@ void initialise_threads()
processors = get_nprocs();
#endif
}
+#endif
if((thread = malloc((2 + processors * 2) * sizeof(pthread_t))) == NULL)
BAD_ERROR("Out of memory allocating thread descriptors\n");
@@ -3962,7 +3970,6 @@ int excluded(struct pathnames *paths, ch
return FALSE;
}
-
*new = init_subdir();
if(stickypath)
*new = add_subdir(*new, stickypath);
diff -rupN squashfs4.0_org/squashfs-tools/read_fs.c squashfs4.0/squashfs-tools/read_fs.c
--- squashfs4.0_org/squashfs-tools/read_fs.c 2009-03-31 00:23:14.000000000 -0400
+++ squashfs4.0/squashfs-tools/read_fs.c 2010-09-02 14:45:20.998000000 -0400
@@ -40,9 +40,11 @@ extern unsigned int get_guid(unsigned in
#include
#ifndef linux
+#ifndef __CYGWIN__
#define __BYTE_ORDER BYTE_ORDER
#define __BIG_ENDIAN BIG_ENDIAN
#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#endif
#else
#include
#endif
diff -rupN squashfs4.0_org/squashfs-tools/unsquashfs.c squashfs4.0/squashfs-tools/unsquashfs.c
--- squashfs4.0_org/squashfs-tools/unsquashfs.c 2009-04-05 17:23:06.000000000 -0400
+++ squashfs4.0/squashfs-tools/unsquashfs.c 2010-09-02 14:44:58.013625000 -0400
@@ -110,6 +110,7 @@ void update_progress_bar();
void sigwinch_handler()
{
+#ifndef __CYGWIN__
struct winsize winsize;
if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
@@ -119,6 +120,9 @@ void sigwinch_handler()
columns = 80;
} else
columns = winsize.ws_col;
+#else
+ columns = 80;
+#endif
}
@@ -1793,6 +1797,9 @@ void initialise_threads(int fragment_buf
EXIT_UNSQUASH("Failed to set signal mask in intialise_threads"
"\n");
+#ifdef __CYGWIN__
+ processors = atoi(getenv("NUMBER_OF_PROCESSORS"));
+#else
if(processors == -1) {
#ifndef linux
int mib[2];
@@ -1814,6 +1821,7 @@ void initialise_threads(int fragment_buf
processors = get_nprocs();
#endif
}
+#endif
if((thread = malloc((3 + processors) * sizeof(pthread_t))) == NULL)
EXIT_UNSQUASH("Out of memory allocating thread descriptors\n");
diff -rupN squashfs4.0_org/squashfs-tools/unsquashfs.h squashfs4.0/squashfs-tools/unsquashfs.h
--- squashfs4.0_org/squashfs-tools/unsquashfs.h 2009-03-28 22:29:02.000000000 -0400
+++ squashfs4.0/squashfs-tools/unsquashfs.h 2010-09-02 14:42:21.154250000 -0400
@@ -46,9 +46,11 @@
#include
#ifndef linux
+#ifndef __CYGWIN__
#define __BYTE_ORDER BYTE_ORDER
#define __BIG_ENDIAN BIG_ENDIAN
#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#endif
#else
#include
#endif
Perhaps you’ve gotten the above error when starting iTunes. This vexed me for a while, as it was happening after a fresh install of Windows XP w/ SP3 from a legal CD (apparently from an illegal CD it’s quite common?). After some Googling, registry poking and downloading, I finally nailed the problem. I’ve written in up on a wiki page at http://www.tinymicros.com/wiki/iTunes_Gives_Warning_On_Startup.
This fix also fixed a problem I was having trying to install the HP software for my LaserJet CP2025dn.
If this works for you, please post a follow-up. [If you're a spammer, just continue on, because your post will never make it up here]
For this reason alone, I would like to have goats!
There’s a neat place in Tiger, GA called ‘Goats On The Roof’ that has… well, goats on the roof (website). I’ve not been there, but Cindy has (and brought back a T-shirt!).
I’ve never owned goats, never been around goats, and never eaten a goat. But they seem like interesting animals, and they’re good for keeping the grass cropped. There are, in fact, companies that rent out goats for grass cutting. Google uses them, and they made the news a while back (sorry, no link).
We’ve got 2.2 acres, and we’re not in a sub-division. I’m pretty sure we’re zoned for goats, since other people have some, along with chickens and cows. But our property is rather hilly, and very difficult to fence. So I guess I won’t have goats, or a goat tower, until we move to 500 acres in the country (right after we win the lottery)…
After having a fair amount of frustration trying to install Lucene from the installation guide provided on the MediaWiki pages, I documented what I had to go through to get it running. I believe this represents a better installation process than the documentation currently available.
It’s available here.
Gizmodo has an excellent collection of photos of Endeavor, including the one above of Endeavour on its 747 transport.
An interesting collection of painted hands. I especially like this one and the giraffe.
Too cute!
I’ve been using Google’s GMail for a long time, and it’s become my primary mail client for both work and home. One of the things I got tired of was clicking a ‘mailto:’ link somewhere on a web page and having Outlook open up. I finally got annoyed enough to do some searching, and found this nifty little program called gAttach!.
It’s a small application that installs itself as the system mail handler. When a ‘mailto:’ link is clicked, it launches, logs into GMail (or optionally assumes that you already are), and creates an entry in your Drafts folder with the email address, and, if present in the ‘mailto:’ link, the subject.
It’s not quite *exactly* what I want, as I would prefer that focus then be switched to the browser and GMail tab, with the cursor positioned so I can start typing in the body. This may not be possible, I don’t know.
But in any case, it’s far better than launching an un-configured version of Microsoft Abortion. Er, I mean, Outlook.
[gAttach!]
From Gizmodo…
According to one of the comments:
This was a publicity stunt for Leb Heir hydraulics, showing the strength of their retrofitted system.
The tower was made for it, as was the quick connect where the bucket is, there was also another quick connect on the body of the excavator that allowed it to anchor to the tower.
I can only conclude that the driver must be totally bats**t whacko.
The other day I had an urge to buy bananas. I enjoy them, but rarely buy them, since they often end up going bad before I get around to eating them. This is mostly because I forget they are there.
But the other day I gave in to my urge, probably because I went grocery shopping while I was hungry (which is never a good idea).
Naturally, the bananas started going bad. Then I had an epiphany. “I should make banana bread!” I said to myself.
So I did, with this recipe.
The bread turned out most excellent, in spite of sticking slightly to the non-stick pan.
If you’re looking for a banana bread recipe, I highly recommend this one.


