Commit c3ae489d authored by jan.koester's avatar jan.koester
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+7 −0
Original line number Diff line number Diff line
build/*
.vs/*
.out/*
out/*
.kdev4/libsystempp.kdev4
libsystempp.kdev4
.kdev4/*

CMakeLists.txt

0 → 100644
+63 −0
Original line number Diff line number Diff line
project(systempp C CXX ASM )
cmake_minimum_required(VERSION 3.0)

if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
    set(CMAKE_C_COMPILER "clang")
    set(CMAKE_CXX_COMPILER "clang++")
    set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
    set (VISIBILTY_HIDDEN "__attribute__ ((visibility (\"hidden\")))")

    set(CMAKE_CXX_FLAGS
        "${CMAKE_CXX_FLAGS} \
        -fPIC \
        -Wall \
        -nostdlib \
        -nostdinc \
        -nodefaultlibs \
        -Wextra-tokens \
        -std=c++20 \
        -fsanitize=address \
        -ffp-exception-behavior=strict\
        -isysroot${CMAKE_SOURCE_DIR}/src/include"
    )

    set(CMAKE_C_FLAGS
        "${CMAKE_C_FLAGS} \
        -fPIC \
        -nostdlib \
        -nodefaultlibs\
        -fsanitize=address \
        -fexceptions\
        -Wall \
        -std=c11 \
        -ffp-exception-behavior=strict\
        -isysroot${CMAKE_SOURCE_DIR}/src/include"
    )

    find_package(Clang REQUIRED)

elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
    set (VISIBILTY_HIDDEN "")

    set(CMAKE_CXX_FLAGS
        "${CMAKE_CXX_FLAGS}
         /std:c++20"
    )

    set(CMAKE_C_FLAGS
        "${CMAKE_C_FLAGS}"
    )

    set(CMAKE_EXE_LINKER_FLAGS
        "${CMAKE_EXE_LINKER_FLAGS}\
        /NODEFAULTLIB"
    )
endif()

configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)

include_directories(
    ${CMAKE_SOURCE_DIR}/include
)

add_subdirectory(lib)

README.md

0 → 100644
+1 −0
Original line number Diff line number Diff line
 

config.h.in

0 → 100644
+38 −0
Original line number Diff line number Diff line
/*******************************************************************************
Copyright (c) 2023, Jan Koester jan.koester@gmx.net
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
	* Redistributions of source code must retain the above copyright
	  notice, this list of conditions and the following disclaimer.
	* Redistributions in binary form must reproduce the above copyright
	  notice, this list of conditions and the following disclaimer in the
	  documentation and/or other materials provided with the distribution.
	* Neither the name of the <organization> nor the
	  names of its contributors may be used to endorse or promote products
	  derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

#pragma once

#define MAXHEAPSIZE 16384 
#define CONFSOCKET  "/var/run/confdb.sock"
#define ARCH ${CMAKE_SYSTEM_PROCESSOR}
#define OS ${CMAKE_SYSTEM_NAME}
#define VISIBILTY_HIDDEN ${VISIBILTY_HIDDEN}
#define LIBDIR "/lib"

static const char __libc_release[] = "${Upstream_VERSION}";
static const char __libc_version[] = "${LIBV}";
 No newline at end of file

fuse/conffs.cpp

0 → 100644
+1 −0
Original line number Diff line number Diff line
 
Loading