Skip to content

Instantly share code, notes, and snippets.

View sortie's full-sized avatar

Jonas Termansen sortie

View GitHub Profile
@sortie
sortie / c99.sh
Created September 28, 2015 13:59
c99
#! /bin/sh
# Call the appropriate C compiler with options to accept ANSI/ISO C
# The following options are the same (as of gcc-3.3):
# -std=c99
# -std=c9x
# -std=iso9899:1999
# -std=iso9899:199x
extra_flag=-std=c99
@sortie
sortie / Configure.sh
Created September 23, 2015 22:25
erl Configure
cat >c1$$ <<EOF
ARGGGHHHH!!!!!
SCO csh still thinks true is false. Write to SCO today and tell them that next
year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
(Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
we'd have to do is go in and swap the && and || tokens, wherever they are.)
[End of diatribe. We now return you to your regularly scheduled programming...]
@sortie
sortie / cbb-gcc-4.6.4.diff
Last active August 29, 2015 14:25
configure.ac patch fix --with-sysroot='' --with-build-sysroot=/foo/bar
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 07a0c78..ce64b10 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -615,7 +615,7 @@ yes|no|auto) enable_multiarch=$enableval;;
*) AC_MSG_ERROR(bad value ${enableval} given for --enable-multiarch option) ;;
esac], [enable_multiarch=auto])
if test x${enable_multiarch} = xauto; then
- if test x$host != x$target && test "x$with_sysroot" = x; then
+ if test x$host != x$target && test "x$with_sysroot" = x && test "x$with_build_sysroot" = x; then
@sortie
sortie / Makefile
Last active August 29, 2015 14:22
Sortix make TIXmakefile
.include <sys.mk> # Builtin variables and rules. (Included automatically)
.include <dirs.mk> # Standard direrctory variables.
SHAREMKDIR ?= $(DATADIR)/mk
CPPFLAGS += -DVERSIONSTR=\"$(VERSION)\" -DSHAREMKDIR=\"$(SHAREMKDIR)\" -D_GNU_SOURCE
PROGRAM = make
OBJS=\
static bool array_add(void*** array_ptr,
size_t* used_ptr,
size_t* length_ptr,
void* value)
{
void** array;
memcpy(&array, array_ptr, sizeof(array));
if ( *used_ptr == *length_ptr )
{
sortie@sortie-pc1 ~/source-sdk-2013/sp/src/utils $ cd vbsp
sortie@sortie-pc1 ~/source-sdk-2013/sp/src/utils/vbsp $ make
g++ -m32 -D_DLL_EXT=.so -DDX_TO_GL_ABSTRACTION -D_EXTERNAL_DLL_EXT=.so -DGL_GLEXT_PROTOTYPES -DGNUC -D_LINUX -DLINUX -DNDEBUG -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE -DNO_STRING_T -D_POSIX -DPOSIX -DPROTECTED_THINGS_ENABLE -D_snprintf=use_Q_snprintf_instead -Dstrncpy=use_Q_strncpy_instead -DUSE_SDL -DUSE_WEBM_FOR_REPLAY -DVECTOR -DVERSION_SAFE_STEAM_API_INTERFACES -DVPROF_LEVEL=1 -I../../public -I../../public/tier0 -I../../public/tier1 -I../common -g -O2 -Werror -Wall -Wno-invalid-offsetof -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-unused-function -Wno-unused-value -Wno-unused-variable -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers -Wno-missing-field-initializers -Wno-type-limits -c ../../public/builddisp.cpp -o ../../public/builddisp.o
g++ -m32 -D_DLL_EXT=.so -DDX_TO_GL_ABSTRACTION -D_EXTERNAL_DLL_EXT=.so -DGL_GLEXT_PROTOTYPES -DGNUC -D_LINUX -DLINUX -DNDEBUG -DNO_H