PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
private.h File Reference
#include <limits.h>
#include <sys/wait.h>
#include <unistd.h>
#include "pgtime.h"
Include dependency graph for private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GRANDPARENTED   "Local time zone must be set--see zic manual page"
 
#define ENOTSUP   EINVAL
 
#define EOVERFLOW   EINVAL
 
#define WIFEXITED(status)   (((status) & 0xff) == 0)
 
#define WEXITSTATUS(status)   (((status) >> 8) & 0xff)
 
#define is_digit(c)   ((unsigned)(c) - '0' <= 9)
 
#define SIZE_MAX   ((size_t) -1)
 
#define remove   unlink
 
#define TYPE_BIT(type)   (sizeof (type) * CHAR_BIT)
 
#define TYPE_SIGNED(type)   (((type) -1) < 0)
 
#define TWOS_COMPLEMENT(t)   ((t) ~ (t) 0 < 0)
 
#define MAXVAL(t, b)
 
#define MINVAL(t, b)   ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0))
 
#define INT_STRLEN_MAXIMUM(type)
 
#define INITIALIZE(x)   ((x) = 0)
 
#define _(msgid)   (msgid)
 
#define YEARSPERREPEAT   400 /* years before a Gregorian repeat */
 
#define SECSPERMIN   60
 
#define MINSPERHOUR   60
 
#define HOURSPERDAY   24
 
#define DAYSPERWEEK   7
 
#define DAYSPERNYEAR   365
 
#define DAYSPERLYEAR   366
 
#define SECSPERHOUR   (SECSPERMIN * MINSPERHOUR)
 
#define SECSPERDAY   ((int32) SECSPERHOUR * HOURSPERDAY)
 
#define MONSPERYEAR   12
 
#define TM_SUNDAY   0
 
#define TM_MONDAY   1
 
#define TM_TUESDAY   2
 
#define TM_WEDNESDAY   3
 
#define TM_THURSDAY   4
 
#define TM_FRIDAY   5
 
#define TM_SATURDAY   6
 
#define TM_JANUARY   0
 
#define TM_FEBRUARY   1
 
#define TM_MARCH   2
 
#define TM_APRIL   3
 
#define TM_MAY   4
 
#define TM_JUNE   5
 
#define TM_JULY   6
 
#define TM_AUGUST   7
 
#define TM_SEPTEMBER   8
 
#define TM_OCTOBER   9
 
#define TM_NOVEMBER   10
 
#define TM_DECEMBER   11
 
#define TM_YEAR_BASE   1900
 
#define EPOCH_YEAR   1970
 
#define EPOCH_WDAY   TM_THURSDAY
 
#define isleap(y)   (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
 
#define isleap_sum(a, b)   isleap((a) % 400 + (b) % 400)
 
#define AVGSECSPERYEAR   31556952L
 
#define SECSPERREPEAT   ((int64) YEARSPERREPEAT * (int64) AVGSECSPERYEAR)
 
#define SECSPERREPEAT_BITS   34 /* ceil(log2(SECSPERREPEAT)) */
 

Functions

int unlink (const char *filename)
 

Macro Definition Documentation

#define _ (   msgid)    (msgid)

Definition at line 101 of file private.h.

#define AVGSECSPERYEAR   31556952L

Definition at line 164 of file private.h.

Referenced by localsub(), and pg_next_dst_boundary().

#define DAYSPERLYEAR   366

Definition at line 112 of file private.h.

Referenced by _fmt(), getrule(), and timesub().

#define DAYSPERNYEAR   365

Definition at line 111 of file private.h.

Referenced by _fmt(), getrule(), and timesub().

#define DAYSPERWEEK   7

Definition at line 110 of file private.h.

Referenced by _fmt(), getrule(), getsecs(), stringoffset(), stringrule(), timesub(), and transtime().

#define ENOTSUP   EINVAL

Definition at line 35 of file private.h.

Referenced by dolink(), and get_errno_symbol().

#define EOVERFLOW   EINVAL

Definition at line 38 of file private.h.

Referenced by get_errno_symbol(), itsdir(), and timesub().

#define EPOCH_WDAY   TM_THURSDAY

Definition at line 141 of file private.h.

