Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
972 commits
Select commit Hold shift + click to select a range
69614f3
Replace shlex.join()
jcoffland Aug 22, 2023
2cbefd1
Fix Connection::isConnected()
jcoffland Aug 25, 2023
f413e12
Cookie sameSite attribute
jcoffland Sep 9, 2023
cb6e4a9
Backoff::reset()
jcoffland Sep 9, 2023
bbcbd33
SystemInfo::getHostname()
jcoffland Sep 9, 2023
01189e8
Blockable JSON::Value::insert()
jcoffland Sep 9, 2023
a77254d
Don't write package-description.txt
jcoffland Sep 11, 2023
d8662e7
Cleanup buildinfo generation, Support additional buildinfo vars
jcoffland Sep 11, 2023
4a36b8c
added Press
jcoffland Sep 12, 2023
4843dda
Use dynamic allocation to satisfy MSVC
jcoffland Sep 12, 2023
eac361c
URL args don't override JSON or query args
jcoffland Sep 17, 2023
99c3b2d
Send close reason in Websocket close
jcoffland Sep 18, 2023
3315248
Improve Time API to avoid some frequent mistakes
jcoffland Sep 18, 2023
042c198
Fix for AMD integrated GPUs on Apple
jcoffland Sep 20, 2023
0147346
Websocket debug messages
jcoffland Sep 22, 2023
43a02d6
Handle SSL connections properly with FDPoolEvent
jcoffland Sep 23, 2023
1ca6be3
Handle zero byte transfers properly with FDPoolEvent
jcoffland Sep 23, 2023
b233171
Microsoft no longer support Chakara so why should we?
jcoffland Sep 24, 2023
74334ac
Upgraded boost to v1.83.0
jcoffland Sep 25, 2023
82aaa92
Remove dead code in osx packaging
kbernhagen Sep 24, 2023
40efad4
Remove obsolete distpkg bundle pkg builder
kbernhagen Sep 29, 2023
b3f10ca
Merge pull request #122 from kbernhagen/osx-updates-2023-09-23
jcoffland Sep 29, 2023
18b88b4
Clean up and fix Windows pipe inherit flag handling
jcoffland Oct 3, 2023
687893f
Fix FD leak in child proc
jcoffland Oct 3, 2023
adadd88
Fix for zero byte payload Websocket messages
jcoffland Oct 3, 2023
ce241fa
Add version to pkg title if absent
kbernhagen Oct 12, 2023
1a07bf3
Migrate keys distpkg_ to pkg_
kbernhagen Oct 13, 2023
8e463a3
Rename distpkg_ to pkg_ in flatdistpkg
kbernhagen Oct 13, 2023
58d67a5
RPM package revival
marcosfrm Oct 14, 2023
8c50942
Merge pull request #125 from marcosfrm/rpm
jcoffland Oct 15, 2023
927d1f9
Merge pull request #126 from kbernhagen/osx-updates-2023-10-12
jcoffland Oct 15, 2023
6e74d7a
white-space
jcoffland Oct 15, 2023
9f9727d
Stop creating relocatable RPM
marcosfrm Oct 18, 2023
ac9f489
Add ZipDist builder
kbernhagen Oct 19, 2023
9ed71c3
Merge pull request #128 from kbernhagen/add-zipdist-builder
jcoffland Oct 19, 2023
be96d1d
Don't use HTTP 1.0
jcoffland Oct 19, 2023
0689b2c
RPM: fix /usr/share/doc/<directory> ownership
marcosfrm Oct 20, 2023
bcec13c
Merge pull request #127 from marcosfrm/no-relocation
jcoffland Oct 20, 2023
99eda61
Simplify and fit to 80-columns
jcoffland Oct 20, 2023
a8fedfd
Fix comparison
jcoffland Oct 20, 2023
2a99574
Remove SSL::init(), add SSL::loadProvider()
jcoffland Oct 30, 2023
15e3513
Query systemd-logind to obtain idle state on Linux
marcosfrm Nov 2, 2023
d84014c
Avoid sync DNS lookup
jcoffland Nov 13, 2023
f0c03f3
Avoid numerical overflow
jcoffland Nov 13, 2023
d0ec932
Allow clearing Connection TTL
jcoffland Nov 14, 2023
1278aa3
Don't require OpenSSL 3.0. re #131
jcoffland Nov 16, 2023
d945a1a
Remove osx compiler defaults
kbernhagen Nov 13, 2023
7a35937
Merge pull request #129 from marcosfrm/logind-idle
jcoffland Nov 27, 2023
bc55a7e
House keeping
jcoffland Nov 27, 2023
393fe2c
Merge pull request #132 from kbernhagen/remove-osx-compiler-defaults
jcoffland Nov 27, 2023
4b748cc
PowerManagement::shutdown() to PowerManagement::~PowerManagement()
jcoffland Nov 27, 2023
3b34bbc
Cleanup memory
jcoffland Nov 27, 2023
fda0958
Decouple JSON::Observable
jcoffland Nov 30, 2023
20539aa
Autoload OpenSSL algorithms for OpenSSL 3.0
jcoffland Dec 3, 2023
e3b0e20
Update Win getOSVersion()
kbernhagen Dec 8, 2023
b13cb05
Don't load 'legacy' OpenSSL provider by default, load 'default' and '…
jcoffland Dec 14, 2023
5c4321b
Merge pull request #133 from kbernhagen/win-os-version
jcoffland Dec 14, 2023
093ece7
Use cb::DynamicLibrary
jcoffland Dec 14, 2023
5b62951
Fix Building JSON with empty key
jcoffland Dec 19, 2023
db996fe
JSON improvements, JSON::Observable bug fix and test
jcoffland Dec 20, 2023
305c01c
Fix invalid memory access. close:#135
jcoffland Dec 24, 2023
830499c
SPDX license ID. Closes #136
jcoffland Dec 27, 2023
569ceda
SPDX license ID update
jcoffland Dec 28, 2023
80f5622
Use SSL_CTX_set_default_verify_paths() to load root certs. closes #181
jcoffland Dec 28, 2023
4d3843f
Remove default osx_min_ver
kbernhagen Dec 29, 2023
e52f57d
Try KHR OpenCL PCI info extension before vendor specific extensions
jcoffland Dec 29, 2023
61d35fc
Merge pull request #138 from kbernhagen/remove-default-osx-min-ver
jcoffland Dec 29, 2023
db9da81
Adde sha256 test
jcoffland Dec 30, 2023
88f8d7f
RPM: populate BUILDROOT by default
marcosfrm Dec 31, 2023
615703e
SSL setVerifyNone() by default
jcoffland Jan 5, 2024
4554770
Merge pull request #140 from marcosfrm/rpm-buildroot
jcoffland Jan 5, 2024
8650cd8
Notify Websocket connection failures with onClose() callback
jcoffland Jan 5, 2024
c65508f
Updated copyright
jcoffland Jan 6, 2024
4c968d5
RPM: add BugURL
marcosfrm Jan 7, 2024
a16b32a
Merge pull request #141 from marcosfrm/rpm-bugurl
jcoffland Jan 7, 2024
a5030dc
Use ZIP_DEFLATED as default
kbernhagen Jan 8, 2024
a4d41be
Remove short_description,altool support
kbernhagen Jan 8, 2024
3f7e970
Merge pull request #142 from kbernhagen/default-zip-deflated
jcoffland Jan 8, 2024
effeeaf
Merge pull request #143 from kbernhagen/osx-pkg-updates-2024-01-07
jcoffland Jan 8, 2024
0c16b94
RPM: small cosmetic change
marcosfrm Jan 8, 2024
330bde8
RPM: remove Icon
marcosfrm Jan 9, 2024
e756539
Merge pull request #144 from marcosfrm/rpm-cosmetic1
jcoffland Jan 9, 2024
d538c2c
Remove reference to FAHClient
jcoffland Jan 11, 2024
d3fe192
Dropped prevent display sleep power management feature, Added systemd…
jcoffland Jan 11, 2024
0d189f6
Fixes for macOS code
jcoffland Jan 12, 2024
6f3d729
Added missing #ifdef and #include
jcoffland Jan 12, 2024
f37327a
Fixes for macOS code
jcoffland Jan 12, 2024
1648c4b
Fix static lib linking for macos
jcoffland Jan 12, 2024
0979434
Attempt to fix CPU core counts on Windows
jcoffland Jan 13, 2024
9ffb398
Isolate some OS specific code
jcoffland Jan 13, 2024
2941938
Drop invalid MacOSRef::operator=
jcoffland Jan 13, 2024
388635e
Attempt to fix CPU core counts on Windows
jcoffland Jan 13, 2024
2ef9182
Fix singletons
jcoffland Jan 13, 2024
79ee13b
Attempt to fix CPU core counts on Windows
jcoffland Jan 13, 2024
df385e3
Fix CPU core counts on Windows
jcoffland Jan 13, 2024
562bff1
Better MacOSRef impl
jcoffland Jan 15, 2024
8648c28
Initially sleep is allowed
jcoffland Jan 15, 2024
1b66f35
MacOS fixes
jcoffland Jan 15, 2024
1ab3b73
MacOS fixes
jcoffland Jan 15, 2024
f2ce4ee
Don't add ref to in MacOSRef assignment.
jcoffland Jan 15, 2024
6c330dd
MacOS fixes
jcoffland Jan 15, 2024
843d460
Don't include windows file in non-windows builds
jcoffland Jan 19, 2024
149f394
Deprecated support for old LinuxThreads
jcoffland Jan 19, 2024
4756653
ws
jcoffland Jan 19, 2024
6c896b0
DEB: add library dependencies
marcosfrm Jan 22, 2024
fb9c578
Merge pull request #146 from marcosfrm/deb-libdeps
jcoffland Jan 31, 2024
31c901a
Support osx packaging pre_sign_callback
kbernhagen Feb 4, 2024
ce14aab
Merge pull request #147 from kbernhagen/osx-pre-sign-callback
jcoffland Feb 4, 2024
fc240b1
Use shutil.which() to support Windows correctly
jcoffland Feb 5, 2024
40754fc
OSX: Remove old pkg root before copying files
kbernhagen Feb 6, 2024
0b13e7c
Merge pull request #148 from kbernhagen/osx-rm-old-pkg-root-before-copy
jcoffland Feb 6, 2024
f07e7b0
use std::ostream
jcoffland Feb 7, 2024
f13bdea
Added ReplaceVariablesInFiles packager method
jcoffland Feb 8, 2024
5e4dfec
Fix zlib detection, re: #149
jcoffland Feb 12, 2024
70b2414
Fix AMD GPU bus ID integer sign
jcoffland Feb 12, 2024
8f6145e
Fix Windows power status call
jcoffland Feb 12, 2024
9f42eed
Use PACKAGE_EXCLUDES in ReplaceVariablesInFiles()
jcoffland Feb 14, 2024
aaefdf5
Get unique machine ID on Linux/Windows/macOS
jcoffland Feb 15, 2024
e270eaa
Don't use platform.dist(). close #150
jcoffland Feb 23, 2024
3f058fc
Do not disable DNSBase when inactive, this disables server retries.
jcoffland Feb 24, 2024
313db37
Decouple cb::URI and cb::IPAddress
jcoffland Feb 24, 2024
e8b56ee
Drop synchronous HTTP impl
jcoffland Feb 24, 2024
968e446
Remove cb::DB::Blob dep on Packet
jcoffland Feb 24, 2024
d7b6dd5
Removed cbang/struct cbang/packet
jcoffland Feb 24, 2024
12ad46a
Remove cbang/script and some unused code
jcoffland Feb 24, 2024
706006f
Don't search for DLLs on PATH
jcoffland Mar 7, 2024
4119481
Rewrite libevent DNS impl, Some prep for IPv6 support
jcoffland Mar 10, 2024
8baef00
Allow using enum aliases in code, Fix for Socket API change
jcoffland Mar 11, 2024
485a30f
Better DNS error handling and support for IPv6 name servers
jcoffland Mar 11, 2024
94bfecf
Better DNS error handling
jcoffland Mar 11, 2024
69a86a5
Only add Windows DNS servers from operational network interfaces
jcoffland Mar 11, 2024
e88f48d
Nameserver logging
jcoffland Mar 11, 2024
86ed83a
Only show DNS server errors in debug log
jcoffland Mar 11, 2024
6ed25b3
Allow backtrace wo/ bfd
jcoffland Mar 11, 2024
bf84913
Attempt to parse macOS backtrace symbols
jcoffland Mar 12, 2024
e8ccb1a
Fix build wo/ BFD
jcoffland Mar 12, 2024
95cd5e9
Set socket protocol
jcoffland Mar 12, 2024
a5a9ead
O_CLOEXEC in socket() call only works in Linux
jcoffland Mar 12, 2024
0943f44
Prevent sqlite build warning
jcoffland Mar 12, 2024
52b8a4d
Fix libevent test
jcoffland Mar 12, 2024
f1cd4c7
Removed more cb::IPAddress deps
jcoffland Mar 12, 2024
877b469
IPv6 wip
jcoffland Mar 14, 2024
2fb0e3e
IPv6 support, completely removed cb::IPAddress
jcoffland Mar 14, 2024
295f6e6
Split up cbang/event
jcoffland Mar 15, 2024
1e32359
reorg
jcoffland Mar 16, 2024
12b70c5
Limit exposure to cbang/thread
jcoffland Mar 16, 2024
91fde16
Remove unsupported compilers, Define NOMINMAX on windows
jcoffland Mar 16, 2024
a9f8bff
Reduce deps on Math.h
jcoffland Mar 16, 2024
7fd3b49
use constexpr
jcoffland Mar 16, 2024
8557139
cbang/Zap deprecated
jcoffland Mar 16, 2024
2035abf
Dump dead code, simplify file override interface
jcoffland Mar 16, 2024
b1e5b78
Always binary mode
jcoffland Mar 16, 2024
86cd842
Drop CPP_TO_C_STR, use std::string::data() when null termination is n…
jcoffland Mar 16, 2024
f739b36
Clean up cbang/io
jcoffland Mar 17, 2024
a223f47
Fix tools
jcoffland Mar 20, 2024
4e02d3a
Code formatting and use of auto and new style for loops
jcoffland Mar 20, 2024
989e656
wip: Move JmpAPI core features to cbang
jcoffland Mar 17, 2024
8c9b2ed
Add namespace qualifier needed by some compilers. re: #153
jcoffland Apr 4, 2024
34f55a6
Check for libcap with libsystemd
jcoffland Apr 4, 2024
e71a7f2
Resource versioning, API, Config improvements, more
jcoffland Apr 23, 2024
e252884
Don't include API without MariaDB
jcoffland Apr 23, 2024
4c360c7
Require callers to manage Event::Event lifetime, other code cleanup
jcoffland Apr 30, 2024
23738bf
Mark overrides
jcoffland Apr 30, 2024
161d1b4
Websocket require close message
jcoffland May 5, 2024
66342a5
enum
jcoffland May 5, 2024
ca8c1f1
Attempt to fix reconnect problem.
jcoffland May 5, 2024
dc2985d
Keep client requests alive
jcoffland May 5, 2024
1d4d6e7
Compress rotated log in background thread, Don't rotate log twice at …
jcoffland May 6, 2024
424d1dc
Object lifetime management
jcoffland May 8, 2024
c5dca4f
License update
jcoffland May 8, 2024
31f8a59
Fix log thread locks
jcoffland May 8, 2024
b8439d1
Don't allow FD or Socket copying, End TailToLog on failed stream
jcoffland May 9, 2024
9d99b01
Debug Socket::close(), Reset failed stream in TailFileToLog
jcoffland May 9, 2024
39a7b8b
Quit on failed stream
jcoffland May 9, 2024
4f73f31
Debug TailFileToLog
jcoffland May 9, 2024
ca177dc
Debug TailFileToLog
jcoffland May 9, 2024
3cc7d21
Check for errors when closing fds
jcoffland May 9, 2024
deb3646
Fix detection of temporary resource files
berny156 May 10, 2024
a74ec97
Merge pull request #154 from berny156/master
jcoffland May 10, 2024
acf1aae
Updated docs, removed unsupported build files
jcoffland May 10, 2024
7cf4409
Added libstdc++ debug mode for GNU C++
jcoffland May 11, 2024
eb0ec89
Log locking changes. Added LogListener
jcoffland May 11, 2024
d6a0f54
Debug TailFileToLog on macOS
jcoffland May 11, 2024
2505244
Fix TailFileToLog on macOS
jcoffland May 11, 2024
6bd93b8
Don't convert Windows hardware exceptions, let them abort the program
jcoffland May 11, 2024
1e36e5a
Add EventTailFileToLog
jcoffland May 11, 2024
106dae5
Only rotate log from main thread
jcoffland May 11, 2024
8dc075f
Event only TailFileToLog
jcoffland May 11, 2024
2d0c874
clear() after seekg()
jcoffland May 11, 2024
a112ca8
abort() on fatal Event error
jcoffland May 11, 2024
2b71747
Drop FORMAT_CHECK() macro
jcoffland May 12, 2024
23ed5aa
Callback lifetime tracking
jcoffland May 12, 2024
2df077f
Try to work around Windows log rotation and reading problems
jcoffland May 12, 2024
ba942fc
Use events to rotate log and log date periodically
jcoffland May 12, 2024
1329b5f
Failed log rotation is non-fatal
jcoffland May 12, 2024
7140f8c
Debugging rotate() on Windows
jcoffland May 12, 2024
0a8cdf1
Implement custom std::iostream to control file descriptor inheritance…
jcoffland May 12, 2024
7df6685
Don't rotate empty log
jcoffland May 13, 2024
0706b9d
More logging and callback handling fixes
jcoffland May 13, 2024
8aebdf8
ControlledCallback debugging
jcoffland May 15, 2024
955ad7d
ControlledCallback fixes
jcoffland May 15, 2024
74ea7a9
Add missing override
jcoffland May 16, 2024
5e3dcf4
Don't use DynamicLibrary to access RtlGetVersion() on Windows
jcoffland May 16, 2024
c284c19
Added libs command line build option
jcoffland May 20, 2024
41c11a7
Fix rounding error in Logger rotation scheduling
jcoffland May 20, 2024
94573d3
Use ControlledCallback to handle DNS request lifetimes
jcoffland May 20, 2024
f2899f8
Declare all method overrides
jcoffland May 20, 2024
c8cea00
Update Linux battery detection
jcoffland May 23, 2024
4e7a152
Don't require ifdef for SSL::init()
jcoffland May 23, 2024
813135f
fix dangling iterator in DNS code
jcoffland May 23, 2024
b0c9278
Fix linux battery detection
jcoffland May 23, 2024
408c0b2
Improve Linux battery detection
jcoffland May 23, 2024
d20f6c4
Allow JSON::Value::format() variables to use paths
jcoffland May 25, 2024
cf786ca
Fix ACMEv2
jcoffland May 25, 2024
387ef1f
Fixed bug in JSON::Observable<Dict>, Fixed regression tests
jcoffland May 28, 2024
0dbb2a0
Websocket pong event should not persist
jcoffland Jun 4, 2024
571b44f
Socket code cleanup
jcoffland Jun 4, 2024
0f4b572
Close Websocket if not active
jcoffland Jun 4, 2024
eed5cfc
Don't allow negative number strings to pass for unsigned
jcoffland Jun 5, 2024
98b72a9
Fix for api change to ScriptOrigin() in V8 12.7
Jun 23, 2024
1b05ea9
Merge pull request #156 from hpmachining/master
jcoffland Jun 24, 2024
76d7bec
Preliminary basic HTTP proxy support
jcoffland Jul 11, 2024
bf9de42
EventDB fixes, NameValueTable limit and ordering, API login changes/f…
jcoffland Jul 11, 2024
7586407
Fix UUID byte order
jcoffland Jul 17, 2024
0e7ad7f
Keep Connection alive
jcoffland Jul 17, 2024
a65ce12
Catch and log nameserver parse errors
jcoffland Jul 20, 2024
5c2f2aa
Spelling fixes
jcoffland Jul 20, 2024
91bca85
Fix for Windows
jcoffland Jul 21, 2024
a4651ff
macOS fixes
jcoffland Jul 21, 2024
bfd5618
fix macOS mem leak
jcoffland Jul 22, 2024
bb6841b
Fix for DNS response handling
jcoffland Jul 22, 2024
8d43128
Send Websocket close reason
jcoffland Aug 1, 2024
e287648
Allow linking system lz4
marcosfrm Aug 13, 2024
f7709f9
Merge pull request #157 from marcosfrm/system-lz4
jcoffland Aug 13, 2024
ca6a011
Add support for RPM weak dependencies
marcosfrm Aug 19, 2024
be2df1c
Merge pull request #158 from marcosfrm/rpm-weak
jcoffland Aug 19, 2024
4d4c88c
Changes to Subprocess exit flags handling, Added TailFileToLog::getBy…
jcoffland Aug 22, 2024
48cf334
DEB: fix library dependencies
marcosfrm Aug 23, 2024
b7c641b
Handle ACMEv2 case where 'authorizations' is missing from order
jcoffland Aug 26, 2024
bbfff7d
Merge pull request #159 from marcosfrm/fix-libdeps
jcoffland Aug 26, 2024
9c7cbd5
minor changes
jcoffland Aug 30, 2024
5051aeb
Fix isDirectoryTreeEmpty()
jcoffland Aug 30, 2024
6d157a5
Option constraints and help
jcoffland Sep 17, 2024
2bff1b1
Added DB functions resetConnection() and changeUser(), Removed refere…
jcoffland Oct 2, 2024
dbc62cb
Release DB event when complete
jcoffland Oct 2, 2024
67636a7
Removed reference loop from cb::API::Login
jcoffland Oct 3, 2024
c9b4cfe
Avoid pipe file descriptor double close
jcoffland Oct 3, 2024
816d50d
DB query error logging
jcoffland Oct 3, 2024
760c25d
Added license to script file, re: #162
jcoffland Nov 7, 2024
8e59380
Petter Reinholdtsen's changes
jcoffland Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Windows Compiled files
*.exe
*.pdb
*.ilk

