#ifdef HAVE_SYS_SHM_H
#include <sys/ipc.h>
#include <sys/shm.h>
+#ifdef __FreeBSD__
+/* sys/ipc.h -> sys/_types.h -> machine/param.h
+ * - defines ALIGN which clashes with our ALIGN
+ */
+#undef ALIGN
+#endif
#endif
#include "pipe/p_compiler.h"
#include "pipe/p_format.h"
#include "pipe/p_state.h"
#include "util/u_inlines.h"
-#include "util/u_format.h"
+#include "util/format/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
-#include "state_tracker/sw_winsys.h"
+#include "frontend/sw_winsys.h"
#include "dri_sw_winsys.h"
}
-static boolean
+static bool
dri_sw_is_displaytarget_format_supported( struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format )
{
/* TODO: check visuals or other sensible thing here */
- return TRUE;
+ return true;
}
#ifdef HAVE_SYS_SHM_H
{
char *addr;
- dri_sw_dt->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|0777);
+ /* 0600 = user read+write */
+ dri_sw_dt->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT | 0600);
if (dri_sw_dt->shmid < 0)
return NULL;
return NULL;
}
-static boolean
+static bool
dri_sw_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
if (whandle->type == WINSYS_HANDLE_TYPE_SHMID) {
if (dri_sw_dt->shmid < 0)
- return FALSE;
+ return false;
whandle->handle = dri_sw_dt->shmid;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static void