Sunday, 22 March 2020

nsfb plan9 support

>From cb45b499fb048c7bfcaea0744f4303b964d48469
From: Ori Bernstein <ori@eigenstate.org>
Date: Sun, 22 Mar 2020 19:06:30 -0700
Subject: [PATCH] Add support for plan 9 surface, remove gcc dependency.


This adds framebuffer support for plan 9 image surfaces,
and puts macros like UNUSED and __attribute__((constructor))
behind appropriate ifdefs.
diff -urN a/include/libnsfb.h b/include/libnsfb.h
--- a/include/libnsfb.h Mon Feb 24 02:57:05 2020
+++ b/include/libnsfb.h Sun Mar 22 19:06:30 2020
@@ -42,6 +42,7 @@
NSFB_SURFACE_LINUX, /**< Linux framebuffer surface */
NSFB_SURFACE_ABLE, /**< ABLE framebuffer surface */
NSFB_SURFACE_RAM, /**< RAM surface */
+ NSFB_SURFACE_PLAN9, /**< Plan 9 devdraw surface */
NSFB_SURFACE_COUNT, /**< The number of surface kinds */
};

diff -urN a/src/plot/16bpp.c b/src/plot/16bpp.c
--- a/src/plot/16bpp.c Mon Feb 24 02:57:05 2020
+++ b/src/plot/16bpp.c Sun Mar 22 19:06:30 2020
@@ -17,7 +17,11 @@
#include "nsfb.h"
#include "plot.h"

-#define UNUSED __attribute__((unused))
+#ifdef __GNUC__
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED
+

No comments:

Post a Comment