$NetBSD: patch-al,v 1.2 2005/05/29 14:38:33 wiz Exp $ --- glunix/src/nmgt/dnmgt.cc.orig 1997-09-18 21:05:03.000000000 +0200 +++ glunix/src/nmgt/dnmgt.cc @@ -138,10 +138,14 @@ #define __THIS_MODULE MODULE_NMGT #include +#include #include #include #include + +#ifndef __NetBSD__ #include +#endif #include "glib/types.h" #include "cdebug.h" @@ -200,6 +204,27 @@ Nmgt_IncomingWelcome(int callbackValue, Bool Nmgt_GetMachineInfo(MsgNmgt_Hello *hello) { +#ifdef __NetBSD__ + + FILE *file; + int *psize, *phys; + int one,two; + + psize = &one; + phys = &two; + + hello->machDesc.numProcessors = 1; /* hardcoded cuz I know better */ + file = fopen("/kern/pagesize","r"); + fscanf(file,"%d",psize); + fclose(file); + file = fopen("/kern/physmem","r"); + fscanf(file,"%d",phys); + fclose(file); + hello->machDesc.totalMegs = one * two; + hello->machDesc.mhz = 100; /* this is a hack XXX */ + +#else + processor_info_t info; ASSERT(hello != NULL); @@ -216,7 +241,7 @@ Nmgt_GetMachineInfo(MsgNmgt_Hello *hello } // Could use uname() to get the os type and version. - +#endif return True; }