osx

How to guarantee 64-bit writes are atomic?

When can 64-bit writes be guaranteed to be atomic, when programming in C on an Intel x86-based platform (in particular, an Intel-based Mac running MacOSX 10.4 using the Intel compiler)? For example: unsigned long long int y; y = 0xfedcba87654321ULL; /* ... a bunch of other time-consuming stuff happens... */ y = 0x12345678abcdefULL; I...

OSX 10.5 Leopard Symbol Mangling with $non_lazy_ptr

Why does Leopard mangle some symbols with $non_lazy_ptr? More importantly what is the best method to fix undefined symbol errors because a symbol has been mangled with $non_lazy_ptr? ...

What is the best way to log out another user from their session on Mac OS X Leopard?

In other words: Log on as Bert (who is an administrator) Using fast user switching, log on as Ernie (Bert remains logged on) Switch back to Bert Bert logs Ernie off What is the best way to achieve step 4? ...

How do I create a container file?

I would like to create a file format for my app like Quake, OO, and MS Office 07 have. Basically a uncompressed zip folder, or tar file. I need this to be cross platform (mac and windows). Can I do something via command prompt and bash? ...

PHP debugging on OS X - hopeless?

I have tried: Xdebug and Eclipse. Eclipse launches a web browser, but the browser tries to access a non-existent file in Eclipse's .app bundle. Xdebug and NetBeans. It does a little bit better; a browser opens a page in /tmp which says "Launching. Please wait…" but nothing happens beyond that. Xdebug and debugclient, the CLI tool which...

What is the best Git GUI on OSX?

What is the best GUI on OSX for viewing a repository, and (optionally) manipulating it? ...

How do I install modperl under OS X Leopard's default Apache 2?

My attempts to install modperl under the default vanilla Leopard Apache 2 have failed and all I can find online are variations on this: I would like if possible not to rely on MacPorts or Fink, though if they can be made to work with the default Apache 2 install that would probably be ok. (The best answer is the one that I've supplied ...

Why am I getting this objective-c error message: invalid conversion from 'objc_object*'

This error message had me stumped for a while: invalid conversion from 'objc_object*' to 'int' the line in question was something like this: int iResult = [MyUtils utilsMemberFunc:param1,param2]; ...

Virtual network interface in Mac OS X

I know that you can make a virtual network interface in Windows (see here), and in Linux it is also pretty easy with ip-aliases, but does something similar exist for Mac OS X? I've been looking for loopback adapters, virtual interfaces and couldn't find a good solution. You can create a new interface in the networking panel, based on a...

Beginner question about XCode 3.1.1 and static libraries

Hi all, I'm an experienced VS.NET user and trying to get up and running on XCode 3.1.1. Here's what I'm trying to accomplish: I'd like a static library ("Lib") to have its own xcodeproj file. I'd an executable application ("App") that makes use of Lib to reference Lib's xcodeproj file so that changes to Lib cause App to relink. Ideall...

CPAN/gem-like repository for Objective-C and Cocoa?

Is there any centralized repository of useful Objective-C / Cocoa libraries as there is for Perl, Ruby, Python, etc.? In building my first iPhone app, I'm finding myself implementing some very basic functions that would be just a quick "gem install" away in Ruby. ...

OSX Security Framework NameAndPassword sample application

I am investigating security plugins using SFAuthorizationPluginView under Mac OSX and as a first step looking at the NameAndPassword sample application. The app builds OK but I cannot get it to authenticate. So does anyone have any experience of SFAuthorizationPluginView or any other examples. ...

Gamepad code on OS X: Buh?

I thought I was a decent programmer until I tried writing gamepad code for OS X. Now I feel deeply useless. Does anyone know of any code that I can legally use in my (non-free) game? Is it really this hard to talk to a gamepad on OS X? What am I missing? ...

How can you generate a Makefile from an Xcode project?

I want to generate a Makefile from an existing Xcode project on the Mac. Specifically, an existing iPhone, Objective-C program on the Mac. I found PBToMake, but it looks like it is for Xcode 2.1 and when I tried using it, it did not work for an Xcode 3.1 project. ...

Is it possible to send the contents of a text file to the clipboard from the command line in OS X?

I've found myself needing to do this a couple of times lately and wondered if there was a way to do this in the OS already. Failing that, I've got a pretty good idea of how to write a script to do it, I just need to know how to access the clipboard in os x. ...

How do you run a script on login in *nix?

I know I once know how to do this but... how do you run a script (bash is OK) on login in unix? ...

Run script on suspend/resume in Mac OS X

Is there any way to automatically run a script on suspend/resume (i.e. when I close the lid, or after opening it) under Mac OS X 10.4? ...

What are the Mac OS X terminal choices?

I am reasonably happy with Terminal.app and very unhappy with iTerm (the damn thing keeps crashing), but am I missing out on a better, more feature rich OS X terminal? ...

Mac OS X Java Swing Buttons are Disabled for no aparent reason

I wrote an application in Java and when it runs on one customer's computer running OS X The Save and Export buttons are disabled. (Everything else works in the application.) Both of these buttons open up a standard save file dialog. Any ideas? ...

Bash prompt in OS X terminal broken

I am using bash in os X Terminal app, and my custom $PS1 breaks when I scroll through my history. PS1="${BLUE}\u${CYAN}@${RED}\h${BLUE}\w\n\[${red}\$${NC}\]" also tried PS1="${BLUE}\u${CYAN}@${RED}\h${BLUE}\w\r\n[${red}\$${NC}]" The problem seems to be in the newline. I have used this bash prompt on Slackware no prob. ...