Changeset ec11ea4 for core/c


Ignore:
Timestamp:
Dec 19, 2004 6:25:27 AM (16 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1756997
Parents:
a1ebf85
git-author:
scintilla <scintilla> (12/19/04 06:25:27)
git-committer:
zzz <zzz@…> (12/19/04 06:25:27)
Message:
  • Convert native jcpuid code from C++ to C. This should alleviate build problems experienced by some users.
Location:
core/c/jcpuid
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • core/c/jcpuid/build.sh

    ra1ebf85 rec11ea4  
    2121mkdir lib/freenet/support/CPUInformation
    2222
    23 CPP="g++"
     23CC="gcc"
    2424
    2525case `uname -sr` in
     
    4444echo "Compiling C code..."
    4545rm -f $LIBFILE
    46 $CPP $LINKFLAGS $INCLUDES src/*.cpp -o $LIBFILE
     46$CC $LINKFLAGS $INCLUDES src/*.c -o $LIBFILE
    4747strip $LIBFILE
    4848echo Built $LIBFILE
  • core/c/jcpuid/src/jcpuid.c

    ra1ebf85 rec11ea4  
    66{
    77        int a,b,c,d;
    8         jclass clsResult = env->FindClass ("freenet/support/CPUInformation/CPUID$CPUIDResult");
    9         jmethodID constructor = env->GetMethodID(clsResult,"<init>","(IIII)V" );
     8        jclass clsResult = (*env)->FindClass(env, "freenet/support/CPUInformation/CPUID$CPUIDResult");
     9        jmethodID constructor = (*env)->GetMethodID(env, clsResult,"<init>","(IIII)V" );
    1010        #ifdef _MSC_VER
    1111                //Use MSVC assembler notation
     
    3131                );
    3232        #endif
    33         return env->NewObject(clsResult,constructor,a,b,c,d);
     33        return (*env)->NewObject(env, clsResult,constructor,a,b,c,d);
    3434}
    3535
Note: See TracChangeset for help on using the changeset viewer.