# Compiled Python
*.pyc
Expand All @@ -31,6 +32,8 @@ config.log
package.txt
lib
include
build_info.cpp
/dist.txt

# Backup files
*~
Expand All @@ -39,3 +42,15 @@ include
.ninja_deps
.ninja_log
build.ninja

# VS Code files
.vscode
*.code-workspace

# Patches, regects, origs
*.patch
*.rej
*.orig

# Env files
/scons-env-options.py
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
sudo: false
dist: bionic
language: cpp
compiler:
- gcc
python:
- "3.8"

cache: ccache

addons:
apt:
update: true
packages:
- scons
- build-essential
- libssl-dev
- binutils-dev
- libiberty-dev
- libmariadb-dev-compat
- libleveldb-dev
- libsnappy-dev
- git

jobs:
include:
- stage: Build
script:
- scons
- stage: Test
script:
- scons
- cd tests
- scons
- ./testHarness
4 changes: 2 additions & 2 deletions CODE_TAG
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This file is part of the C! library. A.K.A the cbang library.

Copyright (c) 2003-2019, Cauldron Development LLC
Copyright (c) 2003-2017, Stanford University
Copyright (c) 2021-2024, Cauldron Development Oy
Copyright (c) 2003-2021, Cauldron Development LLC
All rights reserved.

