Skip to content

Instantly share code, notes, and snippets.

View danielhams's full-sized avatar

Daniel Hams danielhams

View GitHub Profile
@danielhams
danielhams / samples.txt
Created May 2, 2020 00:54
Simple C and CC programs.
simple.c - compile with mips-sgi-irix6.5-gcc -o simple_c simple.c
#include <stdio.h>
int main(int argc, char **argv)
{
printf("All good.\n");
return 0;
}
@danielhams
danielhams / fixing_ninja.cc
Last active April 27, 2020 16:48
Suggested approach to fixing ninja getcwd
Previous code like this:
--------------------------
bool first = true;
vector<char> cwd;
char* success = NULL;
do {
cwd.resize(cwd.size() + 1024);
@danielhams
danielhams / mispro_o1only_didbs_packages.txt
Created April 27, 2020 10:59
List of packages that d.h. could only get to work (and pass tests) with MIPSPro "-O1"
IIRC most of these are either due to crashes of the main thing, or additional failures in the in-package conformance tests.
bison
coreutils
epm
expat
frotz
gawk
libffi
libflac
@danielhams
danielhams / math_core.h
Created April 26, 2020 16:32
GCC header fixer - output include-fixed/internal/math_core.h
/* DO NOT EDIT THIS FILE.
It has been auto-edited by fixincludes from:
"/usr/include/internal/math_core.h"
This had to be done to correct non-standard usages in the
original, manufacturer supplied header file. */
#ifndef __MATH_CORE_H__
Program:
// Written by Ch. Tronche (http://tronche.lri.fr:8000/)
// Copyright by the author. This is unmaintained, no-warranty free software.
// Please use freely. It is appreciated (but by no means mandatory) to
// acknowledge the author's contribution. Thank you.
// Started on Thu Jun 26 23:29:03 1997
//
// Xlib tutorial: 2nd program
@danielhams
danielhams / minimal_set.txt
Created April 10, 2020 14:10
Proposed set of tools in the selfhoster for 0.0.5
Driven by these "requires":
special_packages.emplace("rpm");
special_packages.emplace("sudo");
special_packages.emplace("vim-minimal");
special_packages.emplace("sgug-rpm-tools");
special_packages.emplace("git-all");
special_packages.emplace("tar");
special_packages.emplace("bzip2");
special_packages.emplace("gzip");
@danielhams
danielhams / leafyversions.txt
Created March 17, 2020 20:55
Versions output 2020-03-17
I = Installed, R = Removed
Name Date Description
I 4Dwm 06/10/2018 Desktop Window Manager, 6.5.30
I 4Dwm.man 06/10/2018 Desktop Window Manager Man Pages, 6.5.30
I 4Dwm.man.4Dwm 06/10/2018 Desktop Window Manager Man Pages
I 4Dwm.man.relnotes 06/10/2018 Desktop Window Manager Release Notes
I 4Dwm.sw 06/10/2018 Desktop Window Manager, 6.5.30
I 4Dwm.sw.4Dwm 06/10/2018 Desktop Window Manager
@danielhams
danielhams / testprog.out
Created March 7, 2020 10:53
Using two new threads in C++
0mS[ 1] (14107): was sent signal SIGUSR1 by pid 14110
0mS[ 1] par(14107:4294981371): received signal SIGUSR1 (handler 0x10002ac8)
0mS[ 1] par(14107:4294981371): END-pause() errno = 4 (Interrupted function call)
0mS[ 1] par(14107:4294981371): sigreturn(0x7ffd7ad0) OK
0mS[ 1] testprog(14107:4294981371): execve("./testprog", 0x7ffd7f40, 0x7ffd7f48)
1mS[ 1] testprog(14107:4294981371): END-execve() OK
1mS[ 1] testprog(14107:4294981371): sysconf(_SC_CAP) = 1
1mS[ 1] testprog(14107:4294981371): syssgi(SGI_PROC_ATTR_GET, 0xfb3daf0, 0x7ffd7ec0, 0, 0, 0) = 0
1mS[ 1] testprog(14107:4294981371): getuid() = 55695, euid=55695
1mS[ 1] testprog(14107:4294981371): getuid() = 55695, euid=55695
@danielhams
danielhams / strange strtoll
Last active February 17, 2020 20:40
Twilight Zone
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
int main(int argc, char **argv)
{
size_t llsize = sizeof(long long);
printf("Size of long long is %llu\n", llsize );
@danielhams
danielhams / sguworldrebuilder-0.0.4.sh
Created February 17, 2020 08:09
SGUG World Rebuilding Script
#!/usr/sgug/bin/bash
# Must rebuild: zlib
rpmbuild -ba zlib.spec --nocheck
touch ~/rpmbuild/PROGRESS/zlib.done
# Must rebuild: xz
rpmbuild -ba xz.spec --nocheck
touch ~/rpmbuild/PROGRESS/xz.done
# Must rebuild: xosview
rpmbuild -ba xosview.spec --nocheck
touch ~/rpmbuild/PROGRESS/xosview.done