diff options
author | Stefan Bolte <sbolte@lavabit.com> | 2013-05-18 02:53:24 +0200 |
---|---|---|
committer | Stefan Bolte <sbolte@lavabit.com> | 2013-05-18 02:53:24 +0200 |
commit | d216248c8b9df49a5fe4c6bec1501fe17757fad2 (patch) | |
tree | 0d8d3ed5b40b4ff9f751dfcf6e6ffdc00f2afc2e | |
parent | 56fc1e87ee8493b69701bf2fb1c4b7b462d32c5f (diff) | |
download | dwb-d216248c8b9df49a5fe4c6bec1501fe17757fad2.zip |
Moving dwbem to own directory
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | config.mk | 6 | ||||
-rw-r--r-- | dwbem/Makefile (renamed from tools/Makefile) | 0 | ||||
-rw-r--r-- | dwbem/dwbem.c (renamed from tools/dwbem.c) | 0 | ||||
-rw-r--r-- | exar/exar.c | 3 |
5 files changed, 6 insertions, 8 deletions
@@ -18,10 +18,7 @@ $(TARGET): $(SUBDIRS:%=%.subdir-make) #$(SRCDIR)/%: $(SUBDIR_BUILD_FIRST:%=%.subdir-buildfirst) -%.subdir-buildfirst: $(SUBDIR_BUILD_LIB:%=%.subdir-buildlib) - @$(MAKE) $(MFLAGS) -C $* - -%.subdir-buildlib: +%.subdir-buildfirst: @$(MAKE) $(MFLAGS) -C $* clean: $(SUBDIRS:%=%.subdir-clean) $(SUBDIR_BUILD_FIRST:%=%.subdir-cleanfirst) $(SUBDIR_BUILD_LIB:%=%.subdir-cleanlib) @@ -23,10 +23,10 @@ CONTRIBDIR=contrib DWB_LIB_DIRS = exar -SUBDIRS=$(M4DIR) $(SRCDIR) $(TOOLDIR) -SUBDIR_BUILD_FIRST=$(UTILDIR) -SUBDIR_BUILD_LIB=$(DWB_LIB_DIRS) +SUBDIRS=$(M4DIR) $(SRCDIR) $(DWBEMDIR) +SUBDIR_BUILD_FIRST=$(UTILDIR) $(DWB_LIB_DIRS) +DWBEMDIR=dwbem EXTENSION_MANAGER=dwbem DTARGET=$(TARGET)_d diff --git a/tools/Makefile b/dwbem/Makefile index 059703f2..059703f2 100644 --- a/tools/Makefile +++ b/dwbem/Makefile diff --git a/tools/dwbem.c b/dwbem/dwbem.c index 85c016aa..85c016aa 100644 --- a/tools/dwbem.c +++ b/dwbem/dwbem.c diff --git a/exar/exar.c b/exar/exar.c index b96d8f42..17facf6a 100644 --- a/exar/exar.c +++ b/exar/exar.c @@ -49,6 +49,7 @@ #define DIR_FLAG (100) #define FILE_FLAG (102) #define MAX_FILE_HANDLES 64 +#define MIN(X, Y) ((X) > (Y) ? (Y) : (X)) #define LOG(level, ...) do { if (s_verbose & EXAR_VERBOSE_L##level) { \ fprintf(stderr, "exar-log%d: ", level); \ @@ -82,7 +83,7 @@ get_offset(char *buffer, size_t n, const char *path, int *end) // strip trailing '/' while (tmp[len-1] == '/') len--; - strncpy(buffer, path, len); + strncpy(buffer, path, MIN(n, len)); // get base name offset slash = strrchr(buffer, '/'); |