The C! library is free software: you can redistribute it and/or
Expand Down
502 changes: 0 additions & 502 deletions COPYING

This file was deleted.

20 changes: 0 additions & 20 deletions Dockerfile

This file was deleted.

181 changes: 59 additions & 122 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ C! (a.k.a. C-Bang)
==================

The C! or cbang library is a collection of C++ utility libraries
developed over the course of +15 years and several major C++
developed over the course of +20 years and several major C++
application development projects. It should compile and run on
Windows, Linux and OSX using a modern C++ compiler.
Windows, Linux and macOS using a modern C++ compiler such as GNU C++,
clang or MSVC.

Many of the facilities of C! are geared towards cross-platform
application development and providing basic services that most
applications need such as a configuration system, run-time build
information, logging facilities, threads, smart pointers, simple
embedded scripting, etc.
information, configuration and logging facilities, and smart pointers.

C!'s philosophy is to create clean, simple, readable, modular and
reusable code. C! also encourages exception based error handling, and
light use of C++ templates and C preprocesor macros.
reusable code. C! also encourages exception based error handling,
light use of C++ templates and C preprocesor macros. Event driven
asynchronoius programing is prefered but threading is also fully
supported.

C! "leans" on the venerable boost library but also reimplements
several boost APIs which are considered by the author to be too
Expand All @@ -25,76 +27,81 @@ be any sort of grand unifying system for C++ application development.
However, I hope you find many parts of the library useful in your C++
development projects.

