Skip to content

Commit a0c3b97

Browse files
authored
switch to pkg-config, fix some compiler warnings (HaikuArchives#106)
1 parent e6be3b3 commit a0c3b97

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

bepdf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ DEBUGGER :=
153153
COMPILER_FLAGS = -Wno-write-strings
154154

155155
# Specify any additional linker flags to be used.
156-
LINKER_FLAGS = $(shell freetype-config --libs)
156+
LINKER_FLAGS = $(shell pkg-config --libs freetype2)
157157

158158
# Specify the version of this binary. Example:
159159
# -app 3 4 0 d 0 -short 340 -long "340 "`echo -n -e '\302\251'`"1999 GNU GPL"

bepdf/beos/FileInfoWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static int ToInt(const char *s, int i, int n) {
8787
static const char *ToDate(const char *date, time_t *time) {
8888
static char s[80];
8989
struct tm d;
90-
memset(&d, sizeof(d), 0);
90+
memset(&d, 0, sizeof(d));
9191

9292
if ((date[0] == 'D') && (date[1] == ':')) {
9393
int i = 2;

bepdf/beos/PreferencesWindow.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include <RadioButton.h>
3838
#include <ScrollView.h>
3939
#include <StringView.h>
40-
40+
#include <String.h>
4141
#include "BepdfApplication.h"
4242
#include "LayoutUtils.h"
4343
#include "PreferencesWindow.h"
@@ -62,10 +62,11 @@ void PreferencesWindow::BuildWorkspaceMenu(BMenu *m) {
6262
m->AddItem(new BMenuItem(B_TRANSLATE("current"), new BMessage(WORKSPACE_CHANGED)));
6363
m->AddSeparatorItem();
6464
int n = count_workspaces();
65+
66+
BString buffer;
6567
for (int i = 1; i <= n; i ++) {
66-
char buffer[10];
67-
sprintf(buffer, "%d", i);
68-
m->AddItem(new BMenuItem(buffer, new BMessage(WORKSPACE_CHANGED)));
68+
buffer.SetToFormat("%d", i);
69+
m->AddItem(new BMenuItem(buffer.String(), new BMessage(WORKSPACE_CHANGED)));
6970
}
7071
m->SetLabelFromMarked(true);
7172
m->SetRadioMode(true);

xpdf/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ SYMBOLS :=
191191
DEBUGGER :=
192192

193193
# Specify any additional compiler flags to be used.
194-
COMPILER_FLAGS := $(shell freetype-config --cflags)
194+
COMPILER_FLAGS := $(shell pkg-config --cflags freetype2)
195195

196196
# Specify any additional linker flags to be used.
197-
LINKER_FLAGS = $(shell freetype-config --libs)
197+
LINKER_FLAGS = $(shell pkg-config --libs freetype2)
198198

199199
# Specify the version of this binary. Example:
200200
# -app 3 4 0 d 0 -short 340 -long "340 "`echo -n -e '\302\251'`"1999 GNU GPL"

0 commit comments

Comments
 (0)