mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Generate .c files instead of .h files
The files' contents haven't changed (other than some relative #include's that refer to other .c files). Some build systems have difficulty recognizing .h files as things to be compiled, instead of just things referred to by things to be compiled.
This commit is contained in:
1 parent
b0429923fc
commit
04c91f1410
24 files changed
+40
-49
No files matched your search
@@ -47,7 +47,7 @@ for a C++ compiler $CXX, such as clang++ or g++.
|
||||
// If building this program in an environment that doesn't easily accommodate
|
||||
// relative includes, you can use the script/inline-c-relative-includes.go
|
||||
// program to generate a stand-alone C++ file.
|
||||
#include "../../release/c/wuffs-unsupported-snapshot.h"
|
||||
#include "../../release/c/wuffs-unsupported-snapshot.c"
|
||||
|
||||
#ifndef SRC_BUFFER_SIZE
|
||||
#define SRC_BUFFER_SIZE (32 * 1024)
|
||||
|
||||
@@ -64,7 +64,7 @@ uint64_t micros_since_start(struct timespec* now) {
|
||||
// If building this program in an environment that doesn't easily accommodate
|
||||
// relative includes, you can use the script/inline-c-relative-includes.go
|
||||
// program to generate a stand-alone C file.
|
||||
#include "../../release/c/wuffs-unsupported-snapshot.h"
|
||||
#include "../../release/c/wuffs-unsupported-snapshot.c"
|
||||
|
||||
// Limit the input GIF image to (64 MiB - 1 byte) compressed and 4096 × 4096
|
||||
// pixels uncompressed. This is a limitation of this example program (which
|
||||
|
||||
@@ -33,7 +33,12 @@ for a C compiler $CC, such as clang or gcc.
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "wuffs/release/c/wuffs-unsupported-snapshot.h"
|
||||
// Wuffs ships as a "single file C library" or "header file library" as per
|
||||
// https://github.com/nothings/stb/blob/master/docs/stb_howto.txt
|
||||
//
|
||||
// By #include'ing it "as is" without #define'ing WUFFS_IMPLEMENTATION, we use
|
||||
// it as a "foo.h"-like header, instead of a "foo.c"-like implementation.
|
||||
#include "wuffs/release/c/wuffs-unsupported-snapshot.c"
|
||||
|
||||
#define DST_BUFFER_SIZE (1024 * 1024)
|
||||
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ for a C compiler $CC, such as clang or gcc.
|
||||
#define WUFFS_IMPLEMENTATION
|
||||
|
||||
// Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of
|
||||
// release/c/etc.h whitelist which parts of Wuffs to build. That file contains
|
||||
// release/c/etc.c whitelist which parts of Wuffs to build. That file contains
|
||||
// the entire Wuffs standard library, implementing a variety of codecs and file
|
||||
// formats. Without this macro definition, an optimizing compiler or linker may
|
||||
// very well discard Wuffs code for unused codecs, but listing the Wuffs
|
||||
@@ -49,7 +49,7 @@ for a C compiler $CC, such as clang or gcc.
|
||||
// If building this program in an environment that doesn't easily accommodate
|
||||
// relative includes, you can use the script/inline-c-relative-includes.go
|
||||
// program to generate a stand-alone C file.
|
||||
#include "../../release/c/wuffs-unsupported-snapshot.h"
|
||||
#include "../../release/c/wuffs-unsupported-snapshot.c"
|
||||
|
||||
#ifdef __linux__
|
||||
#include <linux/prctl.h>
|
||||
|
||||
Reference in new issue
Block a user