|
PostgreSQL Source Code git master
|
#include "postgres_fe.h"#include <fcntl.h>#include <sys/stat.h>#include <time.h>#include "pg_getopt.h"#include "private.h"#include "tzfile.h"
Go to the source code of this file.
Data Structures | |
| struct | rule |
| struct | zone |
| struct | link |
| struct | lookup |
| struct | attype |
| struct | timerange |
Typedefs | |
| typedef int_fast64_t | zic_t |
| typedef intmax_t | lineno_t |
Enumerations | |
| enum | { PERCENT_Z_LEN_BOUND = sizeof "+995959" - 1 } |
| enum | { WORK_AROUND_QTBUG_53071 = true } |
| #define LDAYSPERWEEK ((zic_t) DAYSPERWEEK) |
| #define linkat | ( | targetdir, | |
| target, | |||
| linknamedir, | |||
| linkname, | |||
| flag | |||
| ) | (itssymlink(target) ? (errno = ENOTSUP, -1) : link(target, linkname)) |
| #define PRIdZIC PRIdFAST64 |
| #define SCNdZIC SCNdFAST64 |
| #define ZIC_MAX INT_FAST64_MAX |
| #define ZIC_MIN INT_FAST64_MIN |
Definition at line 2575 of file zic.c.
References _, buf, error(), fb(), MINSPERHOUR, SECSPERMIN, and sign.
Referenced by doabbr().
Definition at line 3337 of file zic.c.
References attype::at, attypes, attype::dontmerge, growalloc(), timecnt, timecnt_alloc, type, and attype::type.
Referenced by outzone().
Definition at line 3347 of file zic.c.
References _, charcnt, chars, desigidx, error(), EXIT_FAILURE, fb(), i, isdsts, j, newabbr(), ttisstds, ttisuts, typecnt, TZ_MAX_TYPES, utoffs, and want_bloat().
Referenced by outzone(), and writezone().
Definition at line 3414 of file zic.c.
References _, comment_leapexpires, corr, error(), EXIT_FAILURE, fb(), hi_time, i, leapcnt, leapexpires, oadd(), SECSPERDAY, tadd(), trans, and warning().
Referenced by main().
Definition at line 429 of file zic.c.
References _, fb(), and memory_exhausted().
Referenced by writezone().
Definition at line 1172 of file zic.c.
References _, eat(), error(), errors, EXIT_FAILURE, fb(), getsave(), i, j, nrules, nzones, qsort, rule::r_filename, rule::r_linenum, rule::r_name, rcomp(), rules, warning(), zone::z_rules, and zones.
Referenced by main().
Definition at line 3640 of file zic.c.
References _, ciequal(), ciprefix(), fb(), itsabbr(), lasts, noise, table, warning(), wday_names, and word().
Referenced by getleapdatetime(), infile(), inleap(), and rulesub().
|
static |
Definition at line 873 of file zic.c.
References _, error(), fb(), len, name, noise, and warning().
Referenced by namecheck().
Definition at line 1980 of file zic.c.
References b, buf, i, and val.
Referenced by ExecInitExprRec(), fmtfloat(), fmtint(), fmtptr(), get_rule_expr(), pg_strfromd(), print_double(), print_double(), print_double(), print_double(), puttzcode(), and writezone().
|
static |
Definition at line 2619 of file zic.c.
References abbroffset(), fb(), format, is_alpha(), len, PERCENT_Z_LEN_BOUND, and sprintf.
Referenced by outzone(), and stringzone().
Definition at line 1018 of file zic.c.
References _, close_file(), directory, ENOTSUP, EXIT_FAILURE, fb(), fprintf, free, hardlinkerr(), itsdir(), itssymlink(), mkdirs(), progname, relname, strerror, symlink, and warning().
Referenced by main().
Definition at line 448 of file zic.c.
References malloc, and memcheck().
Referenced by getfields(), itsdir(), outzone(), relname(), and writezone().
Definition at line 454 of file zic.c.
References memcheck(), and realloc.
Referenced by growalloc().
Definition at line 3706 of file zic.c.
References _, emalloc(), error(), EXIT_FAILURE, fb(), is_space(), and size_product().
Referenced by infile().
Definition at line 1366 of file zic.c.
References _, error(), fb(), HOURSPERDAY, MINSPERHOUR, noise, oadd(), SCNdZIC, SECSPERHOUR, SECSPERMIN, sign, warning(), and ZIC_MAX.
Referenced by getleapdatetime(), getsave(), inzsub(), and rulesub().
Definition at line 1663 of file zic.c.
References _, byword(), EPOCH_YEAR, error(), fb(), gethms(), i, isleap, j, leapmaxyear, leapminyear, leapseen, len_months, len_years, LP_DAY, LP_MONTH, LP_TIME, LP_YEAR, max_time, min_time, mon_names, oadd(), SCNdZIC, SECSPERDAY, tadd(), and TM_JANUARY.
Referenced by inexpires(), and inleap().
|
static |
Definition at line 466 of file zic.c.
References _, erealloc(), fb(), memory_exhausted(), nitems, PTRDIFF_MAX, size_product(), and WORK_AROUND_QTBUG_53071.
Definition at line 1782 of file zic.c.
References _, error(), EXPIRES_FIELDS, getleapdatetime(), and leapexpires.
Referenced by infile().
Definition at line 1257 of file zic.c.
References _, buf, byword(), close_file(), comment_leapexpires, eat(), error(), EXIT_FAILURE, fb(), filename, fprintf, free, getfields(), inexpires(), inleap(), inlink(), inrule(), inzcont(), inzone(), LC_EXPIRES, LC_LEAP, LC_LINK, LC_RULE, LC_ZONE, leap_line_codes, leapsec, name, progname, SCNdZIC, strerror, and zi_line_codes.
Referenced by AlterSystemSetConfigFile(), isolation_start_test(), main(), psql_start_test(), and readfile().
Definition at line 1750 of file zic.c.
References _, byword(), error(), fb(), getleapdatetime(), LEAP_FIELDS, leap_types, leapadd(), LP_CORR, and LP_ROLL.
Referenced by infile().
Definition at line 1793 of file zic.c.
References _, ecpyalloc(), error(), filename, growalloc(), link::l_filename, link::l_linenum, link::l_linkname, link::l_target, LF_LINKNAME, LF_TARGET, linenum, LINK_FIELDS, links, namecheck(), nlinks, and nlinks_alloc.
Referenced by infile().
Definition at line 1468 of file zic.c.
References _, ecpyalloc(), error(), fb(), filename, getsave(), growalloc(), linenum, max_abbrvar_len, nrules, nrules_alloc, rule::r_abbrvar, rule::r_filename, rule::r_isdst, rule::r_linenum, rule::r_name, rule::r_save, RF_ABBRVAR, RF_COMMAND, RF_DAY, RF_HIYEAR, RF_LOYEAR, RF_MONTH, RF_NAME, RF_SAVE, RF_TOD, RULE_FIELDS, rules, and rulesub().
Referenced by infile().
Definition at line 1515 of file zic.c.
References _, error(), fb(), i, inzsub(), lcltime, nzones, psxrules, tzdefault, TZDEFRULES, ZF_NAME, ZONE_MAXFIELDS, and zones.
Referenced by infile().
Definition at line 1564 of file zic.c.
References _, ecpyalloc(), error(), fb(), filename, gethms(), growalloc(), linenum, max_format_len, max_time, min_time, namecheck(), noise, nzones, nzones_alloc, rule::r_filename, rule::r_linenum, rule::r_loyear, rpytime(), rulesub(), warning(), zone::z_filename, zone::z_format, zone::z_format_specifier, zone::z_linenum, zone::z_name, zone::z_rule, zone::z_stdoff, zone::z_untilrule, zone::z_untiltime, ZF_FORMAT, ZF_NAME, ZF_RULE, ZF_STDOFF, ZF_TILDAY, ZF_TILMONTH, ZF_TILTIME, ZF_TILYEAR, ZFC_FORMAT, ZFC_RULE, ZFC_STDOFF, ZFC_TILDAY, ZFC_TILMONTH, ZFC_TILTIME, ZFC_TILYEAR, and zones.
Definition at line 3475 of file zic.c.
References a.
Definition at line 3457 of file zic.c.
References a.
Referenced by getfields().
|
static |
Definition at line 2043 of file zic.c.
References timerange::defaulttype, trans, types, and ZIC_MAX.
Referenced by writezone().
Definition at line 18 of file win32link.c.
References _dosmaperr(), and fb().
Definition at line 3540 of file zic.c.
References a.
Referenced by ciequal(), ciprefix(), itsabbr(), and rulesub().
Definition at line 668 of file zic.c.
References _, adjleap(), associate(), bloat, change_directory(), close_file(), directory, dolink(), eat(), error(), errors, EXIT_FAILURE, EXIT_SUCCESS, fb(), fprintf, getopt(), i, infile(), j, lcltime, leapsec, links, nlinks, noise, nzones, optarg, optind, outzone(), print_abbrevs, print_cutoff, printf, progname, psxrules, S_IWGRP, S_IWOTH, timerange_option(), TYPE_BIT, TZDEFAULT, tzdefault, TZDEFRULES, usage(), warning(), warnings, zone::z_name, ZIC_BLOAT_DEFAULT, and zones.
Definition at line 440 of file zic.c.
References fb(), memory_exhausted(), and strerror.
Referenced by ecpyalloc(), emalloc(), and erealloc().
Definition at line 414 of file zic.c.
References _, EXIT_FAILURE, fb(), fprintf, and progname.
Referenced by align_to(), growalloc(), memcheck(), and size_product().
Definition at line 3937 of file zic.c.
References _, ecpyalloc(), err(), error(), EXIT_FAILURE, fb(), free, itsdir(), mkdir, MKDIR_UMASK, name, progname, and strerror.
Referenced by change_directory(), dolink(), and writezone().
Definition at line 917 of file zic.c.
References _, componentcheck(), fb(), name, noise, and warning().
Definition at line 3899 of file zic.c.
References _, charcnt, chars, error(), EXIT_FAILURE, fb(), GRANDPARENTED, i, is_alpha(), noise, TZ_MAX_CHARS, warning(), and ZIC_MAX_ABBR_LEN_WO_WARN.
Referenced by addtype().
Definition at line 3753 of file zic.c.
References fb(), time_overflow(), ZIC_MAX, and ZIC_MIN.
Referenced by adjleap(), gethms(), getleapdatetime(), outzone(), and rpytime().
Definition at line 2935 of file zic.c.
References _, addtt(), addtype(), attype::at, attypes, charcnt, compat, DC_DOM, doabbr(), attype::dontmerge, eat(), eats(), emalloc(), EPOCH_YEAR, error(), fb(), free, i, INITIALIZE, j, leapmaxyear, leapminyear, leapseen, max_abbrvar_len, max_format_len, max_time, max_year, min_time, min_year, noise, oadd(), rule::r_isdst, rpytime(), stringzone(), tadd(), timecnt, TM_JANUARY, type, typecnt, updateminmax(), want_bloat(), warning(), writezone(), YEARSPERREPEAT, ZIC_MAX, ZIC_MIN, ZIC_VERSION, and ZIC_VERSION_PRE_2013.
Referenced by main().
Definition at line 2002 of file zic.c.
References buf, convert(), fb(), and val.
Referenced by puttzcodepass(), and writezone().
Definition at line 2011 of file zic.c.
References buf, convert64(), fb(), puttzcode(), and val.
Referenced by writezone().
Definition at line 965 of file zic.c.
Definition at line 3790 of file zic.c.
References _, DC_DOWGEQ, DC_DOWLEQ, EPOCH_WDAY, EPOCH_YEAR, error(), EXIT_FAILURE, fb(), i, isleap, LDAYSPERWEEK, len_months, len_years, max_time, min_time, noise, oadd(), SECSPERDAY, SECSPERREPEAT, tadd(), TM_FEBRUARY, TM_JANUARY, warning(), y, YEARSPERREPEAT, ZIC_MAX, and ZIC_MIN.
|
static |
Definition at line 1818 of file zic.c.
References _, begin_years, byword(), DC_DOM, DC_DOWGEQ, DC_DOWLEQ, ecpyalloc(), end_years, error(), EXIT_FAILURE, fb(), fprintf, free, gethms(), lasts, len_months, lowerit(), mon_names, progname, SCNdZIC, wday_names, YR_MAXIMUM, YR_MINIMUM, YR_ONLY, ZIC_MAX, and ZIC_MIN.
Definition at line 421 of file zic.c.
References _, fb(), memory_exhausted(), and nitems.
Referenced by getfields(), growalloc(), and writezone().
Definition at line 2671 of file zic.c.
References DAYSPERWEEK, fb(), HOURSPERDAY, len, MINSPERHOUR, SECSPERMIN, and sprintf.
Referenced by stringrule(), and stringzone().
Definition at line 2705 of file zic.c.
References compat, DAYSPERWEEK, DC_DOM, DC_DOWGEQ, DC_DOWLEQ, fb(), len_months, MINSPERHOUR, SECSPERDAY, SECSPERMIN, sprintf, stringoffset(), and TM_FEBRUARY.
Referenced by stringzone().
Definition at line 2800 of file zic.c.
References compat, DC_DOM, doabbr(), fb(), hi_time, i, len, max_time, MINSPERHOUR, rule::r_month, rule_cmp(), SECSPERDAY, SECSPERMIN, stringoffset(), stringrule(), TM_DECEMBER, TM_JANUARY, and ZIC_MAX.
Referenced by outzone().
Definition at line 3761 of file zic.c.
References fb(), max_time, min_time, and time_overflow().
Referenced by adjleap(), getleapdatetime(), outzone(), rpytime(), and writezone().
Definition at line 616 of file zic.c.
References fb(), hi_time, lo_time, max_time, and min_time.
Referenced by main().
Definition at line 557 of file zic.c.
References _, close_file(), EXIT_SUCCESS, fb(), fprintf, and progname.
|
static |
Definition at line 2070 of file zic.c.
References _, _Alignof, addtype(), align_to(), attype::at, atcomp(), attypes, chars, close_file(), convert(), corr, timerange::defaulttype, desigidx, directory, DO, emalloc(), error(), EXIT_FAILURE, fb(), fprintf, free, hi_time, i, isdsts, j, leapcnt, limitrange(), lo_time, max_time, min_time, mkdirs(), name, noise, print_abbrevs, print_cutoff, progname, puttzcode(), puttzcodepass(), qsort, roll, size_product(), strerror, tadd(), timecnt, tm, trans, ttisstds, ttisuts, type, attype::type, typecnt, types, TZ_MAGIC, TZ_MAX_CHARS, TZ_MAX_TIMES, TZ_MAX_TYPES, tzhead::tzh_charcnt, tzhead::tzh_leapcnt, tzhead::tzh_magic, tzhead::tzh_timecnt, tzhead::tzh_ttisstdcnt, tzhead::tzh_ttisutcnt, tzhead::tzh_typecnt, tzhead::tzh_version, utoffs, want_bloat(), warning(), WORK_AROUND_QTBUG_53071, and ZIC_MAX.
Referenced by outzone().
Referenced by addtt(), outzone(), and writezone().
|
static |
Definition at line 655 of file zic.c.
Referenced by main(), and want_bloat().
|
static |
Definition at line 178 of file zic.c.
Referenced by addtype(), newabbr(), outzone(), pg_interpret_timezone_abbrev(), pg_timezone_abbrev_is_known(), tzloadbody(), and tzparse().
|
static |
Definition at line 404 of file zic.c.
Referenced by addtype(), getColorInfo(), initPopulateTable(), newabbr(), pg_reg_getcharacters(), and writezone().
|
static |
|
static |
Definition at line 406 of file zic.c.
Referenced by adjleap(), leapadd(), timesub(), tzloadbody(), and writezone().
|
static |
Definition at line 401 of file zic.c.
Referenced by addtype(), init_ttinfo(), tzloadbody(), and writezone().
Definition at line 648 of file zic.c.
Referenced by create_manifest_writer(), CreateBackupStreamer(), dolink(), GetConfFilesInDir(), identify_target_directory(), main(), open_file_in_directory(), PathNameCreateTemporaryDir(), relname(), search_directory(), verify_directory(), and writezone().
|
static |
Definition at line 179 of file zic.c.
Referenced by associate(), error(), and main().
|
static |
Definition at line 605 of file zic.c.
Referenced by adjleap(), stringzone(), timerange_option(), and writezone().
|
static |
Definition at line 400 of file zic.c.
Referenced by addtype(), and writezone().
|
static |
Definition at line 182 of file zic.c.
Referenced by adjleap(), leapadd(), tzloadbody(), and writezone().
|
static |
Definition at line 608 of file zic.c.
Referenced by adjleap(), and inexpires().
|
static |
Definition at line 185 of file zic.c.
Referenced by getleapdatetime(), and outzone().
|
static |
Definition at line 184 of file zic.c.
Referenced by getleapdatetime(), and outzone().
|
static |
Definition at line 183 of file zic.c.
Referenced by getleapdatetime(), and outzone().
|
static |
Definition at line 384 of file zic.c.
Referenced by getleapdatetime(), rpytime(), rulesub(), and stringrule().
Definition at line 389 of file zic.c.
Referenced by getleapdatetime(), and rpytime().
|
static |
Definition at line 302 of file zic.c.
Referenced by DeadLockCheck(), FindLockCycleRecurseMember(), GetSingleProcBlockerStatusData(), InitProcess(), inlink(), JoinWaitQueue(), main(), ProcLockWakeup(), and TopoSort().
|
static |
Definition at line 604 of file zic.c.
Referenced by timerange_option(), and writezone().
|
static |
|
static |
|
static |
Definition at line 600 of file zic.c.
Referenced by getleapdatetime(), inzsub(), outzone(), rpytime(), stringzone(), tadd(), timerange_option(), and writezone().
|
static |
Definition at line 189 of file zic.c.
Referenced by outzone(), and updateminmax().
|
static |
Definition at line 599 of file zic.c.
Referenced by getleapdatetime(), inzsub(), outzone(), rpytime(), tadd(), timerange_option(), and writezone().
|
static |
Definition at line 190 of file zic.c.
Referenced by outzone(), and updateminmax().
Definition at line 327 of file zic.c.
Referenced by getleapdatetime(), and rulesub().
|
static |
Definition at line 191 of file zic.c.
Referenced by byword(), componentcheck(), gethms(), inzsub(), main(), namecheck(), newabbr(), outzone(), rpytime(), and writezone().
|
static |
Definition at line 287 of file zic.c.
Referenced by associate(), and inrule().
|
static |
|
static |
Definition at line 192 of file zic.c.
Referenced by main(), and writezone().
|
static |
Definition at line 193 of file zic.c.
Referenced by main(), and writezone().
Definition at line 196 of file zic.c.
Referenced by change_directory(), close_file(), dolink(), infile(), main(), memory_exhausted(), mkdirs(), rulesub(), usage(), and writezone().
Definition at line 49 of file zic.c.
Referenced by growalloc().
|
static |
Definition at line 407 of file zic.c.
Referenced by leapadd(), and writezone().
Definition at line 286 of file zic.c.
Referenced by associate(), fireRIRrules(), inrule(), and RelationBuildRuleLock().
|
static |
Definition at line 197 of file zic.c.
Referenced by addtt(), outzone(), tzloadbody(), tzparse(), and writezone().
|
static |
Definition at line 405 of file zic.c.
Referenced by add_tabstat_xact_level(), adjleap(), AtEOSubXact_PgStat_Relations(), AtEOXact_PgStat_Relations(), AtPrepare_PgStat_Relations(), find_tabstat_entry(), leapadd(), limitrange(), pgstat_report_analyze(), PostPrepare_PgStat_Relations(), restore_truncdrop_counters(), save_truncdrop_counters(), sqlnotice(), and writezone().
|
static |
Definition at line 402 of file zic.c.
Referenced by addtype(), and writezone().
|
static |
Definition at line 403 of file zic.c.
Referenced by addtype(), and writezone().
|
static |
Definition at line 199 of file zic.c.
Referenced by addtype(), outzone(), tzloadbody(), and writezone().
|
static |
Definition at line 399 of file zic.c.
Referenced by addtype(), and writezone().