return gids[gid_used++];
}
-rpm_time_t * getBuildTime(void)
-{
- static rpm_time_t buildTime[1];
-
- if (buildTime[0] == 0)
- buildTime[0] = (int32_t) time(NULL);
- return buildTime;
-}
-
-const char * buildHost(void)
-{
- static char hostname[1024];
- static int oneshot = 0;
- struct hostent *hbn;
-
- if (! oneshot) {
- (void) gethostname(hostname, sizeof(hostname));
- hbn = gethostbyname(hostname);
- if (hbn)
- strcpy(hostname, hbn->h_name);
- else
- rpmlog(RPMLOG_WARNING,
- _("Could not canonicalize hostname: %s\n"), hostname);
- oneshot = 1;
- }
- return(hostname);
-}
#include "system.h"
#include <errno.h>
+#include <netdb.h>
+#include <time.h>
#include <rpm/rpmlib.h> /* RPMSIGTAG*, rpmReadPackageFile */
#include <rpm/rpmts.h>
return sb;
}
+static rpm_time_t * getBuildTime(void)
+{
+ static rpm_time_t buildTime[1];
+
+ if (buildTime[0] == 0)
+ buildTime[0] = (int32_t) time(NULL);
+ return buildTime;
+}
+
+static const char * buildHost(void)
+{
+ static char hostname[1024];
+ static int oneshot = 0;
+ struct hostent *hbn;
+
+ if (! oneshot) {
+ (void) gethostname(hostname, sizeof(hostname));
+ hbn = gethostbyname(hostname);
+ if (hbn)
+ strcpy(hostname, hbn->h_name);
+ else
+ rpmlog(RPMLOG_WARNING,
+ _("Could not canonicalize hostname: %s\n"), hostname);
+ oneshot = 1;
+ }
+ return(hostname);
+}
/**
*/
static int addFileToTag(rpmSpec spec, const char * file, Header h, rpmTag tag)
gid_t getGidS(const char * gname);
/** \ingroup rpmbuild
- * Return build hostname.
- * @return build hostname
- */
-const char * buildHost(void) ;
-
-/** \ingroup rpmbuild
- * Return build time stamp.
- * @return build time stamp
- */
-rpm_time_t * getBuildTime(void) ;
-
-/** \ingroup rpmbuild
* Read next line from spec file.
* @param spec spec file control structure
* @param strip truncate comments?