For licensing information please see the files LICENSE and COPYING.

For licensing information please see ``LICENSE`` file.

# Features

- Smart pointers, both thread safe and non, with downcasting capability.
- Threading, mutexes, conditions & thread local storage
- Soft exit & signal handling
- Extensively configurable logging facilities.
- Exception class with stack trace capability including line and file info.
- Stack trace capability with function, file and line. (macOS and Linux only)
- Exception throwing and catching convenience macros.
- HTTP and HTTPS client and server.
- Command line parsing and configuration file configuation system.
- HTTP, HTTPS and Websocket client and server.
- Automatic ACMEv2 TLS certification aquisition.
- OAuth2 logins.
- Event driven programming via C++ wrapper for libevent.
- Asynchronous IP address / hostname resolution, parsing and manipulation.
- IPv6 support.
- Socket client and server with asynchronous capability.
- XMacro based enum implementation.
- PyON Python Object Notation language for serializing and deserializing data.
- Simple scripting language for configuration and text based command server.
- Threading, mutexes, conditions & thread local storage
- Soft exit & signal handling
- GPU detection with OpenCL and CUDA support detection.
- CPU type and feature detection for x86, amd64 and aarch64.
- PCI bus enumeration.
- Embedded Javascript (ECMA) support.
- Dynamic library and symbol loading.
- Subprocess handling.
- Powermanagment and system idle detection.
- XMacro based enumerations with automatic string parsing and printing.
- Software build information system.
- A system for compiling in a directory tree of resources.
- Compile in resource trees from directory of files on disk.
- Network packet automatic byte order and string packing functionality.
- Temporary directories, directory traversal & file operations
- C++ style number, to and from, string conversions.
- iostream utilities.
- Application configuration system.
- XML facilities.
- Temporary directories, directory traversal & file operations.
- File locking.
- C++ style number conversions to/from string.
- std::iostream and compression utilities.
- JSON, YAML and XML facilities.
- TAR file read and write.
- Time and timing functions.
- OpenSSL C++ interface.
- IP address / hostname resolution, parsing and manipulation.
- URL parsing.
- Geometric primitives.
- C++ wrapper for libevent.
- Async MariaDB interface using libevent.
- Async MariaDB/MySQL client interface.
- Human readable size & time formatting.
- Many other utility classes.
- Completely contained in it's own C++ namespace.
- Consistent and clean code formating <= 80 column width.