Referenced by rpytime(), and timesub().

#define EPOCH_YEAR   1970

Definition at line 140 of file private.h.

Referenced by inleap(), outzone(), rpytime(), timesub(), and tzparse().

#define GRANDPARENTED   "Local time zone must be set--see zic manual page"

Definition at line 27 of file private.h.

Referenced by newabbr(), and writezone().

#define HOURSPERDAY   24

Definition at line 109 of file private.h.

Referenced by _fmt(), gethms(), getsecs(), and stringoffset().

#define INITIALIZE (   x)    ((x) = 0)

Definition at line 98 of file private.h.

Referenced by outzone(), and transtime().

#define INT_STRLEN_MAXIMUM (   type)
Value:
((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + \
1 + TYPE_SIGNED(type))
#define TYPE_BIT(type)
Definition: private.h:70
#define TYPE_SIGNED(type)
Definition: private.h:71

Definition at line 91 of file private.h.

Referenced by _conv(), and yearistype().

#define is_digit (   c)    ((unsigned)(c) - '0' <= 9)

Definition at line 49 of file private.h.

Referenced by getnum(), getrule(), and getzname().

#define isleap (   y)    (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))

Definition at line 143 of file private.h.

#define isleap_sum (   a,
 
)    isleap((a) % 400 + (b) % 400)

Definition at line 157 of file private.h.

Referenced by _fmt().

#define MAXVAL (   t,
 
)
Value:
((t) (((t) 1 << ((b) - 1 - TYPE_SIGNED(t))) \
- 1 + ((t) 1 << ((b) - 1 - TYPE_SIGNED(t)))))
#define TYPE_SIGNED(type)
Definition: private.h:71

Definition at line 79 of file private.h.

#define MINSPERHOUR   60

Definition at line 108 of file private.h.

Referenced by _fmt(), abbroffset(), gethms(), getsecs(), stringoffset(), stringrule(), and stringzone().

#define MINVAL (   t,
 
)    ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0))

Definition at line 82 of file private.h.

#define MONSPERYEAR   12

Definition at line 115 of file private.h.

Referenced by _fmt(), and getrule().

#define remove   unlink

Definition at line 62 of file private.h.

#define SECSPERDAY   ((int32) SECSPERHOUR * HOURSPERDAY)

Definition at line 114 of file private.h.

Referenced by inleap(), rpytime(), stringrule(), stringzone(), timesub(), transtime(), and tzparse().

#define SECSPERHOUR   (SECSPERMIN * MINSPERHOUR)

Definition at line 113 of file private.h.

Referenced by gethms(), getrule(), getsecs(), timesub(), and tzparse().

#define SECSPERMIN   60

Definition at line 107 of file private.h.

Referenced by _fmt(), abbroffset(), gethms(), getsecs(), stringoffset(), stringrule(), stringzone(), and timesub().

#define SECSPERREPEAT   ((int64) YEARSPERREPEAT * (int64) AVGSECSPERYEAR)

Definition at line 165 of file private.h.

Referenced by differ_by_repeat(), and localsub().

#define SECSPERREPEAT_BITS   34 /* ceil(log2(SECSPERREPEAT)) */

Definition at line 167 of file private.h.

Referenced by differ_by_repeat().

#define SIZE_MAX   ((size_t) -1)

Definition at line 52 of file private.h.

Referenced by size_product().

#define TM_APRIL   3

Definition at line 128 of file private.h.

#define TM_AUGUST   7

Definition at line 132 of file private.h.

#define TM_DECEMBER   11

Definition at line 136 of file private.h.

Referenced by stringzone().

#define TM_FEBRUARY   1

Definition at line 126 of file private.h.

Referenced by rpytime(), and stringrule().

#define TM_FRIDAY   5

Definition at line 122 of file private.h.

#define TM_JANUARY   0

Definition at line 125 of file private.h.

Referenced by inleap(), outzone(), rpytime(), and stringzone().

#define TM_JULY   6

Definition at line 131 of file private.h.

#define TM_JUNE   5

Definition at line 130 of file private.h.

#define TM_MARCH   2

Definition at line 127 of file private.h.

#define TM_MAY   4

Definition at line 129 of file private.h.

