annotate src/timeconv.c @ 388:292ad0f71fd4

Add operator and quotes to the AX_PYTHON_DEVEL parameter The operator is required and the quotes are needed to protect PYTHON_VERSION. See-also: https://www.gnu.org/software/autoconf-archive/ax_python_devel.html Fixes: checking whether to build the libpst python interface... yes checking for python build information... checking for python3.7... python3.7 checking for main in -lpython3.7... no checking for main in -lpython3.7m... yes results of the Python check: Binary: python3.7 Library: python3.7m Include Dir: /usr/include/python3.7m checking for python3.7... /usr/bin/python3.7 checking for a version of Python >= '2.1.0'... yes checking for a version of Python 3.7... File "<string>", line 1 import sys; ver = sys.version.split ()[0]; print (ver 3.7) ^ SyntaxError: invalid syntax no configure: error: this package requires Python 3.7. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure. See ``configure --help'' for reference.
author Paul Wise <pabs3@bonedaddy.net>
date Sat, 21 Dec 2019 21:25:45 +0800
parents ad7b880ad3d1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
122
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 118
diff changeset
1 #include "define.h"
bdb38b434c0a more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents: 118
diff changeset
2
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 172
diff changeset
3
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
4
199
e3a46f66332b more changes in recurrence decoding
Carl Byington <carl@five-ten-sg.com>
parents: 198
diff changeset
5 char* pst_fileTimeToAscii(const FILETIME* filetime, char* result) {
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 172
diff changeset
6 time_t t;
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 172
diff changeset
7 t = pst_fileTimeToUnixTime(filetime);
199
e3a46f66332b more changes in recurrence decoding
Carl Byington <carl@five-ten-sg.com>
parents: 198
diff changeset
8 return ctime_r(&t, result);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
9 }
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
10
378
ad7b880ad3d1 Alfredo Esteban - add -l and -f options to lspst
Carl Byington <carl@five-ten-sg.com>
parents: 199
diff changeset
11 size_t pst_fileTimeToString(const FILETIME* filetime, const char* date_format, char* result) {
ad7b880ad3d1 Alfredo Esteban - add -l and -f options to lspst
Carl Byington <carl@five-ten-sg.com>
parents: 199
diff changeset
12 time_t t;
ad7b880ad3d1 Alfredo Esteban - add -l and -f options to lspst
Carl Byington <carl@five-ten-sg.com>
parents: 199
diff changeset
13 t = pst_fileTimeToUnixTime(filetime);
ad7b880ad3d1 Alfredo Esteban - add -l and -f options to lspst
Carl Byington <carl@five-ten-sg.com>
parents: 199
diff changeset
14 return strftime(result, MAXDATEFMTLEN-1, date_format, localtime(&t));
ad7b880ad3d1 Alfredo Esteban - add -l and -f options to lspst
Carl Byington <carl@five-ten-sg.com>
parents: 199
diff changeset
15 }
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 172
diff changeset
16
199
e3a46f66332b more changes in recurrence decoding
Carl Byington <carl@five-ten-sg.com>
parents: 198
diff changeset
17 void pst_fileTimeToStructTM (const FILETIME *filetime, struct tm *result) {
172
6954d315aaa8 move version-info into main configure.in, and set it properly.
Carl Byington <carl@five-ten-sg.com>
parents: 129
diff changeset
18 time_t t1;
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 172
diff changeset
19 t1 = pst_fileTimeToUnixTime(filetime);
199
e3a46f66332b more changes in recurrence decoding
Carl Byington <carl@five-ten-sg.com>
parents: 198
diff changeset
20 gmtime_r(&t1, result);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
21 }
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
22
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 172
diff changeset
23
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 172
diff changeset
24 time_t pst_fileTimeToUnixTime(const FILETIME *filetime)
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
25 {
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 182
diff changeset
26 uint64_t t = filetime->dwHighDateTime;
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 182
diff changeset
27 const uint64_t bias = 11644473600LL;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
28 t <<= 32;
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 172
diff changeset
29 t += filetime->dwLowDateTime;
198
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 182
diff changeset
30 t /= 10000000;
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 182
diff changeset
31 t -= bias;
7c60d6d1c681 decode more recurrence mapi elements
Carl Byington <carl@five-ten-sg.com>
parents: 182
diff changeset
32 return ((t > (uint64_t)0x000000007fffffff) && (sizeof(time_t) <= 4)) ? 0 : (time_t)t;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
33 }
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
34