- Platform independent API.

# Prerequisites
## General
## Required
- A modern C++ compiler: GNU C++, Intel C++, MSVS
- SCons http://scons.org/
- openssl http://www.openssl.org/ (optional)
- ChakraCore https://github.com/Microsoft/ChakraCore/ (optional)
- V8 https://developers.google.com/v8/ (optional)
- mariadb https://mariadb.org/ (optional)
- SCons http://scons.org/

## Debug mode only
## Optional
The following add optional features to C!.

- libbfd ftp://ftp.gnu.org/old-gnu/Manuals/bfd-2.9.1/html_mono/bfd.html
- libiberty https://gcc.gnu.org/onlinedocs/libiberty/
- openssl http://www.openssl.org/
- V8 https://developers.google.com/v8/
- mariadb https://mariadb.org/
- LevelDB https://github.com/google/leveldb
- Snappy http://google.github.io/snappy/

## Windows only
- Winsock
## Debug mode
Debug mode is enabled by compiling with ``debug=``.

## OS-X only
- IOKit
- CoreFoundation
Compiling with ``libbfd`` will enhance stack track output on Linux systems.
Install ``binutils-dev`` to get ``libbfd`` on Debian.

## POSIX/Linux only
- pthreads
- libbfd (For debug mode only)
## Debian/Ubuntu install
On most Debian based systems the prerequisites can be installed with the
following command line:

