LibU is a multiplatform utility library written in C, with APIs for handling memory allocation, networking and URI parsing, string manipulation, debugging, and logging in a very compact way, plus many other miscellaneous tasks

== MaKL is a Prerequisite ==

LibU needs http://koanlogic.com/makl to configure and build. 

The following commands should be sufficient to get MaKL installed on any Linux 
flavour or Darwin/MacOSX:

$ wget http://koanlogic.com/download/makl/makl-${VERSION}.tar.gz
$ tar zxf makl-${VERSION}.tar.gz && cd makl-${VERSION}
$ sh configure.sh
$ su 
Password: ****
# make install

Should your platform be one of Solaris, OpenSolaris, FreeBSD, PC-BSD, OpenBSD,
NetBSD, DragonflyBSD, Minix or Windows (MinGW or Gygwin) take a look at the 
INSTALL file in the top-level MaKL sources directory to track down specific 
variations on the theme.

== Download == 

Once MaKL is there, you can start downloading the package (always check the 
official http://koanlogic.com/libu page for the latest version and related 
ChangeLog) and tailor it to your specific needs:

$ wget http://koanlogic.com/download/libu/libu-${VERSION}.tar.gz
$ tar zxf libu-${VERSION}.tar.gz && cd libu-${VERSION}


== Configure ==

E.g. should you need to change the default installation path (i.e. /usr/local),
use:

$ makl-conf --prefix="/my/install/base/dir"


Debug symbols and warnings from the compiler can be switched on via
--enable_debug and --enable_warns (use --enable_icc_warns instead when 
working with the Intel C compiler):

$ makl-conf --enable_debug --enable_warns


Code profiling using gprof(1) can be activated via --enable_profile, and,
more generally, any compiler flag can be passed to the build stage in the 
following way:

$ makl-conf --extra-cflags="-Wformat -Wno-format-extra-args -Wformat-security -Wformat-nonliteral -Wformat=2"

The --extra-xxx="val" is indeed a powerful mechanism by which any Makefile 
variable 'XXX' (uppercase!) can be given an additional value 'val': (ab)use 
it to tweak LDFLAGS, SHLIB_LDFLAGS, etc. as needed.  Anyway if in doubt, 
or in search for exotic features, type makl-conf -h to display the complete 
list of options: it's likely that what you are trying to achieve is already 
there.

By default LibU is compiled as static library, to also enable shared library 
build, supply the --enable_shared flag.

== Pick Up What Needs to be Included ==

The default is to build all the modules, but you can disable the 
inclusion of specific bits selectively using the following switches:
    - --no_hmap: to disable the hmap module
    - --no_config: to disable the config module
    - --no_net: to disable the net module
    - --no_env: to disable the env module
    - --no_fs: to disable the fs module
    - --no_pwd: to disable the pwd module
    - --no_list: to disable the list module
    - --no_array: to disable the array module
    - --no_ringbuffer: to disable the rb module
    - --no_pqueue: to disable the pq module
    - --no_json: to disable the json module
    - --no_bst: to disable the bst module

Also, some specific features regarding the networking code can be disabled
at configuration:
    - --no_ipv6: to disable IPv6 protocol support
    - --no_sctp: to disable SCTP protocol support
    - --no_unixsock: to disable UNIX IPC support

If you need to enable compatibility with (some, not all) 1.X interfaces, 
specify the --compat_1x command line switch.

== Build, Test and Install ==

When you are done with the configure step, you can build LibU bits and 
optionally test them:

$ makl
$ makl -C test


And finally install it:

$ su
Password: ****
# makl install


== Hello LibU ! ==

You now are ready to play with your first LibU program:

$ cat main.c
#include <u/libu.h>

int facility = LOG_LOCAL0;

int main (void)
{
    u_con("Hello LibU world !");
    return 0;
}

Write a Makefile like the following:

$ cat Makefile
include common.mk

PROG = hellolibu
SRCS = main.c

LDADD += /path/to/install/prefix/lib/libu.a
CFLAGS += -I/path/to/install/prefix/include

include prog.mk

Then type:

$ makl && ./hellolibu

and enjoy !
Similar Resources

An open source library for C

Homo Deus - C Library Introduction The Homo Deus C Library (hdelibc) is an open source collection of tools for the C programming language. The project

Nov 28, 2022

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins.

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins.

JUCE is an open-source cross-platform C++ application framework used for rapidly developing high quality desktop and mobile applications, including VS

Dec 1, 2022

A toolkit for making real world machine learning and data analysis applications in C++

dlib C++ library Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real worl

Nov 24, 2022

An eventing framework for building high performance and high scalability systems in C.

NOTE: THIS PROJECT HAS BEEN DEPRECATED AND IS NO LONGER ACTIVELY MAINTAINED As of 2019-03-08, this project will no longer be maintained and will be ar

Nov 20, 2022

Easy to use, header only, macro generated, generic and type-safe Data Structures in C

Easy to use, header only, macro generated, generic and type-safe Data Structures in C

C Macro Collections Easy to use, header only, macro generated, generic and type-safe Data Structures in C. Table of Contents Installation Contributing

Nov 23, 2022

Idle is an asynchronous and hot-reloadable C++ dynamic component framework

Idle is an asynchronous and hot-reloadable C++ dynamic component framework

