Time-OlsonTZ-Data
view release on metacpan or search on metacpan
tzsrc/zic.c view on Meta::CPAN
# define HAVE_PWD_H 1
#endif
#if HAVE_PWD_H
# include <grp.h>
# include <pwd.h>
#else
struct group { gid_t gr_gid; };
struct passwd { uid_t pw_uid; };
# define getgrnam(arg) NULL
# define getpwnam(arg) NULL
# define fchown(fd, owner, group) ((fd) < 0 ? -1 : 0)
#endif
static gid_t const no_gid = -1;
static uid_t const no_uid = -1;
static gid_t output_group = -1;
static uid_t output_owner = -1;
#ifndef GID_T_MAX
# define GID_T_MAX_NO_PADDING MAXVAL(gid_t, TYPE_BIT(gid_t))
# if HAVE__GENERIC
# define GID_T_MAX \
(TYPE_SIGNED(gid_t) \
tzsrc/zic.c view on Meta::CPAN
}
#endif
return arg2num(arg, 8, min(MODE_T_MAX, ULONG_MAX),
N_("%s: -m '%s': invalid mode\n"));
}
static int
chmetadata(FILE *stream)
{
if (output_owner != no_uid || output_group != no_gid) {
int r = fchown(fileno(stream), output_owner, output_group);
if (r < 0)
return r;
}
return output_mode == no_mode ? 0 : fchmod(fileno(stream), output_mode);
}
/* Close STREAM.
If it had an I/O error, report it against DIR/NAME,
remove TEMPNAME if nonnull, and then exit.
If TEMPNAME is nonnull, and if requested,
( run in 0.434 second using v1.01-cache-2.11-cpan-5511b514fd6 )