Fix BeOS build
Mainly C/C++ conflicts: * Designated initializer are not part of C++ * C++ already defines min() and max() * Force C99 and remove -O0 since we now use a decent compiler
This commit is contained in:
parent
46ff49baef
commit
2071c2a91b
|
@ -16,8 +16,8 @@ LDFLAGS += -lexpat -lcurl
|
|||
COMMON_WARNFLAGS += -Wno-multichar
|
||||
|
||||
# compiler flags
|
||||
CFLAGS += -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE -Drestrict="" -g -O0
|
||||
CXXFLAGS += -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE -Drestrict="" -g -O0
|
||||
CFLAGS += -std=c99 -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE -Drestrict="" -g
|
||||
CXXFLAGS += -Dnsbeos -D_BSD_SOURCE -D_POSIX_C_SOURCE -Drestrict="" -g
|
||||
|
||||
BEOS_BERES := beres
|
||||
BEOS_RC := rc
|
||||
|
|
|
@ -538,19 +538,19 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content)
|
|||
|
||||
|
||||
static struct gui_bitmap_table bitmap_table = {
|
||||
.create = bitmap_create,
|
||||
.destroy = bitmap_destroy,
|
||||
.set_opaque = bitmap_set_opaque,
|
||||
.get_opaque = bitmap_get_opaque,
|
||||
.test_opaque = bitmap_test_opaque,
|
||||
.get_buffer = bitmap_get_buffer,
|
||||
.get_rowstride = bitmap_get_rowstride,
|
||||
.get_width = bitmap_get_width,
|
||||
.get_height = bitmap_get_height,
|
||||
.get_bpp = bitmap_get_bpp,
|
||||
.save = bitmap_save,
|
||||
.modified = bitmap_modified,
|
||||
.render = bitmap_render,
|
||||
/*.create =*/ bitmap_create,
|
||||
/*.destroy =*/ bitmap_destroy,
|
||||
/*.set_opaque =*/ bitmap_set_opaque,
|
||||
/*.get_opaque =*/ bitmap_get_opaque,
|
||||
/*.test_opaque =*/ bitmap_test_opaque,
|
||||
/*.get_buffer =*/ bitmap_get_buffer,
|
||||
/*.get_rowstride =*/ bitmap_get_rowstride,
|
||||
/*.get_width =*/ bitmap_get_width,
|
||||
/*.get_height =*/ bitmap_get_height,
|
||||
/*.get_bpp =*/ bitmap_get_bpp,
|
||||
/*.save =*/ bitmap_save,
|
||||
/*.modified =*/ bitmap_modified,
|
||||
/*.render =*/ bitmap_render,
|
||||
};
|
||||
|
||||
struct gui_bitmap_table *beos_bitmap_table = &bitmap_table;
|
||||
|
|
|
@ -59,6 +59,7 @@ struct dirent;
|
|||
#undef max
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
#ifndef min
|
||||
#define min(x,y) (((x)<(y))?(x):(y))
|
||||
#endif
|
||||
|
@ -66,6 +67,7 @@ struct dirent;
|
|||
#ifndef max
|
||||
#define max(x,y) (((x)>(y))?(x):(y))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef PRIxPTR
|
||||
#define PRIxPTR "x"
|
||||
|
|
Loading…
Reference in New Issue