This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(void) | |
{ | |
signal(SIGPIPE, SIG_IGN ); | |
struct addrinfo hints; | |
memset(&hints, 0, sizeof(hints)); | |
hints.ai_family = AF_UNSPEC; | |
hints.ai_socktype = SOCK_STREAM; | |
hints.ai_flags = AI_PASSIVE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Export SfLib. | |
Inductive regexp := | |
| empty : regexp | |
| atom : nat -> regexp | |
| any : regexp | |
| seq : regexp -> regexp -> regexp | |
| disj : regexp -> regexp -> regexp | |
| star : regexp -> regexp | |
| plus : regexp -> regexp. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/sortie/sortix/ports/xorriso/libburn/libdax_msgs.c:45 | |
o->timestamp= tv.tv_sec+0.000001*tv.tv_usec; | |
4a7d79: f2 48 0f 2a 85 70 ff cvtsi2sdq -0x90(%rbp),%xmm0 | |
4a7d80: ff ff | |
4a7d82: f2 0f 59 05 e6 40 03 mulsd 0x340e6(%rip),%xmm0 # 4dbe70 <_fini+0x219> (crash here) | |
4a7d89: 00 | |
4a7d8a: f2 48 0f 2a 8d 68 ff cvtsi2sdq -0x98(%rbp),%xmm1 | |
4a7d91: ff ff | |
4a7d93: f2 0f 58 c1 addsd %xmm1,%xmm0 | |
4a7d97: f2 0f 11 02 movsd %xmm0,(%rdx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/init/init.c b/init/init.c | |
index 8ade106..b27f846 100644 | |
--- a/init/init.c | |
+++ b/init/init.c | |
@@ -370,13 +370,13 @@ static void set_hostname(void) | |
if ( !fp ) | |
return warning("unable to set hostname: /etc/hostname: %m"); | |
char* hostname = read_single_line(fp); | |
+ fclose(fp); | |
if ( !hostname ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wspace ::= '\t' | '\n' | '\v' | '\f' | '\r' | ' '. | |
wspaces ::= <wspace> | |
| <wspace> <wspaces>. | |
ospaces ::= | |
| <wspaces>. | |
char-constant ::= '\'' [^'] '\'' | |
| '\'' '\\' <char> '\''. | |
range-char ::= [^]]. | |
ranges ::= | <range-char> <ranges>. | |
range-constant ::= '[' <ranges> '] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This file is part of ToaruOS and is released under the terms | |
* of the NCSA / University of Illinois License - see LICENSE.md | |
* Copyright (C) 2014 Kevin Lange | |
*/ | |
#include <sys/socket.h> | |
#include <sys/un.h> | |
#include <alloca.h> | |
#include <assert.h> | |
#include <errno.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wspace ::= '\t' | '\n' | '\v' | '\f' | '\r' | ' '. | |
wspaces ::= <wspace> | |
| <wspace> <wspaces>. | |
ospaces ::= | |
| <wspaces>. | |
char-constant ::= '\'' [^'] '\'' | |
| '\'' '\\' <char> '\''. | |
range-char ::= [^]]. | |
ranges ::= | <range-char> <ranges>. | |
range-constant ::= '[' <ranges> '] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/kernel/x64/boot.S b/kernel/x64/boot.S | |
index e541b55..da5798c 100644 | |
--- a/kernel/x64/boot.S | |
+++ b/kernel/x64/boot.S | |
@@ -174,6 +174,15 @@ __start: | |
.code64 | |
2: | |
+ # The upper 32 bits of the general purpose registers are *undefined* after | |
+ # switching into 64-bit mode (Intel Manual, Vol 1, 3.4.1.1 "General-Purpose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fcntl.h> | |
#include <inttypes.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
// The highest bit in the uintmax_t type to avoid shift overflow. | |
#define UINTMAX_HIGH (UINTMAX_C(1) << (sizeof(uintmax_t) * 8 - 1)) | |
// Attempt 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* unistd.h: */ | |
#ifndef _UNISTD_H | |
#define _UNISTD_H | |
#include <sys/types.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
int execv(const char*, char* const[]); | |
int execve(const char*, char* const[], char* const[]); | |
int execvp(const char*, char* const[]); |