#define TM_MONDAY   1

Definition at line 118 of file private.h.

#define TM_NOVEMBER   10

Definition at line 135 of file private.h.

#define TM_OCTOBER   9

Definition at line 134 of file private.h.

#define TM_SATURDAY   6

Definition at line 123 of file private.h.

#define TM_SEPTEMBER   8

Definition at line 133 of file private.h.

#define TM_SUNDAY   0

Definition at line 117 of file private.h.

#define TM_THURSDAY   4

Definition at line 121 of file private.h.

#define TM_TUESDAY   2

Definition at line 119 of file private.h.

#define TM_WEDNESDAY   3

Definition at line 120 of file private.h.

#define TM_YEAR_BASE   1900

Definition at line 138 of file private.h.

Referenced by _fmt(), and timesub().

#define TWOS_COMPLEMENT (   t)    ((t) ~ (t) 0 < 0)

Definition at line 72 of file private.h.

Referenced by detzcode(), and detzcode64().

#define TYPE_BIT (   type)    (sizeof (type) * CHAR_BIT)

Definition at line 70 of file private.h.

Referenced by differ_by_repeat(), and main().

#define TYPE_SIGNED (   type)    (((type) -1) < 0)

Definition at line 71 of file private.h.

Referenced by differ_by_repeat(), increment_overflow_time(), timesub(), and tzloadbody().

#define WEXITSTATUS (   status)    (((status) >> 8) & 0xff)

Definition at line 45 of file private.h.

#define WIFEXITED (   status)    (((status) & 0xff) == 0)

Definition at line 42 of file private.h.

#define YEARSPERREPEAT   400 /* years before a Gregorian repeat */

Definition at line 105 of file private.h.

Referenced by localsub(), outzone(), pg_next_dst_boundary(), and tzparse().

Function Documentation

int unlink ( const char *  filename)

Referenced by AlterSystemSetConfigFile(), AtEOXact_Snapshot(), CancelBackup(), check_hard_link(), CheckForStandbyTrigger(), CheckPointLogicalRewriteHeap(), CheckPointReplicationOrigin(), CheckPointSnapBuild(), cleanup(), CleanupBackupHistory(), CleanupPriorWALFiles(), create_script_for_old_cluster_deletion(), CreateLockFile(), CustomizableCleanupPriorWALFiles(), DeleteAllExportedSnapshotFiles(), destroy_tablespace_directories(), dir_close(), do_promote(), dsm_cleanup_for_mmap(), dsm_impl_mmap(), durable_link_or_rename(), durable_unlink(), exitArchiveRecovery(), FileClose(), gc_qtexts(), KeepFileRestoredFromArchive(), KillExistingArchiveStatus(), KillExistingXLOG(), main(), mdpostckpt(), mdunlinkfork(), pg_file_unlink(), pgss_shmem_shutdown(), pgss_shmem_startup(), pgstat_read_db_statsfile(), pgstat_read_statsfiles(), pgstat_recv_dropdb(), pgstat_reset_remove_files(), pgstat_write_db_statsfile(), pgstat_write_statsfiles(), PostmasterMain(), regression_main(), RelationCacheInitFilePreInvalidate(), remove_tablespace_symlink(), remove_target_file(), remove_target_symlink(), RemovePgTempFilesInDir(), RemovePgTempRelationFilesInDbspace(), RemovePromoteSignalFiles(), RemoveSocketFiles(), RemoveTwoPhaseFile(), ReorderBufferRestoreCleanup(), ResetUnloggedRelationsInDbspaceDir(), RestoreArchivedFile(), RestoreSlotFromDisk(), results_differ(), RewriteControlFile(), rmtree(), signal_cleanup(), SlruDeleteSegment(), SlruInternalDeleteSegment(), SnapBuildSerialize(), StartupReorderBuffer(), StartupXLOG(), transfer_relfile(), unlink_external_pid_file(), unlink_initfile(), UnlinkLockFiles(), update_metainfo_datafile(), write_relcache_init_file(), WriteEmptyXLOG(), writeTimeLineHistory(), writeTimeLineHistoryFile(), XLogArchiveCleanup(), XLogFileCopy(), and XLogFileInit().