Idle is an asynchronous, hot-reloadable, and highly reactive dynamic component framework similar to OSGI that is: 📦 Modular: Your program logic is en

Nov 29, 2022

Manual mapper that uses PTE manipulation, Virtual Address Descriptor (VAD) manipulation, and forceful memory allocation to hide executable pages. (VAD hide / NX bit swapping)

Manual mapper that uses PTE manipulation, Virtual Address Descriptor (VAD) manipulation, and forceful memory allocation to hide executable pages. (VAD hide / NX bit swapping)

Stealthy Kernel-mode Injector Manual mapper that uses PTE manipulation, Virtual Address Descriptor (VAD) manipulation, and forceful memory allocation

Nov 21, 2022

:hocho: Strictly RFC 3986 compliant URI parsing and handling library written in C89; moved from SourceForge to GitHub

uriparser uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C89 ("ANSI C"). uriparser is cross-platform, fast, su

Nov 25, 2022

C Program to input a string and adjust memory allocation according to the length of the string.

C-String C Program to input a string and adjust memory allocation according to the length of the string. With the help of this program, we have replic

Jan 20, 2022

A collection of scripts written in many different programming languages and each developed independently to perform very specific tasks (big or small)

Script Collection A collection of scripts written in many different programming languages and each developed independently to perform very specific ta

Aug 31, 2021

This is a C plus plus coding template for Compitative programming. This template is very optimized for the Online Judgment

C-plusplus-compitative-Programming-Template Tech We Used C++ Features Easy to compile Easy debug facility Analysised and optimized base template Steps

Jan 27, 2022

A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.

Light Gradient Boosting Machine LightGBM is a gradient boosting framework that uses tree based learning algorithms. It is designed to be distributed a

Nov 24, 2022

A template C project using CMAKE, logging library and basic memory handling.

C Project template Aim of this Repository is to create a template repository for C executable projects with following properties: Cmake project Loggin

May 23, 2022

C++14 asynchronous allocation aware futures (supporting then, exception handling, coroutines and connections)

C++14 asynchronous allocation aware futures (supporting then, exception handling, coroutines and connections)

Continuable is a C++14 library that provides full support for: lazy async continuation chaining based on callbacks (then) and expression templates, ca

Nov 15, 2022

Log engine for c plus plus

Log engine for c plus plus

PTCLogs library PTCLogs is a library for pretty and configurable logs. Installation To install the library (headers and .so file), clone this repo and

May 20, 2022

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values. Authors: Sanjay Ghem

Nov 24, 2022
Comments
  • docs: fix simple typo, ouput -> output

    docs: fix simple typo, ouput -> output

    There is a small typo in srcs/toolbox/test.c.

    Should read output rather than ouput.

    Semi-automated pull request generated by https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

  • Buffer corruption in b64.c

    Buffer corruption in b64.c

    chunk_decode writes 3 bytes to pout in any case - even when nlen is less than 3. This is a write beyond the allowed buffer. see b64.c,160

            if (tot_sz >= nlen)
            {
                chunk_decode(buf, pout);
                tot_sz -= nlen; /* Take care of subtracting pad bytes. */
                pout += nlen;
            } 
    
A lightweight C++11-compatible error-handling mechanism
A lightweight C++11-compatible error-handling mechanism

Result is a modern, simple, and light-weight error-handling alternative to exceptions with a rich feature-set.

Nov 26, 2022
C++14 evented IO libraries for high performance networking and media based applications

LibSourcey C++ Networking Evolved LibSourcey is a collection of cross platform C++14 modules and classes that provide developers with an arsenal for r

Nov 22, 2022
C++ Parallel Computing and Asynchronous Networking Engine

As Sogou`s C++ server engine, Sogou C++ Workflow supports almost all back-end C++ online services of Sogou, including all search services, cloud input method,online advertisements, etc., handling more than 10 billion requests every day. This is an enterprise-level programming engine in light and elegant design which can satisfy most C++ back-end development requirements.

Nov 25, 2022
NIH Utility Library

libnih is a light-weight "standard library" of C functions to ease the development of other libraries and applications. Its goals are: * despite it

Sep 15, 2022
Apple Silicon to Apple Silicon VDM utility

Apple Silicon to Apple Silicon VDM tool This tool lets you get a serial console on an Apple Silicon device and reboot it remotely, using only another

Nov 17, 2022
EASTL stands for Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance.

EA Standard Template Library EASTL stands for Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and i

Dec 1, 2022
An open-source C++ library developed and used at Facebook.

Folly: Facebook Open-source Library What is folly? Folly (acronymed loosely after Facebook Open Source Library) is a library of C++14 components desig

Nov 23, 2022
Functional Programming Library for C++. Write concise and readable C++ code.
Functional Programming Library for C++. Write concise and readable C++ code.

FunctionalPlus helps you write concise and readable C++ code. Table of contents Introduction Usage examples Type deduction and useful error messages T

Nov 28, 2022
Embedded Template Library

Embedded Template Library (ETL) Motivation C++ is a great language to use for embedded applications and templates are a powerful aspect. The standard

Nov 26, 2022
? A glib-like multi-platform c library
? A glib-like multi-platform c library

A glib-like cross-platform C library Supporting the project Support this project by becoming a sponsor. Your logo will show up here with a link to you

Nov 27, 2022