You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-commits@incubator.apache.org by mo...@apache.org on 2009/09/29 15:05:18 UTC
svn commit: r819978 - in
/incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native:
cjvmti.c include/cjvmti.h
Author: monteith
Date: Tue Sep 29 15:05:18 2009
New Revision: 819978
URL: http://svn.apache.org/viewvc?rev=819978&view=rev
Log:
Fixup cjvmti to work with Visual C++ 6.0
Modified:
incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native/cjvmti.c
incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native/include/cjvmti.h
Modified: incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native/cjvmti.c
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native/cjvmti.c?rev=819978&r1=819977&r2=819978&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native/cjvmti.c (original)
+++ incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native/cjvmti.c Tue Sep 29 15:05:18 2009
@@ -353,6 +353,7 @@
int initAgent(){
static int dumpCount;
time_t creationTime;
+ __int64 longCreationTime;
struct tm * dumpTime;
char fileName[50];
int nameType = 0; // Switches between timestamping the file and not
@@ -390,7 +391,9 @@
writeReference(0, variableFile);
fwrite(&endianCheck, sizeof(int), 1, variableFile);
fprintf(variableFile, "CJVMTI V0.01");
- fwrite(&creationTime, sizeof(time_t), 1, variableFile);
+
+ longCreationTime = (_int64) creationTime; // Ensure that time is written as a long long.
+ fwrite(&longCreationTime, sizeof(_int64), 1, variableFile);
dumpCount++;
return 1;
}
Modified: incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native/include/cjvmti.h
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native/include/cjvmti.h?rev=819978&r1=819977&r2=819978&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native/include/cjvmti.h (original)
+++ incubator/kato/trunk/org.apache.kato/kato.native/kato.native.cjvmti/src/main/native/include/cjvmti.h Tue Sep 29 15:05:18 2009
@@ -55,6 +55,11 @@
#define FTELL(x) _ftelli64((x))
#define FGETPOS(x,y) (*(y))=_ftelli64((x))
#define FSETPOS(x,y) _fseeki64((x), (*(y)), SEEK_SET)
+
+/* Prototypes for 64 bit functions */
+extern __int64 _ftelli64(FILE *stream);
+extern int _fseeki64(FILE *stream, __int64 offset, int origin);
+
#else
#error "unable to compile on this platform"
#endif