search for: have_sys_errlist

Displaying 9 results from an estimated 9 matches for "have_sys_errlist".

2000 Jul 17
0
patch for getting 2.1.1p4 to compile on SunOS 4
...and_buf)); - memset(rand_buf, 0, sizeof(rand_buf)); -} -#endif /* !HAVE_ARC4RANDOM */ - #ifndef HAVE_SETPROCTITLE void setproctitle(const char *fmt, ...) { @@ -159,8 +78,13 @@ #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) -const char *strerror(void) +const char *strerror(int e) { - return(sys_errlist[errno]); + extern int sys_nerr; + extern char *sys_errlist[]; + + return (e >= 0 && e < sys_nerr) + ? sys_errlist[e] + : "unlisted error" ; } #endif /*...
2001 Mar 12
1
Bug in bsd-misc.c
Hi guys... Just wanted to see what is so different in BSD from Linux and had a quick look at the openbsd-compat directory (openssh-2.5.1p1). There is a REALLY obvious bug in bsd-misc.c, quoted below: #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR) const char *strerror(int e) { extern int sys_nerr; extern char *sys_errlist[]; if ((e >= 0) || (e < sys_nerr)) return("unlisted error"); else return(sys_errlist[e]); } #endif...
2019 Sep 30
0
[PATCH libnbd v2 1/2] lib: Don't use perror after fork in nbd_connect_callback.
.....35a4fed 100644 --- a/configure.ac +++ b/configure.ac @@ -77,6 +77,16 @@ AC_CHECK_HEADERS([\ stdatomic.h \ sys/endian.h]) +dnl Check for sys_errlist (optional). +AC_MSG_CHECKING([for sys_errlist]) +AC_TRY_LINK([], [extern int sys_errlist; char *p = &sys_errlist;], [ + AC_DEFINE([HAVE_SYS_ERRLIST], [1], + [Define if libc has a sys_errlist variable.]) + AC_MSG_RESULT([yes]) +], [ + AC_MSG_RESULT([no]) +]) + dnl Check for GnuTLS (optional, for TLS support). AC_ARG_WITH([gnutls], [AS_HELP_STRING([--without-gnutls], diff --git a/generator/states-connect.c b/generator/s...
2019 Sep 30
1
Re: [PATCH libnbd v2 1/2] lib: Don't use perror after fork in nbd_connect_callback.
...en (s)); Surprisingly, strlen() is not listed in current POSIX' list of async-signal-safe functions. But I have an open bug to remedy that, and don't see any problem in using it. I think it looks nicer to use STDERR_FILENO instead of 2. > + write (2, ": ", 2); > +#if HAVE_SYS_ERRLIST > + write (2, sys_errlist[errno], strlen (sys_errlist[errno])); > +#else > + char buf[32]; > + const char *v = nbd_internal_fork_safe_itoa ((long) errno, buf, sizeof buf); > + write (2, v, strlen (v)); > +#endif > + write (2, "\n", 1); > +#if defined(__GNUC__)...
2019 Sep 30
4
[PATCH libnbd v2 0/2] Implement systemd socket activation.
v1 was posted here: https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00337 v2: - Drop the first patch. - Hopefully fix the multiple issues with fork-safety and general behaviour on error paths. Note this requires execvpe for which there seems to be no equivalent on FreeBSD, except some kind of tedious path parsing (but can we assign to environ?) Rich.
2003 Dec 30
8
[Bug 651] SCO 3.2v4.2 and OpenSSH 3.7.1p1 --> connection hangs and does not close (ssh2 only)
http://bugzilla.mindrot.org/show_bug.cgi?id=651 ------- Additional Comments From vikashb at comparexafrica.co.za 2003-12-30 16:39 ------- tried openssh-SNAP-20031223 does not compile: (cd openbsd-compat && make) gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.. -I. -I./.. -I/usr/local/ssl/include -Dftruncate=chsize -I/usr/local/include -DHAVE_CONFIG_H -c
2005 Sep 19
1
ssh hangs or gives Segmentation fault
..."/bin/login" #define _PATH_PASSWD_PROG "/usr/bin/passwd" /* #undef HAVE_PW_CLASS_IN_PASSWD */ /* #undef HAVE_PW_EXPIRE_IN_PASSWD */ /* #undef HAVE_PW_CHANGE_IN_PASSWD */ /* #undef HAVE_ACCRIGHTS_IN_MSGHDR */ #define HAVE_CONTROL_IN_MSGHDR 1 /* #undef BROKEN_INET_NTOA */ #define HAVE_SYS_ERRLIST 1 #define HAVE_SYS_NERR 1 /* #undef IP_TOS_IS_BROKEN */ /* #undef HAVE_GETUSERATTR */ #define HAVE_BASENAME 1 #define PAM_TTY_KLUDGE 1 /* #undef SSHPAM_CHAUTHTOK_NEEDS_RUID */ /* #undef USE_PIPES */ /* #undef BROKEN_SNPRINTF */ /* #undef HAVE_CYGWIN */ /* #undef BROKEN_REALPATH */ /* #undef HAVE_NE...
2006 Apr 11
0
Problem building openssh-4.3p2 under cygwin and windows XP
...VE_STRLCAT 1 #define HAVE_STRLCPY 1 #define HAVE_STRSEP 1 #define HAVE_STRTOLL 1 #define HAVE_STRTOUL 1 #define HAVE_STRUCT_SOCKADDR_STORAGE 1 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 #define HAVE_STRUCT_TIMESPEC 1 #define HAVE_STRUCT_TIMEVAL 1 #define HAVE_SYSCONF 1 #define HAVE_SYS_CDEFS_H 1 #define HAVE_SYS_ERRLIST 1 #define HAVE_SYS_MMAN_H 1 #define HAVE_SYS_NERR 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_SYSMACROS_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_UN_H 1 #define HAVE_TCGETPGRP 1 #define HAVE_TCSENDBREAK 1 #define HAVE_TIME 1 #define HAVE_TIME_H 1 #define HAVE_TIME_...
2023 Mar 15
4
[libnbd PATCH v4 0/3] lib/utils: add async-signal-safe assert()
This is version 4 of the following sub-series: [libnbd PATCH v3 06/29] lib/utils: introduce xwrite() as a more robust write() [libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert() [libnbd PATCH v3 08/29] lib/utils: add unit test for async-signal-safe assert() http://mid.mail-archive.com/20230215141158.2426855-7-lersek at redhat.com