Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/aclocal.m4 # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / aclocal.m4` 40 lines ยท 1473 bytes Raw Blame History 1 dnl Check for socklen_t: historically on BSD it is an int, and in 2 dnl POSIX 1g it is a type of its own, but some platforms use different 3 dnl types for the argument to getsockopt, getpeername, etc. So we 4 dnl have to test to find something that will work. 5 AC_DEFUN([TYPE_SOCKLEN_T], 6 [ 7 AC_CHECK_TYPE([socklen_t], ,[ 8 AC_MSG_CHECKING([for socklen_t equivalent]) 9 AC_CACHE_VAL([git_cv_socklen_t_equiv], 10 [ 11 # Systems have either "struct sockaddr *" or 12 # "void *" as the second argument to getpeername 13 git_cv_socklen_t_equiv= 14 for arg2 in "struct sockaddr" void; do 15 for t in int size_t unsigned long "unsigned long"; do 16 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ 17 #include 18 #include 19 20 int getpeername (int, $arg2 *, $t *); 21 ],[ 22 $t len; 23 getpeername(0,0,&len); 24 ])],[ 25 git_cv_socklen_t_equiv="$t" 26 break 2 27 ]) 28 done 29 done 30 31 if test "x$git_cv_socklen_t_equiv" = x; then 32 AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) 33 fi 34 ]) 35 AC_MSG_RESULT($git_cv_socklen_t_equiv) 36 AC_DEFINE_UNQUOTED(socklen_t, $git_cv_socklen_t_equiv, 37 [type to use in place of socklen_t if not defined])], 38 [#include 39 #include ]) 40 ])