Category Archives: Apple

alpine and OS X 10.5 (Leopard)

You may get the following error when compiling alpine or pine on OS X 10.5 (Leopard):

In file included from osdep.c:49:
env_unix.c: In function ‘dotlock_lock’:
env_unix.c:1188: error: too many arguments to function ‘setpgrp’
In file included from osdep.c:52:
tcp_unix.c: In function ‘tcp_aopen’:
tcp_unix.c:408: error: too many arguments to function ‘setpgrp’
make[4]: *** [osdep.o] Error 1
make[3]: *** [osx] Error 2
make[2]: *** [OSTYPE] Error 2
make[1]: *** [oxp] Error 2
make: *** [c-client] Error 2

To resolve this problem modify the source code to use setsid() instead of setpgrp(), you can use my patch as guidance (applied to alpine .9999):

diff -ruN alpine-0.9999/alpine/send.c alpine-0.9999-JST/alpine/send.c
--- alpine-0.9999/alpine/send.c	2007-08-30 15:33:35.000000000 -0700
+++ alpine-0.9999-JST/alpine/send.c	2007-11-06 14:04:47.000000000 -0800
@@ -3806,7 +3806,7 @@
 		    /*
 		     * Put us in new process group...
 		     */
-		    setpgrp(0, ps_global->post->pid);
+                    setsid();

 		    /* BUG: should fix argv[0] to indicate what we're up to */

diff -ruN alpine-0.9999/imap/src/osdep/unix/env_unix.c alpine-0.9999-JST/imap/src/osdep/unix/env_unix.c
--- alpine-0.9999/imap/src/osdep/unix/env_unix.c	2007-08-16 12:43:35.000000000 -0700
+++ alpine-0.9999-JST/imap/src/osdep/unix/env_unix.c	2007-11-06 14:05:38.000000000 -0800
@@ -1185,7 +1185,7 @@
 	    for (cf = max (20,max (max (pi[0],pi[1]),max(po[0],po[1])));
 		 cf >= 3; --cf) if (cf != fd) close (cf);
 				/* be our own process group */
-	    setpgrp (0,getpid ());
+             setsid();
 				/* now run it */
 	    _exit (execv (argv[0],argv));
 	  }
diff -ruN alpine-0.9999/imap/src/osdep/unix/tcp_unix.c alpine-0.9999-JST/imap/src/osdep/unix/tcp_unix.c
--- alpine-0.9999/imap/src/osdep/unix/tcp_unix.c	2007-08-16 12:43:35.000000000 -0700
+++ alpine-0.9999-JST/imap/src/osdep/unix/tcp_unix.c	2007-11-06 14:05:56.000000000 -0800
@@ -405,7 +405,7 @@
       dup2 (pipeo[0],0);	/* parent's output is my input */
 				/* close all unnecessary descriptors */
       for (cf = 3; cf < = maxfd; cf++) close (cf);
-      setpgrp (0,getpid ());	/* be our own process group */
+      setsid();
       _exit (execv (path,argv));/* now run it */
     }
     _exit (1);			/* child is done */
diff -ruN alpine-0.9999/web/src/alpined.d/alpined.c alpine-0.9999-JST/web/src/alpined.d/alpined.c
--- alpine-0.9999/web/src/alpined.d/alpined.c	2007-08-31 11:52:30.000000000 -0700
+++ alpine-0.9999-JST/web/src/alpined.d/alpined.c	2007-11-06 14:04:24.000000000 -0800
@@ -540,7 +540,7 @@
 			    close(0);		/* disassociate */
 			    close(1);
 			    close(2);
-			    setpgrp(0, 0);
+                            setsid();
 			    break;

 			  default :		/* parent */

Word Processors for OS X

I’ve always used Microsoft Office on my Apple for word processing because OpenOffice/NeoOffice is slow and relies on X11 etc. I recently installed AbiWord because I needed to open some WordPerfect files. It worked great, it was responsive and stable and doesn’t require X11. Most importantly, it’s free and open-source. Wonder why it gets so little credit in Apple-land.

Bizarre wording in Adium

Adium has been updated. Every-time I get the notification window I misread it as an update was made X weeks ago. Of course this isn’t the case, but it’s easy for one to think so if they don’t take a few minutes to read it again and again.

Note to developers: This is too confusing, maybe just tell me my current version and the new version that is available?

Recorded phone calls in iTunes via RSS

calls in itunes via rss

I setup my Asterisk PBX to use the monitor() application to record phone calls. Then I wrote some perl code that generates an iTunes compatible RSS feed, embedding the recorded phone calls as media enclosures.

The result is an archive of my phone calls in iTunes updating automatically via RSS. I think I’ll create a second RSS feed for voicemails…

Update: I’ve had a few requests for the perl that did this for me. Follow on through for the goodies.

Continued reading >

12″ Powerbook thoughts

I bought the 15″ titanium powerbook several years ago and just recently replaced it with a new 12″ powerbook (aluminum).

The keyboard, although being the same size, feels quite smaller. The new keyboard is silver, not black, and doesn’t seem to flex at all. I just ordered the iSkin Protouch keyboard cover for this laptop, it should prevent candy and dirt getting under the keyboard. I could never keep the last laptop clean enough.

The 12″ display is not as crisp as the titanium’s 15″ LCD. This bothered me at first, but I no longer notice it unless I have it next to a better display. It’s also not a cinema display. I believe the LCD in the 12″ is the same part from the ibook line, which is less expensive. Probably explains the image not being as sharp as the other powerbooks.

Maybe an hour more juice in the battery over the tibook. I can squeeze four and a half to five hours depending on how much I have the screen dimmed.

The corners of the 12″ are rounded, compared to the square shape of the tibook. Besides looking nicer it’s more comfortable in the hand. I don’t see any evidence of painted plastic like the molding of the tibook. I really like the placement of the vents between the lcd and the base, no matter how I lay this thing down the vent won’t be covered. Oftentimes in the tibook the vent would be covered and the fans would spin up.

Speaking of fans, it seems to turn on more frequently than the older titanium. Overall I’m really happy with it– but I can’t wait to get something faster and a couple big displays.