Edenwaith Blog

Check for 64-bit

29th January 2011 | Tutorial

If you have a Macintosh application and you need to check if the OS is running in either 32 or 64 bit mode, here is a code snippet to make that determination.


/* File: check64bit.c
 * Description: Check if the running version of Mac OS X is 64-bit
 * To Compile: gcc -Wall -o check64bit check64bit.c
 * To run: ./check64bit
 */
 
 #include <stdio.h>
 #include <string.h>
 #include <sys/utsname.h>
 
 int main(int argc, char *argv[])
 {
 	int ret = 0;
 	struct utsname uname_info;
 	
 	ret = uname(&uname_info);
 	
 	if (ret == 0)
 	{
		printf("Uname Info\n");
		printf("Sysname  : %s\n", uname_info.sysname);
		printf("Nodename : %s\n", uname_info.nodename);
		printf("Release  : %s\n", uname_info.release);
		printf("Version  : %s\n", uname_info.version);
		printf("Machine  : %s\n", uname_info.machine);
		
		if (strcmp(uname_info.machine, "x86_64") == 0)
		{
			printf("You are running in 64-bit mode!\n");
		}
		else
		{
			printf("You are running in 32-bit mode.\n");
		}
 	}
 	
 	return 0;
 }
 
 

Reference

Edenwaith Gist : https://gist.github.com/edenwaith/8125865

GUI Tar 1.2.4

27th January 2011 | GUI Tar

2011 has started off well with two software updates in January. GUI Tar has been updated to address a couple of issues.

At this time, this is the only planned release for GUI Tar this year. GUI Tar is a freeware application which has seen infrequent updates in the past several years, and there are no current plans to heavily continue development on GUI Tar in the foreseeable future. If your archiving needs exceed what Mac OS X or GUI Tar can provide, it is recommended that you look for a more appropriate solution (such as StuffIt, BetterZip, or one of the many other archiving utilities available).

Permanent Eraser 2.5.1

11th January 2011 | Permanent Eraser

A number of people reported having difficulty accessing the new Preferences in Permanent Eraser 2.5.0. Considering that the Preferences was one of the cornerstones for the 2.5 release, this problem needed to be fixed so trying to open the Preferences was not so much of a delicate timing issue. Permanent Eraser 2.5.1 has fixed this problem, so the Preferences window can be opened, even when the initial warning message appears.

« Newer posts