#include <limits.h>
#include <sys/wait.h>
#include <unistd.h>
#include "pgtime.h"
Go to the source code of this file.
Defines | |
#define | GRANDPARENTED "Local time zone must be set--see zic manual page" |
#define | WIFEXITED(status) (((status) & 0xff) == 0) |
#define | WEXITSTATUS(status) (((status) >> 8) & 0xff) |
#define | is_digit(c) ((unsigned)(c) - '0' <= 9) |
#define | remove unlink |
#define | TRUE 1 |
#define | FALSE 0 |
#define | TYPE_BIT(type) (sizeof (type) * CHAR_BIT) |
#define | TYPE_SIGNED(type) (((type) -1) < 0) |
#define | TYPE_INTEGRAL(type) (((type) 0.5) != 0.5) |
#define | INT_STRLEN_MAXIMUM(type) ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type)) |
#define | _(msgid) (msgid) |
#define | YEARSPERREPEAT 400 |
#define | AVGSECSPERYEAR 31556952L |
#define | SECSPERREPEAT ((int64) YEARSPERREPEAT * (int64) AVGSECSPERYEAR) |
#define | SECSPERREPEAT_BITS 34 |
Functions | |
int | unlink (const char *filename) |
char * | icalloc (int nelem, int elsize) |
char * | icatalloc (char *old, const char *new) |
char * | icpyalloc (const char *string) |
char * | imalloc (int n) |
void * | irealloc (void *pointer, int size) |
void | icfree (char *pointer) |
void | ifree (char *pointer) |
const char * | scheck (const char *string, const char *format) |
#define GRANDPARENTED "Local time zone must be set--see zic manual page" |
Definition at line 26 of file private.h.
Referenced by newabbr(), and writezone().
#define INT_STRLEN_MAXIMUM | ( | type | ) | ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type)) |
#define SECSPERREPEAT ((int64) YEARSPERREPEAT * (int64) AVGSECSPERYEAR) |
#define SECSPERREPEAT_BITS 34 |
Definition at line 121 of file private.h.
Referenced by differ_by_repeat().
#define TYPE_BIT | ( | type | ) | (sizeof (type) * CHAR_BIT) |
Definition at line 74 of file private.h.
Referenced by differ_by_repeat(), and main().
#define TYPE_INTEGRAL | ( | type | ) | (((type) 0.5) != 0.5) |
Definition at line 87 of file private.h.
Referenced by differ_by_repeat(), and tzload().
#define TYPE_SIGNED | ( | type | ) | (((type) -1) < 0) |
Definition at line 78 of file private.h.
Referenced by differ_by_repeat(), and tzload().
#define YEARSPERREPEAT 400 |
Definition at line 105 of file private.h.
Referenced by localsub(), outzone(), and pg_next_dst_boundary().
char* icalloc | ( | int | nelem, | |
int | elsize | |||
) |
char* icatalloc | ( | char * | old, | |
const char * | new | |||
) |
Definition at line 39 of file ialloc.c.
References irealloc(), and NULL.
Referenced by icpyalloc().
{ char *result; int oldsize, newsize; newsize = (new == NULL) ? 0 : strlen(new); if (old == NULL) oldsize = 0; else if (newsize == 0) return old; else oldsize = strlen(old); if ((result = irealloc(old, oldsize + newsize + 1)) != NULL) if (new != NULL) (void) strcpy(result + oldsize, new); return result; }
void icfree | ( | char * | pointer | ) |
char* icpyalloc | ( | const char * | string | ) |
void ifree | ( | char * | pointer | ) |
char* imalloc | ( | int | n | ) |
void* irealloc | ( | void * | pointer, | |
int | size | |||
) |
const char* scheck | ( | const char * | string, | |
const char * | format | |||
) |
Definition at line 15 of file scheck.c.
References ifree(), imalloc(), is_digit, and NULL.
Referenced by gethms(), inleap(), and rulesub().
{ char *fbuf; const char *fp; char *tp; int c; const char *result; char dummy; result = ""; if (string == NULL || format == NULL) return result; fbuf = imalloc((int) (2 * strlen(format) + 4)); if (fbuf == NULL) return result; fp = format; tp = fbuf; while ((*tp++ = c = *fp++) != '\0') { if (c != '%') continue; if (*fp == '%') { *tp++ = *fp++; continue; } *tp++ = '*'; if (*fp == '*') ++fp; while (is_digit(*fp)) *tp++ = *fp++; if (*fp == 'l' || *fp == 'h') *tp++ = *fp++; else if (*fp == '[') do *tp++ = *fp++; while (*fp != '\0' && *fp != ']'); if ((*tp++ = *fp++) == '\0') break; } *(tp - 1) = '%'; *tp++ = 'c'; *tp = '\0'; if (sscanf(string, fbuf, &dummy) != 1) result = (char *) format; ifree(fbuf); return result; }
int unlink | ( | const char * | filename | ) |
Referenced by AtEOXact_Snapshot(), CancelBackup(), check_hard_link(), CheckForStandbyTrigger(), cleanup(), CleanupBackupHistory(), CleanupPriorWALFiles(), create_script_for_old_cluster_deletion(), create_tablespace_directories(), CreateLockFile(), CustomizableCleanupPriorWALFiles(), DeleteAllExportedSnapshotFiles(), destroy_tablespace_directories(), do_pg_stop_backup(), do_promote(), exitArchiveRecovery(), FileClose(), InstallXLogFileSegment(), issue_warnings(), KeepFileRestoredFromArchive(), KillExistingArchiveStatus(), KillExistingXLOG(), main(), mdpostckpt(), mdunlinkfork(), open_walfile(), 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(), regression_main(), RelationCacheInitFilePreInvalidate(), RemoveOldXlogFiles(), RemovePgTempFilesInDir(), RemovePgTempRelationFilesInDbspace(), RemoveTwoPhaseFile(), ResetUnloggedRelationsInDbspaceDir(), RestoreArchivedFile(), results_differ(), RewriteControlFile(), rmtree(), signal_cleanup(), SlruScanDirCbDeleteAll(), SlruScanDirCbDeleteCutoff(), StartupXLOG(), transfer_relfile(), unlink_external_pid_file(), unlink_initfile(), UnlinkLockFiles(), write_relcache_init_file(), WriteEmptyXLOG(), writeTimeLineHistory(), writeTimeLineHistoryFile(), XLogArchiveCleanup(), XLogFileCopy(), and XLogFileInit().