~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to m4/aio.m4

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl -------------------------------------------------------------------------
2
 
dnl       aio.m4,v 1.1 2003/11/18 23:59:13 ossama Exp
3
 
dnl
4
 
dnl       aio.m4
5
 
dnl
6
 
dnl       ACE M4 include file which contains ACE specific M4 macros
7
 
dnl       that determine availablility of POSIX asynchronous IO
8
 
dnl       support.
9
 
dnl
10
 
dnl -------------------------------------------------------------------------
11
 
 
12
 
dnl  Copyright (C) 1998, 1999, 2002  Ossama Othman
13
 
dnl
14
 
dnl  All Rights Reserved
15
 
dnl
16
 
dnl This library is free software; you can redistribute it and/or
17
 
dnl modify it under the current ACE distribution terms.
18
 
dnl
19
 
dnl This library is distributed in the hope that it will be useful,
20
 
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22
 
 
23
 
dnl Asynchronous IO check
24
 
dnl Use this macro to determine if asynchronous IO is working on a
25
 
dnl given platform.
26
 
dnl Usage: ACE_CHECK_ASYNCH_IO
27
 
AC_DEFUN([ACE_CHECK_ASYNCH_IO],
28
 
[
29
 
 AC_REQUIRE([AC_PROG_CXX])
30
 
 AC_REQUIRE([AC_PROG_CXXCPP])
31
 
 AC_LANG([C++])
32
 
 AC_REQUIRE([AC_LANG])
33
 
 AC_REQUIRE([ACE_CHECK_THREADS])
34
 
 
35
 
 dnl In case a library with the asynchronous libraries is found but
36
 
 dnl the asynchronous IO support is not functional then save a copy
37
 
 dnl of the list of libraries before the asynch IO function library
38
 
 dnl is added to the list so that we can revert the list to its
39
 
 dnl pre-asynch-IO check state.
40
 
 ace_save_LIBS="$LIBS"
41
 
 
42
 
 dnl Asynchronous IO library check
43
 
 dnl Some platforms, such as Solaris puts aio_read in -lposix4, for example.
44
 
 dnl In some cases, the thread library must be linked to in addition to the
45
 
 dnl real-time support library.  As such, make sure these checks are done
46
 
 dnl after the thread library checks.
47
 
 AC_SEARCH_LIBS([aio_read], [aio rt posix4],
48
 
    [ace_has_aio_funcs=yes], [ace_has_aio_funcs=no])
49
 
 
50
 
if test "$ace_has_aio_funcs" = yes; then
51
 
  ACE_CACHE_CHECK([for working asynchronous IO],
52
 
    [ace_cv_feature_aio_calls],
53
 
    [
54
 
     AC_RUN_IFELSE([AC_LANG_SOURCE([[
55
 
#ifndef ACE_LACKS_UNISTD_H
56
 
#include <unistd.h>
57
 
#endif
58
 
#include <fcntl.h>
59
 
#ifndef ACE_LACKS_SYS_TYPES_H
60
 
# include <sys/types.h>
61
 
#endif
62
 
#include <sys/stat.h>
63
 
#include <signal.h>
64
 
#include <string.h>
65
 
#include <errno.h>
66
 
#include <stdio.h>
67
 
#include <iostream.h>
68
 
 
69
 
#include <aio.h>
70
 
 
71
 
class Test_Aio
72
 
{
73
 
public:
74
 
  Test_Aio (void);
75
 
  // Default constructor.
76
 
 
77
 
  int init (void);
78
 
  // Initting the output file and the buffer.
79
 
 
80
 
  int do_aio (void);
81
 
  // Doing the testing stuff.
82
 
 
83
 
  ~Test_Aio (void);
84
 
  // Destructor.
85
 
private:
86
 
  int out_fd_;
87
 
  // Output file descriptor.
88
 
 
89
 
  struct aiocb *aiocb_write_;
90
 
  // For writing to the file.
91
 
 
92
 
  struct aiocb *aiocb_read_;
93
 
  // Reading stuff from the file.
94
 
 
95
 
  char *buffer_write_;
96
 
  // The buffer to be written to the out_fd.
97
 
 
98
 
  char *buffer_read_;
99
 
  // The buffer to be read back from the file.
100
 
};
101
 
 
102
 
Test_Aio::Test_Aio (void)
103
 
  : out_fd_ (0),
104
 
    aiocb_write_ (new struct aiocb),
105
 
    aiocb_read_ (new struct aiocb),
106
 
    buffer_write_ (0),
107
 
    buffer_read_ (0)
108
 
{
109
 
}
110
 
 
111
 
Test_Aio::~Test_Aio (void)
112
 
{
113
 
  if (close (this->out_fd_) != 0)
114
 
    perror ("close");
115
 
 
116
 
  delete aiocb_write_;
117
 
  delete aiocb_read_;
118
 
  delete [] buffer_write_;
119
 
  delete [] buffer_read_;
120
 
}
121
 
 
122
 
// Init the output file and init the buffer.
123
 
int
124
 
Test_Aio::init (void)
125
 
{
126
 
  // Open the output file.
127
 
  this->out_fd_ = open ("test_aio.log", O_RDWR | O_CREAT | O_TRUNC, 0600);
128
 
  if (this->out_fd_ == -1)
129
 
    {
130
 
      perror ("open");
131
 
      return -1;
132
 
    }
133
 
 
134
 
  unlink ("test_aio.log"); // Unlink now so we don't have to do so later.
135
 
 
136
 
  const char message[] = "Welcome to the world of AIO... AIO Rules !!!";
137
 
 
138
 
  // Init the buffers.
139
 
  this->buffer_write_ = new char [sizeof (message) + 1];
140
 
  strcpy (this->buffer_write_, message);
141
 
  // cout << "The buffer : " << this->buffer_write_ << endl;
142
 
  this->buffer_read_ = new char [sizeof (message) + 1];
143
 
 
144
 
  return 0;
145
 
}
146
 
 
147
 
// Set the necessary things for the AIO stuff.
148
 
// Write the buffer asynchly.hmm Disable signals.
149
 
// Go on aio_suspend. Wait for completion.
150
 
// Print out the result.
151
 
int
152
 
Test_Aio::do_aio (void)
153
 
{
154
 
  // = Write to the file.
155
 
 
156
 
  // Setup AIOCB.
157
 
  this->aiocb_write_->aio_fildes = this->out_fd_;
158
 
  this->aiocb_write_->aio_offset = 0;
159
 
  this->aiocb_write_->aio_buf = this->buffer_write_;
160
 
  this->aiocb_write_->aio_nbytes = strlen (this->buffer_write_);
161
 
  this->aiocb_write_->aio_reqprio = 0;
162
 
  this->aiocb_write_->aio_sigevent.sigev_notify = SIGEV_NONE;
163
 
  //this->this->aiocb_.aio_sigevent.sigev_signo = SIGRTMAX;
164
 
  this->aiocb_write_->aio_sigevent.sigev_value.sival_ptr =
165
 
    (void *) this->aiocb_write_;
166
 
 
167
 
  // Fire off the aio write.
168
 
  if (aio_write (this->aiocb_write_) != 0)
169
 
    {
170
 
      perror ("aio_write");
171
 
      return -1;
172
 
    }
173
 
 
174
 
  // = Read from that file.
175
 
 
176
 
  // Setup AIOCB.
177
 
  this->aiocb_read_->aio_fildes = this->out_fd_;
178
 
  this->aiocb_read_->aio_offset = 0;
179
 
  this->aiocb_read_->aio_buf = this->buffer_read_;
180
 
  this->aiocb_read_->aio_nbytes = strlen (this->buffer_write_);
181
 
  this->aiocb_read_->aio_reqprio = 0;
182
 
  this->aiocb_read_->aio_sigevent.sigev_notify = SIGEV_NONE;
183
 
  //this->this->aiocb_.aio_sigevent.sigev_signo = SIGRTMAX;
184
 
  this->aiocb_read_->aio_sigevent.sigev_value.sival_ptr =
185
 
    (void *) this->aiocb_read_;
186
 
 
187
 
  // Fire off the aio write. If it doesnt get queued, carry on to get
188
 
  // the completion for the first one.
189
 
  if (aio_read (this->aiocb_read_) < 0)
190
 
    perror ("aio_read");
191
 
 
192
 
  // Wait for the completion on aio_suspend.
193
 
  struct aiocb *list_aiocb[2];
194
 
  list_aiocb [0] = this->aiocb_write_;
195
 
  list_aiocb [1] = this->aiocb_read_;
196
 
 
197
 
  // Do suspend till all the aiocbs in the list are done.
198
 
  int done = 0;
199
 
  while (!done)
200
 
    {
201
 
      if (aio_suspend (list_aiocb, 2, 0) != 0)
202
 
        {
203
 
          perror ("aio_suspend");
204
 
          return -1;
205
 
        }
206
 
 
207
 
      // Analyze return and error values.
208
 
      if (list_aiocb [0] != 0 && aio_error (list_aiocb [0]) != EINPROGRESS)
209
 
        {
210
 
          if (aio_return (list_aiocb [0]) == -1)
211
 
            {
212
 
              perror ("aio_return");
213
 
              return -1;
214
 
            }
215
 
          else
216
 
            {
217
 
              // Successful. Store the pointer somewhere and make the
218
 
              // entry NULL in the list.
219
 
              // @@ no need ----> this->aiocb_write_ = list_aiocb [0];
220
 
              list_aiocb [0] = 0;
221
 
            }
222
 
        }
223
 
//      else
224
 
//        cout << "AIO in progress" << endl;
225
 
 
226
 
      if (list_aiocb [1] != 0 && aio_error (list_aiocb [1]) != EINPROGRESS)
227
 
        {
228
 
          if (aio_return (list_aiocb [1]) == -1)
229
 
            {
230
 
              perror ("aio_return");
231
 
              return -1;
232
 
            }
233
 
          else
234
 
            {
235
 
              // Successful. Store the pointer somewhere and make the
236
 
              // entry NULL in the list.
237
 
              // @@ no need ----> this->aiocb_read_ = list_aiocb [1];
238
 
              list_aiocb [1] = 0;
239
 
            }
240
 
        }
241
 
//      else
242
 
//        cout << "AIO in progress" << endl;
243
 
 
244
 
      // Is it done?
245
 
      if ((list_aiocb [0] == 0) && (list_aiocb [1] == 0))
246
 
        done = 1;
247
 
    }
248
 
 
249
 
  //cout << "Both the AIO operations done." << endl;
250
 
  //cout << "The buffer is :" << this->buffer_read_ << endl;
251
 
 
252
 
  return 0;
253
 
}
254
 
 
255
 
int
256
 
main ()
257
 
{
258
 
  Test_Aio test_aio;
259
 
 
260
 
  if (test_aio.init () != 0)
261
 
    {
262
 
      //printf ("AIOCB test failed:\n"
263
 
      //        "ACE_POSIX_AIOCB_PROACTOR may not work in this platform\n");
264
 
      return -1;
265
 
    }
266
 
 
267
 
  if (test_aio.do_aio () != 0)
268
 
    {
269
 
      //printf ("AIOCB test failed:\n"
270
 
      //        "ACE_POSIX_AIOCB_PROACTOR may not work in this platform\n");
271
 
      return -1;
272
 
    }
273
 
  //printf ("AIOCB test successful:\n"
274
 
  //        "ACE_POSIX_AIOCB_PROACTOR should work in this platform\n");
275
 
  return 0;
276
 
}
277
 
       ]])],[
278
 
        dnl Now try another test
279
 
 
280
 
        dnl Create a file for the test program to read.
281
 
        cat > test_aiosig.txt <<EOF
282
 
 
283
 
*******************************************************
284
 
FOO BAR FOO BAR FOO BAR FOO BAR FOO BAR FOO BAR FOO BAR
285
 
*******************************************************
286
 
EOF
287
 
 
288
 
 
289
 
        AC_RUN_IFELSE(
290
 
          [AC_LANG_SOURCE([[
291
 
#ifndef ACE_LACKS_UNISTD_H
292
 
#include <unistd.h>
293
 
#endif
294
 
#include <fcntl.h>
295
 
#ifndef ACE_LACKS_SYS_TYPES_H
296
 
# include <sys/types.h>
297
 
#endif
298
 
#include <sys/stat.h>
299
 
#include <pthread.h>
300
 
#include <signal.h>
301
 
#include <string.h>
302
 
#include <errno.h>
303
 
#include <stdio.h>
304
 
 
305
 
#include <limits.h>
306
 
 
307
 
#include <aio.h>
308
 
 
309
 
#ifdef __cplusplus
310
 
extern "C"
311
 
#endif
312
 
void null_handler (int /* signal_number */,
313
 
                   siginfo_t * /* info */,
314
 
                   void * /* context */);
315
 
 
316
 
int file_handle = -1;
317
 
char mb1[BUFSIZ + 1];
318
 
char mb2[BUFSIZ + 1];
319
 
aiocb aiocb1, aiocb2;
320
 
sigset_t completion_signal;
321
 
 
322
 
// Function prototypes.
323
 
int setup_signal_delivery (void);
324
 
int issue_aio_calls (void);
325
 
int query_aio_completions (void);
326
 
int test_aio_calls (void);
327
 
int setup_signal_handler (void);
328
 
int setup_signal_handler (int signal_number);
329
 
 
330
 
int
331
 
setup_signal_delivery (void)
332
 
{
333
 
  // Make the sigset_t consisting of the completion signal.
334
 
  if (sigemptyset (&completion_signal) == -1)
335
 
    {
336
 
      perror ("Error:Couldn't init the RT completion signal set\n");
337
 
      return -1;
338
 
    }
339
 
 
340
 
  if (sigaddset (&completion_signal, SIGRTMIN) == -1)
341
 
    {
342
 
      perror ("Error:Couldn't init the RT completion signal set\n");
343
 
      return -1;
344
 
    }
345
 
 
346
 
  // Mask them.
347
 
  if (pthread_sigmask (SIG_BLOCK, &completion_signal, 0) == -1)
348
 
    {
349
 
      perror ("Error:Couldn't make the RT completion signals\n");
350
 
      return -1;
351
 
    }
352
 
 
353
 
  return setup_signal_handler (SIGRTMIN);
354
 
}
355
 
 
356
 
int
357
 
issue_aio_calls (void)
358
 
{
359
 
  // Setup AIOCB.
360
 
  aiocb1.aio_fildes = file_handle;
361
 
  aiocb1.aio_offset = 0;
362
 
  aiocb1.aio_buf = mb1;
363
 
  aiocb1.aio_nbytes = BUFSIZ;
364
 
  aiocb1.aio_reqprio = 0;
365
 
  aiocb1.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
366
 
  aiocb1.aio_sigevent.sigev_signo = SIGRTMIN;
367
 
  aiocb1.aio_sigevent.sigev_value.sival_ptr = (void *) &aiocb1;
368
 
 
369
 
  // Fire off the aio write.
370
 
  if (aio_read (&aiocb1) == -1)
371
 
    {
372
 
      // Queueing failed.
373
 
      perror ("Error:Asynch_Read_Stream: aio_read queueing failed\n");
374
 
      return -1;
375
 
    }
376
 
 
377
 
  // Setup AIOCB.
378
 
  aiocb2.aio_fildes = file_handle;
379
 
  aiocb2.aio_offset = BUFSIZ + 1;
380
 
  aiocb2.aio_buf = mb2;
381
 
  aiocb2.aio_nbytes = BUFSIZ;
382
 
  aiocb2.aio_reqprio = 0;
383
 
  aiocb2.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
384
 
  aiocb2.aio_sigevent.sigev_signo = SIGRTMIN;
385
 
  aiocb2.aio_sigevent.sigev_value.sival_ptr = (void *) &aiocb2;
386
 
 
387
 
  // Fire off the aio write.
388
 
  if (aio_read (&aiocb2) == -1)
389
 
    {
390
 
      // Queueing failed.
391
 
      perror ("Error:Asynch_Read_Stream: aio_read queueing failed\n");
392
 
      return -1;
393
 
    }
394
 
  return 0;
395
 
}
396
 
 
397
 
int
398
 
query_aio_completions (void)
399
 
{
400
 
  int result = 0;
401
 
  size_t number_of_completions = 0;
402
 
  for (number_of_completions = 0;
403
 
       number_of_completions < 2;
404
 
       number_of_completions++)
405
 
    {
406
 
      // Wait for <milli_seconds> amount of time.
407
 
      // @@ Assigning <milli_seconds> to tv_sec.
408
 
      timespec timeout;
409
 
      timeout.tv_sec = 5;
410
 
      timeout.tv_nsec = 0;
411
 
 
412
 
      // To get back the signal info.
413
 
      siginfo_t sig_info;
414
 
 
415
 
      // Await the RT completion signal.
416
 
      int sig_return = sigtimedwait (&completion_signal,
417
 
                                     &sig_info,
418
 
                                     &timeout);
419
 
 
420
 
      // Error case.
421
 
      // If failure is coz of timeout, then return *0* but set
422
 
      // errno appropriately. This is what the WinNT proactor
423
 
      // does.
424
 
      if (sig_return == -1)
425
 
        {
426
 
          perror ("Error:Error waiting for RT completion signals\n");
427
 
          return -1;
428
 
        }
429
 
 
430
 
      // RT completion signals returned.
431
 
      if (sig_return != SIGRTMIN)
432
 
        {
433
 
          //printf ("Unexpected signal (%d) has been received while waiting for RT Completion Signals\n",
434
 
          //        sig_return);
435
 
          return -1;
436
 
        }
437
 
 
438
 
      // @@ Debugging.
439
 
      //printf ("Sig number found in the sig_info block : %d\n",
440
 
      //        sig_info.si_signo);
441
 
 
442
 
      // Is the signo returned consistent?
443
 
      if (sig_info.si_signo != sig_return)
444
 
        {
445
 
          //printf ("Inconsistent signal number (%d) in the signal info block\n",
446
 
          //        sig_info.si_signo);
447
 
          return -1;
448
 
        }
449
 
 
450
 
      // @@ Debugging.
451
 
      //printf ("Signal code for this signal delivery : %d\n",
452
 
      //        sig_info.si_code);
453
 
 
454
 
      // Is the signal code an aio completion one?
455
 
      if ((sig_info.si_code != SI_ASYNCIO) &&
456
 
          (sig_info.si_code != SI_QUEUE))
457
 
        {
458
 
          //printf ("Unexpected signal code (%d) returned on completion querying\n",
459
 
          //        sig_info.si_code);
460
 
          return -1;
461
 
        }
462
 
 
463
 
      // Retrive the aiocb.
464
 
      aiocb* aiocb_ptr = (aiocb *) sig_info.si_value.sival_ptr;
465
 
 
466
 
      // Analyze error and return values. Return values are
467
 
      // actually <errno>'s associated with the <aio_> call
468
 
      // corresponding to aiocb_ptr.
469
 
      int error_code = aio_error (aiocb_ptr);
470
 
      if (error_code == -1)
471
 
        {
472
 
          perror ("Error:Invalid control block was sent to <aio_error> for compleion querying\n");
473
 
          return -1;
474
 
        }
475
 
 
476
 
      if (error_code != 0)
477
 
        {
478
 
          // Error occurred in the <aio_>call. Return the errno
479
 
          // corresponding to that <aio_> call.
480
 
          //printf ("Error:An AIO call has failed:Error code = %d\n",
481
 
          //        error_code);
482
 
          return -1;
483
 
        }
484
 
 
485
 
      // No error occured in the AIO operation.
486
 
      int nbytes = aio_return (aiocb_ptr);
487
 
      if (nbytes == -1)
488
 
        {
489
 
          perror ("Error:Invalid control block was sent to <aio_return>\n");
490
 
          return -1;
491
 
        }
492
 
 
493
 
      //if (number_of_completions == 0)
494
 
        // Print the buffer.
495
 
        //printf ("Number of bytes transferred : %d\n The buffer : %s \n",
496
 
        //        nbytes,
497
 
        //        mb1);
498
 
      //else
499
 
        // Print the buffer.
500
 
        //printf ("Number of bytes transferred : %d\n The buffer : %s \n",
501
 
        //        nbytes,
502
 
        //        mb2);
503
 
    }
504
 
  return 0;
505
 
}
506
 
 
507
 
int
508
 
test_aio_calls (void)
509
 
{
510
 
  // Set up the input file.
511
 
  // Open file (in SEQUENTIAL_SCAN mode)
512
 
  file_handle = open ("test_aiosig.txt", O_RDONLY);
513
 
 
514
 
  if (file_handle == -1)
515
 
    {
516
 
      perror ("open");
517
 
      return -1;
518
 
    }
519
 
 
520
 
  unlink ("test_aiosig.txt"); // Unlink now so we don't have to do so later.
521
 
 
522
 
  if (setup_signal_delivery () < 0)
523
 
    return -1;
524
 
 
525
 
  if (issue_aio_calls () < 0)
526
 
    return -1;
527
 
 
528
 
  if (query_aio_completions () < 0)
529
 
    return -1;
530
 
 
531
 
  if (close (file_handle) != 0)
532
 
    {
533
 
      perror ("close");
534
 
      return -1;
535
 
    }
536
 
 
537
 
  return 0;
538
 
}
539
 
 
540
 
int
541
 
setup_signal_handler (int signal_number)
542
 
{
543
 
   // Setting up the handler(!) for these signals.
544
 
  struct sigaction reaction;
545
 
  sigemptyset (&reaction.sa_mask);   // Nothing else to mask.
546
 
  reaction.sa_flags = SA_SIGINFO;    // Realtime flag.
547
 
#if defined (SA_SIGACTION)
548
 
  // Lynx says, it is better to set this bit to be portable.
549
 
  reaction.sa_flags &= SA_SIGACTION;
550
 
#endif /* SA_SIGACTION */
551
 
  reaction.sa_sigaction = null_handler;     // Null handler.
552
 
  int sigaction_return = sigaction (SIGRTMIN,
553
 
                                    &reaction,
554
 
                                    0);
555
 
  if (sigaction_return == -1)
556
 
    {
557
 
      perror ("Error:Proactor couldn't do sigaction for the RT SIGNAL");
558
 
      return -1;
559
 
    }
560
 
 
561
 
  return 0;
562
 
}
563
 
 
564
 
void
565
 
null_handler (int         /* signal_number */,
566
 
              siginfo_t * /* info */,
567
 
              void *      /* context */)
568
 
{
569
 
}
570
 
 
571
 
int
572
 
main ()
573
 
{
574
 
  if (test_aio_calls () == 0)
575
 
    {
576
 
      // printf ("RT SIG test successful:\n"
577
 
      //         "ACE_POSIX_SIG_PROACTOR should work in this platform\n");
578
 
      return 0;
579
 
    }
580
 
 
581
 
  //printf ("RT SIG test failed:\n"
582
 
  //        "ACE_POSIX_SIG_PROACTOR may not work in this platform\n");
583
 
  return -1;
584
 
 
585
 
}
586
 
         ]])],
587
 
         [
588
 
          ace_cv_feature_aio_calls=yes
589
 
         ],
590
 
         [
591
 
          ace_cv_feature_aio_calls=no
592
 
         ],
593
 
         [
594
 
          dnl Don't bother doing anything for cross-compiling here
595
 
          dnl since the outer run-time test will prevent this
596
 
          dnl inner run-time test from ever running when cross-compiling.
597
 
          dnl We just put something in here to prevent autoconf
598
 
          dnl from complaining.
599
 
          ace_just_a_place_holder=ignoreme
600
 
         ])
601
 
       ],[
602
 
        ace_cv_feature_aio_calls=no
603
 
       ],[
604
 
        dnl Asynchronous IO test for cross-compiled platforms
605
 
        dnl This test is weaker than the above run-time tests but it will
606
 
        dnl have to do.
607
 
        AC_COMPILE_IFELSE(
608
 
          [AC_LANG_PROGRAM([[
609
 
#include <aio.h>
610
 
          ]],
611
 
          [[
612
 
           aiocb* aiocb_ptr (void);
613
 
          ]])],
614
 
          [
615
 
           ace_cv_feature_aio_calls=yes
616
 
          ],
617
 
          [
618
 
           ace_cv_feature_aio_calls=no
619
 
          ])
620
 
       ])
621
 
    ],[AC_DEFINE([ACE_HAS_AIO_CALLS])],[LIBS="$ace_save_LIBS"])
622
 
fi dnl test "$ace_has_aio_funcs" = yes
623
 
])