From 47735c3d73cc677e519cd33b58232c97729596fa Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 9 Jun 2008 23:52:56 +0200 Subject: Date/time string formatting revision Added ability to set custom date/time format --- UGlibC_compat.pas | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'UGlibC_compat.pas') diff --git a/UGlibC_compat.pas b/UGlibC_compat.pas index 342ab2d..95cd75d 100644 --- a/UGlibC_compat.pas +++ b/UGlibC_compat.pas @@ -26,6 +26,16 @@ uses Classes, SysUtils {$IFNDEF CPU64}, Libc{$ENDIF}; const GLIBC_LIB = 'libc.so.6'; type +{$IFDEF KYLIX} + QWORD = Int64; +{$ENDIF} + +{$IFNDEF CPU64} + TTimeT = DWORD; +{$ELSE} + TTimeT = QWORD; +{$ENDIF} + PGlibc_IOFile = pointer; TGlibc_timespec = packed record @@ -207,9 +217,6 @@ type {$ENDIF} end; -{$IFDEF KYLIX} - QWORD = Int64; -{$ENDIF} @@ -222,6 +229,10 @@ function glibc_stat64(const afile: PChar; buf: PGlibc_stat64): longint; function glibc_lstat64(const path: PChar; buf: PGlibc_stat64): longint; {$ENDIF} +{ +function glibc_localtime(timep: Pointer): Pointer; cdecl; external GLIBC_LIB name 'localtime'; +function glibc_strftime(s: PChar; max: Longint; format: PChar; tm: Pointer): Longint; cdecl; external GLIBC_LIB name 'strftime'; +} function glibc_statfs64(const path: PChar; buf: PGlibc_statfs64): longint; cdecl; external GLIBC_LIB name 'statfs64'; -- cgit v1.2.3