#ifndef common_h
#define common_h
-#ifdef __BORLANDC__
-#include <time.h>
-#else
-#include <ctime>
-#endif
+#include "stg/os_int.h"
+#include "stg/const.h"
+
#include <string>
#include <sstream>
+#include <ctime>
-#include "stg/os_int.h"
-#include "stg/const.h"
+#include <unistd.h> // uid_t, gid_t
+#include <sys/stat.h> // mode_t
#define STAT_TIME_3 (1)
#define STAT_TIME_2 (2)
//-----------------------------------------------------------------------------
int str2x(const std::string & str, int32_t & x);
int str2x(const std::string & str, uint32_t & x);
+int str2x(const std::string & str, double & x);
#ifndef WIN32
int str2x(const std::string & str, int64_t & x);
int str2x(const std::string & str, uint64_t & x);
char * stg_strptime(const char *, const char *, struct tm *);
time_t stg_timegm(struct tm *);
+uid_t str2uid(const std::string& name);
+gid_t str2gid(const std::string& name);
+mode_t str2mode(const std::string& mode);
+
#endif