On Debian based systems the prerequisites can be installed with the following
command line:
sudo apt-get install -y scons build-essential libssl-dev binutils-dev \
libiberty-dev libmariadb-dev-compat libleveldb-dev libsnappy-dev git \
libzstd-dev

sudo apt-get install scons build-essential libssl-dev binutils-dev \
libiberty-dev libmariadbclient-dev git

Unfortunately, at this time, there is no ChakraCore package for Debian. See
the build instructions below.
The necessary library packages can very by Linux distribution type and version.

# Build

Expand All @@ -112,7 +119,7 @@ command line to scons or place in a configuration file named
- strict - Enable strict checking
- distcc - Enable distcc distributed compile system
- ccache - Enable ccache caching compile system
- backtrace_debugger - Enable the printing backtraces
- backtrace_debugger - Enable the printing of stack traces

These options are enabled by setting them to 1. For example:

Expand All @@ -126,76 +133,6 @@ strict checking.

# Testing the Build

You can testing C! by going to the *tests* directory in the root of the
cbang source tree, building the test programs and running the test harness:

cd tests
scons
./testHarness

# Troubleshooting

This section describes some common problems and their solutions.

## OpenSSL Library Less than v1.0.0

If you get an error about the openssl library version being too old then you
either need to upgrade your package or build openssl from source like this:

