~ubuntu-branches/ubuntu/oneiric/jabberd2/oneiric-security

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Nicolai Spohrer
  • Date: 2008-08-12 16:13:43 UTC
  • mfrom: (1.1.3 upstream) (0.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20080812161343-6trz3r97dtevxd17
Tags: 2.2.1-1ubuntu1
* Merge with Debian unstable (LP: #257130), remaining changes:
  - debian/control:
    + Modify Maintainer field as per spec
    + Depend on libdb4.6-dev instead of libdb4.4-dev
    + Added Conflicts and Replaces: ..., jabber for jabberd2
  - debian/rules: Added libtoolize call (jabberd2 ships with
     an older ltmain.sh version that conflicts with the
     current libtool version)
  - debian/init: create /var/run/jabber directory with correct
     permissions
* Dropped changes:
  - Debian already depends on libpq-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
491
491
EOF
492
492
])
493
493
 
 
494
dnl Check for socklen_t: historically on BSD it is an int, and in
 
495
dnl POSIX 1g it is a type of its own, but some platforms use different
 
496
dnl types for the argument to getsockopt, getpeername, etc.  So we
 
497
dnl have to test to find something that will work.
 
498
AC_DEFUN([TYPE_SOCKLEN_T],
 
499
[
 
500
   AC_CHECK_TYPE([socklen_t], ,[
 
501
      AC_MSG_CHECKING([for socklen_t equivalent])
 
502
      AC_CACHE_VAL([socklen_t_equiv],
 
503
      [
 
504
         # Systems have either "struct sockaddr *" or
 
505
         # "void *" as the second argument to getpeername
 
506
         socklen_t_equiv=
 
507
         for arg2 in "struct sockaddr" void; do
 
508
            for t in int size_t unsigned long "unsigned long"; do
 
509
               AC_TRY_COMPILE([
 
510
                  #include <sys/types.h>
 
511
                  #include <sys/socket.h>
 
512
 
 
513
                  int getpeername (int, $arg2 *, $t *);
 
514
               ],[
 
515
                  $t len;
 
516
                  getpeername(0,0,&len);
 
517
               ],[
 
518
                  socklen_t_equiv="$t"
 
519
                  break
 
520
               ])
 
521
            done
 
522
         done
 
523
 
 
524
         if test "x$socklen_t_equiv" = x; then
 
525
            AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
 
526
         fi
 
527
      ])
 
528
      AC_MSG_RESULT($socklen_t_equiv)
 
529
      AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv,
 
530
                        [type to use in place of socklen_t if not defined])],
 
531
      [#include <sys/types.h>
 
532
#include <sys/socket.h>])
 
533
])
 
534
 
494
535
dnl quote from SunOS-5.8 sys/inttypes.h:
495
536
dnl Use at your own risk.  As of February 1996, the committee is squarely
496
537
dnl behind the fixed sized types; the "least" and "fast" types are still being