Compare commits

..

1 commit

Author SHA1 Message Date
f577a0fb94 First attempt to use new CI runner. 2024-09-21 14:45:38 -04:00
4 changed files with 3 additions and 81 deletions

View file

@ -1,6 +1,6 @@
name: Compile Cytoplasm name: Compile Cytoplasm
run-name: Compile Cytoplasm on ${{ forgejo.actor }} run-name: Compile Cytoplasm on ${{ forgejo.actor }}
on: [push, pull_request] on: [push]
jobs: jobs:
"Compile Cytoplasm": "Compile Cytoplasm":
@ -11,7 +11,7 @@ jobs:
runs-on: ["${{ matrix.os }}", "${{ matrix.arch }}"] runs-on: ["${{ matrix.os }}", "${{ matrix.arch }}"]
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v4 uses: actions/checkout@v3
- name: Configure Cytoplasm - name: Configure Cytoplasm
run: ./configure run: ./configure
- name: Build Cytoplasm - name: Build Cytoplasm

2
configure vendored
View file

@ -37,7 +37,7 @@ case "$(uname)" in
# These systems typically use GCC. # These systems typically use GCC.
SCRIPT_ARGS="${SCRIPT_ARGS} --cc=gcc" SCRIPT_ARGS="${SCRIPT_ARGS} --cc=gcc"
;; ;;
OpenBSD|FreeBSD|Darwin) OpenBSD|FreeBSD)
# These systems typically use Clang. # These systems typically use Clang.
SCRIPT_ARGS="${SCRIPT_ARGS} --cc=clang" SCRIPT_ARGS="${SCRIPT_ARGS} --cc=clang"
;; ;;

View file

@ -1,69 +0,0 @@
/*
* Copyright (C) 2022-2024 Jordan Bancino <@jordan:bancino.net>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef CYTOPLASM_PLATFORM_H
#define CYTOPLASM_PLATFORM_H
/***
* @Nm Platform
* @Nd A simple macro header that determines what platform the application
* is being built for.
* @Dd September 21, 2024
*/
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
#define PLATFORM_WINDOWS
#ifdef _WIN64
#define PLATFORM_WIN64
#else
#define PLATFORM_WIN32
#endif
#elif __APPLE__
#define PLATFORM_DARWIN
#include <TargetConditionals.h>
#if TARGET_IPHONE_SIMULATOR
#define PLATFORM_IPHONE
#elif TARGET_OS_MACCATALYST
#define PLATFORM_CATALYST
#elif TARGET_OS_IPHONE
#define PLATFORM_IPHONE
#elif TARGET_OS_MAC
#define PLATFORM_MAC
#else
# error "Unknown Apple platform"
#endif
#elif __ANDROID__
#define PLATFORM_ANDROID
#elif __linux__
#define PLATFORM_LINUX
#elif __unix__
#define PLATFORM_UNIX
#elif defined(_POSIX_VERSION)
#define PLATFORM_POSIX
#else
# error "Unknown compiler"
#endif
#endif /* CYTOPLASM_PLATFORM_H */

View file

@ -24,7 +24,6 @@
#include <Util.h> #include <Util.h>
#include <Memory.h> #include <Memory.h>
#include <Platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -90,10 +89,6 @@ UtilTsMillis(void)
return ts; return ts;
} }
#ifdef PLATFORM_DARWIN
#define st_mtim st_mtimespec
#endif
uint64_t uint64_t
UtilLastModified(char *path) UtilLastModified(char *path)
{ {
@ -110,10 +105,6 @@ UtilLastModified(char *path)
return ts; return ts;
} }
#ifdef PLATFORM_DARWIN
#undef st_mtim
#endif
int int
UtilMkdir(const char *dir, const mode_t mode) UtilMkdir(const char *dir, const mode_t mode)
{ {