1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-20 16:28:12 +00:00
Commit Graph

1428 Commits

Author SHA1 Message Date
Nick Briggs
ee21e482a7 Invoke "command" with /bin/sh -c from makefile to avoid not-found errors 2026-03-19 11:16:16 -07:00
Frank Halasz
bbe011c583 Take geminis suggestion on getting glibc version number in linux-common.mk 2026-03-18 01:27:16 -07:00
Frank Halasz
54c81a3762 Fixed comment in linux-compiler.mk 2026-03-18 01:15:21 -07:00
Frank Halasz
6c20a5c635 Fixed comment in linux-compiler.mk 2026-03-18 01:03:32 -07:00
Frank Halasz
1195048b1b Ooops. Took out debugging code. 2026-03-18 00:51:03 -07:00
Frank Halasz
7a286a8f1f Fix sed script in linux-common.mk 2026-03-18 00:50:14 -07:00
Frank Halasz
034c52b86f In CMakelists, limit use of libbsd for linux to cases where libc does not include strlcat 2026-03-18 00:25:28 -07:00
Frank Halasz
a26cafcbda Change USE_GCC=T/USE_CLANG=T to USE_COMPILER=clang/gcc for linux-y makefiles 2026-03-18 00:01:24 -07:00
Frank Halasz
c6f3ba4305 Including all suggestions made by Gemeni code check. Now includes linking to libbsd (if requested) only if glibc < version 2.38 since glibc >= 2.38 includes strlcat and friends. 2026-03-17 23:02:12 -07:00
Frank Halasz
3430574f61 More updates to github actions to account for deprecation of Node 20. 2026-03-14 20:43:13 -07:00
Frank Halasz
07e009cf08 Update github actions to latest versions to account for deprecation of node 20. 2026-03-14 19:37:40 -07:00
Frank Halasz
25654fa090 For Linux makefiles, automated selection of gcc versus clang compiler depending on whats installed. Refactored Linux makefiles to simplify top level makefiles with slightly more complicated common makefiles. Makefiles for Cygwin and WSL1 all rewritten to use the common linux makefiles code. 2026-03-13 23:51:50 -07:00
Frank Halasz
dadbef47bf Add pkgconf package to things loaded into the Builder Docker image to be used by libbsd changes to linux makefiles 2026-03-09 20:43:02 -07:00
Frank Halasz
41cad3e499 Update all makefiles for linux to use (by include) a common base makefile as well as common makefiles for X and sdl. These included makefiles have the name linux-*.mk. Updated all linux makefiles to use the libbsd-overlay package, using pkg-config to set the appropriate flags. Updated CMakelists to also use the libbsd-overlay package via pkgconfig for Linux only. Finally added install targets to the CMakelists file so that cmake --install . will place the lde binaries into the appropriate directory in maiko as the makefiles currently do. 2026-03-09 18:11:23 -07:00
Frank Halasz
fcbcb2c6b8 Updating all linux makefiles to use the libbsd-overlay scheme properly 2026-03-09 00:45:09 -07:00
Frank Halasz
f4021ef268 Move builder image back to 22.04 so that exe's that we build can run on systems with glibc <2.38 (e.g., Ubuntu 22.04 and Debian 12). 2026-03-01 03:21:04 -08:00
Frank Halasz
e130b0fcb7 Merge remote-tracking branch 'origin/nhb-linux-build-with-libbsd' into fgh_libbsd 2026-03-01 03:16:32 -08:00
Frank Halasz
97b84d4117 Add libbsd to ld library search for all makefile-linux* and makefile-init-linux*. Add libbsd to MAIKO_LIBRARIES (where appropriate) in CMakeLists.txt. This will support building maiko on Ubuntu 22.04 and Debian 12, where strlcat is found only in libbsd. For Ubuntu 24.04 and beyond and Debian 13 and beyond, strlcat is now in glibc (>2.38). 2026-03-01 03:00:08 -08:00
Nick Briggs
c821a73ed4 Updates build environment to Ubuntu Linux 24.04 2026-02-21 17:32:13 -08:00
Nick Briggs
d791b1d332 Merge pull request #533 from Interlisp/nhb-rewrite-version-parser-v2
Extensive rewrite of various parts of the file name/version handling code.  Converts a lot of unsafe string handling functions to safer variants.  Passes buffer sizes in various places to enable overflow checks. Removes some unused variable declarations. Updates comments.  Improves performance with alarm timeout setting when sequences of alarm set/cancel operations are performed.  Adds GETFILEINFO processing for INODE_LO and INODE_HI attributes.
maiko-251031-d791b1d3 maiko-260301-f4021ef2
2025-10-31 15:29:43 -07:00
Nick Briggs
3d09555c6c Removes assigned-but-not-used rval in DSK_getfilename and redundant test of current_len in conc_dir_and_name 2025-10-21 18:04:40 -07:00
Nick Briggs
8ad8b4db2a Removes unused local variable len 2025-10-21 18:03:11 -07:00
Nick Briggs
673ec07a58 Updates CMakeLists.txt to reflect removal of inc/lispver2.h 2025-10-21 17:23:31 -07:00
Nick Briggs
60e12dabc0 Removes comment that is now unnecessary/confusing 2025-10-20 16:57:44 -07:00
Nick Briggs
e2f69f4e48 Adds comment clarifying requirement to call alarm(0) after S_TOUT 2025-10-20 16:57:00 -07:00
Nick Briggs
9f1bcb9299 Simplify conc_dir_and_name implementation for Gemini 2025-10-20 16:35:54 -07:00
Nick Briggs
4dfbdf27ff Responds to Gemini review of potential buffer overflows in quote_... fns 2025-10-20 16:07:36 -07:00
Nick Briggs
51a33680f4 Resolves error and style complaints by Gemini code review 2025-10-20 15:50:52 -07:00
Nick Briggs
d4a882adc2 Uses sizeof() or passed size, where known, in calls to conc_name_and_version 2025-10-20 15:08:51 -07:00
Nick Briggs
67f8cc0cf0 Cleanup UnixVersionToLispVersion and LispVersionToUnixVersion
* implements these as functions rather than #define macros
  * moves definitions to ufs.c
  * adds parameter to UnixVersionToLispVersion for the storage
    size of the buffer being passed
  * removes inc/lispver2.h
  * adjusts makefile-dos an makefile-tail to update dependencies
