mirror of
https://github.com/troglobit/libite.git
synced 2026-10-14 10:19:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb3bb94cfa | ||
|
|
11b9c88732 | ||
|
|
11d4aafce1 | ||
|
|
5cdc5736f3 | ||
|
|
059bfd7806 | ||
|
|
0cda6339a4 |
No files matched your search
+14
-1
@@ -4,6 +4,18 @@ Change Log
|
||||
All notable changes to the project are documented in this file.
|
||||
|
||||
|
||||
[v2.5.2][] - 2022-04-17
|
||||
-----------------------
|
||||
|
||||
### Changes
|
||||
- Add printf format attribute hint to all vararg functions. This will
|
||||
help users of these functions by telling CC what to look for
|
||||
|
||||
### Fixes
|
||||
- Fix `fisdir()` segfault on GNU/Hurd
|
||||
- Fix `touch)` on Debian/kFreeBSD, use `creat()` instad of `mknod()`
|
||||
|
||||
|
||||
[v2.5.1][] - 2021-12-02
|
||||
-----------------------
|
||||
|
||||
@@ -463,7 +475,8 @@ problems this may cause!
|
||||
Initial extraction of frog DNA from [Finit][]. See [README][] for API details.
|
||||
|
||||
|
||||
[UNRELEASED]: https://github.com/troglobit/libite/compare/v2.5.1...HEAD
|
||||
[UNRELEASED]: https://github.com/troglobit/libite/compare/v2.5.2...HEAD
|
||||
[v2.5.2]: https://github.com/troglobit/libite/compare/v2.5.1...v2.5.2
|
||||
[v2.5.1]: https://github.com/troglobit/libite/compare/v2.5.0...v2.5.1
|
||||
[v2.5.0]: https://github.com/troglobit/libite/compare/v2.4.1...v2.5.0
|
||||
[v2.4.1]: https://github.com/troglobit/libite/compare/v2.4.0...v2.4.1
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
AC_INIT(libite, 2.5.1, https://github.com/troglobit/libite/issues)
|
||||
AC_INIT(libite, 2.5.2, https://github.com/troglobit/libite/issues)
|
||||
AC_CONFIG_AUX_DIR(aux)
|
||||
AM_INIT_AUTOMAKE([1.11 foreign dist-xz])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ lib_LTLIBRARIES = libite.la
|
||||
|
||||
libite_la_CPPFLAGS = -D_GNU_SOURCE
|
||||
libite_la_CFLAGS = -W -Wall -Wextra
|
||||
libite_la_LDFLAGS = $(AM_LDFLAGS) -version-info 8:1:3
|
||||
libite_la_LDFLAGS = $(AM_LDFLAGS) -version-info 8:2:3
|
||||
libite_la_SOURCES = chomp.c copyfile.c \
|
||||
conio.c conio.h dir.c \
|
||||
erasef.c fopenf.c fremove.c \
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ int fisdir(const char *path)
|
||||
{
|
||||
struct stat sb;
|
||||
|
||||
if (!stat(path, &sb) && S_ISDIR(sb.st_mode))
|
||||
if (path && !stat(path, &sb) && S_ISDIR(sb.st_mode))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
||||
+16
-11
@@ -72,21 +72,21 @@ typedef struct sdbuf sdbuf_t; /**< Opqaue context struct for telnet APIs */
|
||||
|
||||
char *chomp (char *str);
|
||||
|
||||
int erasef (const char *fmt, ...);
|
||||
int erasef (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
char *fparseln (FILE *, size_t *, size_t *, const char[3], int);
|
||||
|
||||
int fexist (const char *file);
|
||||
int fisdir (const char *path);
|
||||
|
||||
FILE *fopenf (const char *mode, const char *fmt, ...);
|
||||
int fremove (const char *fmt, ...);
|
||||
FILE *fopenf (const char *mode, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
int fremove (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
FILE *tempfile (void);
|
||||
ssize_t copyfile (const char *src, const char *dst, int len, int opt);
|
||||
int movefile (const char *src, const char *dst);
|
||||
int fcopyfile (FILE *src, FILE *dst);
|
||||
ssize_t fsendfile (FILE *src, FILE *dst, size_t len);
|
||||
int truncatef (off_t length, const char *fmt, ...);
|
||||
int truncatef (off_t length, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
|
||||
int ifconfig (const char *ifname, const char *addr, const char *mask, int up);
|
||||
|
||||
@@ -97,7 +97,7 @@ char *lfgetkey (lfile_t *lf, const char *key);
|
||||
int lfgetint (lfile_t *lf, const char *key);
|
||||
int fgetint (const char *file, const char *sep, const char *key);
|
||||
|
||||
int fmkpath (mode_t mode, const char *fmt, ...);
|
||||
int fmkpath (mode_t mode, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
int mkpath (const char *dir, mode_t mode);
|
||||
int makepath (const char *dir);
|
||||
|
||||
@@ -114,16 +114,16 @@ void *reallocarray(void *optr, size_t nmemb, size_t size);
|
||||
void progress (int percent, int max_width);
|
||||
void progress_simple(int percent);
|
||||
|
||||
int systemf (const char *fmt, ...);
|
||||
int systemf (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
sdbuf_t*telnet_open (int addr, short port);
|
||||
int telnet_close (sdbuf_t *ctx);
|
||||
int telnet_expect (sdbuf_t *ctx, char *script[], FILE *output);
|
||||
int telnet_session (int addr, short port, char *script[], FILE *output);
|
||||
|
||||
int touchf (const char *fmt, ...);
|
||||
int touchf (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
int yorn (const char *fmt, ...);
|
||||
int yorn (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
char *which (const char *cmd);
|
||||
int whichp (const char *cmd);
|
||||
@@ -139,10 +139,15 @@ int whichp (const char *cmd);
|
||||
*/
|
||||
static inline int touch(const char *path)
|
||||
{
|
||||
int fd;
|
||||
|
||||
if (utimensat(AT_FDCWD, path, NULL, 0)) {
|
||||
if (errno == ENOENT)
|
||||
return mknod((path), S_IFREG|0644, 0);
|
||||
return -1;
|
||||
if (errno != ENOENT)
|
||||
return -1;
|
||||
fd = creat(path, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
close(fd);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ static int mtime()
|
||||
char buf[80];
|
||||
|
||||
/* Must sleep a while here otherwise we execute too fast => no mtime change :-( */
|
||||
usleep(10000);
|
||||
sleep(2);
|
||||
|
||||
PRINT("Calling pidfile() again to update mtime ...\n");
|
||||
if (pidfile(pidfile_arg))
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ static int mtime(char *file)
|
||||
stat(file, &before);
|
||||
|
||||
/* Must sleep a while here otherwise we execute too fast => no mtime change :-( */
|
||||
usleep(10000);
|
||||
sleep(2);
|
||||
|
||||
PRINT("Calling touch() again to update mtime ...\n");
|
||||
if (touch(file)) {
|
||||
|
||||
Reference in new issue
Block a user