aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix
diff options
context:
space:
mode:
Diffstat (limited to 'code/unix')
-rw-r--r--code/unix/unix_main.c14
-rw-r--r--code/unix/unix_net.c4
2 files changed, 8 insertions, 10 deletions
diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c
index 7f4b65c..31521de 100644
--- a/code/unix/unix_main.c
+++ b/code/unix/unix_main.c
@@ -72,7 +72,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#if idppc_altivec
#ifdef MACOS_X
- #include <Carbon/Carbon.h>
+ #include <sys/sysctl.h>
#endif
#endif
@@ -383,11 +383,13 @@ qboolean Sys_DetectAltivec( void )
#if idppc_altivec
#ifdef MACOS_X
- long feat = 0;
- OSErr err = Gestalt(gestaltPowerPCProcessorFeatures, &feat);
- if ((err==noErr) && ((1 << gestaltPowerPCHasVectorInstructions) & feat)) {
- altivec = qtrue;
- }
+ int selectors[2] = { CTL_HW, HW_VECTORUNIT };
+ int hasVectorUnit = 0;
+ size_t length = sizeof(hasVectorUnit);
+ int error = sysctl(selectors, 2, &hasVectorUnit, &length, NULL, 0);
+
+ if( 0 == error )
+ altivec = (hasVectorUnit != 0);
#else
void (*handler)(int sig);
handler = signal(SIGILL, illegal_instruction);
diff --git a/code/unix/unix_net.c b/code/unix/unix_net.c
index 13dc3fb..5fd1b0c 100644
--- a/code/unix/unix_net.c
+++ b/code/unix/unix_net.c
@@ -382,8 +382,6 @@ void NET_GetLocalAddress( void ) {
int interfaceSocket;
int family;
- Com_Printf("NET_GetLocalAddress: Querying for network interfaces\n");
-
// Set this early so we can just return if there is an error
numIP = 0;
@@ -405,7 +403,6 @@ void NET_GetLocalAddress( void ) {
return;
}
-
linkInterface = (struct ifreq *) ifc.ifc_buf;
while ((char *) linkInterface < &ifc.ifc_buf[ifc.ifc_len]) {
unsigned int nameLength;
@@ -469,7 +466,6 @@ void NET_GetLocalAddress( void ) {
}
linkInterface = IFR_NEXT(linkInterface);
}
- Com_Printf("NET_GetLocalAddress: DONE querying for network interfaces\n");
close(interfaceSocket);
}