"C code" case-sensitive using MaxIde(MacOS)

Übersicht BlitzMax, BlitzMax NG Allgemein

Neue Antwort erstellen

 

Guamtmsou G.

Betreff: "C code" case-sensitive using MaxIde(MacOS)

BeitragSa, Mai 21, 2011 2:41
Antworten mit Zitat
Benutzer-Profile anzeigen
Just discovered that "C" sources on MacOS are case-sensitive...
for example, to retrieve the numbers of MAC cores:

http://www.blitzbasic.com/code...?code=2526

the "cpucount.macos.c" on the Ubuntu-version that contains:

Code: [AUSKLAPPEN]
#Include <stdio.h>
#Include <sys/param.h>
#Include <sys/sysctl.h>

Int CpuCount () {
   Int mib[2];
   size_t Len;
   Int cpun = 1;
   mib[0] = CTL_HW;
   mib[1] = HW_NCPU;
   Len = SizeOf(cpun);
   If (sysctl(mib, 2, &cpun, &Len, Null, Null == -1)) {
      cpun=1;
   }
    Return cpun;
}


doesn't works on MacOS...
it's necessary to re-lowerize the code

Code: [AUSKLAPPEN]
#include <stdio.h>
#include <sys/param.h>
#include <sys/sysctl.h>

int CpuCount(){
   int mib[2];
   size_t Len;
   int cpun = 1;
   mib[0] = CTL_HW;
   mib[1] = HW_NCPU;
   Len = sizeof(cpun);
   if (sysctl(mib, 2, &cpun, &Len, NULL, NULL == -1)) {
      cpun=1;
   }
    return cpun;
}

DaysShadow

BeitragSa, Mai 21, 2011 12:18
Antworten mit Zitat
Benutzer-Profile anzeigen
C code is always case sensitive and the code can't work because usually all primitive data types such as int, float and so on are written small in C as long as there is nothing like "#define Int int" somewhere in the headers which are included.

So, it's nothing special.
Blessed is the mind too small for doubt
 

Guamtmsou G.

BeitragSa, Mai 21, 2011 15:36
Antworten mit Zitat
Benutzer-Profile anzeigen
sorry, i'm a very "c" noob

Neue Antwort erstellen


Übersicht BlitzMax, BlitzMax NG Allgemein

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group