https://github.com/torvalds/linux
Revision 91a13c281d7d4648c0b32dede11a0144c4e7984c authored by Claudio Scordino on 17 November 2011, 10:08:32 UTC, committed by Greg Kroah-Hartman on 18 November 2011, 18:39:24 UTC
Patch to fix the error message "directives may not be used inside a macro
argument" which appears when the kernel is compiled for the cris architecture.

Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent b2433d8
Raw File
Tip revision: 91a13c281d7d4648c0b32dede11a0144c4e7984c authored by Claudio Scordino on 17 November 2011, 10:08:32 UTC
drivers/base/node.c: fix compilation error with older versions of gcc
Tip revision: 91a13c2
bin2c.c
/*
 * Unloved program to convert a binary on stdin to a C include on stdout
 *
 * Jan 1999 Matt Mackall <mpm@selenic.com>
 *
 * This software may be used and distributed according to the terms
 * of the GNU General Public License, incorporated herein by reference.
 */

#include <stdio.h>

int main(int argc, char *argv[])
{
	int ch, total=0;

	if (argc > 1)
		printf("const char %s[] %s=\n",
			argv[1], argc > 2 ? argv[2] : "");

	do {
		printf("\t\"");
		while ((ch = getchar()) != EOF)
		{
			total++;
			printf("\\x%02x",ch);
			if (total % 16 == 0)
				break;
		}
		printf("\"\n");
	} while (ch != EOF);

	if (argc > 1)
		printf("\t;\n\nconst int %s_size = %d;\n", argv[1], total);

	return 0;
}
back to top