wget http://www.openssl.org/source/openssl-1.0.1f.tar.gz
tar xzvf openssl-1.0.1f.tar.gz
cd openssl-1.0.1f
./config
make
export OPENSSL_HOME=$PWD

Then try building C!.

## ChakraCore

You can either download a prebuilt ChakraCore or build it yourself. Currently
we require a fork of ChakraCore which includes some fixes.

### Windows Binaries

You can find windows binaries of ChakraCore here:
https://github.com/CauldronDevelopmentLLC/ChakraCore/releases/tag/v2.0.0.1

### Building ChakraCore

ChakraCore is the Javascript engine used by the Microsoft Edge browser. It
is fast and Open-Source. Unfortunately there currently aren't any readily
available Debian packages for ChakraCore so you will have to build it from
source.

First make sure you have the prerequisites:

sudo apt-get install -y cmake clang libunwind-dev libicu-dev

You need at least cmake 3.2 and clang 3.8. If your system doesn't have these
then you need to build them from source.


First download the source code:

git clone --depth=1 https://github.com/CauldronDevelopmentLLC/ChakraCore.git

Then build it:

cd ChakraCore
./build.sh --static -j 8

Next collect the various libraries it produces in to one:

mkdir tmp
cd tmp
for i in $(find ../Build* -name \*.a); do
ar x $i
done
ar rcs ../libChakraCore.a *.o
cd ..
rm -rf tmp

Now setup the environment so that the C! build system can find ChakraCore:
You can testing C! by running the test suite:

export CHAKRA_CORE_HOME=$PWD
scons test
Loading