History log of /haiku/src/tools/data_to_source.cpp
Revision Date Author Comments
# 669e389c 10-Sep-2014 Paweł Dziepak <pdziepak@quarnos.org>

tools: data_to_source: fix types of generated variables

Both data array and its size should be constant so that GCC can do
as much as possible at compile time and it is safe to use them in
static assertions.

This patch also changes the type of size constant to size_t which
more appropriate and uses sizeof() to determine the size of the
array.

Fixes build breakage introduced in e547662664d88e5ee79048bd00ad8eefa45e7074.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>


# 2c8f0c50 19-Apr-2014 PulkoMandy <pulkomandy@pulkomandy.tk>

Fix compile error on 64-bit machines.

* This is built for the host system, so we can't use B_PRIdOFF.
* Until POSIX introduces a format constant for off_t, cast the variable
to long long to avoid a warning.


# 6fc59c0f 08-Jan-2011 François Revol <revol@free.fr>

Haiku defines S_IRUSR in sys/stat.h as per OpenGroup...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40156 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1485d7a2 14-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added small tool source_to_data, which takes an arbitrary data file and
generates a C source file defining an array variable containing the file's
data. DataFileToSourceFile is the respective jam rule.

The idea is to directly built the boot archive into the boot loader for
network booting (and thus avoiding to download it from somewhere). In
case of PXE this doesn't work, though, due to restrictions to the size
of the NBP. Maybe Open Firmware is less restrictive.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21602 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 669e389c33cbdfc134da6943c84cc6dbb92f5b54 10-Sep-2014 Paweł Dziepak <pdziepak@quarnos.org>

tools: data_to_source: fix types of generated variables

Both data array and its size should be constant so that GCC can do
as much as possible at compile time and it is safe to use them in
static assertions.

This patch also changes the type of size constant to size_t which
more appropriate and uses sizeof() to determine the size of the
array.

Fixes build breakage introduced in e547662664d88e5ee79048bd00ad8eefa45e7074.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>


# 2c8f0c50152325a3c2415db787b0a35f34d752a4 19-Apr-2014 PulkoMandy <pulkomandy@pulkomandy.tk>

Fix compile error on 64-bit machines.

* This is built for the host system, so we can't use B_PRIdOFF.
* Until POSIX introduces a format constant for off_t, cast the variable
to long long to avoid a warning.


# 6fc59c0f33da5e54a03133a50ab1fb27ef7b57cf 08-Jan-2011 François Revol <revol@free.fr>

Haiku defines S_IRUSR in sys/stat.h as per OpenGroup...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40156 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1485d7a2d7e9d2af5c68965b3f35671448c5e337 14-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added small tool source_to_data, which takes an arbitrary data file and
generates a C source file defining an array variable containing the file's
data. DataFileToSourceFile is the respective jam rule.

The idea is to directly built the boot archive into the boot loader for
network booting (and thus avoiding to download it from somewhere). In
case of PXE this doesn't work, though, due to restrictions to the size
of the NBP. Maybe Open Firmware is less restrictive.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21602 a95241bf-73f2-0310-859d-f6bbb57e9c96