Unilaterally making string.h a prerequisite for console.h is going to
break build for a lot of consumers of console.h.
Define a macro for the new flex ring. Consumers which want to use it
should define the macro.
Partially revert
af8d9356417cb617b635c5ace782388ebfe86e3a.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
#include "utils.h"
#include "io.h"
-#include <string.h>
#include <xenevtchn.h>
#include <xengnttab.h>
#include <xenstore.h>
#include <stdlib.h>
#include <errno.h>
+#include <string.h>
#include <poll.h>
#include <fcntl.h>
#include <unistd.h>
* this program; If not, see <http://www.gnu.org/licenses/>.
*/
+#define XEN_WANT_FLEX_CONSOLE_RING 1
+
#include <xen/errno.h>
#include <xen/event.h>
#include <xen/guest_access.h>
PUBLIC_ANSI_HEADERS := $(filter-out public/%ctl.h public/xsm/% public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS))
public/io/9pfs.h-prereq := string
-public/io/console.h-prereq := string
public/io/pvcalls.h-prereq := string
headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile
#ifndef __XEN_PUBLIC_IO_CONSOLE_H__
#define __XEN_PUBLIC_IO_CONSOLE_H__
-#include "ring.h"
-
typedef uint32_t XENCONS_RING_IDX;
#define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1))
XENCONS_RING_IDX out_cons, out_prod;
};
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#ifdef XEN_WANT_FLEX_CONSOLE_RING
+#include "ring.h"
DEFINE_XEN_FLEX_RING(xencons);
#endif