Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=76ae1d1eb85015b1eda2dd8de4481e5f7c9c9a3e
commit 76ae1d1eb85015b1eda2dd8de4481e5f7c9c9a3e Author: Michel Hermier <[email protected]> Date: Mon Sep 29 16:28:44 2014 +0200 dg rec: Move ffilelogger.c and fsyslogger.c to C++. diff --git a/lib/libpacman/CMakeLists.txt b/lib/libpacman/CMakeLists.txt index 0fb1d92..00c042d 100644 --- a/lib/libpacman/CMakeLists.txt +++ b/lib/libpacman/CMakeLists.txt @@ -24,7 +24,7 @@ set(FLIB_SOURCES util/fdispatchlogger.cpp util/fdispatchlogger.h util/flist.h - util/ffilelogger.c + util/ffilelogger.cpp util/ffilelogger.h util/ffunctional.h util/flog.cpp @@ -34,7 +34,7 @@ set(FLIB_SOURCES util/fptrlist.cpp util/fptrlist.h util/fstringlist.cpp - util/fsyslogger.c + util/fsyslogger.cpp util/fsyslogger.h util/log.c util/time.c diff --git a/lib/libpacman/util/ffilelogger.c b/lib/libpacman/util/ffilelogger.cpp similarity index 100% rename from lib/libpacman/util/ffilelogger.c rename to lib/libpacman/util/ffilelogger.cpp diff --git a/lib/libpacman/util/flog.cpp b/lib/libpacman/util/flog.cpp index 52bd8de..76ad461 100644 --- a/lib/libpacman/util/flog.cpp +++ b/lib/libpacman/util/flog.cpp @@ -27,6 +27,8 @@ /* pacman-g2 */ #include "util/flog.h" +#include "util/flogger.h" + FLogger *_f_sys_logger = NULL; void f_log(unsigned char flag, const char *format, ...) diff --git a/lib/libpacman/util/flog.h b/lib/libpacman/util/flog.h index be6729b..6eb2106 100644 --- a/lib/libpacman/util/flog.h +++ b/lib/libpacman/util/flog.h @@ -21,8 +21,6 @@ #ifndef F_LOG_H #define F_LOG_H -#include "flogger.h" - void f_log(unsigned char flag, const char *format, ...); void f_logs(unsigned char flag, const char *message); void f_vlog(unsigned char flag, const char *format, va_list ap); diff --git a/lib/libpacman/util/flogger.h b/lib/libpacman/util/flogger.h index bf78f0d..e3feeb2 100644 --- a/lib/libpacman/util/flogger.h +++ b/lib/libpacman/util/flogger.h @@ -23,10 +23,6 @@ #include "pacman.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LOG_STR_LEN 256 typedef struct FLogger FLogger; @@ -48,9 +44,6 @@ void f_logger_log(FLogger *logger, unsigned char flag, const char *format, ...); void f_logger_logs(FLogger *logger, unsigned char flag, const char *s); void f_logger_vlog(FLogger *logger, unsigned char flag, const char *format, va_list ap); -#ifdef __cplusplus -} -#endif #endif /* F_LOGGER_H */ /* vim: set ts=2 sw=2 noet: */ diff --git a/lib/libpacman/util/fsyslogger.c b/lib/libpacman/util/fsyslogger.cpp similarity index 100% rename from lib/libpacman/util/fsyslogger.c rename to lib/libpacman/util/fsyslogger.cpp diff --git a/lib/libpacman/util/time.h b/lib/libpacman/util/time.h index df67191..944d08b 100644 --- a/lib/libpacman/util/time.h +++ b/lib/libpacman/util/time.h @@ -23,6 +23,10 @@ #include <time.h> +#ifdef __cplusplus +extern "C" { +#endif + #define PM_TIME_INVALID ((time_t) -1) static inline @@ -48,6 +52,10 @@ char *f_strptime_lc(const char *s, const char *format, struct tm *tm); #define f_strftime_rfc1123_lc(s, max, tm) f_strftime_lc((s), (max), F_RFC1123_FORMAT, (tm)) #define f_strptime_rfc1123_lc(s, tm) f_strptime_lc((s), F_RFC1123_FORMAT, (tm)) +#ifdef __cplusplus +} +#endif + #endif /* _PACMAN_TIME_H */ /* vim: set ts=2 sw=2 noet: */ _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