2025-10-20 14:31:18 -07:00
Konrad Hinsen
853d133cda No need to do makeright init clean 2025-09-29 11:37:54 -07:00
Konrad Hinsen
0370354432 Corrected instructions for building ldeinit 2025-09-29 11:37:54 -07:00
Konrad Hinsen
f85f6ce004 Add instructions for building a function ldeinit 2025-09-29 11:37:54 -07:00
Nick Briggs
04ad740ead Adds GETFILEATTRIBUTE processing for INODE_LO and INODE_HI attributes. 2025-08-18 23:05:53 -07:00
Nick Briggs
fe7beafcc1 "as if" => "as is" in comments. 2025-08-16 19:13:09 -07:00
Nick Briggs
e745381970 Fixup: wrong quoting function used in updates to enum_ufs, enum_ufs_prop 2025-08-16 18:56:56 -07:00
Nick Briggs
5190a3976f Resolves issue medley #2165 ignored quoting characters in filename 2025-08-16 18:56:56 -07:00
Nick Briggs
babe728d3a Improves performance of some file operations, fixes some memory leaks, and increases clarity.
* Avoids unnecessary alarm(0) when it is about to be set again, only
cleans up after it’s all done.

* Renames DIRCHAR to LISPDIRCHAR to be more descriptive, adds LISPDIRSTR
for contexts where a string is required rather than a character.

* Avoids leaks of directory structures by ensuring that any opendir()
has a matching closedir(), with a timeout check, on the return path

* Ensures that closedir() calls that could smash errno happen after
errno is saved for Lisp’s consumption

* Simplifies code to take advantage of strlcpy()/strlcat() guarantee
that destination string is NUL terminated

* Reduces number of unnecessary copies into scratch buffer for file name
processing

* Removes some commented out code left over from copy/paste of functions
2025-08-16 18:56:56 -07:00
Nick Briggs
38d65df90c Replaces unchecked strcpy/strcat with strlcpy/strlcat
Unchecked strcpy/strcat can result in memory smashes if provided with
overly long source arguments. Replacing these with the strl... functions
protects against overruns of the destination memory.

Requires changing the signature of various functions to pass destination
storage size when destination argument is a pointer rather than something
amenable to sizeof() operator.
2025-08-16 18:56:56 -07:00
Nick Briggs
d4a9286962 Replaces unchecked strcpy with strlcpy. 2025-08-16 18:56:55 -07:00
Nick Briggs
24327920f2 Replaces unchecked strcpy with strlcpy. 2025-08-16 18:56:55 -07:00
Nick Briggs
987fa637a9 Replaces unchecked strcpy with strlcpy. 2025-08-16 18:56:55 -07:00
Nick Briggs
4de8b733fd Replaces unchecked strcpy/strcat with strlcpy/strlcat
Unchecked writes to strings using strcpy and strcat can cause memory smashes,
replacing them with (destination) bounds checked strl... equivalents can
avoid this.

Incidentally, fix construction of file name for $HOME/.Xdefaults
2025-08-16 18:56:55 -07:00
Nick Briggs
353f6d202e Clean up quote_fname, quote_fname_ufs, and quote_dname
Moves definitions of the quote_xxx functions from ufs.c where they are not
used to dir.c where they are used.

Adds a parameter to each of the quote_xxx functions to supply the length
of the storage allocated for the result string, and change strcpy() to
strlcpy() to avoid potential memory smash if used carelessly.
2025-08-16 18:56:55 -07:00
Nick Briggs
55209aa7e7 Adds size of output parameter to lisppathname() and replaces various strcpy() with strlcpy() 2025-08-16 18:56:55 -07:00
Nick Briggs
dfb820cc62 Replace sprintf() with snprintf() 2025-08-16 18:56:55 -07:00
Nick Briggs
11b81f6c17 Replaces all calls to sprintf() with snprintf() in ufs.c 2025-08-16 18:56:55 -07:00
Nick Briggs
9557ae8f5b Updates unixpathname() signature to include output string length, replace strcpy with strlcpy 2025-08-16 18:56:55 -07:00
Nick Briggs
d1f7361429 Replaces strcat() with strlcat() in dsk.c 2025-08-16 18:56:55 -07:00
Nick Briggs
4c6aef8fd4 Replaces all strcpy() by strlcpy() in dsk.c 2025-08-16 18:56:55 -07:00