Compare commits
62 Commits
before_cac
...
master
Author | SHA1 | Date | |
---|---|---|---|
7ba0017ab1 | |||
![]() |
e88ee36f63 | ||
![]() |
d1143bee85 | ||
![]() |
e8a014ad18 | ||
![]() |
364410438a | ||
![]() |
50cbef999c | ||
![]() |
3f641c6e8d | ||
![]() |
da31c93c98 | ||
![]() |
f0928a82fc | ||
![]() |
2e53d02ca2 | ||
![]() |
f156d94713 | ||
![]() |
3c628d6832 | ||
![]() |
394cc9ac6d | ||
![]() |
a0144ff183 | ||
![]() |
ffd878ebc5 | ||
![]() |
e551b98cfb | ||
![]() |
97f9dc139f | ||
![]() |
8f54afac36 | ||
![]() |
1fbc39ce62 | ||
![]() |
ae73ee5094 | ||
![]() |
a1462fc77b | ||
![]() |
d8144b6969 | ||
![]() |
0ca1109cc8 | ||
![]() |
c6b7016330 | ||
![]() |
062d116f33 | ||
![]() |
e02ae5d350 | ||
![]() |
b244466563 | ||
![]() |
943b73001c | ||
![]() |
34b0cbd170 | ||
![]() |
37c3424cd5 | ||
![]() |
734f36df4e | ||
![]() |
dfa2da5ce8 | ||
![]() |
a2c463c1bd | ||
![]() |
1aa603aff2 | ||
![]() |
5a26ac47f4 | ||
![]() |
3690534459 | ||
![]() |
47ff192c6a | ||
![]() |
75734d2899 | ||
![]() |
7f31dace87 | ||
![]() |
49d46da35e | ||
![]() |
5ff162d145 | ||
![]() |
4419684028 | ||
![]() |
29e5b9a740 | ||
![]() |
e2c5ed7505 | ||
![]() |
5140065b3e | ||
![]() |
780bdb30ce | ||
![]() |
725228882d | ||
![]() |
17c287e5c0 | ||
![]() |
360dc19fb0 | ||
![]() |
5660da9844 | ||
![]() |
5f841e752b | ||
![]() |
a7e940eebb | ||
![]() |
6313196963 | ||
![]() |
ae9fa335fc | ||
![]() |
2ae47fca0b | ||
![]() |
8ce1196012 | ||
![]() |
026c4d93f0 | ||
![]() |
2c02025332 | ||
![]() |
f03172ab10 | ||
![]() |
8b7af6781f | ||
![]() |
d51b06a396 | ||
![]() |
c8257af1bc |
339
LICENSE
Normal file
339
LICENSE
Normal file
@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
smmapdfw
|
||||
Copyright (C) 2020 Wolfgang Hottgenroth
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
@ -0,0 +1,13 @@
|
||||
smmapd.ini snippet:
|
||||
|
||||
[pgworker]
|
||||
obj = /home/who/Sources/sf/test/pgworker/lib/libpg_worker.so
|
||||
debug = 1
|
||||
sql_statement = SELECT a.mailuser, a.mailtarget, a.mailalias FROM mailaddress_t
|
||||
a, domain_t d WHERE a.address=$1 and d.name=$2 and a.domain = d.id
|
||||
input_delimiter = |
|
||||
output_format_string = <$1><$2><$3>
|
||||
dbhost = confdb.hottis.de
|
||||
dbname = config
|
||||
dbuser = lurker
|
||||
dbpass = lurker123
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
Copyright (C) 2004, Wolfgang Hottgenroth
|
||||
Copyright (C) 2004, 2005 Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
This file is part of smmapdfw-pgworker.
|
||||
|
||||
smmapdfw is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
@ -18,14 +18,17 @@
|
||||
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#include <containers_public.h>
|
||||
|
||||
#include "htmalloc.h"
|
||||
#include "htbuffer.h"
|
||||
#include "smmapd.h"
|
||||
|
||||
|
||||
@ -33,7 +36,7 @@ int pg_worker_init(cfgl_t *cfg, void **handle);
|
||||
int pg_worker_destroy(void *handle);
|
||||
int pg_worker_work_setup(void *handle, void **work_handle);
|
||||
int pg_worker_work_destroy(void *handle, void *work_handle);
|
||||
int pg_worker_work(void *handle, void *work_handle, char *input, char *output);
|
||||
int pg_worker_work(void *handle, void *work_handle, char *input, htbuffer_t *output);
|
||||
|
||||
class_descriptor_t pgworker = {
|
||||
"pgworker",
|
||||
@ -47,17 +50,154 @@ class_descriptor_t pgworker = {
|
||||
|
||||
typedef struct pg_container_handle_s {
|
||||
int counter;
|
||||
cfgl_t *cfg;
|
||||
char *sql_statement;
|
||||
int param_cnt;
|
||||
char *input_delimiter;
|
||||
char *output_format_string;
|
||||
char *dbhost;
|
||||
char *dbname;
|
||||
char *dbuser;
|
||||
char *dbpass;
|
||||
int allow_multiple_result_items;
|
||||
char *multiple_result_item_separator;
|
||||
int consider_many_items_as_failure;
|
||||
} pg_container_handle_t;
|
||||
|
||||
typedef struct pg_worker_handle_s {
|
||||
int counter;
|
||||
pg_container_handle_t *pch;
|
||||
char **param_array; /* pre-allocated space for separated params */
|
||||
PGconn *dbconn;
|
||||
} pg_worker_handle_t;
|
||||
|
||||
static int process(pg_worker_handle_t *pwh, char *input, htbuffer_t *output);
|
||||
static int count_params(const char *stmt);
|
||||
static int break_input(pg_worker_handle_t *pwh, char *input);
|
||||
|
||||
|
||||
|
||||
int debug = 0;
|
||||
|
||||
|
||||
#define MAX_PARAM_DIGIT_NUM 2
|
||||
#define MAX_PARAM_COUNT 99
|
||||
static int count_params(const char *stmt) {
|
||||
const char *paramPtr = stmt;
|
||||
const char *spacePtr;
|
||||
char numBuf[MAX_PARAM_DIGIT_NUM + 1];
|
||||
char checkArray[MAX_PARAM_COUNT];
|
||||
int i, x, cnt=0, done, res=0;
|
||||
|
||||
memset(checkArray, 0, MAX_PARAM_COUNT);
|
||||
|
||||
if (debug) syslog(LOG_DEBUG, "pgworker count_params: start %s", paramPtr);
|
||||
while ((paramPtr = strchr(paramPtr, '$')) && (res == 0)) {
|
||||
paramPtr++;
|
||||
if (debug) syslog(LOG_DEBUG, "pgworker count_params: step %s", paramPtr);
|
||||
for (i = 0, done = 0; (i <= MAX_PARAM_DIGIT_NUM) && !done; i++) {
|
||||
if (isdigit(*paramPtr)) {
|
||||
numBuf[i] = *paramPtr;
|
||||
if (debug) syslog(LOG_DEBUG, "pgworker count_params: i=%d, nb=%c",
|
||||
i, numBuf[i]);
|
||||
paramPtr++;
|
||||
} else {
|
||||
numBuf[i] = '\0';
|
||||
if (debug) syslog(LOG_DEBUG, "pgworker count_params: end, i=%d, nb=%s",
|
||||
i, numBuf);
|
||||
x = atoi(numBuf);
|
||||
if (x == 0) {
|
||||
syslog(LOG_ERR, "pgworker count_params: failure, x=0");
|
||||
break;
|
||||
}
|
||||
if (x >= MAX_PARAM_COUNT) {
|
||||
syslog(LOG_ERR, "pgworker count_params: failure, x > MAX_PARAM_COUNT");
|
||||
break;
|
||||
}
|
||||
checkArray[x-1] = 1;
|
||||
cnt++;
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
if (!done) {
|
||||
syslog(LOG_ERR, "pgworker count_params: not done, failure");
|
||||
res = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (done) {
|
||||
for (i = 0; (i <= MAX_PARAM_COUNT) && checkArray[i]; i++);
|
||||
if (i != cnt) {
|
||||
syslog(LOG_ERR,
|
||||
"pgworker count_params: none continuous sequence of param numbers, failure");
|
||||
res = -1;
|
||||
} else {
|
||||
if (debug) syslog(LOG_DEBUG, "pgworker count_params: %d params", cnt);
|
||||
res = cnt;
|
||||
}
|
||||
}
|
||||
|
||||
if (debug) syslog(LOG_DEBUG, "pgworker count_params: finish, res=%d", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int pg_worker_init(cfgl_t *cfg, void **handle) {
|
||||
pg_container_handle_t *pch = (pg_container_handle_t*)htmalloc(sizeof(pg_container_handle_t));
|
||||
pg_container_handle_t *pch =
|
||||
(pg_container_handle_t*)htmalloc(sizeof(pg_container_handle_t));
|
||||
pch->counter = 0;
|
||||
pch->cfg = cfg;
|
||||
debug = atoi(findcfglx(pch->cfg, "debug", "0"));
|
||||
pch->sql_statement = findcfgl(pch->cfg, "sql_statement");
|
||||
if (pch->sql_statement == NULL) {
|
||||
syslog(LOG_ERR, "pgworker pg_worker_init: missing SQL statement");
|
||||
return -1;
|
||||
}
|
||||
pch->param_cnt = count_params(pch->sql_statement);
|
||||
if (pch->param_cnt <= 0)
|
||||
return -1;
|
||||
pch->input_delimiter = findcfgl(pch->cfg, "input_delimiter");
|
||||
if ((pch->param_cnt > 1) && (pch->input_delimiter == NULL)) {
|
||||
syslog(LOG_ERR,
|
||||
"pgworker pg_worker_init: more than one parameter but no input_delimiter given");
|
||||
return -1;
|
||||
}
|
||||
pch->output_format_string = findcfgl(pch->cfg, "output_format_string");
|
||||
pch->dbhost = findcfgl(pch->cfg, "dbhost");
|
||||
if (pch->dbhost == NULL) {
|
||||
syslog(LOG_ERR, "pgworker pg_worker_init: missing dbhost");
|
||||
return -1;
|
||||
}
|
||||
pch->dbname = findcfgl(pch->cfg, "dbname");
|
||||
if (pch->dbname == NULL) {
|
||||
syslog(LOG_ERR, "pgworker pg_worker_init: missing dbname");
|
||||
return -1;
|
||||
}
|
||||
pch->dbuser = findcfgl(pch->cfg, "dbuser");
|
||||
if (pch->dbuser == NULL) {
|
||||
syslog(LOG_ERR, "pgworker pg_worker_init: missing dbuser");
|
||||
return -1;
|
||||
}
|
||||
pch->dbpass = findcfgl(pch->cfg, "dbpass");
|
||||
if (pch->dbpass == NULL) {
|
||||
syslog(LOG_ERR, "pgworker pg_worker_init: missing dbpass");
|
||||
return -1;
|
||||
}
|
||||
|
||||
pch->allow_multiple_result_items = atoi(findcfglx(pch->cfg, "allow_multiple_result_items", "0"));
|
||||
pch->multiple_result_item_separator = findcfgl(pch->cfg, "multiple_result_item_separator");
|
||||
pch->consider_many_items_as_failure = atoi(findcfglx(pch->cfg, "consider_many_items_as_failure", "0"));
|
||||
if (pch->allow_multiple_result_items && pch->consider_many_items_as_failure) {
|
||||
syslog(LOG_ERR, "pgworker pg_worker_init: allow_multiple_result_items and consider_many_items_as failure exclude each other");
|
||||
return -1;
|
||||
}
|
||||
if (pch->allow_multiple_result_items && ! pch->multiple_result_item_separator) {
|
||||
syslog(LOG_ERR, "pgworker pg_worker_init: multiple result items allowed but no separator given");
|
||||
return -1;
|
||||
}
|
||||
|
||||
*handle = pch;
|
||||
return 0;
|
||||
}
|
||||
@ -69,24 +209,239 @@ int pg_worker_destroy(void *handle) {
|
||||
}
|
||||
|
||||
int pg_worker_work_setup(void *handle, void **work_handle) {
|
||||
pg_worker_handle_t *pwh = (pg_worker_handle_t*)htmalloc(sizeof(pg_worker_handle_t));
|
||||
pg_worker_handle_t *pwh =
|
||||
(pg_worker_handle_t*)htmalloc(sizeof(pg_worker_handle_t));
|
||||
pwh->counter = 0;
|
||||
pwh->pch = handle;
|
||||
*work_handle = pwh;
|
||||
pwh->param_array = (char **) htmalloc(sizeof(char*) * pwh->pch->param_cnt);
|
||||
syslog(LOG_DEBUG, "pgworker c=%p w=%p", pwh->pch, pwh);
|
||||
|
||||
pwh->dbconn = PQsetdbLogin(pwh->pch->dbhost,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
pwh->pch->dbname,
|
||||
pwh->pch->dbuser,
|
||||
pwh->pch->dbpass);
|
||||
syslog(LOG_DEBUG, "pgworker (%p) pg_worker_work_setup: dbconn=%p",
|
||||
pwh, pwh->dbconn);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pg_worker_work_destroy(void *handle, void *work_handle) {
|
||||
syslog(LOG_DEBUG, "pg_worker_destroy: freeing the worker handle");
|
||||
free(work_handle);
|
||||
}
|
||||
|
||||
int pg_worker_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
pg_container_handle_t *pch = (pg_container_handle_t*) handle;
|
||||
pg_worker_handle_t *pwh = (pg_worker_handle_t*) work_handle;
|
||||
sprintf(output, "pg-worker receives %s (pch %p, pwh %p) (called %d)\n",
|
||||
input, pch, pwh, pwh->counter++);
|
||||
return SMM_OK;
|
||||
syslog(LOG_DEBUG, "pgworker (%p) pg_worker_destroy: freeing the worker handle",
|
||||
pwh);
|
||||
PQfinish(pwh->dbconn);
|
||||
free(pwh->param_array);
|
||||
free(pwh);
|
||||
}
|
||||
|
||||
int pg_worker_work(void *handle, void *work_handle, char *input, htbuffer_t *output) {
|
||||
int res;
|
||||
pg_worker_handle_t *pwh = (pg_worker_handle_t*) work_handle;
|
||||
|
||||
syslog(LOG_DEBUG, "pgworker (%p) pg_worker_work entered", pwh);
|
||||
|
||||
res = process(pwh, input, output);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
static int break_input(pg_worker_handle_t *pwh, char *input) {
|
||||
char *param, *nextptr;
|
||||
int cnt=0;
|
||||
|
||||
if (pwh->pch->input_delimiter == NULL) {
|
||||
syslog(LOG_DEBUG, "pgworker (%p) break_input: input is %s", pwh, input);
|
||||
pwh->param_array[0] = input;
|
||||
} else {
|
||||
nextptr = input;
|
||||
while (NULL != (param = strstr(nextptr, pwh->pch->input_delimiter))) {
|
||||
*param = '\0';
|
||||
if (cnt >= pwh->pch->param_cnt) {
|
||||
syslog(LOG_ERR, "pgworker (%p) break_input: too much parameters", pwh);
|
||||
return SMM_ILLEGAL_INPUT;
|
||||
}
|
||||
pwh->param_array[cnt] = nextptr;
|
||||
cnt++;
|
||||
syslog(LOG_DEBUG, "pgworker (%p) break_input: param found (cnt=%d): {%s}",
|
||||
pwh, cnt, nextptr);
|
||||
nextptr = param + strlen(pwh->pch->input_delimiter);
|
||||
}
|
||||
|
||||
/* last */
|
||||
if (cnt >= pwh->pch->param_cnt) {
|
||||
syslog(LOG_ERR, "pgworker (%p) break_input: too much parameters", pwh);
|
||||
return SMM_ILLEGAL_INPUT;
|
||||
}
|
||||
pwh->param_array[cnt] = nextptr;
|
||||
cnt++;
|
||||
syslog(LOG_DEBUG, "pgworker (%p) break_input: last param (cnt=%d): {%s}",
|
||||
pwh, cnt, nextptr);
|
||||
|
||||
if (cnt < pwh->pch->param_cnt) {
|
||||
syslog(LOG_ERR, "pgworker (%p) break_input: too few parameters", pwh);
|
||||
return SMM_ILLEGAL_INPUT;
|
||||
}
|
||||
|
||||
syslog(LOG_DEBUG, "pgworker (%p) break_input: end", pwh);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#define MAX_RESULT_DIGIT_NUM 2
|
||||
static int populate_output_format(pg_worker_handle_t *pwh, PGresult *pgr,
|
||||
htbuffer_t *output, int tuple_num) {
|
||||
const char *formatPtr = pwh->pch->output_format_string;
|
||||
const char *tmpPtr = formatPtr;
|
||||
char numBuf[MAX_PARAM_DIGIT_NUM + 1];
|
||||
char *s;
|
||||
int i, x, cnt=0, done, res=0;
|
||||
|
||||
syslog(LOG_DEBUG, "pgworker (%p) populate_output_format OUTPUT: %s",
|
||||
pwh, output->buf);
|
||||
|
||||
|
||||
while ((formatPtr = strchr(formatPtr, '$')) && (res == 0)) {
|
||||
syslog(LOG_DEBUG, "pgworker (%p) populate_output_format tmpPtr: %s, formatPtr: %s, d: %i",
|
||||
pwh, tmpPtr, formatPtr, formatPtr - tmpPtr);
|
||||
htbuffer_strncat(output, tmpPtr, formatPtr - tmpPtr);
|
||||
syslog(LOG_DEBUG, "pgworker (%p) populate_output_format OUTPUT: %s",
|
||||
pwh, output->buf);
|
||||
formatPtr++;
|
||||
for (i = 0, done = 0; (i <= MAX_RESULT_DIGIT_NUM) && !done; i++) {
|
||||
if (isdigit(*formatPtr)) {
|
||||
numBuf[i] = *formatPtr;
|
||||
formatPtr++;
|
||||
tmpPtr = formatPtr;
|
||||
} else {
|
||||
numBuf[i] = '\0';
|
||||
x = atoi(numBuf) - 1;
|
||||
if (x > PQnfields(pgr)) {
|
||||
syslog(LOG_ERR,
|
||||
"pgworker (%p) populate_output_format param num too high");
|
||||
break;
|
||||
}
|
||||
s = PQgetvalue(pgr, tuple_num, x);
|
||||
syslog(LOG_DEBUG, "pgworker (%p) populate_output_format OUTPUT PARAM: %s",
|
||||
pwh, s);
|
||||
htbuffer_strcat(output, s);
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
if (!done) {
|
||||
syslog(LOG_ERR, "pgworker (%p) populate_outputformat, not done, failure",
|
||||
pwh);
|
||||
htbuffer_strcpy(output, "");
|
||||
res = SMM_ILLEGAL_INPUT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (done == 1) {
|
||||
/* reminds */
|
||||
htbuffer_strncat(output, tmpPtr, formatPtr - tmpPtr);
|
||||
syslog(LOG_DEBUG, "OUTPUT: %s", output->buf);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
static int process(pg_worker_handle_t *pwh, char *input, htbuffer_t *output) {
|
||||
int i, j, t, f, res;
|
||||
char *s;
|
||||
PGresult *pgr;
|
||||
|
||||
|
||||
if (0 == (res = break_input(pwh, input))) {
|
||||
pgr = PQexecParams(pwh->dbconn,
|
||||
pwh->pch->sql_statement,
|
||||
pwh->pch->param_cnt,
|
||||
NULL,
|
||||
(const char * const *) pwh->param_array,
|
||||
NULL,
|
||||
NULL,
|
||||
0);
|
||||
syslog(LOG_DEBUG, "pgworker (%p) process pgr=%p", pwh, pgr);
|
||||
|
||||
t = PQntuples(pgr);
|
||||
syslog(LOG_DEBUG, "pgworker (%p) process PQntuples=%d", pwh, t);
|
||||
|
||||
f = PQnfields(pgr);
|
||||
syslog(LOG_DEBUG, "pgworker (%p) process PQnfields=%d", pwh, f);
|
||||
|
||||
if (t == 0) {
|
||||
syslog(LOG_DEBUG, "pgworker (%p) process: no output", pwh);
|
||||
res = SMM_NOT_FOUND_NOK;
|
||||
} else if ((t > 1) && pwh->pch->consider_many_items_as_failure) {
|
||||
syslog(LOG_DEBUG, "pgworker (%p) process: many items, considered as failure", pwh);
|
||||
res = SMM_NOT_FOUND_NOK;
|
||||
} else if (t > 0) {
|
||||
t = (pwh->pch->allow_multiple_result_items) ? t : 1;
|
||||
for (i = 0; i < t; i++) {
|
||||
if (i > 0)
|
||||
htbuffer_strcat(output, pwh->pch->multiple_result_item_separator);
|
||||
if (NULL == pwh->pch->output_format_string) {
|
||||
if (f > 1)
|
||||
syslog(LOG_WARNING,
|
||||
"pgworker (%p) process: more than one result fields (%d) but no format string",
|
||||
pwh, f);
|
||||
htbuffer_strcat(output, PQgetvalue(pgr, i, 0));
|
||||
res = SMM_OK;
|
||||
} else {
|
||||
if (0 == (res = populate_output_format(pwh, pgr, output, i))) {
|
||||
syslog(LOG_DEBUG, "pgworker (%p) process: output %s", pwh, output->buf);
|
||||
res = SMM_OK;
|
||||
} else {
|
||||
syslog(LOG_ERR, "pgworker (%p) process failure in population of output", pwh);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PQclear(pgr);
|
||||
}
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
A:
|
||||
- An instance of the pgworker will get an SQL-statement.
|
||||
- The SQL-statement may contain multiple parameter.
|
||||
- A separator token to be used in the input from sendmail will be defined.
|
||||
- The SQL-statement contains one result parameter.
|
||||
- A cache file can be defined.
|
||||
|
||||
B:
|
||||
- Multiple instances of the pgworker will get exactly the same SQL-statement.
|
||||
- The SQL-statement may contain multiple parameter.
|
||||
- A separator token to be used in the input from sendmail will be defined.
|
||||
- The SQL-statement contains multiple result parameters, usually as many
|
||||
as instances are using it.
|
||||
- A position argument to identify the result parameter for the particular
|
||||
instance will be defined.
|
||||
- If a cache file should be used, the same cache file can be used of
|
||||
instances using the same SQL-statement.
|
||||
|
||||
C:
|
||||
- As B, but for each instance a list of position arguments can be given
|
||||
to return multiple output results.
|
||||
- A separator token for the different result items must be given.
|
||||
|
||||
D:
|
||||
- As C, but instead of a separator token a format string must be given.
|
||||
|
||||
E:
|
||||
- As D, but instead of given output positions in a separate list, the
|
||||
position numbers will be used directly in the format string.
|
||||
*/
|
||||
|
@ -1,3 +1,3 @@
|
||||
SUBDIRS = libsmmapdfw smmapd verify_worker test_worker cyrus_worker doc m4 mib
|
||||
SUBDIRS = libsmmapdfw verify_worker test_worker cyrus_worker recpverify_worker rateconn_worker smmapd doc m4
|
||||
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -10,142 +12,237 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
|
||||
config.guess config.sub depcomp install-sh ltmain.sh missing \
|
||||
mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
LIB = @LIB@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = libsmmapdfw verify_worker test_worker cyrus_worker recpverify_worker rateconn_worker smmapd doc m4
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
SUBDIRS = libsmmapdfw smmapd verify_worker test_worker cyrus_worker doc m4 mib
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
|
||||
Makefile.am Makefile.in NEWS aclocal.m4 config.guess config.h.in \
|
||||
config.sub configure configure.ac install-sh ltmain.sh missing \
|
||||
mkinstalldirs
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac
|
||||
cd $(srcdir) && $(ACLOCAL)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.h: stamp-h
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h; \
|
||||
$(MAKE) stamp-h; \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
|
||||
$(SHELL) ./config.status
|
||||
@echo timestamp > stamp-h 2> /dev/null
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
|
||||
@if test ! -f $@; then \
|
||||
rm -f $(srcdir)/stamp-h.in; \
|
||||
$(MAKE) $(srcdir)/stamp-h.in; \
|
||||
else :; fi
|
||||
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
|
||||
|
||||
mostlyclean-hdr:
|
||||
|
||||
clean-hdr:
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h
|
||||
-rm -f config.h stamp-h1
|
||||
|
||||
maintainer-clean-hdr:
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
@ -153,13 +250,14 @@ maintainer-clean-hdr:
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
all-recursive install-data-recursive install-exec-recursive \
|
||||
installdirs-recursive install-recursive uninstall-recursive \
|
||||
check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
@ -171,7 +269,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
@ -179,13 +277,24 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
rev="$$subdir $$rev"; \
|
||||
test "$$subdir" != "." || dot_seen=yes; \
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
test "$$dot_seen" = "no" && rev=". $$rev"; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
@ -195,184 +304,314 @@ maintainer-clean-recursive:
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP))
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
maintainer-clean-tags:
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
for subdir in $(SUBDIRS); do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
|| exit 1; \
|
||||
chmod 777 $(distdir)/$$subdir; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
dvi: dvi-recursive
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
installcheck-am:
|
||||
installcheck: installcheck-recursive
|
||||
all-recursive-am: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
install-exec-am:
|
||||
all-am: Makefile config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-recursive
|
||||
uninstall-am:
|
||||
uninstall: uninstall-recursive
|
||||
all-am: Makefile config.h
|
||||
all-redirect: all-recursive-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
clean: clean-recursive
|
||||
pdf: pdf-recursive
|
||||
|
||||
distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
pdf-am:
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f config.status
|
||||
ps: ps-recursive
|
||||
|
||||
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
ps-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f config.status
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
|
||||
install-data-recursive uninstall-data-recursive install-exec-recursive \
|
||||
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
|
||||
install-exec-am install-exec install-data-am install-data install-am \
|
||||
install uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-libtool clean-recursive \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-recursive distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
3915
smmapdfw/aclocal.m4
vendored
3915
smmapdfw/aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
597
smmapdfw/config.guess
vendored
597
smmapdfw/config.guess
vendored
File diff suppressed because it is too large
Load Diff
@ -6,9 +6,6 @@
|
||||
/* enable Net-SNMP */
|
||||
#undef ENABLE_NETSNMP
|
||||
|
||||
/* enable stats */
|
||||
#undef ENABLE_STATS
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
@ -174,7 +171,7 @@
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define as `fork' if `vfork' does not work. */
|
||||
|
150
smmapdfw/config.sub
vendored
150
smmapdfw/config.sub
vendored
@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
|
||||
# Inc.
|
||||
|
||||
timestamp='2004-06-24'
|
||||
timestamp='2006-09-20'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@ -21,14 +22,15 @@ timestamp='2004-06-24'
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
@ -70,7 +72,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
@ -83,11 +85,11 @@ Try \`$me --help' for more information."
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
--time-stamp | --time* | -t )
|
||||
echo "$timestamp" ; exit 0 ;;
|
||||
echo "$timestamp" ; exit ;;
|
||||
--version | -v )
|
||||
echo "$version" ; exit 0 ;;
|
||||
echo "$version" ; exit ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
echo "$usage"; exit ;;
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
@ -99,7 +101,7 @@ while test $# -gt 0 ; do
|
||||
*local*)
|
||||
# First pass through any local machine types.
|
||||
echo $1
|
||||
exit 0;;
|
||||
exit ;;
|
||||
|
||||
* )
|
||||
break ;;
|
||||
@ -118,8 +120,9 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
|
||||
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@ -170,6 +173,10 @@ case $os in
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco6)
|
||||
os=-sco5v6
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5)
|
||||
os=-sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
@ -186,6 +193,10 @@ case $os in
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5v6*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
@ -230,14 +241,16 @@ case $basic_machine in
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| m32r | m32rle | m68000 | m68k | m88k | mcore \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
@ -246,6 +259,7 @@ case $basic_machine in
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
@ -254,20 +268,24 @@ case $basic_machine in
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc | or32 \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale | xstormy16 | xtensa \
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
@ -278,6 +296,9 @@ case $basic_machine in
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||
;;
|
||||
ms1)
|
||||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
@ -297,8 +318,8 @@ case $basic_machine in
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| bs2000-* \
|
||||
| avr-* | avr32-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
@ -308,9 +329,9 @@ case $basic_machine in
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| m32r-* | m32rle-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | mcore-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
@ -319,6 +340,7 @@ case $basic_machine in
|
||||
| mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mips64vr5900-* | mips64vr5900el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
@ -327,24 +349,27 @@ case $basic_machine in
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
|
||||
| xtensa-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
@ -457,6 +482,9 @@ case $basic_machine in
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
crisv32 | crisv32-* | etraxfs*)
|
||||
basic_machine=crisv32-axis
|
||||
;;
|
||||
cris | cris-* | etrax*)
|
||||
basic_machine=cris-axis
|
||||
;;
|
||||
@ -486,6 +514,10 @@ case $basic_machine in
|
||||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
djgpp)
|
||||
basic_machine=i586-pc
|
||||
os=-msdosdjgpp
|
||||
;;
|
||||
dpx20 | dpx20-*)
|
||||
basic_machine=rs6000-bull
|
||||
os=-bosx
|
||||
@ -676,6 +708,9 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
;;
|
||||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
@ -751,9 +786,8 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
or32 | or32-*)
|
||||
openrisc | openrisc-*)
|
||||
basic_machine=or32-unknown
|
||||
os=-coff
|
||||
;;
|
||||
os400)
|
||||
basic_machine=powerpc-ibm
|
||||
@ -784,6 +818,12 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pc98)
|
||||
basic_machine=i386-pc
|
||||
;;
|
||||
pc98-*)
|
||||
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
@ -840,6 +880,10 @@ case $basic_machine in
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
@ -866,6 +910,10 @@ case $basic_machine in
|
||||
sb1el)
|
||||
basic_machine=mipsisa64sb1el-unknown
|
||||
;;
|
||||
sde)
|
||||
basic_machine=mipsisa32-sde
|
||||
os=-elf
|
||||
;;
|
||||
sei)
|
||||
basic_machine=mips-sei
|
||||
os=-seiux
|
||||
@ -1026,6 +1074,10 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
xbox)
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
@ -1075,13 +1127,10 @@ case $basic_machine in
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@ -1154,20 +1203,23 @@ case $os in
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos* | -toppers*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@ -1185,7 +1237,7 @@ case $os in
|
||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
|
||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||
;;
|
||||
-mac*)
|
||||
@ -1294,6 +1346,9 @@ case $os in
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
@ -1316,6 +1371,12 @@ else
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
score-*)
|
||||
os=-elf
|
||||
;;
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
@ -1325,9 +1386,9 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
@ -1371,6 +1432,9 @@ case $basic_machine in
|
||||
*-be)
|
||||
os=-beos
|
||||
;;
|
||||
*-haiku)
|
||||
os=-haiku
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
@ -1542,7 +1606,7 @@ case $basic_machine in
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
||||
exit 0
|
||||
exit
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
|
14548
smmapdfw/configure
vendored
14548
smmapdfw/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -2,10 +2,11 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
|
||||
AC_INIT(smmapdfw, 0.96, woho@hottis.de)
|
||||
AM_INIT_AUTOMAKE(smmapdfw, 0.96)
|
||||
AC_INIT(smmapdfw, 0.99-5, woho@hottis.de)
|
||||
AM_INIT_AUTOMAKE(smmapdfw, 0.99-5)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_LANG_C
|
||||
@ -22,7 +23,7 @@ AC_ARG_WITH(bdb-lib-dir,
|
||||
yes)
|
||||
;;
|
||||
*)
|
||||
LDFLAGS="$LDFLAGS -L$withval -R$withval"
|
||||
LDFLAGS="$LDFLAGS -L$withval"
|
||||
;;
|
||||
esac ]
|
||||
)
|
||||
@ -55,7 +56,7 @@ AC_ARG_WITH(djbdns-lib-dir,
|
||||
yes)
|
||||
;;
|
||||
*)
|
||||
LDFLAGS="$LDFLAGS -L$withval -R$withval"
|
||||
LDFLAGS="$LDFLAGS -L$withval"
|
||||
;;
|
||||
esac ]
|
||||
)
|
||||
@ -101,7 +102,7 @@ AC_ARG_WITH(netsnmp-lib-dir,
|
||||
yes)
|
||||
;;
|
||||
*)
|
||||
LDFLAGS="$LDFLAGS -L$withval -R$withval"
|
||||
LDFLAGS="$LDFLAGS -L$withval"
|
||||
;;
|
||||
esac ]
|
||||
)
|
||||
@ -170,15 +171,6 @@ dnl (default=no)])],
|
||||
dnl cyrus_BUILD=libcyrus_worker.la
|
||||
dnl )
|
||||
|
||||
ENABLE_STATS=0
|
||||
AC_ARG_ENABLE(stats,
|
||||
[AC_HELP_STRING(--enable-stats, [
|
||||
Enables statistics collection.
|
||||
(default=no)])],
|
||||
if test "x$enableval" = xyes; then ENABLE_STATS=1; fi
|
||||
if test "x$enableval" = xno; then ENABLE_STATS=0; fi
|
||||
|
||||
)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@ -202,9 +194,6 @@ AC_CHECK_LIB(pthread, pthread_create,
|
||||
AC_CHECK_LIB([resolv], [inet_aton])
|
||||
AC_CHECK_LIB([socket], [connect])
|
||||
|
||||
if test "x$WITHOUT_DJBDNS" = "x0"; then
|
||||
AC_CHECK_LIB([djbdns], [dns_transmit_start])
|
||||
fi
|
||||
|
||||
ENABLE_NETSNMP=0
|
||||
if test "x$WITHOUT_NETSNMP" = "x0"; then
|
||||
@ -260,13 +249,17 @@ fi
|
||||
|
||||
AC_SUBST(BDB_LIBS)
|
||||
|
||||
if test "x$WITHOUT_DJBDNS" = "x0"; then
|
||||
AC_CHECK_LIB([djbdns], [dns_transmit_start])
|
||||
fi
|
||||
|
||||
|
||||
if test "x$BDB_NOT_FOUND" = "x1"; then
|
||||
echo "*** no db/dbm found, disabling verify cache"
|
||||
ENABLE_CACHE=0
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(ENABLE_CACHE, ${ENABLE_CACHE}, [enable cache])
|
||||
AC_DEFINE_UNQUOTED(ENABLE_STATS, ${ENABLE_STATS}, [enable stats])
|
||||
AC_DEFINE_UNQUOTED(ENABLE_NETSNMP, ${ENABLE_NETSNMP}, [enable Net-SNMP])
|
||||
|
||||
|
||||
@ -277,6 +270,6 @@ dnl AC_SUBST(test_BUILD)
|
||||
dnl AC_SUBST(cyrus_BUILD)
|
||||
|
||||
|
||||
AC_CONFIG_FILES([Makefile libsmmapdfw/Makefile smmapd/Makefile test_worker/Makefile verify_worker/Makefile cyrus_worker/Makefile doc/Makefile m4/Makefile mib/Makefile])
|
||||
AC_CONFIG_FILES([Makefile libsmmapdfw/Makefile smmapd/Makefile test_worker/Makefile verify_worker/Makefile cyrus_worker/Makefile recpverify_worker/Makefile rateconn_worker/Makefile doc/Makefile m4/Makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
|
@ -1,6 +1,8 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -10,180 +12,268 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = cyrus_worker
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libcyrus_worker_la_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
am_libcyrus_worker_la_OBJECTS = cyrus_worker.lo
|
||||
libcyrus_worker_la_OBJECTS = $(am_libcyrus_worker_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libcyrus_worker_la_SOURCES)
|
||||
DIST_SOURCES = $(libcyrus_worker_la_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
LIB = @LIB@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
lib_LTLIBRARIES = libcyrus_worker.la
|
||||
libcyrus_worker_la_SOURCES = cyrus_worker.c
|
||||
libcyrus_worker_la_LIBADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
|
||||
INCLUDES = -I../libsmmapdfw
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
all: all-am
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
libcyrus_worker_la_LDFLAGS =
|
||||
libcyrus_worker_la_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
libcyrus_worker_la_OBJECTS = cyrus_worker.lo
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/cyrus_worker.P
|
||||
SOURCES = $(libcyrus_worker_la_SOURCES)
|
||||
OBJECTS = $(libcyrus_worker_la_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .obj .s
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu cyrus_worker/Makefile
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cyrus_worker/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu cyrus_worker/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-libLTLIBRARIES:
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
|
||||
distclean-libLTLIBRARIES:
|
||||
|
||||
maintainer-clean-libLTLIBRARIES:
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
# FIXME: We should only use cygpath when building on Windows,
|
||||
# and only if it is available.
|
||||
.c.obj:
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libcyrus_worker.la: $(libcyrus_worker_la_OBJECTS) $(libcyrus_worker_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libcyrus_worker_la_LDFLAGS) $(libcyrus_worker_la_OBJECTS) $(libcyrus_worker_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cyrus_worker.Plo@am__quote@
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@ -192,170 +282,178 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
libcyrus_worker.la: $(libcyrus_worker_la_OBJECTS) $(libcyrus_worker_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libcyrus_worker_la_LDFLAGS) $(libcyrus_worker_la_OBJECTS) $(libcyrus_worker_la_LIBADD) $(LIBS)
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = cyrus_worker
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu cyrus_worker/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-libLTLIBRARIES
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
clean: clean-am
|
||||
pdf: pdf-am
|
||||
|
||||
distclean-am: distclean-libLTLIBRARIES distclean-compile \
|
||||
distclean-libtool distclean-tags distclean-depend \
|
||||
distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
pdf-am:
|
||||
|
||||
distclean: distclean-am
|
||||
ps: ps-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
ps-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
|
||||
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
|
||||
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
|
||||
distclean-compile clean-compile maintainer-clean-compile \
|
||||
mostlyclean-libtool distclean-libtool clean-libtool \
|
||||
maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
|
||||
distclean-depend clean-depend maintainer-clean-depend info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "smtp.h"
|
||||
#include "htdns.h"
|
||||
#include "htmalloc.h"
|
||||
#include "htbuffer.h"
|
||||
#include "stats.h"
|
||||
|
||||
#define SMM_LOCAL_PERM_NOK 101
|
||||
@ -35,9 +36,27 @@
|
||||
#define SMM_LOCAL_OK 103
|
||||
|
||||
|
||||
counterDef_t *cyrus_counterDefs = NULL;
|
||||
void cyrus_setupCounterList() {
|
||||
cyrus_counterDefs = addOneCounterDef(cyrus_counterDefs, SMM_TYPE_COUNTER, "Cyrus: checker");
|
||||
cyrus_counterDefs = addOneCounterDef(cyrus_counterDefs, SMM_TYPE_COUNTER, "Cyrus: illegal input");
|
||||
cyrus_counterDefs = addOneCounterDef(cyrus_counterDefs, SMM_TYPE_COUNTER, "Cyrus: depot dns failure");
|
||||
cyrus_counterDefs = addOneCounterDef(cyrus_counterDefs, SMM_TYPE_COUNTER, "Cyrus: returned OK");
|
||||
cyrus_counterDefs = addOneCounterDef(cyrus_counterDefs, SMM_TYPE_COUNTER, "Cyrus: returned NOK");
|
||||
cyrus_counterDefs = addOneCounterDef(cyrus_counterDefs, SMM_TYPE_COUNTER, "Cyrus: returned TNOK");
|
||||
};
|
||||
|
||||
#define STAT_CNT_CYRUS_WORKER 0
|
||||
#define STAT_CNT_CYRUS_ILLEGAL_INPUT 1
|
||||
#define STAT_CNT_CYRUS_DEPOT_DNS_FAILURE 2
|
||||
#define STAT_CNT_CYRUS_RETURNED_OK 3
|
||||
#define STAT_CNT_CYRUS_RETURNED_NOK 4
|
||||
#define STAT_CNT_CYRUS_RETURNED_TNOK 5
|
||||
|
||||
|
||||
struct cyrus_container_handle_s {
|
||||
cfgl_t *cfg;
|
||||
statCounter_t *statCounter;
|
||||
int timeout;
|
||||
char *sender_address;
|
||||
char *lhlo_arg;
|
||||
@ -60,7 +79,7 @@ typedef struct cyrus_work_handle_s cyrus_work_handle_t;
|
||||
int cyrus_init(cfgl_t *cfg, void **handle);
|
||||
int cyrus_destroy(void *handle);
|
||||
/* int cyrus_work_setup(void *handle, void **work_handle); */
|
||||
int cyrus_work(void *handle, void *work_handle, char *input, char *output);
|
||||
int cyrus_work(void *handle, void *work_handle, char *input, htbuffer_t *output);
|
||||
/* int cyrus_work_destroy(void *handle, void *work_handle); */
|
||||
|
||||
|
||||
@ -84,6 +103,9 @@ int cyrus_init(cfgl_t *cfg, void **handle) {
|
||||
cch->sender_address = findcfglx(cch->cfg, "sender_address", "<>");
|
||||
cch->lhlo_arg = findcfglx(cch->cfg, "lhlo_arg", "local");
|
||||
cch->lmtp_port = atoi(findcfglx(cch->cfg, "lmtp_port", "24"));
|
||||
|
||||
cyrus_setupCounterList();
|
||||
cch->statCounter = initStatCounter("cyrus", cyrus_counterDefs);
|
||||
|
||||
*handle = cch;
|
||||
return 0;
|
||||
@ -99,7 +121,7 @@ int cyrus_destroy(void *handle) {
|
||||
|
||||
|
||||
|
||||
int cyrus_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
int cyrus_work(void *handle, void *work_handle, char *input, htbuffer_t *output) {
|
||||
static const char *DEFAULT_ANSWER = "default answer";
|
||||
static const char *ILLEGAL_INPUT = "illegal input (must be 'depot_uid depot_host')";
|
||||
static const char *UNEXPECTED_ERROR = "unexpected error in lmtp dialog";
|
||||
@ -126,12 +148,13 @@ int cyrus_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
|
||||
syslog(LOG_DEBUG, "cyrus_work: (%04x) going to check %s", log_id, input);
|
||||
|
||||
incStatCounter(STAT_CNT_CYRUS_WORKER);
|
||||
incStatCounter(cch->statCounter, STAT_CNT_CYRUS_WORKER);
|
||||
|
||||
depot_uid = input;
|
||||
if (NULL == (depot_host = strchr(depot_uid, ' '))) {
|
||||
snprintf(output, ANSWER_BUFSIZE, ILLEGAL_INPUT);
|
||||
incStatCounter(STAT_CNT_CYRUS_ILLEGAL_INPUT);
|
||||
// snprintf(output, ANSWER_BUFSIZE, ILLEGAL_INPUT);
|
||||
htbuffer_strcpy(output, ILLEGAL_INPUT);
|
||||
incStatCounter(cch->statCounter, STAT_CNT_CYRUS_ILLEGAL_INPUT);
|
||||
return SMM_PERM_NOK;
|
||||
}
|
||||
|
||||
@ -143,8 +166,9 @@ int cyrus_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
if (NULL == a_rdata) {
|
||||
syslog(LOG_DEBUG, "cyrus_work: (%04x) depot_host %s could not be found in dns",
|
||||
log_id, depot_host);
|
||||
snprintf(output, ANSWER_BUFSIZE, DEPOT_DNS_ERROR);
|
||||
incStatCounter(STAT_CNT_CYRUS_DEPOT_DNS_FAILURE);
|
||||
// snprintf(output, ANSWER_BUFSIZE, DEPOT_DNS_ERROR);
|
||||
htbuffer_strcpy(output, DEPOT_DNS_ERROR);
|
||||
incStatCounter(cch->statCounter, STAT_CNT_CYRUS_DEPOT_DNS_FAILURE);
|
||||
return SMM_TEMP_NOK;
|
||||
}
|
||||
|
||||
@ -240,29 +264,39 @@ int cyrus_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
|
||||
switch (result) {
|
||||
case SMM_LOCAL_TEMP_NOK:
|
||||
snprintf(output, ANSWER_BUFSIZE, "<TNOK><%s>", response_text);
|
||||
htbuffer_strcat(output, "<TNOK><");
|
||||
htbuffer_strcat(output, response_text);
|
||||
htbuffer_strcat(output, ">");
|
||||
//snprintf(output, ANSWER_BUFSIZE, "<TNOK><%s>", response_text);
|
||||
result = SMM_OK;
|
||||
incStatCounter(STAT_CNT_CYRUS_RETURNED_TNOK);
|
||||
incStatCounter(cch->statCounter, STAT_CNT_CYRUS_RETURNED_TNOK);
|
||||
break;
|
||||
case SMM_LOCAL_PERM_NOK:
|
||||
snprintf(output, ANSWER_BUFSIZE, "<NOK><%s>", response_text);
|
||||
htbuffer_strcat(output, "<NOK><");
|
||||
htbuffer_strcat(output, response_text);
|
||||
htbuffer_strcat(output, ">");
|
||||
//snprintf(output, ANSWER_BUFSIZE, "<NOK><%s>", response_text);
|
||||
result = SMM_OK;
|
||||
incStatCounter(STAT_CNT_CYRUS_RETURNED_NOK);
|
||||
incStatCounter(cch->statCounter, STAT_CNT_CYRUS_RETURNED_NOK);
|
||||
break;
|
||||
case SMM_LOCAL_OK:
|
||||
snprintf(output, ANSWER_BUFSIZE, "<OK><%s>", response_text);
|
||||
htbuffer_strcat(output, "<OK><");
|
||||
htbuffer_strcat(output, response_text);
|
||||
htbuffer_strcat(output, ">");
|
||||
//snprintf(output, ANSWER_BUFSIZE, "<OK><%s>", response_text);
|
||||
result = SMM_OK;
|
||||
incStatCounter(STAT_CNT_CYRUS_RETURNED_OK);
|
||||
incStatCounter(cch->statCounter, STAT_CNT_CYRUS_RETURNED_OK);
|
||||
break;
|
||||
default:
|
||||
snprintf(output, ANSWER_BUFSIZE, response_text);
|
||||
htbuffer_strcpy(output, response_text);
|
||||
//snprintf(output, ANSWER_BUFSIZE, response_text);
|
||||
break;
|
||||
}
|
||||
|
||||
smtp_destroy(lmtp);
|
||||
|
||||
syslog(LOG_DEBUG, "cyrus_work: (%04x) result %d, %s", log_id,
|
||||
result, output);
|
||||
result, output->buf);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
423
smmapdfw/depcomp
Executable file
423
smmapdfw/depcomp
Executable file
@ -0,0 +1,423 @@
|
||||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. This file always lives in the current directory.
|
||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||
# $object doesn't have directory information.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'. We will use -o /dev/null later,
|
||||
# however we can't do the remplacement now because
|
||||
# `-o $object' might simply not be used
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -1,6 +1,8 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -10,315 +12,466 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = doc
|
||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
texinfo.tex
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
INFO_DEPS = $(srcdir)/smmapdfw.info
|
||||
am__TEXINFO_TEX_DIR = $(srcdir)
|
||||
DVIS = smmapdfw.dvi
|
||||
PDFS = smmapdfw.pdf
|
||||
PSS = smmapdfw.ps
|
||||
HTMLS = smmapdfw.html
|
||||
TEXINFOS = smmapdfw.texi
|
||||
TEXI2DVI = texi2dvi
|
||||
TEXI2PDF = $(TEXI2DVI) --pdf --batch
|
||||
MAKEINFOHTML = $(MAKEINFO) --html
|
||||
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
|
||||
DVIPS = dvips
|
||||
am__installdirs = "$(DESTDIR)$(infodir)"
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
LIB = @LIB@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
info_TEXINFOS = smmapdfw.texi
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
TEXI2DVI = texi2dvi
|
||||
INFO_DEPS = smmapdfw.info
|
||||
DVIS = smmapdfw.dvi
|
||||
TEXINFOS = smmapdfw.texi
|
||||
DIST_COMMON = README Makefile.am Makefile.in texinfo.tex
|
||||
all: all-am
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile
|
||||
.SUFFIXES: .dvi .html .info .pdf .ps .texi
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
smmapdfw.info: smmapdfw.texi
|
||||
smmapdfw.dvi: smmapdfw.texi
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
DVIPS = dvips
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
|
||||
.texi.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||||
am__cwd=`pwd` && cd $(srcdir) && \
|
||||
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
||||
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||||
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||||
done; \
|
||||
else :; fi && \
|
||||
cd "$$am__cwd"; \
|
||||
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $@ $<; \
|
||||
then \
|
||||
rc=0; \
|
||||
cd $(srcdir); \
|
||||
else \
|
||||
rc=$$?; \
|
||||
cd $(srcdir) && \
|
||||
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
||||
fi; \
|
||||
rm -rf $$backupdir; exit $$rc
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS=.:$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) $<
|
||||
|
||||
.texi:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
.texi.pdf:
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2PDF) $<
|
||||
|
||||
.texinfo.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo.dvi:
|
||||
TEXINPUTS=.:$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.txi.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.txi.dvi:
|
||||
TEXINPUTS=.:$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.txi:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
.texi.html:
|
||||
rm -rf $(@:.html=.htp)
|
||||
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $(@:.html=.htp) $<; \
|
||||
then \
|
||||
rm -rf $@; \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
|
||||
else \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(srcdir)/smmapdfw.info: smmapdfw.texi
|
||||
smmapdfw.dvi: smmapdfw.texi
|
||||
smmapdfw.pdf: smmapdfw.texi
|
||||
smmapdfw.html: smmapdfw.texi
|
||||
.dvi.ps:
|
||||
$(DVIPS) $< -o $@
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
||||
if test -f $$d/$$ifile; then \
|
||||
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
|
||||
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
||||
uninstall-info-am:
|
||||
@$(PRE_UNINSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
done; \
|
||||
else : ; fi
|
||||
|
||||
uninstall-info:
|
||||
$(PRE_UNINSTALL)
|
||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
||||
ii=yes; \
|
||||
else ii=; fi; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
test -z "$$ii" \
|
||||
|| install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
|
||||
done
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(INFO_DEPS)'; \
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
(cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
(if cd "$(DESTDIR)$(infodir)"; then \
|
||||
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
|
||||
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
|
||||
else :; fi); \
|
||||
done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for file in `cd $$d && eval echo $$base*`; do \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
case $$base in \
|
||||
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$base; then d=.; else d=$(srcdir); fi; \
|
||||
for file in $$d/$$base*; do \
|
||||
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||
test -f $(distdir)/$$relfile || \
|
||||
cp -p $$file $(distdir)/$$relfile; \
|
||||
done; \
|
||||
done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -f smmapdfw.aux smmapdfw.cp smmapdfw.cps smmapdfw.dvi smmapdfw.fn \
|
||||
smmapdfw.fns smmapdfw.ky smmapdfw.kys smmapdfw.ps \
|
||||
smmapdfw.log smmapdfw.pg smmapdfw.toc smmapdfw.tp \
|
||||
smmapdfw.tps smmapdfw.vr smmapdfw.vrs smmapdfw.op smmapdfw.tr \
|
||||
smmapdfw.cv smmapdfw.cn
|
||||
|
||||
clean-aminfo:
|
||||
|
||||
distclean-aminfo:
|
||||
-rm -rf smmapdfw.aux smmapdfw.cp smmapdfw.cps smmapdfw.fn smmapdfw.fns \
|
||||
smmapdfw.ky smmapdfw.kys smmapdfw.log smmapdfw.pg \
|
||||
smmapdfw.pgs smmapdfw.tmp smmapdfw.toc smmapdfw.tp \
|
||||
smmapdfw.tps smmapdfw.vr smmapdfw.vrs smmapdfw.dvi \
|
||||
smmapdfw.pdf smmapdfw.ps smmapdfw.html
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
cd $(srcdir) && for i in $(INFO_DEPS); do \
|
||||
rm -f $$i; \
|
||||
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
|
||||
rm -f $$i-[0-9]*; \
|
||||
fi; \
|
||||
@list='$(INFO_DEPS)'; for i in $$list; do \
|
||||
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
|
||||
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = doc
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu doc/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||
info-am: $(INFO_DEPS)
|
||||
info: info-am
|
||||
dvi-am: $(DVIS)
|
||||
dvi: dvi-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
all-am: Makefile $(INFO_DEPS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(infodir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-info-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-info
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(INFO_DEPS)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am: $(HTMLS)
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
|
||||
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
|
||||
if test -f $$ifile; then \
|
||||
relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
|
||||
echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
$(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-aminfo clean-generic mostlyclean-am
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
clean: clean-am
|
||||
pdf: pdf-am
|
||||
|
||||
distclean-am: distclean-aminfo distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
pdf-am: $(PDFS)
|
||||
|
||||
distclean: distclean-am
|
||||
ps: ps-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-aminfo maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
ps-am: $(PSS)
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: install-info-am uninstall-info mostlyclean-aminfo \
|
||||
distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir \
|
||||
info-am info dvi-am dvi check check-am installcheck-am installcheck \
|
||||
install-exec-am install-exec install-data-am install-data install-am \
|
||||
install uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
dist-info distclean distclean-generic distclean-libtool \
|
||||
distdir dvi dvi-am html html-am info info-am install \
|
||||
install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-aminfo \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-aminfo \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -1,5 +1,11 @@
|
||||
include_HEADERS=containers_public.h queue.h smtp.h cfg.h count.h safe_write.h sunos_comp.h htdns.h smmapd.h htmalloc.h stats.h htcache.h
|
||||
include_HEADERS=containers_public.h queue.h smtp.h cfg.h count.h safe_write.h sunos_comp.h htdns.h smmapd.h htmalloc.h stats.h htcache.h htbuffer.h dvl.h
|
||||
lib_LTLIBRARIES = libsmmapdfw.la
|
||||
libsmmapdfw_la_SOURCES = cfg.c queue.c count.c safe_write.c config_public.c htdns.c smtp.c htmalloc.c stats.c htcache.c
|
||||
libsmmapdfw_la_SOURCES = cfg.c queue.c count.c safe_write.c config_public.c htdns.c smtp.c htmalloc.c stats.c htcache.c htbuffer.c
|
||||
libsmmapdfw_la_LIBADD = @BDB_LIBS@
|
||||
|
||||
bin_PROGRAMS = htcachetest htbuffertest htdnstest
|
||||
htcachetest_SOURCES = htcachetest.c
|
||||
htcachetest_LDADD = libsmmapdfw.la
|
||||
htbuffertest_SOURCES = htbuffertest.c
|
||||
htbuffertest_LDADD = libsmmapdfw.la
|
||||
htdnstest_SOURCES = htdnstest.c
|
||||
htdnstest_LDADD = libsmmapdfw.la
|
||||
|
@ -1,6 +1,8 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -10,184 +12,347 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = htcachetest$(EXEEXT) htbuffertest$(EXEEXT) \
|
||||
htdnstest$(EXEEXT)
|
||||
subdir = libsmmapdfw
|
||||
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
|
||||
"$(DESTDIR)$(includedir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libsmmapdfw_la_DEPENDENCIES =
|
||||
am_libsmmapdfw_la_OBJECTS = cfg.lo queue.lo count.lo safe_write.lo \
|
||||
config_public.lo htdns.lo smtp.lo htmalloc.lo stats.lo \
|
||||
htcache.lo htbuffer.lo
|
||||
libsmmapdfw_la_OBJECTS = $(am_libsmmapdfw_la_OBJECTS)
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_htbuffertest_OBJECTS = htbuffertest.$(OBJEXT)
|
||||
htbuffertest_OBJECTS = $(am_htbuffertest_OBJECTS)
|
||||
htbuffertest_DEPENDENCIES = libsmmapdfw.la
|
||||
am_htcachetest_OBJECTS = htcachetest.$(OBJEXT)
|
||||
htcachetest_OBJECTS = $(am_htcachetest_OBJECTS)
|
||||
htcachetest_DEPENDENCIES = libsmmapdfw.la
|
||||
am_htdnstest_OBJECTS = htdnstest.$(OBJEXT)
|
||||
htdnstest_OBJECTS = $(am_htdnstest_OBJECTS)
|
||||
htdnstest_DEPENDENCIES = libsmmapdfw.la
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libsmmapdfw_la_SOURCES) $(htbuffertest_SOURCES) \
|
||||
$(htcachetest_SOURCES) $(htdnstest_SOURCES)
|
||||
DIST_SOURCES = $(libsmmapdfw_la_SOURCES) $(htbuffertest_SOURCES) \
|
||||
$(htcachetest_SOURCES) $(htdnstest_SOURCES)
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(include_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
LIB = @LIB@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
include_HEADERS = containers_public.h queue.h smtp.h cfg.h count.h safe_write.h sunos_comp.h htdns.h smmapd.h htmalloc.h stats.h htcache.h
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
include_HEADERS = containers_public.h queue.h smtp.h cfg.h count.h safe_write.h sunos_comp.h htdns.h smmapd.h htmalloc.h stats.h htcache.h htbuffer.h dvl.h
|
||||
lib_LTLIBRARIES = libsmmapdfw.la
|
||||
libsmmapdfw_la_SOURCES = cfg.c queue.c count.c safe_write.c config_public.c htdns.c smtp.c htmalloc.c stats.c htcache.c
|
||||
libsmmapdfw_la_SOURCES = cfg.c queue.c count.c safe_write.c config_public.c htdns.c smtp.c htmalloc.c stats.c htcache.c htbuffer.c
|
||||
libsmmapdfw_la_LIBADD = @BDB_LIBS@
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
htcachetest_SOURCES = htcachetest.c
|
||||
htcachetest_LDADD = libsmmapdfw.la
|
||||
htbuffertest_SOURCES = htbuffertest.c
|
||||
htbuffertest_LDADD = libsmmapdfw.la
|
||||
htdnstest_SOURCES = htdnstest.c
|
||||
htdnstest_LDADD = libsmmapdfw.la
|
||||
all: all-am
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
libsmmapdfw_la_LDFLAGS =
|
||||
libsmmapdfw_la_DEPENDENCIES =
|
||||
libsmmapdfw_la_OBJECTS = cfg.lo queue.lo count.lo safe_write.lo \
|
||||
config_public.lo htdns.lo smtp.lo htmalloc.lo stats.lo htcache.lo
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
HEADERS = $(include_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/cfg.P .deps/config_public.P .deps/count.P \
|
||||
.deps/htcache.P .deps/htdns.P .deps/htmalloc.P .deps/queue.P \
|
||||
.deps/safe_write.P .deps/smtp.P .deps/stats.P
|
||||
SOURCES = $(libsmmapdfw_la_SOURCES)
|
||||
OBJECTS = $(libsmmapdfw_la_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .obj .s
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu libsmmapdfw/Makefile
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libsmmapdfw/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu libsmmapdfw/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-libLTLIBRARIES:
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
|
||||
distclean-libLTLIBRARIES:
|
||||
|
||||
maintainer-clean-libLTLIBRARIES:
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
# FIXME: We should only use cygpath when building on Windows,
|
||||
# and only if it is available.
|
||||
.c.obj:
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libsmmapdfw.la: $(libsmmapdfw_la_OBJECTS) $(libsmmapdfw_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libsmmapdfw_la_LDFLAGS) $(libsmmapdfw_la_OBJECTS) $(libsmmapdfw_la_LIBADD) $(LIBS)
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
htbuffertest$(EXEEXT): $(htbuffertest_OBJECTS) $(htbuffertest_DEPENDENCIES)
|
||||
@rm -f htbuffertest$(EXEEXT)
|
||||
$(LINK) $(htbuffertest_LDFLAGS) $(htbuffertest_OBJECTS) $(htbuffertest_LDADD) $(LIBS)
|
||||
htcachetest$(EXEEXT): $(htcachetest_OBJECTS) $(htcachetest_DEPENDENCIES)
|
||||
@rm -f htcachetest$(EXEEXT)
|
||||
$(LINK) $(htcachetest_LDFLAGS) $(htcachetest_OBJECTS) $(htcachetest_LDADD) $(LIBS)
|
||||
htdnstest$(EXEEXT): $(htdnstest_OBJECTS) $(htdnstest_DEPENDENCIES)
|
||||
@rm -f htdnstest$(EXEEXT)
|
||||
$(LINK) $(htdnstest_LDFLAGS) $(htdnstest_OBJECTS) $(htdnstest_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_public.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htbuffer.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htbuffertest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htcache.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htcachetest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htdns.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htdnstest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htmalloc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queue.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe_write.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stats.Plo@am__quote@
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@ -196,186 +361,200 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
libsmmapdfw.la: $(libsmmapdfw_la_OBJECTS) $(libsmmapdfw_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libsmmapdfw_la_LDFLAGS) $(libsmmapdfw_la_OBJECTS) $(libsmmapdfw_la_LIBADD) $(LIBS)
|
||||
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)
|
||||
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
|
||||
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
|
||||
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(include_HEADERS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(includedir)/$$p; \
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = libsmmapdfw
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu libsmmapdfw/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
install-exec: install-exec-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
|
||||
install-binPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
install-data-am: install-includeHEADERS
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-libLTLIBRARIES uninstall-includeHEADERS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
|
||||
clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-includeHEADERS
|
||||
|
||||
install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
clean: clean-am
|
||||
pdf: pdf-am
|
||||
|
||||
distclean-am: distclean-libLTLIBRARIES distclean-compile \
|
||||
distclean-libtool distclean-tags distclean-depend \
|
||||
distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
pdf-am:
|
||||
|
||||
distclean: distclean-am
|
||||
ps: ps-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
ps-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
|
||||
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
|
||||
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
|
||||
distclean-compile clean-compile maintainer-clean-compile \
|
||||
mostlyclean-libtool distclean-libtool clean-libtool \
|
||||
maintainer-clean-libtool uninstall-includeHEADERS \
|
||||
install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
|
||||
maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
|
||||
clean-depend maintainer-clean-depend info-am info dvi-am dvi check \
|
||||
check-am installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
|
||||
uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic clean-libLTLIBRARIES clean-libtool ctags \
|
||||
distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-includeHEADERS install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-binPROGRAMS \
|
||||
uninstall-includeHEADERS uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -36,6 +36,8 @@
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "cfg.h"
|
||||
#include "htmalloc.h"
|
||||
|
||||
|
@ -23,13 +23,14 @@
|
||||
#define _CONTAINERS_PUBLIC_H_
|
||||
|
||||
#include "cfg.h"
|
||||
#include "htbuffer.h"
|
||||
|
||||
struct class_descriptor_s {
|
||||
char *name;
|
||||
int (*init_function)(cfgl_t *cfg, void **handle);
|
||||
int (*destroy_function)(void *handle);
|
||||
int (*work_setup_function)(void *handle, void **work_handle);
|
||||
int (*work_function)(void *handle, void *work_handle, char *input, char *output);
|
||||
int (*work_function)(void *handle, void *work_handle, char *input, htbuffer_t *output);
|
||||
int (*work_destroy_function)(void *handle, void *work_handle);
|
||||
};
|
||||
|
||||
|
8
smmapdfw/libsmmapdfw/dvl.h
Normal file
8
smmapdfw/libsmmapdfw/dvl.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef _DVL_H_
|
||||
#define _DVL_H_
|
||||
|
||||
#define dvl(a, b) (((a) == NULL) ? (b) : (a))
|
||||
#define dvls(a) dvl((a), "<NULL_STRING>")
|
||||
|
||||
#endif
|
||||
|
142
smmapdfw/libsmmapdfw/htbuffer.c
Normal file
142
smmapdfw/libsmmapdfw/htbuffer.c
Normal file
@ -0,0 +1,142 @@
|
||||
/*
|
||||
Copyright (C) 2005 Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
|
||||
smmapdfw is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
smmapdfw is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with smmapdfw. If not, write to the Free Software Foundation, 59
|
||||
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "htmalloc.h"
|
||||
#include "htbuffer.h"
|
||||
|
||||
|
||||
|
||||
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
||||
#define MIN(A, B) ((A) < (B) ? (A) : (B))
|
||||
|
||||
htbuffer_t *htbuffer_init(unsigned int start_size) {
|
||||
htbuffer_t *b;
|
||||
|
||||
b = (htbuffer_t*) htmalloc(sizeof(htbuffer_t));
|
||||
|
||||
b->current_buf_size = (start_size % DEFAULT_CHUNK_SIZE)
|
||||
? (start_size + (DEFAULT_CHUNK_SIZE - start_size % DEFAULT_CHUNK_SIZE))
|
||||
: start_size;
|
||||
|
||||
b->max_size = DEFAULT_MAX_SIZE;
|
||||
|
||||
b->buf = (char*) htmalloc(sizeof(char) * b->current_buf_size);
|
||||
memset(b->buf, 0, b->current_buf_size);
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
void htbuffer_set_max_size(htbuffer_t *b, unsigned int s) {
|
||||
b->max_size = s;
|
||||
}
|
||||
|
||||
void htbuffer_free(htbuffer_t *b) {
|
||||
free(b->buf);
|
||||
free(b);
|
||||
}
|
||||
|
||||
|
||||
unsigned int htbuffer_strlen(htbuffer_t *b) {
|
||||
return strlen(b->buf);
|
||||
}
|
||||
|
||||
htbuffer_t *htbuffer_memcpy_w_offset(htbuffer_t *dest, unsigned int offset, const char *src, unsigned int src_size) {
|
||||
int new_buf_size;
|
||||
|
||||
/* printf("src_size=%d, offset=%d, cbs=%d\n", src_size, offset, dest->current_buf_size); */
|
||||
if (src_size + offset > dest->current_buf_size) {
|
||||
/* grow buffer */
|
||||
int pos = src_size + offset;
|
||||
new_buf_size = (pos % DEFAULT_CHUNK_SIZE)
|
||||
? (pos + (DEFAULT_CHUNK_SIZE - (pos % DEFAULT_CHUNK_SIZE)))
|
||||
: pos;
|
||||
|
||||
if (new_buf_size > dest->max_size) {
|
||||
syslog(LOG_ERR, "htbuffer (%p) htbuffer_memcpy_w_offset: new size too large %d (max=%d)",
|
||||
dest, new_buf_size, dest->max_size);
|
||||
exit(154);
|
||||
}
|
||||
|
||||
syslog(LOG_INFO, "htbuffer (%p) htbuffer_memcpy_w_offset: increase buffer from %d to %d\n",
|
||||
dest, dest->current_buf_size, new_buf_size);
|
||||
dest->buf = (char*) htrealloc(dest->buf, sizeof(char) * new_buf_size);
|
||||
memset(dest->buf + dest->current_buf_size, 0, new_buf_size - dest->current_buf_size);
|
||||
dest->current_buf_size = new_buf_size;
|
||||
}
|
||||
|
||||
memcpy(dest->buf + offset, src, src_size);
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
|
||||
htbuffer_t *htbuffer_clear(htbuffer_t *dest) {
|
||||
memset(dest->buf, 0, dest->current_buf_size);
|
||||
return dest;
|
||||
}
|
||||
|
||||
htbuffer_t *htbuffer_memcpy(htbuffer_t *dest, const char *src, unsigned int src_size) {
|
||||
return htbuffer_memcpy_w_offset(dest, 0, src, src_size);
|
||||
}
|
||||
|
||||
htbuffer_t *htbuffer_strcpy_w_offset(htbuffer_t *dest, unsigned int offset, const char *src) {
|
||||
return htbuffer_memcpy_w_offset(dest, offset, src, strlen(src)+1);
|
||||
}
|
||||
|
||||
htbuffer_t *htbuffer_strcpy(htbuffer_t *dest, const char *src) {
|
||||
return htbuffer_strcpy_w_offset(dest, 0, src);
|
||||
}
|
||||
|
||||
htbuffer_t *htbuffer_strncpy_w_offset(htbuffer_t *dest, unsigned int offset, const char *src, unsigned int n) {
|
||||
return htbuffer_memcpy_w_offset(dest, offset, src, MIN(strlen(src)+1, n));
|
||||
}
|
||||
|
||||
htbuffer_t *htbuffer_strncpy(htbuffer_t *dest, const char *src, unsigned int n) {
|
||||
return htbuffer_strncpy_w_offset(dest, 0, src, n);
|
||||
}
|
||||
|
||||
htbuffer_t *htbuffer_strcat(htbuffer_t *dest, const char *src) {
|
||||
return htbuffer_strcpy_w_offset(dest, strlen(dest->buf), src);
|
||||
}
|
||||
|
||||
htbuffer_t *htbuffer_strncat(htbuffer_t *dest, const char *src, unsigned int n) {
|
||||
return htbuffer_strncpy_w_offset(dest, strlen(dest->buf), src, n);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
59
smmapdfw/libsmmapdfw/htbuffer.h
Normal file
59
smmapdfw/libsmmapdfw/htbuffer.h
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
Copyright (C) 2005, Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
|
||||
smmapdfw is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
smmapdfw is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with smmapdfw. If not, write to the Free Software Foundation, 59
|
||||
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef _HTBUFFER_H_
|
||||
#define _HTBUFFER_H_
|
||||
|
||||
#define DEFAULT_MAX_SIZE 16*1024*1024
|
||||
#define DEFAULT_CHUNK_SIZE 1024
|
||||
|
||||
typedef struct htbuffer_s {
|
||||
char *buf;
|
||||
unsigned int current_buf_size;
|
||||
unsigned int max_size;
|
||||
} htbuffer_t;
|
||||
|
||||
|
||||
void htbuffer_set_max_size(htbuffer_t *b, unsigned int s);
|
||||
htbuffer_t *htbuffer_init(unsigned int start_size);
|
||||
void htbuffer_free(htbuffer_t *b);
|
||||
|
||||
unsigned int htbuffer_strlen(htbuffer_t *b);
|
||||
|
||||
htbuffer_t *htbuffer_memcpy_w_offset(htbuffer_t *dest, unsigned int offset, const char *src, unsigned int src_size);
|
||||
htbuffer_t *htbuffer_memcpy(htbuffer_t *dest, const char *src, unsigned int src_size);
|
||||
|
||||
|
||||
htbuffer_t *htbuffer_strcpy_w_offset(htbuffer_t *dest, unsigned int offset, const char *src);
|
||||
htbuffer_t *htbuffer_strcpy(htbuffer_t *dest, const char *src);
|
||||
|
||||
htbuffer_t *htbuffer_strncpy_w_offset(htbuffer_t *dest, unsigned int offset, const char *src, unsigned int n);
|
||||
htbuffer_t *htbuffer_strncpy(htbuffer_t *dest, const char *src, unsigned int n);
|
||||
|
||||
htbuffer_t *htbuffer_strncat(htbuffer_t *dest, const char *src, unsigned int n);
|
||||
htbuffer_t *htbuffer_strcat(htbuffer_t *dest, const char *src);
|
||||
|
||||
|
||||
|
||||
#endif /* _HTBUFFER_H_ */
|
||||
|
||||
|
217
smmapdfw/libsmmapdfw/htbuffertest.c
Normal file
217
smmapdfw/libsmmapdfw/htbuffertest.c
Normal file
@ -0,0 +1,217 @@
|
||||
/*
|
||||
Copyright (C) 2005 Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
|
||||
smmapdfw is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
smmapdfw is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with smmapdfw. If not, write to the Free Software Foundation, 59
|
||||
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "htbuffer.h"
|
||||
|
||||
|
||||
|
||||
|
||||
int main(int argc, char **args) {
|
||||
htbuffer_t *b;
|
||||
char* output;
|
||||
int size;
|
||||
int res;
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
b = htbuffer_init(512);
|
||||
if (b->current_buf_size != 1024)
|
||||
printf("1. FAILURE: wrong current_buf_size (%d), expected 1024\n", b->current_buf_size);
|
||||
else
|
||||
printf("1. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
b = htbuffer_init(519);
|
||||
if (b->current_buf_size != 1024)
|
||||
printf("2. FAILURE: wrong current_buf_size (%d), expected 1024\n", b->current_buf_size);
|
||||
else
|
||||
printf("2. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
b = htbuffer_init(2500);
|
||||
if (b->current_buf_size != 3072)
|
||||
printf("3. FAILURE: wrong current_buf_size (%d), expected 3072\n", b->current_buf_size);
|
||||
else
|
||||
printf("3. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
b = htbuffer_init(1024);
|
||||
if (b->current_buf_size != 1024)
|
||||
printf("4. FAILURE: wrong current_buf_size (%d), expected 1024\n", b->current_buf_size);
|
||||
else
|
||||
printf("4. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
b = htbuffer_init(10240);
|
||||
if (b->current_buf_size != 10240)
|
||||
printf("5. FAILURE: wrong current_buf_size (%d), expected 10240\n", b->current_buf_size);
|
||||
else
|
||||
printf("5. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
#define TEXT1 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa123"
|
||||
b = htbuffer_init(512);
|
||||
htbuffer_strcpy(b, TEXT1);
|
||||
if (b->current_buf_size != 1024)
|
||||
printf("6. FAILURE: wrong current_buf_size (%d), expected 1024\n", b->current_buf_size);
|
||||
else if (strcmp(TEXT1, b->buf))
|
||||
printf("6. FAILURE: unexpected content\n");
|
||||
else
|
||||
printf("6. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
#define TEXT2 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa123"
|
||||
b = htbuffer_init(512);
|
||||
htbuffer_strcpy(b, TEXT2);
|
||||
if (b->current_buf_size != 2048)
|
||||
printf("7. FAILURE: wrong current_buf_size (%d), expected 2048\n", b->current_buf_size);
|
||||
else if (strcmp(TEXT2, b->buf))
|
||||
printf("7. FAILURE: unexpected content\n");
|
||||
else
|
||||
printf("7. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
#define TEXT3 "abcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa123"
|
||||
#define TEXT4 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx123"
|
||||
#define TEXT3_4 "abcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx123"
|
||||
b = htbuffer_init(512);
|
||||
htbuffer_strcpy(b, TEXT3);
|
||||
htbuffer_strcpy_w_offset(b, 3, TEXT4);
|
||||
if (b->current_buf_size != 1024)
|
||||
printf("8. FAILURE: wrong current_buf_size (%d), expected 1024\n", b->current_buf_size);
|
||||
else if (strcmp(TEXT3_4, b->buf))
|
||||
printf("8. FAILURE: unexpected content {%s}\n", b->buf);
|
||||
else
|
||||
printf("8. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
#define TEXT5 "abc"
|
||||
#define TEXT6 "xxxxxxyyyyyyyxxxxxxxxxxxxxxxxxxxxxxxx123"
|
||||
#define TEXT5_6 "abcxxxxxxyyy"
|
||||
b = htbuffer_init(512);
|
||||
htbuffer_strcpy(b, TEXT5);
|
||||
htbuffer_strncpy_w_offset(b, 3, TEXT6, 9);
|
||||
if (b->current_buf_size != 1024)
|
||||
printf("9. FAILURE: wrong current_buf_size (%d), expected 1024\n", b->current_buf_size);
|
||||
else if (strcmp(TEXT5_6, b->buf))
|
||||
printf("9. FAILURE: unexpected content {%s}\n", b->buf);
|
||||
else
|
||||
printf("9. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
#define TEXT7 "---------XXX"
|
||||
#define TEXT8 "xxxxxxyyyyyyyxxxxxxxxxxxxxxxxxxxxxxxx123"
|
||||
#define TEXT9 "xxxxxxyyyXXX"
|
||||
b = htbuffer_init(512);
|
||||
htbuffer_strcpy(b, TEXT7);
|
||||
htbuffer_strncpy(b, TEXT8, 9);
|
||||
if (b->current_buf_size != 1024)
|
||||
printf("10. FAILURE: wrong current_buf_size (%d), expected 1024\n", b->current_buf_size);
|
||||
else if (strcmp(TEXT9, b->buf))
|
||||
printf("10. FAILURE: unexpected content {%s}\n", b->buf);
|
||||
else
|
||||
printf("10. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
#define TEXT10 "aaa"
|
||||
#define TEXT11 "bbb"
|
||||
#define TEXT10_11 "aaabbb"
|
||||
b = htbuffer_init(512);
|
||||
htbuffer_strcpy(b, TEXT10);
|
||||
htbuffer_strcat(b, TEXT11);
|
||||
if (b->current_buf_size != 1024)
|
||||
printf("11. FAILURE: wrong current_buf_size (%d), expected 1024\n", b->current_buf_size);
|
||||
else if (strcmp(TEXT10_11, b->buf))
|
||||
printf("11. FAILURE: unexpected content {%s}\n", b->buf);
|
||||
else
|
||||
printf("11. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
#define TEXT12 "aaa"
|
||||
#define TEXT13 "bbb"
|
||||
b = htbuffer_init(512);
|
||||
htbuffer_strcpy(b, TEXT12);
|
||||
htbuffer_strcpy(b, TEXT13);
|
||||
|
||||
if (strcmp(TEXT13, b->buf))
|
||||
printf("12. FAULURE: unexpected content {%s}\n", b->buf);
|
||||
else
|
||||
printf("12. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
#define TEXT14 "aaa"
|
||||
#define TEXT15 "bbb"
|
||||
b = htbuffer_init(512);
|
||||
htbuffer_strcpy(b, TEXT14);
|
||||
htbuffer_strcpy(b, "");
|
||||
htbuffer_strcat(b, TEXT15);
|
||||
|
||||
if (strcmp(TEXT15, b->buf))
|
||||
printf("13. FAULURE: unexpected content {%s}\n", b->buf);
|
||||
else
|
||||
printf("13. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
#define TEXT16 "aaa"
|
||||
#define TEXT17 "bbb"
|
||||
#define TEXT17_1 "b"
|
||||
b = htbuffer_init(512);
|
||||
htbuffer_strcpy(b, TEXT16);
|
||||
htbuffer_clear(b);
|
||||
htbuffer_strncat(b, TEXT15, 1);
|
||||
htbuffer_strncat(b, "\0", 1);
|
||||
|
||||
if (strcmp(TEXT17_1, b->buf))
|
||||
printf("13. FAULURE: unexpected content {%s}\n", b->buf);
|
||||
else
|
||||
printf("13. OK\n");
|
||||
htbuffer_free(b);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2004, Wolfgang Hottgenroth
|
||||
Copyright (C) 2004,2005 Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
|
||||
@ -52,7 +52,7 @@ typedef struct mydata_s mydata_t;
|
||||
|
||||
|
||||
|
||||
htcache_t *cache_init(const char *file, int expiry) {
|
||||
htcache_t *htcache_init(const char *file, int expiry) {
|
||||
#if ENABLE_CACHE == 1
|
||||
htcache_t *handle = (htcache_t*) htmalloc(sizeof(htcache_t));
|
||||
handle->mutex = (pthread_mutex_t*) htmalloc(sizeof(pthread_mutex_t));
|
||||
@ -67,7 +67,7 @@ htcache_t *cache_init(const char *file, int expiry) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void cache_destroy(htcache_t *handle) {
|
||||
void htcache_destroy(htcache_t *handle) {
|
||||
#if ENABLE_CACHE == 1
|
||||
pthread_mutex_destroy(handle->mutex);
|
||||
free(handle->mutex);
|
||||
@ -75,14 +75,14 @@ void cache_destroy(htcache_t *handle) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void cache_insert(htcache_t *handle, const char *key, const void *value, int value_size) {
|
||||
void htcache_insert(htcache_t *handle, const char *key, const char *value, int value_size) {
|
||||
#if ENABLE_CACHE == 1
|
||||
DBM *cache;
|
||||
datum data, dkey;
|
||||
int ret;
|
||||
mydata_t *mydata;
|
||||
|
||||
syslog(LOG_DEBUG, "cache_insert: inserting %s -> %s (size %d)", key, (char*) value, value_size);
|
||||
syslog(LOG_DEBUG, "htcache_insert: inserting %s -> %s (size %d)", key, (char*) value, value_size);
|
||||
dkey.dsize = strlen(key) + 1; /* one more for the terminating \0 */
|
||||
dkey.dptr = (char*) key;
|
||||
data.dsize = (sizeof(mydata_t) + value_size + 1);
|
||||
@ -96,9 +96,9 @@ void cache_insert(htcache_t *handle, const char *key, const void *value, int val
|
||||
if (NULL != (cache = dbm_open(handle->file, O_RDWR | O_CREAT, 0644))) {
|
||||
ret = dbm_store(cache, dkey, data, DBM_INSERT);
|
||||
if (ret != 0) {
|
||||
syslog(LOG_DEBUG, "cache_insert: couldn't insert record");
|
||||
syslog(LOG_DEBUG, "htcache_insert: couldn't insert record");
|
||||
} else {
|
||||
syslog(LOG_DEBUG, "cache_insert: record inserted");
|
||||
syslog(LOG_DEBUG, "htcache_insert: record inserted");
|
||||
}
|
||||
dbm_close(cache);
|
||||
}
|
||||
@ -106,12 +106,12 @@ void cache_insert(htcache_t *handle, const char *key, const void *value, int val
|
||||
|
||||
free(mydata);
|
||||
#else
|
||||
syslog(LOG_DEBUG, "cache_insert: cache disabled");
|
||||
syslog(LOG_DEBUG, "htcache_insert: cache disabled");
|
||||
#endif /* ENABLE_CACHE */
|
||||
}
|
||||
|
||||
|
||||
void *cache_lookup(htcache_t *handle, const char* key) {
|
||||
int htcache_lookup(htcache_t *handle, const char* key, char** value, int* value_size2) {
|
||||
#if ENABLE_CACHE == 1
|
||||
DBM *cache;
|
||||
datum data, dkey;
|
||||
@ -119,7 +119,7 @@ void *cache_lookup(htcache_t *handle, const char* key) {
|
||||
mydata_t *mydata;
|
||||
int value_size, ret, res = -1;
|
||||
|
||||
syslog(LOG_DEBUG, "cache_lookup: looking up %s, expiry %d",
|
||||
syslog(LOG_DEBUG, "htcache_lookup: looking up %s, expiry %d",
|
||||
key, handle->expiry);
|
||||
|
||||
if (NULL != (cache = dbm_open(handle->file, O_RDONLY, 0644))) {
|
||||
@ -127,24 +127,27 @@ void *cache_lookup(htcache_t *handle, const char* key) {
|
||||
dkey.dptr = (char*) key;
|
||||
data = dbm_fetch(cache, dkey);
|
||||
if (NULL == data.dptr) {
|
||||
syslog(LOG_DEBUG, "cache_lookup: nothing found");
|
||||
syslog(LOG_DEBUG, "htcache_lookup: nothing found");
|
||||
dbm_close(cache);
|
||||
} else {
|
||||
mydata = (mydata_t *) data.dptr;
|
||||
syslog(LOG_DEBUG, "cache_lookup: found: %s -> %s (size %d)",
|
||||
key, data.dptr, data.dsize);
|
||||
syslog(LOG_DEBUG, "htcache_lookup: found: %s %d %d %s (size %d)",
|
||||
key, mydata->timestamp, mydata->value_size, mydata->value, data.dsize);
|
||||
if ((mydata->timestamp + handle->expiry) > time(NULL)) {
|
||||
syslog(LOG_DEBUG, "cache_lookup: not yet expired");
|
||||
syslog(LOG_DEBUG, "htcache_lookup: not yet expired");
|
||||
value_size = mydata->value_size;
|
||||
output = (char*) htmalloc(value_size+5);
|
||||
memcpy(output, mydata->value, value_size);
|
||||
|
||||
*value_size2 = value_size;
|
||||
*value = output;
|
||||
|
||||
/* Berkeley DB frees on its own! */
|
||||
/* free(data.dptr); */
|
||||
dbm_close(cache);
|
||||
res = 0;
|
||||
} else {
|
||||
syslog(LOG_DEBUG, "cache_lookup: expired, will be deleted from cache");
|
||||
syslog(LOG_DEBUG, "htcache_lookup: expired, will be deleted from cache");
|
||||
/* free(data.dptr); --- Berkeley DB frees on its own */
|
||||
dbm_close(cache);
|
||||
|
||||
@ -152,11 +155,12 @@ void *cache_lookup(htcache_t *handle, const char* key) {
|
||||
if (NULL != (cache = dbm_open(handle->file, O_RDWR, 0644))) {
|
||||
ret = dbm_delete(cache, dkey);
|
||||
if (ret != 0) {
|
||||
syslog(LOG_DEBUG, "cache_insert: couldn't delete record");
|
||||
syslog(LOG_DEBUG, "htcache_lookup: couldn't delete record");
|
||||
} else {
|
||||
syslog(LOG_DEBUG, "cache_insert: record deleted");
|
||||
syslog(LOG_DEBUG, "htcache_lookup: record deleted");
|
||||
}
|
||||
dbm_close(cache);
|
||||
res = -2;
|
||||
}
|
||||
pthread_mutex_unlock(handle->mutex);
|
||||
}
|
||||
@ -171,4 +175,3 @@ void *cache_lookup(htcache_t *handle, const char* key) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -32,10 +32,10 @@ typedef struct htcache_s {
|
||||
pthread_mutex_t *mutex;
|
||||
} htcache_t;
|
||||
|
||||
htcache_t *cache_init(const char *file, int expiry);
|
||||
void cache_destroy(htcache_t *handle);
|
||||
void cache_insert(htcache_t *handle, const char *key, const void *value, int value_size);
|
||||
void *cache_lookup(htcache_t *handle, const char *key);
|
||||
htcache_t *htcache_init(const char *file, int expiry);
|
||||
void htcache_destroy(htcache_t *handle);
|
||||
void htcache_insert(htcache_t *handle, const char *key, const char *value, int value_size);
|
||||
int htcache_lookup(htcache_t *handle, const char *key, char** value, int* value_size2);
|
||||
|
||||
|
||||
#endif /* _HTCACHE_H_ */
|
||||
|
131
smmapdfw/libsmmapdfw/htcachetest.c
Normal file
131
smmapdfw/libsmmapdfw/htcachetest.c
Normal file
@ -0,0 +1,131 @@
|
||||
/*
|
||||
Copyright (C) 2004,2005 Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
|
||||
smmapdfw is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
smmapdfw is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with smmapdfw. If not, write to the Free Software Foundation, 59
|
||||
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "htcache.h"
|
||||
|
||||
|
||||
|
||||
|
||||
int main(int argc, char **args) {
|
||||
char* output;
|
||||
int size;
|
||||
int res;
|
||||
|
||||
|
||||
htcache_t *c = htcache_init("/tmp/test-cache", 10);
|
||||
|
||||
openlog("htcachetest", LOG_PID, LOG_LOCAL2);
|
||||
|
||||
printf("Populating cache\n");
|
||||
htcache_insert(c, "key1", "value1", 7);
|
||||
htcache_insert(c, "key2", "value2", 7);
|
||||
htcache_insert(c, "key3", "value3", 7);
|
||||
htcache_insert(c, "key4", "value4", 7);
|
||||
htcache_insert(c, "key5", "value5", 7);
|
||||
htcache_insert(c, "key6", "value6", 7);
|
||||
htcache_insert(c, "key7", "value7", 7);
|
||||
htcache_insert(c, "key8", "value8", 7);
|
||||
htcache_insert(c, "key9", "value9", 7);
|
||||
|
||||
res = htcache_lookup(c, "key", &output, &size);
|
||||
if (-1 != res) {
|
||||
printf("Failure when nothing should be found\n");
|
||||
} else {
|
||||
printf("Ok, not found when looking up not existing key\n");
|
||||
}
|
||||
|
||||
res = htcache_lookup(c, "key5", &output, &size);
|
||||
if (0 != res) {
|
||||
printf("Failure when key5 should be found: %d\n", res);
|
||||
} else {
|
||||
printf("Ok, key5 found\n");
|
||||
if (size != 7) {
|
||||
printf(" Failure: invalid size: %d\n", size);
|
||||
} else if (strcmp(output, "value5")) {
|
||||
printf(" Failure: invalid data: %s\n", output);
|
||||
}
|
||||
free(output);
|
||||
}
|
||||
|
||||
res = htcache_lookup(c, "key2", &output, &size);
|
||||
if (0 != res) {
|
||||
printf("Failure when key2 should be found: %d\n", res);
|
||||
} else {
|
||||
printf("Ok, key2 found\n");
|
||||
if (size != 7) {
|
||||
printf(" Failure: invalid size: %d\n", size);
|
||||
} else if (strcmp(output, "value2")) {
|
||||
printf(" Failure: invalid data: %s\n", output);
|
||||
}
|
||||
free(output);
|
||||
}
|
||||
|
||||
printf("Add entry to cache\n");
|
||||
htcache_insert(c, "key_9", "value_9", 8);
|
||||
|
||||
res = htcache_lookup(c, "key_9", &output, &size);
|
||||
if (0 != res) {
|
||||
printf("Failure when key_9 should be found: %d\n", res);
|
||||
} else {
|
||||
printf("Ok, key_9 found\n");
|
||||
if (size != 8) {
|
||||
printf(" Failure: invalid size: %d\n", size);
|
||||
} else if (strcmp(output, "value_9")) {
|
||||
printf(" Failure: invalid data: %s\n", output);
|
||||
}
|
||||
free(output);
|
||||
}
|
||||
|
||||
printf("Sleeping a while\n");
|
||||
sleep(15);
|
||||
|
||||
|
||||
res = htcache_lookup(c, "key2", &output, &size);
|
||||
if (-2 != res) {
|
||||
printf("Failure when nothing should be found with expiry code\n");
|
||||
} else {
|
||||
printf("Ok, not found when looking up expired entry, got expiry code\n");
|
||||
}
|
||||
|
||||
res = htcache_lookup(c, "key2", &output, &size);
|
||||
if (-1 != res) {
|
||||
printf("Failure when nothing should be found\n");
|
||||
} else {
|
||||
printf("Ok, not found when looking up already expired entry\n");
|
||||
}
|
||||
|
||||
|
||||
htcache_destroy(c);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -21,8 +21,19 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if HAVE_LIBDJBDNS
|
||||
// int h_errno;
|
||||
#else
|
||||
extern int h_errno;
|
||||
/* extern struct state _res; */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#define BIND_8_COMPAT
|
||||
#include <arpa/nameser.h>
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
@ -33,7 +44,8 @@
|
||||
#include <assert.h>
|
||||
|
||||
#if HAVE_LIBDJBDNS
|
||||
#include <dns.h>
|
||||
#include <djbdns/dns.h>
|
||||
#include <djbdns/alloc.h>
|
||||
#include <pthread.h>
|
||||
#else
|
||||
#include <resolv.h>
|
||||
@ -43,11 +55,6 @@
|
||||
#include "htmalloc.h"
|
||||
|
||||
|
||||
#if ! HAVE_LIBDJBDNS
|
||||
extern int h_errno;
|
||||
/* extern struct state _res; */
|
||||
#endif
|
||||
|
||||
union answer_u {
|
||||
HEADER hdr;
|
||||
u_char buf[PACKETSZ+1];
|
||||
@ -66,13 +73,15 @@ typedef union answer_u answer_t;
|
||||
pthread_mutex_t dns_transmit_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
static int get_domain_name(answer_t *answer, int offset, char **name) {
|
||||
int start, len, i, offset2;
|
||||
char *name_buf, *name_buf2, *remember_name_buf;
|
||||
name_buf = NULL;
|
||||
|
||||
|
||||
|
||||
while (0 != (len = answer->buf[offset++])) {
|
||||
if (0xC0 == (len & 0xC0)) {
|
||||
if (NULL != name) { /* if we don't need the result, we don't need to recurse, since a ... */
|
||||
@ -103,15 +112,19 @@ static int get_domain_name(answer_t *answer, int offset, char **name) {
|
||||
}
|
||||
}
|
||||
if (NULL != name) {
|
||||
name_buf[strlen(name_buf)-1] = '\0'; /* remove the final dot */
|
||||
if (name_buf != NULL) /* we can do this of course only if there is something */
|
||||
name_buf[strlen(name_buf)-1] = '\0'; /* remove the final dot */
|
||||
*name = name_buf;
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int get_mx_rdata(answer_t *answer, int offset, int len, mx_rdata_t **resp) {
|
||||
*resp = (mx_rdata_t*) htmalloc(sizeof(mx_rdata_t));
|
||||
(*resp)->preference = get16(answer->buf, offset);
|
||||
(*resp)->exchange = NULL;
|
||||
get_domain_name(answer, offset+2, &(*resp)->exchange);
|
||||
(*resp)->type = T_MX;
|
||||
|
||||
@ -135,6 +148,7 @@ static int get_a_rdata(answer_t *answer, int offset, int len, a_rdata_t **resp)
|
||||
|
||||
static int get_cname_rdata(answer_t *answer, int offset, int len, cname_rdata_t **resp) {
|
||||
*resp = (cname_rdata_t*) htmalloc(sizeof(cname_rdata_t));
|
||||
(*resp)->cname = NULL;
|
||||
get_domain_name(answer, offset, &(*resp)->cname);
|
||||
(*resp)->type = T_CNAME;
|
||||
|
||||
@ -202,8 +216,10 @@ static void** get_rrs(char *domain, int qtype) {
|
||||
char *name;
|
||||
void **rdata, **rdata2;
|
||||
|
||||
|
||||
#if HAVE_LIBDJBDNS
|
||||
struct dns_transmit dt = {0};
|
||||
char *q = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
@ -213,7 +229,6 @@ static void** get_rrs(char *domain, int qtype) {
|
||||
{
|
||||
char s[64];
|
||||
int flagrecursive = 1;
|
||||
char *q = NULL;
|
||||
char t[2];
|
||||
char localip[4] = "\0\0\0\0";
|
||||
iopause_fd x[1];
|
||||
@ -226,19 +241,22 @@ static void** get_rrs(char *domain, int qtype) {
|
||||
|
||||
if (dns_resolvconfip(s) == -1) {
|
||||
syslog(LOG_ERR, "failure in dns_resolvconfip: %d, %s\n",
|
||||
errno, strerror(errno));
|
||||
errno, strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
syslog(LOG_DEBUG, "get_rrs: (1) q = %p", q);
|
||||
dns_domain_fromdot(&q, domain, strlen(domain));
|
||||
syslog(LOG_DEBUG, "get_rrs: (2) q = %p", q);
|
||||
|
||||
pthread_mutex_lock(&dns_transmit_mutex);
|
||||
res = dns_transmit_start(&dt, s, flagrecursive, q, t, localip);
|
||||
syslog(LOG_DEBUG, "get_rrs: (3) q = %p", q);
|
||||
pthread_mutex_unlock(&dns_transmit_mutex);
|
||||
|
||||
if (res == -1) {
|
||||
syslog(LOG_ERR, "failure in dns_transmit_start: %d, %s\n",
|
||||
errno, strerror(errno));
|
||||
//syslog(LOG_ERR, "failure in dns_transmit_start: %d, %s\n",
|
||||
//errno, strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -259,8 +277,8 @@ static void** get_rrs(char *domain, int qtype) {
|
||||
pthread_mutex_unlock(&dns_transmit_mutex);
|
||||
|
||||
if (-1 == r) {
|
||||
syslog(LOG_ERR, "failure in dns_transmit_get: %d, %s\n",
|
||||
errno, strerror(errno));
|
||||
//syslog(LOG_ERR, "failure in dns_transmit_get: %d, %s\n",
|
||||
//errno, strerror(errno));
|
||||
|
||||
pthread_mutex_lock(&dns_transmit_mutex);
|
||||
dns_transmit_free(&dt);
|
||||
@ -292,7 +310,7 @@ static void** get_rrs(char *domain, int qtype) {
|
||||
|
||||
cnt = sizeof(HEADER);
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
syslog(LOG_DEBUG, "id: %d\n", answer->hdr.id);
|
||||
syslog(LOG_DEBUG, "qr: %d\n", answer->hdr.qr);
|
||||
syslog(LOG_DEBUG, "oc: %d\n", answer->hdr.opcode);
|
||||
@ -300,8 +318,8 @@ static void** get_rrs(char *domain, int qtype) {
|
||||
syslog(LOG_DEBUG, "tc: %d\n", answer->hdr.tc);
|
||||
syslog(LOG_DEBUG, "rd: %d\n", answer->hdr.rd);
|
||||
syslog(LOG_DEBUG, "ra: %d\n", answer->hdr.ra);
|
||||
syslog(LOG_DEBUG, "ad: %d\n", answer->hdr.ad);
|
||||
syslog(LOG_DEBUG, "cd: %d\n", answer->hdr.cd);
|
||||
// syslog(LOG_DEBUG, "ad: %d\n", answer->hdr.ad);
|
||||
// syslog(LOG_DEBUG, "cd: %d\n", answer->hdr.cd);
|
||||
syslog(LOG_DEBUG, "rc: %d\n", answer->hdr.rcode);
|
||||
syslog(LOG_DEBUG, "qdcount: %d\n", ntohs(answer->hdr.qdcount));
|
||||
syslog(LOG_DEBUG, "ancount: %d\n", ntohs(answer->hdr.ancount));
|
||||
@ -324,7 +342,11 @@ static void** get_rrs(char *domain, int qtype) {
|
||||
cnt = get_domain_name(answer, cnt, NULL);
|
||||
type = get16(answer->buf, cnt);
|
||||
syslog(LOG_DEBUG, "get_rrs: answer type %d", type);
|
||||
|
||||
//if (type != qtype)
|
||||
// printf("answer type mismatch: %d != %d\n", type, qtype);
|
||||
/* assert(type==qtype); */
|
||||
|
||||
cnt += 2;
|
||||
class = get16(answer->buf, cnt);
|
||||
cnt += 2;
|
||||
@ -344,66 +366,197 @@ static void** get_rrs(char *domain, int qtype) {
|
||||
pthread_mutex_lock(&dns_transmit_mutex);
|
||||
dns_transmit_free(&dt);
|
||||
pthread_mutex_unlock(&dns_transmit_mutex);
|
||||
|
||||
syslog(LOG_DEBUG, "get_rrs: (4) q = %p", q);
|
||||
alloc_free(q);
|
||||
q = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
return rdata;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
mx_rdata_t** get_mx_rrs(char *domain) {
|
||||
return (mx_rdata_t**) get_rrs(domain, T_MX);
|
||||
}
|
||||
|
||||
a_rdata_t** get_a_rrs(char *domain) {
|
||||
rdata_t **rdata, **rdata2;
|
||||
cname_rdata_t **cname_rdata;
|
||||
|
||||
rdata = (rdata_t**) get_rrs(domain, T_A);
|
||||
if ((NULL == rdata) || (NULL == *rdata))
|
||||
if (domain == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((*rdata)->type == T_CNAME) {
|
||||
cname_rdata = (cname_rdata_t**) rdata;
|
||||
rdata2 = (rdata_t**) get_a_rrs((*cname_rdata)->cname);
|
||||
free_rrs((void**)rdata);
|
||||
rdata = rdata2;
|
||||
rdata_t **rdata = (rdata_t**) get_rrs(domain, T_MX);
|
||||
|
||||
if (NULL == rdata) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (a_rdata_t**) rdata;
|
||||
if (NULL == *rdata) {
|
||||
free(rdata);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rdata_t **rdata2;
|
||||
mx_rdata_t **mx_rdata = NULL;
|
||||
int i = 0; // one for the termination
|
||||
for (rdata2 = rdata; *rdata2 != NULL; rdata2++) {
|
||||
if ((*rdata2)->type == T_MX) {
|
||||
mx_rdata = (mx_rdata_t**) htrealloc(mx_rdata, sizeof(mx_rdata_t*) * (i + 2));
|
||||
*(mx_rdata + i) = (mx_rdata_t*) *rdata2;
|
||||
i++;
|
||||
} else {
|
||||
/* it's not, free it */
|
||||
free_rdata(*rdata2);
|
||||
}
|
||||
}
|
||||
|
||||
/* free the old container */
|
||||
free(rdata);
|
||||
|
||||
/* terminate the new container */
|
||||
if (mx_rdata != NULL)
|
||||
*((int**)(mx_rdata + i)) = NULL;
|
||||
|
||||
return mx_rdata;
|
||||
}
|
||||
|
||||
|
||||
|
||||
a_rdata_t** inner_get_a_rrs(char *domain, int *depth) {
|
||||
//printf("depth: %d, domain: %s\n", *depth, domain);
|
||||
if (*depth > 5) {
|
||||
//printf("loop\n");
|
||||
return NULL;
|
||||
}
|
||||
if (domain == NULL)
|
||||
return NULL;
|
||||
|
||||
cname_rdata_t **cname_rdata;
|
||||
|
||||
rdata_t **rdata = (rdata_t**) get_rrs(domain, T_A);
|
||||
|
||||
if (NULL == rdata) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (NULL == *rdata) {
|
||||
free(rdata);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rdata_t **rdata2;
|
||||
a_rdata_t **a_rdata = NULL;
|
||||
int i = 0; // one for the termination
|
||||
for (rdata2 = rdata; *rdata2 != NULL; rdata2++) {
|
||||
//printf(" depth: %d, rdata2: %p\n", *depth, rdata2);
|
||||
if ((*rdata2)->type == T_A) {
|
||||
a_rdata = (a_rdata_t**) htrealloc(a_rdata, sizeof(a_rdata_t*) * (i + 2));
|
||||
*(a_rdata + i) = *rdata2;
|
||||
i++;
|
||||
} else if ((*rdata2)->type == T_CNAME) {
|
||||
cname_rdata_t *cname_rdata = (cname_rdata_t*) *rdata2;
|
||||
(*depth)++;
|
||||
a_rdata_t **a_rdata_recurse = inner_get_a_rrs(cname_rdata->cname, depth);
|
||||
if ((NULL != a_rdata_recurse) && (NULL != *a_rdata_recurse)) {
|
||||
a_rdata_t **a_rdata2;
|
||||
for (a_rdata2 = a_rdata_recurse; *a_rdata2 != NULL; a_rdata2++) {
|
||||
a_rdata = (a_rdata_t**) htrealloc(a_rdata, sizeof(a_rdata_t*) * (i + 2));
|
||||
*(a_rdata + i) = *a_rdata2;
|
||||
i++;
|
||||
}
|
||||
free(a_rdata_recurse);
|
||||
} else if (NULL != a_rdata_recurse) {
|
||||
free(a_rdata_recurse);
|
||||
}
|
||||
free_rdata(cname_rdata);
|
||||
} else {
|
||||
/* it's not, free it */
|
||||
free_rdata(*rdata2);
|
||||
}
|
||||
}
|
||||
|
||||
/* free the old container */
|
||||
free(rdata);
|
||||
|
||||
/* terminate the new container */
|
||||
if (a_rdata != NULL)
|
||||
*((int**)(a_rdata + i)) = NULL;
|
||||
|
||||
return a_rdata;
|
||||
}
|
||||
|
||||
|
||||
a_rdata_t** get_a_rrs(char *domain) {
|
||||
if (NULL == domain)
|
||||
return NULL;
|
||||
|
||||
char *myDomain = domain;
|
||||
|
||||
struct in_addr addr;
|
||||
if (myDomain[0] == '[' && myDomain[strlen(myDomain)-1] == ']') {
|
||||
syslog(LOG_DEBUG, "get_a_rrs: this is something (hopefully an IP address) in square brackets");
|
||||
myDomain[strlen(myDomain)-1] = '\0';
|
||||
myDomain++;
|
||||
}
|
||||
|
||||
a_rdata_t **a_rdata = NULL;
|
||||
if (inet_aton(myDomain, &addr)) {
|
||||
syslog(LOG_DEBUG, "get_a_rss: not a name but an address");
|
||||
|
||||
a_rdata = (a_rdata_t**) htmalloc(sizeof(a_rdata_t*) * 2);
|
||||
|
||||
a_rdata_t *resp = (a_rdata_t*) htmalloc(sizeof(a_rdata_t));
|
||||
resp->address = addr.s_addr;
|
||||
resp->type = T_A;
|
||||
|
||||
*a_rdata = resp;
|
||||
*(a_rdata + 1) = NULL;
|
||||
} else {
|
||||
int i = 0;
|
||||
a_rdata = inner_get_a_rrs(myDomain, &i);
|
||||
}
|
||||
return a_rdata;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define min(A,B) ((A<B) ? A : B)
|
||||
mx_rdata_t** get_best_mx_rrs(char *domain) {
|
||||
mx_rdata_t **all_mx_rrs, **mx_rdata2, **best_mx_rrs;
|
||||
int min_pref = 10000000;
|
||||
int all_cnt = 0;
|
||||
int best_cnt = 0;
|
||||
if (domain == NULL)
|
||||
return NULL;
|
||||
|
||||
int i = 0;
|
||||
|
||||
all_mx_rrs = get_mx_rrs(domain);
|
||||
|
||||
mx_rdata_t **all_mx_rrs = get_mx_rrs(domain);
|
||||
if (NULL == all_mx_rrs)
|
||||
return NULL;
|
||||
|
||||
|
||||
/* how much are there at all and what is the minimum preference */
|
||||
int min_pref = 10000000;
|
||||
int all_cnt = 0;
|
||||
mx_rdata_t **mx_rdata2;
|
||||
for (mx_rdata2 = all_mx_rrs; *mx_rdata2 != NULL; mx_rdata2++) {
|
||||
all_cnt++;
|
||||
min_pref = min(min_pref, (*mx_rdata2)->preference);
|
||||
}
|
||||
|
||||
//printf("all_cnt: %d, min_pref: %d\n", all_cnt, min_pref);
|
||||
|
||||
/* how much are there of the minimum preference */
|
||||
int best_cnt = 0;
|
||||
for (mx_rdata2 = all_mx_rrs; *mx_rdata2 != NULL; mx_rdata2++)
|
||||
if ((*mx_rdata2)->preference == min_pref)
|
||||
best_cnt++;
|
||||
//printf("best_cnt: %d\n", best_cnt);
|
||||
|
||||
if (all_cnt == best_cnt) {
|
||||
/* all of them are minimum */
|
||||
return all_mx_rrs;
|
||||
} else {
|
||||
/* space for the minimum pref rr's */
|
||||
best_mx_rrs = (mx_rdata_t**) htmalloc(sizeof(mx_rdata_t*) * (best_cnt+1));
|
||||
mx_rdata_t **best_mx_rrs = (mx_rdata_t**) htmalloc(sizeof(mx_rdata_t*) * (best_cnt+1));
|
||||
for (mx_rdata2 = all_mx_rrs; *mx_rdata2 != NULL; mx_rdata2++) {
|
||||
if ((*mx_rdata2)->preference == min_pref) {
|
||||
/* is a minimum one, keep it */
|
||||
@ -411,7 +564,7 @@ mx_rdata_t** get_best_mx_rrs(char *domain) {
|
||||
i++;
|
||||
} else {
|
||||
/* it's not, free it */
|
||||
free_mx_rdata(*mx_rdata2);
|
||||
free_rdata(*mx_rdata2);
|
||||
}
|
||||
}
|
||||
/* free the old container */
|
||||
@ -492,3 +645,4 @@ int main(int argc, char **argv) {
|
||||
|
||||
#endif /* _TEST_MODE_ */
|
||||
|
||||
|
||||
|
83
smmapdfw/libsmmapdfw/htdnstest.c
Normal file
83
smmapdfw/libsmmapdfw/htdnstest.c
Normal file
@ -0,0 +1,83 @@
|
||||
#if 0
|
||||
|
||||
/*
|
||||
Copyright (C) 2004,2005 Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
|
||||
smmapdfw is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
smmapdfw is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with smmapdfw. If not, write to the Free Software Foundation, 59
|
||||
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "htdns.h"
|
||||
|
||||
|
||||
|
||||
|
||||
int main(int argc, char **args) {
|
||||
if (argc != 3) {
|
||||
printf("give domain to test and query type on commandline\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
char *domain = args[1];
|
||||
char *type = args[2];
|
||||
|
||||
if (! strcmp(type, "mx")) {
|
||||
mx_rdata_t **mx_rdata = get_best_mx_rrs(domain);
|
||||
if (mx_rdata == NULL) {
|
||||
printf("no mx-rr found\n");
|
||||
} else {
|
||||
mx_rdata_t **mx_rdata2;
|
||||
for (mx_rdata2 = mx_rdata; *mx_rdata2 != NULL; mx_rdata2++) {
|
||||
printf("--> %d, %s\n", (*mx_rdata2)->preference, (*mx_rdata2)->exchange);
|
||||
}
|
||||
|
||||
free_rrs((void**)mx_rdata);
|
||||
}
|
||||
} else if (! strcmp(type, "a")) {
|
||||
a_rdata_t **a_rdata = get_a_rrs(domain);
|
||||
if (a_rdata == NULL) {
|
||||
printf("nothing found\n");
|
||||
} else {
|
||||
a_rdata_t **a_rdata2;
|
||||
for (a_rdata2 = a_rdata; *a_rdata2 != NULL; a_rdata2++) {
|
||||
printf("--> %08x, %d.%d.%d.%d\n", htonl((*a_rdata2)->address),
|
||||
(htonl((*a_rdata2)->address)&0xff000000)>>24, (htonl((*a_rdata2)->address)&0x00ff0000)>>16,
|
||||
(htonl((*a_rdata2)->address)&0x0000ff00)>>8, (htonl((*a_rdata2)->address)&0x000000ff));
|
||||
}
|
||||
|
||||
free_rrs((void**)a_rdata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
main() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
#include "htmalloc.h"
|
||||
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "queue.h"
|
||||
#include "htmalloc.h"
|
||||
#include <syslog.h>
|
||||
|
||||
#ifdef _TEST_MODE_
|
||||
#include <stdio.h>
|
||||
@ -74,30 +75,46 @@ int queue_put(ht_queue_t *q, void *d) {
|
||||
}
|
||||
|
||||
void *queue_get_wait(ht_queue_t *q) {
|
||||
return queue_get_wait_w_timeout(q, 0);
|
||||
}
|
||||
|
||||
void *queue_get_wait_w_timeout(ht_queue_t *q, int timeout_seconds) {
|
||||
queue_entry_t *entry = NULL;
|
||||
void *d = NULL;
|
||||
int rc = 0;
|
||||
|
||||
pthread_mutex_lock(&q->mutex);
|
||||
|
||||
while ((NULL == q->head) && (NULL == q->tail)) {
|
||||
pthread_cond_wait(&q->cond, &q->mutex);
|
||||
if (timeout_seconds == 0) {
|
||||
pthread_cond_wait(&q->cond, &q->mutex);
|
||||
} else {
|
||||
struct timespec ts;
|
||||
ts.tv_sec = time(0) + timeout_seconds;
|
||||
ts.tv_nsec = 0;
|
||||
rc = pthread_cond_timedwait(&q->cond, &q->mutex, &ts);
|
||||
if (rc != 0) // terminate loop for timeout
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
entry = q->head;
|
||||
if (rc == 0) {
|
||||
entry = q->head;
|
||||
|
||||
if (NULL != q->head) {
|
||||
q->head = q->head->prev;
|
||||
}
|
||||
|
||||
if (NULL == q->head) {
|
||||
q->tail = NULL;
|
||||
} else {
|
||||
q->head->next = NULL;
|
||||
}
|
||||
|
||||
if (NULL != entry) {
|
||||
d = entry->data;
|
||||
free(entry);
|
||||
if (NULL != q->head) {
|
||||
q->head = q->head->prev;
|
||||
}
|
||||
|
||||
if (NULL == q->head) {
|
||||
q->tail = NULL;
|
||||
} else {
|
||||
q->head->next = NULL;
|
||||
}
|
||||
|
||||
if (NULL != entry) {
|
||||
d = entry->data;
|
||||
free(entry);
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&q->mutex);
|
||||
|
@ -44,6 +44,7 @@ void queue_init(ht_queue_t *q);
|
||||
void queue_destroy(ht_queue_t *q);
|
||||
int queue_put(ht_queue_t *q, void *d);
|
||||
void *queue_get_wait(ht_queue_t *q);
|
||||
void *queue_get_wait_w_timeout(ht_queue_t *q, int timeout_seconds);
|
||||
|
||||
|
||||
#endif /* _QUEUE_H_ */
|
||||
|
@ -21,86 +21,143 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <syslog.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "cfg.h"
|
||||
|
||||
|
||||
#define _STATS_C_
|
||||
#include "stats.h"
|
||||
|
||||
#include "count.h"
|
||||
#include "htmalloc.h"
|
||||
|
||||
|
||||
#if ENABLE_STATS==1
|
||||
count_t statCounter[STAT_CNT_MAXNUM];
|
||||
#endif
|
||||
statCounterEntry_t *statCounterList = NULL;
|
||||
unsigned int statCounterListLen = 0;
|
||||
|
||||
void initStatCounter() {
|
||||
#if ENABLE_STATS==1
|
||||
counterDef_t *addOneCounterDef(counterDef_t *counterDef, unsigned int type, const char* name) {
|
||||
int counterCnt = 0;
|
||||
if (counterDef != NULL) {
|
||||
counterDef_t *curCounterDef;
|
||||
for (curCounterDef = counterDef; curCounterDef->type != SMM_TYPE_NULL; curCounterDef++, counterCnt++);
|
||||
}
|
||||
counterDef_t *newCounterDef = (counterDef_t*) htrealloc(counterDef, sizeof(counterDef_t) * (counterCnt + 2));
|
||||
(newCounterDef + counterCnt)->type = type;
|
||||
(newCounterDef + counterCnt)->name = name;
|
||||
(newCounterDef + counterCnt + 1)->type = SMM_TYPE_NULL;
|
||||
(newCounterDef + counterCnt + 1)->name = NULL;
|
||||
return newCounterDef;
|
||||
}
|
||||
|
||||
statCounter_t *initStatCounter(const char *moduleName, counterDef_t *counterDefs) {
|
||||
counterDef_t *curCounterDef;
|
||||
unsigned i = 0;
|
||||
for (curCounterDef = counterDefs; curCounterDef->type != SMM_TYPE_NULL; curCounterDef++, i++);
|
||||
statCounter_t *statCounter = (statCounter_t*) htmalloc(sizeof(statCounter_t) * (i + 1));
|
||||
statCounter_t *curStatCounter;
|
||||
for (curCounterDef = counterDefs, curStatCounter = statCounter; curCounterDef->type != SMM_TYPE_NULL; curCounterDef++, curStatCounter++) {
|
||||
curStatCounter->magic = STAT_COUNTER_MAGIC;
|
||||
curStatCounter->counter = (count_t*) htmalloc(sizeof(count_t));
|
||||
count_init(curStatCounter->counter);
|
||||
}
|
||||
curStatCounter->magic = STAT_COUNTER_MAGIC;
|
||||
curStatCounter->counter = NULL;
|
||||
|
||||
|
||||
statCounterList = (statCounterEntry_t*) htrealloc(statCounterList, sizeof(statCounterEntry_t) * (statCounterListLen + 1));
|
||||
(statCounterList + statCounterListLen)->moduleName = moduleName;
|
||||
(statCounterList + statCounterListLen)->counterDefs = counterDefs;
|
||||
(statCounterList + statCounterListLen)->statCounters = statCounter;
|
||||
statCounterListLen++;
|
||||
|
||||
return statCounter;
|
||||
}
|
||||
|
||||
void destroyStatCounters() {
|
||||
int i;
|
||||
|
||||
for (i=0; i<STAT_CNT_MAXNUM; i++) {
|
||||
count_init(&statCounter[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
unsigned int getStatCounter(int cnt_idx) {
|
||||
#if ENABLE_STATS==1
|
||||
assert((cnt_idx >= 0) && (cnt_idx < STAT_CNT_MAXNUM));
|
||||
return count_get(&statCounter[cnt_idx]);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void incStatCounter(int cnt_idx) {
|
||||
#if ENABLE_STATS==1
|
||||
assert((cnt_idx >= 0) && (cnt_idx < STAT_CNT_MAXNUM));
|
||||
count_inc(&statCounter[cnt_idx]);
|
||||
#endif
|
||||
}
|
||||
|
||||
void decStatCounter(int cnt_idx) {
|
||||
#if ENABLE_STATS==1
|
||||
assert((cnt_idx >= 0) && (cnt_idx < STAT_CNT_MAXNUM));
|
||||
count_dec(&statCounter[cnt_idx]);
|
||||
#endif
|
||||
}
|
||||
|
||||
void outputStats(int stdout_nice, int syslog_nice) {
|
||||
#if ENABLE_STATS==1
|
||||
char buf[1024];
|
||||
char buf2[64];
|
||||
int i, v;
|
||||
|
||||
*buf = '\0';
|
||||
*buf2 = '\0';
|
||||
|
||||
strcat(buf, "Stats: ");
|
||||
|
||||
if (2 == stdout_nice)
|
||||
printf("---------------------------------------------------------\n");
|
||||
|
||||
for (i=1; i<STAT_CNT_MAXNUM; i++) {
|
||||
v = getStatCounter(i);
|
||||
if (2 == stdout_nice)
|
||||
printf("%44s = %5d\n", stat_cnt_names[i], v);
|
||||
if (2 == syslog_nice)
|
||||
syslog(LOG_DEBUG, "%44s = %5d\n", stat_cnt_names[i], v);
|
||||
if ((1 == stdout_nice) || (1 == syslog_nice)) {
|
||||
sprintf(buf2, "%d ", v);
|
||||
strcat(buf, buf2);
|
||||
statCounterEntry_t *s;
|
||||
for (i = 0, s = statCounterList; i < statCounterListLen; i++, s++) {
|
||||
statCounter_t *ss;
|
||||
for (ss = s->statCounters; ss->counter != NULL; ss++) {
|
||||
free(ss->counter);
|
||||
}
|
||||
free(s->counterDefs);
|
||||
free(s->statCounters);
|
||||
}
|
||||
free(statCounterList);
|
||||
}
|
||||
|
||||
if (stdout_nice)
|
||||
printf("\n");
|
||||
unsigned int getStatCounter(statCounter_t *statCounter, int cnt_idx) {
|
||||
statCounter_t *curStatCounter = statCounter + cnt_idx;
|
||||
if (curStatCounter == NULL || curStatCounter->magic != STAT_COUNTER_MAGIC) {
|
||||
syslog(LOG_CRIT, "STAT_COUNTER_MAGIC not matching in getStatCounter!!!");
|
||||
return 0;
|
||||
} else {
|
||||
return count_get(curStatCounter->counter);
|
||||
}
|
||||
}
|
||||
|
||||
if (1 == stdout_nice)
|
||||
printf("%s\n\n", buf);
|
||||
if (1 == syslog_nice)
|
||||
syslog(LOG_DEBUG, buf);
|
||||
#endif
|
||||
void incStatCounter(statCounter_t *statCounter, int cnt_idx) {
|
||||
statCounter_t *curStatCounter = statCounter + cnt_idx;
|
||||
if (curStatCounter == NULL || curStatCounter->magic != STAT_COUNTER_MAGIC) {
|
||||
syslog(LOG_CRIT, "STAT_COUNTER_MAGIC not matching in incStatCounter!!!");
|
||||
} else {
|
||||
count_inc(curStatCounter->counter);
|
||||
}
|
||||
}
|
||||
|
||||
void decStatCounter(statCounter_t *statCounter, int cnt_idx) {
|
||||
statCounter_t *curStatCounter = statCounter + cnt_idx;
|
||||
if (curStatCounter == NULL || curStatCounter->magic != STAT_COUNTER_MAGIC) {
|
||||
syslog(LOG_CRIT, "STAT_COUNTER_MAGIC not matching in decStatCounter!!!");
|
||||
} else {
|
||||
count_dec(curStatCounter->counter);
|
||||
}
|
||||
}
|
||||
|
||||
#define SYSLOG_BUF_SIZE 1024
|
||||
void outputStats(int stdout_nice, int syslog_nice) {
|
||||
char syslogBuf[SYSLOG_BUF_SIZE];
|
||||
int remainsSyslogBufLen = SYSLOG_BUF_SIZE - 1;
|
||||
|
||||
statCounterEntry_t *curStatCounterEntry;
|
||||
unsigned int i;
|
||||
for (curStatCounterEntry = statCounterList, i = 0; i < statCounterListLen; curStatCounterEntry++, i++) {
|
||||
if (stdout_nice == 1)
|
||||
printf("%s: ", curStatCounterEntry->moduleName);
|
||||
else if (stdout_nice == 2)
|
||||
printf("moduleName: %s\n", curStatCounterEntry->moduleName);
|
||||
if (syslog_nice == 1) {
|
||||
snprintf(syslogBuf, remainsSyslogBufLen, "%s: ", curStatCounterEntry->moduleName);
|
||||
remainsSyslogBufLen -= strlen(syslogBuf);
|
||||
} else if (syslog_nice == 2) {
|
||||
snprintf(syslogBuf, remainsSyslogBufLen, "moduleName: %s\n", curStatCounterEntry->moduleName);
|
||||
remainsSyslogBufLen -= strlen(syslogBuf);
|
||||
}
|
||||
statCounter_t *curStatCounter;
|
||||
counterDef_t *curCounterDef;
|
||||
for (curStatCounter = curStatCounterEntry->statCounters, curCounterDef = curStatCounterEntry->counterDefs;
|
||||
curStatCounter->counter != NULL;
|
||||
curStatCounter++, curCounterDef++) {
|
||||
if (stdout_nice == 1)
|
||||
printf("%d ", count_get(curStatCounter->counter));
|
||||
else if (stdout_nice == 2)
|
||||
printf(" %s: %d\n", curCounterDef->name, count_get(curStatCounter->counter));
|
||||
if (syslog_nice == 1) {
|
||||
snprintf(syslogBuf, remainsSyslogBufLen, "%d ", count_get(curStatCounter->counter));
|
||||
remainsSyslogBufLen -= strlen(syslogBuf);
|
||||
} else if (syslog_nice == 2) {
|
||||
snprintf(syslogBuf, remainsSyslogBufLen, " %s: %d\n", curCounterDef->name, count_get(curStatCounter->counter));
|
||||
remainsSyslogBufLen -= strlen(syslogBuf);
|
||||
}
|
||||
}
|
||||
if (stdout_nice == 1 || stdout_nice == 2)
|
||||
printf("\n");
|
||||
if (syslog_nice == 1 || syslog_nice == 2)
|
||||
syslog(LOG_INFO, syslogBuf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -23,81 +23,37 @@
|
||||
#define _STATS_H_
|
||||
|
||||
#include "smmapd.h"
|
||||
|
||||
#ifdef _STATS_C_
|
||||
char *stat_cnt_names[] = {
|
||||
"",
|
||||
"Server: accepted",
|
||||
"Server: failed",
|
||||
"Server: running networker threads",
|
||||
"Server: networker threads",
|
||||
"Server: failed to start, networker threads",
|
||||
|
||||
"Verifier: entries in cache",
|
||||
"Verifier: running worker threads",
|
||||
"Verifier: worker threads",
|
||||
"Verifier: failed to start, worker threads",
|
||||
"Verifier: timed out worker threads",
|
||||
"Verifier: running checker threads",
|
||||
"Verifier: checker threads",
|
||||
"Verifier: failed to start, checker threads",
|
||||
"Verifier: answered from cache",
|
||||
"Verifier: returned OK",
|
||||
"Verifier: returned NOK",
|
||||
"Verifier: returned TNOK",
|
||||
|
||||
"Cyrus: checker",
|
||||
"Cyrus: illegal input",
|
||||
"Cyrus: depot dns failure",
|
||||
"Cyrus: returned OK",
|
||||
"Cyrus: returned NOK",
|
||||
"Cyrus: returned TNOK",
|
||||
|
||||
"Server: returned OK",
|
||||
"Server: returned TEMP_NOK",
|
||||
"Server: returned PERM_NOK",
|
||||
"Server: returned NOT_FOUND_NOK",
|
||||
"Server: returned illegal input",
|
||||
"Server: returned unknown class",
|
||||
"Server: returned TIMEOUT_NOK",
|
||||
"Server: returned netstring unparsable",
|
||||
};
|
||||
#endif /* _STATS_C_ */
|
||||
#include "count.h"
|
||||
#include "cfg.h"
|
||||
|
||||
|
||||
#define STAT_CNT_ACCEPTED 1
|
||||
#define STAT_CNT_FAILED 2
|
||||
#define STAT_CNT_NETWORKER_R_THREADS 3
|
||||
#define STAT_CNT_NETWORKER_THREADS 4
|
||||
#define STAT_CNT_NETWORKER_THREADS_FAILED 5
|
||||
#define SMM_TYPE_NULL 0
|
||||
#define SMM_TYPE_COUNTER 1
|
||||
#define SMM_TYPE_GAUGE 2
|
||||
|
||||
#define STAT_CNT_VERIFIER_CACHE 6
|
||||
#define STAT_CNT_VERIFIER_WORKER_R_THREADS 7
|
||||
#define STAT_CNT_VERIFIER_WORKER_THREADS 8
|
||||
#define STAT_CNT_VERIFIER_WORKER_THREADS_FAILED 9
|
||||
#define STAT_CNT_VERIFIER_WORKER_THREADS_TIMEOUT 10
|
||||
#define STAT_CNT_VERIFIER_CHECKER_R_THREADS 11
|
||||
#define STAT_CNT_VERIFIER_CHECKER_THREADS 12
|
||||
#define STAT_CNT_VERIFIER_CHECKER_THREADS_FAILED 13
|
||||
#define STAT_CNT_VERIFIER_ANSWERED_FROM_CACHE 14
|
||||
#define STAT_CNT_VERIFIER_RETURNED_OK 15
|
||||
#define STAT_CNT_VERIFIER_RETURNED_NOK 16
|
||||
#define STAT_CNT_VERIFIER_RETURNED_TNOK 17
|
||||
#define STAT_COUNTER_MAGIC 0x27061972
|
||||
|
||||
#define STAT_CNT_CYRUS_WORKER 18
|
||||
#define STAT_CNT_CYRUS_ILLEGAL_INPUT 19
|
||||
#define STAT_CNT_CYRUS_DEPOT_DNS_FAILURE 20
|
||||
#define STAT_CNT_CYRUS_RETURNED_OK 21
|
||||
#define STAT_CNT_CYRUS_RETURNED_NOK 22
|
||||
#define STAT_CNT_CYRUS_RETURNED_TNOK 23
|
||||
typedef struct counterDef_s {
|
||||
unsigned int type;
|
||||
const char *name;
|
||||
} counterDef_t;
|
||||
|
||||
#define STAT_CNT_OFFSET 23
|
||||
#define STAT_CNT_MAXNUM STAT_CNT_OFFSET + SMM_MAX_NUM
|
||||
typedef struct statCounter_s {
|
||||
unsigned int magic;
|
||||
count_t *counter;
|
||||
} statCounter_t;
|
||||
|
||||
|
||||
void initStatCounter();
|
||||
unsigned int getStatCounter(int cnt_idx);
|
||||
void incStatCounter(int cnt_idx);
|
||||
void decStatCounter(int cnt_idx);
|
||||
typedef struct statCounterEntry_s {
|
||||
const char *moduleName;
|
||||
counterDef_t *counterDefs;
|
||||
statCounter_t *statCounters;
|
||||
} statCounterEntry_t;
|
||||
|
||||
counterDef_t *addOneCounterDef(counterDef_t *counterDef, unsigned int type, const char* name);
|
||||
void destroyStatCounter();
|
||||
statCounter_t *initStatCounter(const char *moduleName, counterDef_t *counterDefs);
|
||||
unsigned int getStatCounter(statCounter_t *statCounter, int cnt_idx);
|
||||
void incStatCounter(statCounter_t *statCounter, int cnt_idx);
|
||||
void decStatCounter(statCounter_t *statCounter, int cnt_idx);
|
||||
void outputStats(int stdout_nice, int syslog_nice);
|
||||
#endif /* _STATS_H_ */
|
||||
|
1271
smmapdfw/ltmain.sh
1271
smmapdfw/ltmain.sh
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,8 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -10,211 +12,338 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = m4
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(datadir)"
|
||||
dataDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(data_DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
LIB = @LIB@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
data_DATA = cyruscheck.m4 verifysender.m4
|
||||
EXTRA_DIST = cyruscheck.m4 verifysender.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DATA = $(data_DATA)
|
||||
all: all-am
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu m4/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-dataDATA: $(data_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
|
||||
@list='$(data_DATA)'; for p in $$list; do \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(datadir)/$$p"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(datadir)/$$p; \
|
||||
else if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(datadir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(datadir)/$$p; \
|
||||
fi; fi; \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \
|
||||
$(dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-dataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(data_DATA)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(datadir)/$$p; \
|
||||
@list='$(data_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(datadir)/$$f"; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = m4
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu m4/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(datadir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-dataDATA
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-dataDATA
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(DATA)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dataDATA
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
clean: clean-am
|
||||
pdf: pdf-am
|
||||
|
||||
distclean-am: distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
pdf-am:
|
||||
|
||||
distclean: distclean-am
|
||||
ps: ps-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
ps-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: uninstall-dataDATA install-dataDATA tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
uninstall-am: uninstall-dataDATA uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dataDATA install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am uninstall-dataDATA uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -1,21 +0,0 @@
|
||||
DE-HOTTIS-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Integer32, enterprises FROM SNMPv2-SMI
|
||||
;
|
||||
|
||||
deHottis MODULE-IDENTITY
|
||||
LAST-UPDATED "200411040000Z" -- 04 Nov 2004, midnight
|
||||
ORGANIZATION "hottis.de"
|
||||
CONTACT-INFO "postal: Wolfgang Hottgenroth
|
||||
Eupenstr. 20
|
||||
45259 Essen
|
||||
Germany
|
||||
|
||||
email: woho@hottis.de
|
||||
"
|
||||
DESCRIPTION "My main MIB
|
||||
"
|
||||
::= { enterprises 9676 }
|
||||
|
||||
END
|
@ -1,354 +0,0 @@
|
||||
DE-HOTTIS-SMMAPD-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Counter32 FROM SNMPv2-SMI
|
||||
deHottis FROM DE-HOTTIS-MIB
|
||||
;
|
||||
|
||||
deHottisSmmapdMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "200411040000Z" -- 04 Nov 2004, midnight
|
||||
ORGANIZATION "hottis.de"
|
||||
CONTACT-INFO "postal: Wolfgang Hottgenroth
|
||||
Eupenstr. 20
|
||||
45259 Essen
|
||||
Germany
|
||||
|
||||
email: woho@hottis.de
|
||||
"
|
||||
DESCRIPTION "MIB for gathering statistics from smmapd
|
||||
"
|
||||
::= { deHottis 2 }
|
||||
|
||||
dhsSmmapdStats OBJECT IDENTIFIER ::= { deHottisSmmapdMIB 1 }
|
||||
|
||||
dhsNumber1 OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"number1"
|
||||
::= { dhsSmmapdStats 1 }
|
||||
|
||||
|
||||
DhsServerStat ::=
|
||||
SEQUENCE {
|
||||
dhsAccepted Counter32,
|
||||
dhsFailed Counter32,
|
||||
dhsRunningNwThreads Integer32,
|
||||
dhsNwThreads Counter32,
|
||||
dhsFailedNwThreads Counter32,
|
||||
dhsOKReturned Counter32,
|
||||
dhsTEMPReturned Counter32,
|
||||
dhsPERMReturned Counter32,
|
||||
dhsNOTFOUNDReturned Counter32,
|
||||
dhsIllegalInputFailure Counter32,
|
||||
dhsUnknownClassFailure Counter32,
|
||||
dhsTimeoutFailure Counter32,
|
||||
dhsNetStringFailure Counter32
|
||||
}
|
||||
|
||||
dhsServerStat OBJECT-TYPE
|
||||
SYNTAX DhsServerStat
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Statistics of the server"
|
||||
::= { dhsSmmapdStats 2 }
|
||||
|
||||
|
||||
dhsAccepted OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Connections accepted by the server"
|
||||
::= { dhsServerStat 1 }
|
||||
|
||||
dhsFailed OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Connections the server failed to accept"
|
||||
::= { dhsServerStat 2 }
|
||||
|
||||
dhsRunningNwThreads OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Running networker threads"
|
||||
::= { dhsServerStat 3 }
|
||||
|
||||
dhsNwThreads OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Networker threads"
|
||||
::= { dhsServerStat 4 }
|
||||
|
||||
dhsFailedNwThreads OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Networker threads failed to start"
|
||||
::= { dhsServerStat 5 }
|
||||
|
||||
dhsOKReturned OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"OK returned to sendmail"
|
||||
::= { dhsServerStat 6 }
|
||||
|
||||
dhsTEMPReturned OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"TEMP failure returned to sendmail"
|
||||
::= { dhsServerStat 7 }
|
||||
|
||||
dhsPERMReturned OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"PERM failure returned to sendmail"
|
||||
::= { dhsServerStat 8 }
|
||||
|
||||
dhsNOTFOUNDReturned OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"NOTFOUND returned to sendmail"
|
||||
::= { dhsServerStat 9 }
|
||||
|
||||
dhsIllegalInputFailure OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Class not found (PERM) returned to sendmail"
|
||||
::= { dhsServerStat 10 }
|
||||
|
||||
dhsUnknownClassFailure OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Class not found (PERM) returned to sendmail"
|
||||
::= { dhsServerStat 11 }
|
||||
|
||||
dhsTimeoutFailure OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Timeout failure returned to sendmail"
|
||||
::= { dhsServerStat 12 }
|
||||
|
||||
dhsNetStringFailure OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"NetString (NOK) returned to sendmail"
|
||||
::= { dhsServerStat 13 }
|
||||
|
||||
|
||||
DhsVerifierStat ::=
|
||||
SEQUENCE {
|
||||
dhsVCacheEntries Integer32,
|
||||
dhsVRunningWorkerThreads Integer32,
|
||||
dhsVWorkerThreads Counter32,
|
||||
dhsVFailedWorkerThreads Counter32,
|
||||
dhsVTimedOutWorkerThreads Counter32,
|
||||
dhsVRunningCheckerThreads Integer32,
|
||||
dhsVCheckerThreads Counter32,
|
||||
dhsVFailedCheckerThreads Counter32,
|
||||
dhsVAnsweredFromCache Counter32,
|
||||
dhsVReturnedOK Counter32,
|
||||
dhsVReturnedNOK Counter32,
|
||||
dhsVReturnedTNOK Counter32
|
||||
}
|
||||
|
||||
dhsVerifierStat OBJECT-TYPE
|
||||
SYNTAX DhsVerifierStat
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Statistics of the verifier"
|
||||
::= { dhsSmmapdStats 3 }
|
||||
|
||||
|
||||
dhsVCacheEntries OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Entries in verifier cache"
|
||||
::= { dhsVerifierStat 1 }
|
||||
|
||||
dhsVRunningWorkerThreads OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Running verifier worker threads"
|
||||
::= { dhsVerifierStat 2 }
|
||||
|
||||
dhsVWorkerThreads OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"verifier worker threads"
|
||||
::= { dhsVerifierStat 3 }
|
||||
|
||||
dhsVFailedWorkerThreads OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"failed to start verifier worker threads"
|
||||
::= { dhsVerifierStat 4 }
|
||||
|
||||
dhsVTimedOutWorkerThreads OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"timed out verifier worker threads"
|
||||
::= { dhsVerifierStat 5 }
|
||||
|
||||
dhsVRunningCheckerThreads OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Running verifier checker threads"
|
||||
::= { dhsVerifierStat 6 }
|
||||
|
||||
dhsVCheckerThreads OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"verifier checker threads"
|
||||
::= { dhsVerifierStat 7 }
|
||||
|
||||
dhsVFailedCheckerThreads OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"failed to start verifier checker threads"
|
||||
::= { dhsVerifierStat 8 }
|
||||
|
||||
dhsVAnsweredFromCache OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"answers taken directly from cache"
|
||||
::= { dhsVerifierStat 9 }
|
||||
|
||||
dhsVReturnedOK OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"verifier returned OK"
|
||||
::= { dhsVerifierStat 10 }
|
||||
|
||||
dhsVReturnedNOK OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"verifier returned NOK"
|
||||
::= { dhsVerifierStat 11 }
|
||||
|
||||
dhsVReturnedTNOK OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"verifier returned TNOK"
|
||||
::= { dhsVerifierStat 12 }
|
||||
|
||||
|
||||
DhsCyrusStat ::=
|
||||
SEQUENCE {
|
||||
dhsCWorker Counter32,
|
||||
dhsCIllegalInput Counter32,
|
||||
dhsCDepotDNSFailure Counter32,
|
||||
dhsCReturnedOK Counter32,
|
||||
dhsCReturnedNOK Counter32,
|
||||
dhsCReturnedTNOK Counter32
|
||||
}
|
||||
|
||||
dhsCyrusStat OBJECT-TYPE
|
||||
SYNTAX DhsCyrusStat
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Statistics of the cyrus checker"
|
||||
::= { dhsSmmapdStats 4 }
|
||||
|
||||
|
||||
dhsCWorker OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"cyrus checkers"
|
||||
::= { dhsCyrusStat 1 }
|
||||
|
||||
dhsCIllegalInput OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"cyrus checkers with illegal input"
|
||||
::= { dhsCyrusStat 2 }
|
||||
|
||||
dhsCDepotDNSFailure OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"cyrus checkers with depot DNS failure"
|
||||
::= { dhsCyrusStat 3 }
|
||||
|
||||
dhsCReturnedOK OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"cyrus checkers returned OK"
|
||||
::= { dhsCyrusStat 4 }
|
||||
|
||||
dhsCReturnedNOK OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"cyrus checkers returned NOK"
|
||||
::= { dhsCyrusStat 5 }
|
||||
|
||||
dhsCReturnedTNOK OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"cyrus checkers returned TNOK"
|
||||
::= { dhsCyrusStat 6 }
|
||||
|
||||
|
||||
END
|
@ -1,2 +0,0 @@
|
||||
data_DATA = DE-HOTTIS-MIB.txt DE-HOTTIS-SMMAPD-MIB.txt
|
||||
EXTRA_DIST = DE-HOTTIS-MIB.txt DE-HOTTIS-SMMAPD-MIB.txt
|
@ -1,221 +0,0 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
LIB = @LIB@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
data_DATA = DE-HOTTIS-MIB.txt DE-HOTTIS-SMMAPD-MIB.txt
|
||||
EXTRA_DIST = DE-HOTTIS-MIB.txt DE-HOTTIS-SMMAPD-MIB.txt
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DATA = $(data_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu mib/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
install-dataDATA: $(data_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@list='$(data_DATA)'; for p in $$list; do \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(datadir)/$$p"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(datadir)/$$p; \
|
||||
else if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(datadir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(datadir)/$$p; \
|
||||
fi; fi; \
|
||||
done
|
||||
|
||||
uninstall-dataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(data_DATA)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(datadir)/$$p; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = mib
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu mib/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-dataDATA
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-dataDATA
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(DATA)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: uninstall-dataDATA install-dataDATA tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
5
smmapdfw/rateconn_worker/Makefile.am
Normal file
5
smmapdfw/rateconn_worker/Makefile.am
Normal file
@ -0,0 +1,5 @@
|
||||
lib_LTLIBRARIES = librateconn_worker.la
|
||||
librateconn_worker_la_SOURCES = rateconn_worker.c testplusplus.C rateconn.C
|
||||
librateconn_worker_la_LIBADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
|
||||
INCLUDES = -I../libsmmapdfw
|
492
smmapdfw/rateconn_worker/Makefile.in
Normal file
492
smmapdfw/rateconn_worker/Makefile.in
Normal file
@ -0,0 +1,492 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = rateconn_worker
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
librateconn_worker_la_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
am_librateconn_worker_la_OBJECTS = rateconn_worker.lo testplusplus.lo \
|
||||
rateconn.lo
|
||||
librateconn_worker_la_OBJECTS = $(am_librateconn_worker_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(librateconn_worker_la_SOURCES)
|
||||
DIST_SOURCES = $(librateconn_worker_la_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
lib_LTLIBRARIES = librateconn_worker.la
|
||||
librateconn_worker_la_SOURCES = rateconn_worker.c testplusplus.C rateconn.C
|
||||
librateconn_worker_la_LIBADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
INCLUDES = -I../libsmmapdfw
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .C .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu rateconn_worker/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu rateconn_worker/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
librateconn_worker.la: $(librateconn_worker_la_OBJECTS) $(librateconn_worker_la_DEPENDENCIES)
|
||||
$(CXXLINK) -rpath $(libdir) $(librateconn_worker_la_LDFLAGS) $(librateconn_worker_la_OBJECTS) $(librateconn_worker_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rateconn.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rateconn_worker.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testplusplus.Plo@am__quote@
|
||||
|
||||
.C.o:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.C.obj:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.C.lo:
|
||||
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
16
smmapdfw/rateconn_worker/Mutex.H
Normal file
16
smmapdfw/rateconn_worker/Mutex.H
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef _MUTEX_H_
|
||||
#define _MUTEX_H_
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
||||
class Mutex {
|
||||
public:
|
||||
Mutex(pthread_mutex_t *mutex) : m_mutex(mutex) { pthread_mutex_lock(m_mutex); };
|
||||
~Mutex() { pthread_mutex_unlock(m_mutex); }
|
||||
private:
|
||||
pthread_mutex_t *m_mutex;
|
||||
};
|
||||
|
||||
|
||||
#endif // _MUTEX_H_
|
80
smmapdfw/rateconn_worker/rateconn.C
Normal file
80
smmapdfw/rateconn_worker/rateconn.C
Normal file
@ -0,0 +1,80 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "rateconn.H"
|
||||
#include "Mutex.H"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
RateconnTable *rateconnTable = NULL;
|
||||
|
||||
extern "C" void rateconnInitWrapper(pthread_mutex_t *mutex, int numOfBuckets) throw () {
|
||||
rateconnTable = new RateconnTable(mutex, numOfBuckets);
|
||||
}
|
||||
|
||||
extern "C" void rateconnTurnWrapper() throw () {
|
||||
rateconnTable->turn();
|
||||
}
|
||||
|
||||
extern "C" int rateconnIncAndGetWrapper(const char* input) throw () {
|
||||
return rateconnTable->incAndGet(string(input));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
- a certain number of hashes, sitting on a kind of a chain
|
||||
- periodically the chain is moved a step forward, the last hash while be dropped
|
||||
off from the end of the chain and wiped out, a new one is create and put at the
|
||||
first position of the chain
|
||||
- new entries a put into the first one
|
||||
- all hashes are considered when calculating the number of events in a timespan
|
||||
-
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
RateconnTable::RateconnTable(pthread_mutex_t *mutex, int numOfBuckets)
|
||||
: m_numOfBuckets(numOfBuckets), m_mutex(mutex)
|
||||
{
|
||||
turn();
|
||||
}
|
||||
|
||||
void RateconnTable::turn() {
|
||||
Mutex m1(m_mutex); // rmc to lock the whole scope and to unlock it at its end
|
||||
|
||||
if (m_countersDeque.size() > m_numOfBuckets)
|
||||
m_countersDeque.pop_back();
|
||||
m_countersDeque.push_front(counterMap_t());
|
||||
}
|
||||
|
||||
void RateconnTable::printAll() {
|
||||
int t = 0;
|
||||
for (countersDeque_t::const_iterator i = m_countersDeque.begin(); i != m_countersDeque.end(); ++i, ++t) {
|
||||
for (counterMap_t::const_iterator j = i->begin(); j != i->end(); ++j) {
|
||||
cout << "table: " << t <<", key: " << j->first << ", value: " << j->second << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int RateconnTable::incAndGet(const string& input) {
|
||||
Mutex m1(m_mutex); // rmc to lock the whole scope and to unlock it at its end
|
||||
|
||||
counterMap_t& cm = m_countersDeque.front();
|
||||
if (cm.find(input) == 0)
|
||||
cm[input] = 0;
|
||||
cm[input]++;
|
||||
|
||||
int cnt = 0;
|
||||
for (countersDeque_t::iterator i = m_countersDeque.begin(); i != m_countersDeque.end(); ++i) {
|
||||
cnt += (*i)[input];
|
||||
}
|
||||
|
||||
printAll();
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
|
31
smmapdfw/rateconn_worker/rateconn.H
Normal file
31
smmapdfw/rateconn_worker/rateconn.H
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef _RATECONN_H_
|
||||
#define _RATECONN_H_
|
||||
|
||||
#include <map>
|
||||
#include <deque>
|
||||
#include <string>
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
typedef std::map<std::string, int> counterMap_t;
|
||||
typedef std::deque<counterMap_t> countersDeque_t;
|
||||
|
||||
|
||||
class RateconnTable {
|
||||
public:
|
||||
RateconnTable(pthread_mutex_t *mutex, int numOfBuckets);
|
||||
void turn();
|
||||
void printAll();
|
||||
int incAndGet(const std::string& input);
|
||||
// ~RateconnTable();
|
||||
|
||||
|
||||
private:
|
||||
int m_numOfBuckets;
|
||||
countersDeque_t m_countersDeque;
|
||||
pthread_mutex_t *m_mutex;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // _RATECONN_H_
|
191
smmapdfw/rateconn_worker/rateconn_worker.c
Normal file
191
smmapdfw/rateconn_worker/rateconn_worker.c
Normal file
@ -0,0 +1,191 @@
|
||||
/*
|
||||
Copyright (C) 2004-2009, Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
|
||||
smmapdfw is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
smmapdfw is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with smmapdfw. If not, write to the Free Software Foundation, 59
|
||||
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "containers_public.h"
|
||||
#include "smmapd.h"
|
||||
|
||||
#include "htmalloc.h"
|
||||
#include "htbuffer.h"
|
||||
#include "stats.h"
|
||||
|
||||
#include "rateconn_worker.h"
|
||||
|
||||
|
||||
|
||||
counterDef_t *rateconn_counterDefs = NULL;
|
||||
void rateconn_setupCounterList() {
|
||||
rateconn_counterDefs = addOneCounterDef(rateconn_counterDefs, SMM_TYPE_COUNTER, "RateConn: checker");
|
||||
rateconn_counterDefs = addOneCounterDef(rateconn_counterDefs, SMM_TYPE_COUNTER, "RateConn: illegal input");
|
||||
rateconn_counterDefs = addOneCounterDef(rateconn_counterDefs, SMM_TYPE_COUNTER, "RateConn: returned OK");
|
||||
rateconn_counterDefs = addOneCounterDef(rateconn_counterDefs, SMM_TYPE_COUNTER, "RateConn: returned NOK");
|
||||
rateconn_counterDefs = addOneCounterDef(rateconn_counterDefs, SMM_TYPE_COUNTER, "RateConn: returned TNOK");
|
||||
};
|
||||
|
||||
#define STAT_CNT_RATECONN_WORKER 0
|
||||
#define STAT_CNT_RATECONN_ILLEGAL_INPUT 1
|
||||
#define STAT_CNT_RATECONN_RETURNED_OK 2
|
||||
#define STAT_CNT_RATECONN_RETURNED_NOK 3
|
||||
#define STAT_CNT_RATECONN_RETURNED_TNOK 4
|
||||
|
||||
|
||||
struct rateconn_container_handle_s {
|
||||
cfgl_t *cfg;
|
||||
statCounter_t *statCounter;
|
||||
pthread_mutex_t tableMutex;
|
||||
pthread_t turner;
|
||||
int numOfBuckets;
|
||||
int turnPeriod;
|
||||
int threshold;
|
||||
};
|
||||
|
||||
typedef struct rateconn_container_handle_s rateconn_container_handle_t;
|
||||
|
||||
|
||||
|
||||
struct rateconn_work_handle_s {
|
||||
int id;
|
||||
rateconn_container_handle_t *cch;
|
||||
};
|
||||
|
||||
typedef struct rateconn_work_handle_s rateconn_work_handle_t;
|
||||
|
||||
|
||||
|
||||
int rateconn_init(cfgl_t *cfg, void **handle);
|
||||
int rateconn_destroy(void *handle);
|
||||
/* int rateconn_work_setup(void *handle, void **work_handle); */
|
||||
int rateconn_work(void *handle, void *work_handle, char *input, htbuffer_t *output);
|
||||
/* int rateconn_work_destroy(void *handle, void *work_handle); */
|
||||
|
||||
|
||||
class_descriptor_t rateconn_check = {
|
||||
"rateconn_check",
|
||||
&rateconn_init,
|
||||
&rateconn_destroy,
|
||||
NULL, /* &rateconn_work_setup, */
|
||||
&rateconn_work,
|
||||
NULL /* &rateconn_work_destroy */
|
||||
};
|
||||
|
||||
|
||||
static void *tableTurner(void *arg) {
|
||||
if (arg == NULL) {
|
||||
syslog(LOG_CRIT, "tableTurner: arg is NULL");
|
||||
return NULL;
|
||||
}
|
||||
rateconn_container_handle_t *cch = (rateconn_container_handle_t*) arg;
|
||||
|
||||
while (1) {
|
||||
syslog(LOG_DEBUG, "rateconn_worker: turning");
|
||||
rateconnTurnWrapper();
|
||||
sleep(cch->turnPeriod);
|
||||
}
|
||||
}
|
||||
|
||||
int rateconn_init(cfgl_t *cfg, void **handle) {
|
||||
rateconn_container_handle_t *cch;
|
||||
|
||||
cch = (rateconn_container_handle_t*) htmalloc(sizeof(rateconn_container_handle_t));
|
||||
cch->cfg = cfg;
|
||||
|
||||
cch->numOfBuckets = atoi(findcfglx(cch->cfg, "num_of_buckets", "12"));
|
||||
cch->turnPeriod = atoi(findcfglx(cch->cfg, "turn_period", "300"));
|
||||
cch->threshold = atoi(findcfglx(cch->cfg, "threshold", 10));
|
||||
|
||||
|
||||
rateconn_setupCounterList();
|
||||
cch->statCounter = initStatCounter("rateconn", rateconn_counterDefs);
|
||||
|
||||
|
||||
|
||||
pthread_mutex_init(&(cch->tableMutex), NULL);
|
||||
pthread_mutex_unlock(&(cch->tableMutex));
|
||||
|
||||
rateconnInitWrapper(&(cch->tableMutex), cch->numOfBuckets);
|
||||
|
||||
|
||||
int err = pthread_create(&(cch->turner), NULL, &tableTurner, cch);
|
||||
|
||||
*handle = cch;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rateconn_destroy(void *handle) {
|
||||
rateconn_container_handle_t *cch = (rateconn_container_handle_t*)handle;
|
||||
|
||||
free(cch);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int rateconn_work(void *handle, void *work_handle, char *input, htbuffer_t *output) {
|
||||
static const char *DEFAULT_ANSWER = "default answer";
|
||||
static const char *ILLEGAL_INPUT = "illegal input (must be 'auth_author')";
|
||||
static const char *GO_AHEAD = "go ahead";
|
||||
|
||||
static int log_id = 0;
|
||||
|
||||
rateconn_container_handle_t *cch = (rateconn_container_handle_t*) handle;
|
||||
int result = SMM_TEMP_NOK;
|
||||
char *auth_author, *response_text, *tmp_arg;
|
||||
|
||||
log_id++;
|
||||
|
||||
syslog(LOG_INFO, "rateconn_work: (%04x) going to check %s", log_id, input);
|
||||
|
||||
incStatCounter(cch->statCounter, STAT_CNT_RATECONN_WORKER);
|
||||
|
||||
|
||||
int cnt = rateconnIncAndGetWrapper(input);
|
||||
syslog(LOG_DEBUG, "rateconn_work: cnt=%d", cnt);
|
||||
|
||||
result = (cnt > cch->threshold) ? SMM_LOCAL_NOK : SMM_LOCAL_OK;
|
||||
|
||||
|
||||
switch (result) {
|
||||
case SMM_LOCAL_NOK:
|
||||
htbuffer_strcpy(output, "<NOK><REJECTED>");
|
||||
result = SMM_OK;
|
||||
incStatCounter(cch->statCounter, STAT_CNT_RATECONN_RETURNED_NOK);
|
||||
break;
|
||||
case SMM_LOCAL_OK:
|
||||
htbuffer_strcpy(output, "<OK><ACCEPTED>");
|
||||
result = SMM_OK;
|
||||
incStatCounter(cch->statCounter, STAT_CNT_RATECONN_RETURNED_OK);
|
||||
break;
|
||||
default:
|
||||
htbuffer_strcpy(output, "<TNOK><UNKNOWN FAILURE>");
|
||||
result = SMM_TEMP_NOK;
|
||||
incStatCounter(cch->statCounter, STAT_CNT_RATECONN_RETURNED_TNOK);
|
||||
}
|
||||
|
||||
syslog(LOG_DEBUG, "rateconn_work: (%04x) result %d, %s", log_id,
|
||||
result, output->buf);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
2
smmapdfw/rateconn_worker/rateconn_worker.h
Normal file
2
smmapdfw/rateconn_worker/rateconn_worker.h
Normal file
@ -0,0 +1,2 @@
|
||||
#define SMM_LOCAL_NOK 101
|
||||
#define SMM_LOCAL_OK 10
|
7
smmapdfw/rateconn_worker/testplusplus.C
Normal file
7
smmapdfw/rateconn_worker/testplusplus.C
Normal file
@ -0,0 +1,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern "C" void outputSomething() throw () {
|
||||
cout << " something " << endl;
|
||||
}
|
5
smmapdfw/recpverify_worker/Makefile.am
Normal file
5
smmapdfw/recpverify_worker/Makefile.am
Normal file
@ -0,0 +1,5 @@
|
||||
lib_LTLIBRARIES = librecpveri_worker.la
|
||||
librecpveri_worker_la_SOURCES = recpveri_worker.c
|
||||
librecpveri_worker_la_LIBADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
|
||||
INCLUDES = -I../libsmmapdfw
|
460
smmapdfw/recpverify_worker/Makefile.in
Normal file
460
smmapdfw/recpverify_worker/Makefile.in
Normal file
@ -0,0 +1,460 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = recpverify_worker
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
librecpveri_worker_la_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
am_librecpveri_worker_la_OBJECTS = recpveri_worker.lo
|
||||
librecpveri_worker_la_OBJECTS = $(am_librecpveri_worker_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(librecpveri_worker_la_SOURCES)
|
||||
DIST_SOURCES = $(librecpveri_worker_la_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
lib_LTLIBRARIES = librecpveri_worker.la
|
||||
librecpveri_worker_la_SOURCES = recpveri_worker.c
|
||||
librecpveri_worker_la_LIBADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
INCLUDES = -I../libsmmapdfw
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu recpverify_worker/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu recpverify_worker/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
librecpveri_worker.la: $(librecpveri_worker_la_OBJECTS) $(librecpveri_worker_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(librecpveri_worker_la_LDFLAGS) $(librecpveri_worker_la_OBJECTS) $(librecpveri_worker_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recpveri_worker.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
303
smmapdfw/recpverify_worker/recpveri_worker.c
Normal file
303
smmapdfw/recpverify_worker/recpveri_worker.c
Normal file
@ -0,0 +1,303 @@
|
||||
/*
|
||||
Copyright (C) 2004, Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
|
||||
smmapdfw is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
smmapdfw is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with smmapdfw. If not, write to the Free Software Foundation, 59
|
||||
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "containers_public.h"
|
||||
#include "smmapd.h"
|
||||
|
||||
#include "smtp.h"
|
||||
#include "htdns.h"
|
||||
#include "htmalloc.h"
|
||||
#include "htbuffer.h"
|
||||
#include "stats.h"
|
||||
|
||||
#define SMM_LOCAL_PERM_NOK 101
|
||||
#define SMM_LOCAL_TEMP_NOK 102
|
||||
#define SMM_LOCAL_OK 103
|
||||
|
||||
|
||||
counterDef_t *recpveri_counterDefs = NULL;
|
||||
void recpveri_setupCounterList() {
|
||||
recpveri_counterDefs = addOneCounterDef(recpveri_counterDefs, SMM_TYPE_COUNTER, "RecpVeri: checker");
|
||||
recpveri_counterDefs = addOneCounterDef(recpveri_counterDefs, SMM_TYPE_COUNTER, "RecpVeri: illegal input");
|
||||
recpveri_counterDefs = addOneCounterDef(recpveri_counterDefs, SMM_TYPE_COUNTER, "RecpVeri: dns failure");
|
||||
recpveri_counterDefs = addOneCounterDef(recpveri_counterDefs, SMM_TYPE_COUNTER, "RecpVeri: returned OK");
|
||||
recpveri_counterDefs = addOneCounterDef(recpveri_counterDefs, SMM_TYPE_COUNTER, "RecpVeri: returned NOK");
|
||||
recpveri_counterDefs = addOneCounterDef(recpveri_counterDefs, SMM_TYPE_COUNTER, "RecpVeri: returned TNOK");
|
||||
};
|
||||
|
||||
#define STAT_CNT_RECPVERI_WORKER 0
|
||||
#define STAT_CNT_RECPVERI_ILLEGAL_INPUT 1
|
||||
#define STAT_CNT_RECPVERI_DNS_FAILURE 2
|
||||
#define STAT_CNT_RECPVERI_RETURNED_OK 3
|
||||
#define STAT_CNT_RECPVERI_RETURNED_NOK 4
|
||||
#define STAT_CNT_RECPVERI_RETURNED_TNOK 5
|
||||
|
||||
|
||||
struct recpveri_container_handle_s {
|
||||
cfgl_t *cfg;
|
||||
statCounter_t *statCounter;
|
||||
int timeout;
|
||||
char *sender_address;
|
||||
char *ehlo_arg;
|
||||
int smtp_port;
|
||||
};
|
||||
|
||||
typedef struct recpveri_container_handle_s recpveri_container_handle_t;
|
||||
|
||||
|
||||
|
||||
struct recpveri_work_handle_s {
|
||||
int id;
|
||||
recpveri_container_handle_t *rvch;
|
||||
};
|
||||
|
||||
typedef struct recpveri_work_handle_s recpveri_work_handle_t;
|
||||
|
||||
|
||||
|
||||
int recpveri_init(cfgl_t *cfg, void **handle);
|
||||
int recpveri_destroy(void *handle);
|
||||
/* int recpveri_work_setup(void *handle, void **work_handle); */
|
||||
int recpveri_work(void *handle, void *work_handle, char *input, htbuffer_t *output);
|
||||
/* int recpveri_work_destroy(void *handle, void *work_handle); */
|
||||
|
||||
|
||||
class_descriptor_t recpvericheck = {
|
||||
"recpvericheck",
|
||||
&recpveri_init,
|
||||
&recpveri_destroy,
|
||||
NULL, /* &recpveri_work_setup, */
|
||||
&recpveri_work,
|
||||
NULL /* &recpveri_work_destroy */
|
||||
};
|
||||
|
||||
|
||||
int recpveri_init(cfgl_t *cfg, void **handle) {
|
||||
recpveri_container_handle_t *rvch;
|
||||
|
||||
rvch = (recpveri_container_handle_t*) htmalloc(sizeof(recpveri_container_handle_t));
|
||||
rvch->cfg = cfg;
|
||||
|
||||
rvch->timeout = atoi(findcfglx(rvch->cfg, "timeout", "5"));
|
||||
rvch->sender_address = findcfglx(rvch->cfg, "sender_address", "<>");
|
||||
rvch->ehlo_arg = findcfglx(rvch->cfg, "ehlo_arg", "local");
|
||||
rvch->smtp_port = atoi(findcfglx(rvch->cfg, "smtp_port", "25"));
|
||||
|
||||
recpveri_setupCounterList();
|
||||
rvch->statCounter = initStatCounter("recpveri", recpveri_counterDefs);
|
||||
|
||||
*handle = rvch;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int recpveri_destroy(void *handle) {
|
||||
recpveri_container_handle_t *rvch = (recpveri_container_handle_t*)handle;
|
||||
|
||||
free(rvch);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int recpveri_work(void *handle, void *work_handle, char *input, htbuffer_t *output) {
|
||||
static const char *DEFAULT_ANSWER = "default answer";
|
||||
static const char *ILLEGAL_INPUT = "illegal input (must be 'mailaddress mailserver')";
|
||||
static const char *UNEXPECTED_ERROR = "unexpected error in smtp dialog";
|
||||
static const char *TIMEOUT_ERROR = "timeout on smtp dialog";
|
||||
static const char *GO_AHEAD = "go ahead";
|
||||
static const char *DNS_ERROR = "mailserver could not be found in dns";
|
||||
|
||||
static int log_id = 0;
|
||||
|
||||
recpveri_container_handle_t *rvch = (recpveri_container_handle_t*) handle;
|
||||
int result = SMM_TEMP_NOK;
|
||||
char *mailaddress, *mailserver, *response_text, *tmp_arg;
|
||||
|
||||
smtp_t *smtp;
|
||||
a_rdata_t **a_rdata;
|
||||
int ip_address, done=0, err;
|
||||
|
||||
enum {
|
||||
CONNECT, EHLO, MAILFROM, RCPTTO, RSET, QUIT, END
|
||||
} state = CONNECT;
|
||||
|
||||
|
||||
log_id++;
|
||||
|
||||
syslog(LOG_DEBUG, "recpveri_work: (%04x) going to check %s", log_id, input);
|
||||
|
||||
incStatCounter(rvch->statCounter, STAT_CNT_RECPVERI_WORKER);
|
||||
|
||||
mailaddress = input;
|
||||
if (NULL == (mailserver = strchr(mailaddress, ' '))) {
|
||||
// snprintf(output, ANSWER_BUFSIZE, ILLEGAL_INPUT);
|
||||
htbuffer_strcpy(output, ILLEGAL_INPUT);
|
||||
incStatCounter(rvch->statCounter, STAT_CNT_RECPVERI_ILLEGAL_INPUT);
|
||||
return SMM_PERM_NOK;
|
||||
}
|
||||
|
||||
*mailserver = '\0';
|
||||
mailserver++;
|
||||
|
||||
|
||||
a_rdata = get_a_rrs(mailserver);
|
||||
if (NULL == a_rdata) {
|
||||
syslog(LOG_DEBUG, "recpveri_work: (%04x) mailserver %s could not be found in dns",
|
||||
log_id, mailserver);
|
||||
// snprintf(output, ANSWER_BUFSIZE, DEPOT_DNS_ERROR);
|
||||
htbuffer_strcpy(output, DNS_ERROR);
|
||||
incStatCounter(rvch->statCounter, STAT_CNT_RECPVERI_DNS_FAILURE);
|
||||
return SMM_TEMP_NOK;
|
||||
}
|
||||
|
||||
ip_address = (*a_rdata)->address;
|
||||
free_rrs((void**)a_rdata);
|
||||
|
||||
|
||||
syslog(LOG_DEBUG, "recpveri_work: (%04x) mailaddress %s, mailserver %s", log_id,
|
||||
mailaddress, mailserver);
|
||||
|
||||
|
||||
smtp = smtp_init(ip_address, rvch->smtp_port, rvch->timeout);
|
||||
|
||||
while ((END != state) && (0 == done)) {
|
||||
syslog(LOG_DEBUG, "recpveri_work: (%04x) smtp dialog state %d", log_id, state);
|
||||
switch(state) {
|
||||
case CONNECT:
|
||||
err = smtp_connect(smtp);
|
||||
break;
|
||||
case EHLO:
|
||||
err = smtp_ehlo(smtp, rvch->ehlo_arg);
|
||||
break;
|
||||
case MAILFROM:
|
||||
err = smtp_mailfrom(smtp, rvch->sender_address);
|
||||
break;
|
||||
case RCPTTO:
|
||||
tmp_arg = (char*) htmalloc(sizeof(char) * (strlen(mailaddress)+5));
|
||||
*tmp_arg = '\0';
|
||||
strcat(tmp_arg, "<");
|
||||
strcat(tmp_arg, mailaddress);
|
||||
strcat(tmp_arg, ">");
|
||||
err = smtp_rcptto(smtp, tmp_arg);
|
||||
free(tmp_arg);
|
||||
break;
|
||||
case RSET:
|
||||
err = smtp_rset(smtp);
|
||||
break;
|
||||
case QUIT:
|
||||
err = smtp_quit(smtp);
|
||||
break;
|
||||
}
|
||||
|
||||
state++;
|
||||
|
||||
switch(err) {
|
||||
case SMTP_TIMEOUT:
|
||||
syslog(LOG_DEBUG, "recpveri_work: (%04x) timeout in smtp dialog", log_id);
|
||||
result = SMM_LOCAL_TEMP_NOK;
|
||||
response_text = (char*)TIMEOUT_ERROR;
|
||||
done = 1;
|
||||
break;
|
||||
case 0:
|
||||
/* evaluate smtp_response, return or continue */
|
||||
err = smtp_response(smtp, &response_text);
|
||||
if (-1 == err) {
|
||||
syslog(LOG_DEBUG, "recpveri_work: (%04x) response could not be parsed", log_id);
|
||||
result = SMM_LOCAL_TEMP_NOK;
|
||||
response_text = (char*)UNEXPECTED_ERROR;
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
syslog(LOG_DEBUG, "recpveri_work: (%04x) response: %d, %s", log_id,
|
||||
err, response_text);
|
||||
switch(err/100) {
|
||||
case 4:
|
||||
result = SMM_LOCAL_TEMP_NOK;
|
||||
done = 1;
|
||||
break;
|
||||
case 5:
|
||||
result = SMM_LOCAL_PERM_NOK;
|
||||
done = 1;
|
||||
break;
|
||||
case 2:
|
||||
if (END == state) {
|
||||
result = SMM_LOCAL_OK;
|
||||
response_text = (char*)GO_AHEAD;
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
syslog(LOG_DEBUG, "recpveri_work: (%04x) unexpected error in smtp dialog", log_id);
|
||||
result = SMM_LOCAL_TEMP_NOK;
|
||||
response_text = (char*)UNEXPECTED_ERROR;
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
smtp_close(smtp);
|
||||
|
||||
|
||||
switch (result) {
|
||||
case SMM_LOCAL_TEMP_NOK:
|
||||
htbuffer_strcat(output, "<TNOK><");
|
||||
htbuffer_strcat(output, response_text);
|
||||
htbuffer_strcat(output, ">");
|
||||
//snprintf(output, ANSWER_BUFSIZE, "<TNOK><%s>", response_text);
|
||||
result = SMM_OK;
|
||||
incStatCounter(rvch->statCounter, STAT_CNT_RECPVERI_RETURNED_TNOK);
|
||||
break;
|
||||
case SMM_LOCAL_PERM_NOK:
|
||||
htbuffer_strcat(output, "<NOK><");
|
||||
htbuffer_strcat(output, response_text);
|
||||
htbuffer_strcat(output, ">");
|
||||
//snprintf(output, ANSWER_BUFSIZE, "<NOK><%s>", response_text);
|
||||
result = SMM_OK;
|
||||
incStatCounter(rvch->statCounter, STAT_CNT_RECPVERI_RETURNED_NOK);
|
||||
break;
|
||||
case SMM_LOCAL_OK:
|
||||
htbuffer_strcat(output, "<OK><");
|
||||
htbuffer_strcat(output, response_text);
|
||||
htbuffer_strcat(output, ">");
|
||||
//snprintf(output, ANSWER_BUFSIZE, "<OK><%s>", response_text);
|
||||
result = SMM_OK;
|
||||
incStatCounter(rvch->statCounter, STAT_CNT_RECPVERI_RETURNED_OK);
|
||||
break;
|
||||
default:
|
||||
htbuffer_strcpy(output, response_text);
|
||||
//snprintf(output, ANSWER_BUFSIZE, response_text);
|
||||
break;
|
||||
}
|
||||
|
||||
smtp_destroy(smtp);
|
||||
|
||||
syslog(LOG_DEBUG, "recpveri_work: (%04x) result %d, %s", log_id,
|
||||
result, output->buf);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
noinst_HEADERS = containers.h snmp_subagent.h
|
||||
sysconf_DATA = smmapd.ini
|
||||
bin_PROGRAMS = smmapd
|
||||
bin_PROGRAMS = smmapd workertest
|
||||
smmapd_SOURCES = smmapd.c containers.c snmp_subagent.c
|
||||
smmapd_LDADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
workertest_SOURCES = workertest.c containers.c
|
||||
workertest_LDADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
|
||||
INCLUDES = -I../libsmmapdfw
|
||||
CPPFLAGS = -DDEFAULT_SMMAPD_INI=\"$(sysconfdir)/smmapd.ini\" @CPPFLAGS@
|
||||
AM_CPPFLAGS = -DDEFAULT_SMMAPD_INI=\"$(sysconfdir)/smmapd.ini\" @CPPFLAGS@
|
||||
|
||||
EXTRA_DIST = smmapd.ini
|
@ -1,6 +1,8 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -10,190 +12,292 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = smmapd$(EXEEXT) workertest$(EXEEXT)
|
||||
subdir = smmapd
|
||||
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_smmapd_OBJECTS = smmapd.$(OBJEXT) containers.$(OBJEXT) \
|
||||
snmp_subagent.$(OBJEXT)
|
||||
smmapd_OBJECTS = $(am_smmapd_OBJECTS)
|
||||
smmapd_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
am_workertest_OBJECTS = workertest.$(OBJEXT) containers.$(OBJEXT)
|
||||
workertest_OBJECTS = $(am_workertest_OBJECTS)
|
||||
workertest_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(smmapd_SOURCES) $(workertest_SOURCES)
|
||||
DIST_SOURCES = $(smmapd_SOURCES) $(workertest_SOURCES)
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
sysconfDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(sysconf_DATA)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
LIB = @LIB@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
noinst_HEADERS = containers.h snmp_subagent.h
|
||||
sysconf_DATA = smmapd.ini
|
||||
bin_PROGRAMS = smmapd
|
||||
smmapd_SOURCES = smmapd.c containers.c snmp_subagent.c
|
||||
smmapd_LDADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
|
||||
workertest_SOURCES = workertest.c containers.c
|
||||
workertest_LDADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
INCLUDES = -I../libsmmapdfw
|
||||
CPPFLAGS = -DDEFAULT_SMMAPD_INI=\"$(sysconfdir)/smmapd.ini\" @CPPFLAGS@
|
||||
|
||||
AM_CPPFLAGS = -DDEFAULT_SMMAPD_INI=\"$(sysconfdir)/smmapd.ini\" @CPPFLAGS@
|
||||
EXTRA_DIST = smmapd.ini
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
bin_PROGRAMS = smmapd$(EXEEXT)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
all: all-am
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
smmapd_OBJECTS = smmapd.$(OBJEXT) containers.$(OBJEXT) \
|
||||
snmp_subagent.$(OBJEXT)
|
||||
smmapd_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
smmapd_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DATA = $(sysconf_DATA)
|
||||
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/containers.P .deps/smmapd.P .deps/snmp_subagent.P
|
||||
SOURCES = $(smmapd_SOURCES)
|
||||
OBJECTS = $(smmapd_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .obj .s
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu smmapd/Makefile
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu smmapd/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu smmapd/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
# FIXME: We should only use cygpath when building on Windows,
|
||||
# and only if it is available.
|
||||
.c.obj:
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
smmapd$(EXEEXT): $(smmapd_OBJECTS) $(smmapd_DEPENDENCIES)
|
||||
@rm -f smmapd$(EXEEXT)
|
||||
$(LINK) $(smmapd_LDFLAGS) $(smmapd_OBJECTS) $(smmapd_LDADD) $(LIBS)
|
||||
workertest$(EXEEXT): $(workertest_OBJECTS) $(workertest_DEPENDENCIES)
|
||||
@rm -f workertest$(EXEEXT)
|
||||
$(LINK) $(workertest_LDFLAGS) $(workertest_OBJECTS) $(workertest_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/containers.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smmapd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snmp_subagent.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/workertest.Po@am__quote@
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@ -202,190 +306,195 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
smmapd$(EXEEXT): $(smmapd_OBJECTS) $(smmapd_DEPENDENCIES)
|
||||
@rm -f smmapd$(EXEEXT)
|
||||
$(LINK) $(smmapd_LDFLAGS) $(smmapd_OBJECTS) $(smmapd_LDADD) $(LIBS)
|
||||
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-sysconfDATA: $(sysconf_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
|
||||
test -z "$(sysconfdir)" || $(mkdir_p) "$(DESTDIR)$(sysconfdir)"
|
||||
@list='$(sysconf_DATA)'; for p in $$list; do \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p; \
|
||||
else if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p; \
|
||||
fi; fi; \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \
|
||||
$(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-sysconfDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(sysconf_DATA)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(sysconfdir)/$$p; \
|
||||
@list='$(sysconf_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(sysconfdir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = smmapd
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu smmapd/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-binPROGRAMS install-sysconfDATA
|
||||
all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-sysconfDATA
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir)
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS install-sysconfDATA
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
clean: clean-am
|
||||
pdf: pdf-am
|
||||
|
||||
distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
|
||||
distclean-tags distclean-depend distclean-generic \
|
||||
clean-am
|
||||
-rm -f libtool
|
||||
pdf-am:
|
||||
|
||||
distclean: distclean-am
|
||||
ps: ps-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
ps-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
|
||||
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
|
||||
clean-libtool maintainer-clean-libtool uninstall-sysconfDATA \
|
||||
install-sysconfDATA tags mostlyclean-tags distclean-tags clean-tags \
|
||||
maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
|
||||
clean-depend maintainer-clean-depend info-am info dvi-am dvi check \
|
||||
check-am installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
|
||||
uninstall-sysconfDATA
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic clean-libtool ctags distclean distclean-compile \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-binPROGRAMS install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip install-sysconfDATA installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS uninstall-info-am \
|
||||
uninstall-sysconfDATA
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "cfg.h"
|
||||
#include "smmapd.h"
|
||||
#include "htmalloc.h"
|
||||
#include "htbuffer.h"
|
||||
|
||||
|
||||
#define CFG_SECTION_GLOBAL "global"
|
||||
@ -51,6 +52,7 @@
|
||||
#define CFG_NAME_PLUGINS "plugins"
|
||||
#define CFG_PLUGINS_DELIMITER " "
|
||||
#define CFG_NAME_OBJ "obj"
|
||||
#define CFG_NAME "name"
|
||||
|
||||
extern cfg_t *cfg;
|
||||
|
||||
@ -85,6 +87,7 @@ int containers_destroy(container_handle_t *ch) {
|
||||
}
|
||||
wh2 = wh;
|
||||
wh = wh->next;
|
||||
syslog(LOG_DEBUG, "containers_destroy: free worker handle %p", wh2);
|
||||
free(wh2);
|
||||
}
|
||||
|
||||
@ -93,60 +96,63 @@ int containers_destroy(container_handle_t *ch) {
|
||||
}
|
||||
|
||||
|
||||
int containers_dispatcher(container_handle_t *ch, char *input, char *output) {
|
||||
int containers_dispatcher(container_handle_t *ch, char *input, htbuffer_t *output) {
|
||||
char *class;
|
||||
char *data;
|
||||
classes_t *classes;
|
||||
int result, err;
|
||||
worker_handle_t *wh, *wh_last, *wh2;
|
||||
|
||||
if (input == NULL) {
|
||||
syslog(LOG_ERR, "dispatcher: no input at all");
|
||||
return SMM_ILLEGAL_INPUT;
|
||||
}
|
||||
syslog(LOG_DEBUG, "dispatcher: input: %s", input);
|
||||
|
||||
data = strchr(input, ' ');
|
||||
if (NULL == data) {
|
||||
if (NULL == data || (strlen(data) < 1)) {
|
||||
syslog(LOG_ERR, "dispatcher: illegal input (%s)", input);
|
||||
return SMM_ILLEGAL_INPUT;
|
||||
}
|
||||
|
||||
data++; /* skip the blank */
|
||||
|
||||
*data = '\0'; /* terminate class */
|
||||
data++; /* skip the former blank, now null */
|
||||
class = input;
|
||||
class[strlen(class)-strlen(data)-1] = '\0';
|
||||
|
||||
syslog(LOG_DEBUG, "dispatcher: class: %s, data: %s", class, data);
|
||||
|
||||
for (classes = classes_root.next; classes != NULL; classes = classes->next) {
|
||||
if (0 == strcmp(class, classes->descr->name)) {
|
||||
syslog(LOG_DEBUG, "dispatcher: yes, we support it, it's id=%d", classes->id);
|
||||
for (wh = ch->worker_handle_root.next, wh_last = &ch->worker_handle_root, wh2 = NULL;
|
||||
wh != NULL;
|
||||
wh = wh->next) {
|
||||
wh_last = wh;
|
||||
if (wh->id == classes->id) {
|
||||
syslog(LOG_DEBUG, "dispatcher: we already have a worker handle");
|
||||
wh2 = wh;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (0 == strcmp(class, classes->alias)) {
|
||||
syslog(LOG_DEBUG, "dispatcher: yes, we support it, it's id=%d", classes->id);
|
||||
for (wh = ch->worker_handle_root.next, wh_last = &ch->worker_handle_root, wh2 = NULL;
|
||||
wh != NULL;
|
||||
wh = wh->next) {
|
||||
wh_last = wh;
|
||||
if (wh->id == classes->id) {
|
||||
syslog(LOG_DEBUG, "dispatcher: we already have a worker handle: %p", wh);
|
||||
wh2 = wh;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((NULL == wh_last->next) && (NULL == wh2)) {
|
||||
syslog(LOG_DEBUG, "dispatcher: we haven't one, we create one");
|
||||
wh2 = (worker_handle_t*)htmalloc(sizeof(worker_handle_t));
|
||||
wh2->id = classes->id;
|
||||
if (NULL != classes->descr->work_setup_function) {
|
||||
err = (*classes->descr->work_setup_function)(classes->handle, &(wh2->handle));
|
||||
} else {
|
||||
wh2->handle = NULL;
|
||||
}
|
||||
wh2->next = NULL;
|
||||
wh_last->next = wh2;
|
||||
}
|
||||
if ((NULL == wh_last->next) && (NULL == wh2)) {
|
||||
wh2 = (worker_handle_t*)htmalloc(sizeof(worker_handle_t));
|
||||
syslog(LOG_DEBUG, "dispatcher: we haven't one, we create one: %p", wh2);
|
||||
wh2->id = classes->id;
|
||||
if (NULL != classes->descr->work_setup_function) {
|
||||
err = (*classes->descr->work_setup_function)(classes->handle, &(wh2->handle));
|
||||
} else {
|
||||
wh2->handle = NULL;
|
||||
}
|
||||
wh2->next = NULL;
|
||||
wh_last->next = wh2;
|
||||
}
|
||||
|
||||
|
||||
result = (*classes->descr->work_function)(classes->handle, wh2->handle, data, output);
|
||||
syslog(LOG_DEBUG, "dispatcher: worker output: (%d, %s)", result, output);
|
||||
break;
|
||||
}
|
||||
result = (*classes->descr->work_function)(classes->handle, wh2->handle, data, output);
|
||||
syslog(LOG_DEBUG, "dispatcher: worker output: (%d, %s)", result, output->buf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (NULL == classes) {
|
||||
@ -157,15 +163,15 @@ int containers_dispatcher(container_handle_t *ch, char *input, char *output) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static int register_class(int id, class_descriptor_t *class_descriptor) {
|
||||
static int register_class(int id, void *dl_handle, class_descriptor_t *class_descriptor, char *alias) {
|
||||
int result = 0;
|
||||
cfgl_t *c;
|
||||
classes_t *w;
|
||||
|
||||
|
||||
syslog(LOG_DEBUG, "register_class: registering class %s", class_descriptor->name);
|
||||
syslog(LOG_DEBUG, "register_class: registering class %s, alias %s", class_descriptor->name, alias);
|
||||
|
||||
c = findcfgsection(cfg, class_descriptor->name);
|
||||
c = findcfgsection(cfg, alias);
|
||||
if (NULL == c) {
|
||||
syslog(LOG_ERR, "register_class: no configuration section for this plugin available");
|
||||
return -1;
|
||||
@ -189,7 +195,9 @@ static int register_class(int id, class_descriptor_t *class_descriptor) {
|
||||
}
|
||||
|
||||
w->descr = class_descriptor;
|
||||
w->alias = alias;
|
||||
w->id = id;
|
||||
w->dl_handle = dl_handle;
|
||||
w->next = NULL;
|
||||
|
||||
classes_head->next = w;
|
||||
@ -206,7 +214,7 @@ static int unregister_class(classes_t *class) {
|
||||
|
||||
if (NULL != class->descr->destroy_function) {
|
||||
syslog(LOG_DEBUG, "unregister_class: destroying class");
|
||||
result = (*class->descr->destroy_function)(&class->handle);
|
||||
result = (*class->descr->destroy_function)(class->handle);
|
||||
syslog(LOG_ERR, "unregister_class: destroy function returns %d", result);
|
||||
}
|
||||
|
||||
@ -222,17 +230,24 @@ int unregister_all() {
|
||||
classes = classes->next;
|
||||
|
||||
unregister_class(cf);
|
||||
|
||||
if (NULL != cf->dl_handle)
|
||||
dlclose(cf->dl_handle);
|
||||
|
||||
free(cf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int register_all() {
|
||||
void *dl_handle;
|
||||
class_descriptor_t * class_descriptor;
|
||||
char *cfg_plugin_dir, *cfg_plugins, *cfg_plugin, *cfg_obj;
|
||||
char *obj_name;
|
||||
return register_worker(NULL);
|
||||
}
|
||||
|
||||
int register_worker(char *worker_name) {
|
||||
void *dl_handle = NULL;
|
||||
class_descriptor_t * class_descriptor = NULL;
|
||||
char *cfg_plugin_dir, *cfg_plugins, *cfg_plugin, *cfg_obj, *cfg_plugin_name;
|
||||
char *obj_name = NULL;
|
||||
const char *err_msg;
|
||||
int err;
|
||||
int id = 0;
|
||||
@ -249,6 +264,9 @@ int register_all() {
|
||||
cfg_plugins = NULL; /* this is for subsequence calls of strtok */
|
||||
dlerror(); /* this is to clear old errors */
|
||||
|
||||
if ((NULL != worker_name) && strcmp(cfg_plugin, worker_name))
|
||||
continue;
|
||||
|
||||
cfg_obj = findcfg(cfg, cfg_plugin, CFG_NAME_OBJ);
|
||||
if (NULL == cfg_obj) {
|
||||
syslog(LOG_ERR, "register_all: obj for plugin %s not configured", cfg_plugin);
|
||||
@ -270,14 +288,16 @@ int register_all() {
|
||||
return -4;
|
||||
}
|
||||
free(obj_name);
|
||||
|
||||
class_descriptor = (class_descriptor_t*) dlsym(dl_handle, cfg_plugin);
|
||||
|
||||
cfg_plugin_name = findcfg(cfg, cfg_plugin, CFG_NAME);
|
||||
cfg_plugin_name = cfg_plugin_name ? cfg_plugin_name : cfg_plugin;
|
||||
class_descriptor = (class_descriptor_t*) dlsym(dl_handle, cfg_plugin_name);
|
||||
if (NULL != (err_msg = dlerror())) {
|
||||
syslog(LOG_ERR, "register_all: plugin %s not found, error %s", cfg_plugin, err_msg);
|
||||
return -5;
|
||||
}
|
||||
|
||||
err = register_class(id++, class_descriptor);
|
||||
err = register_class(id++, dl_handle, class_descriptor, cfg_plugin);
|
||||
if (0 != err) {
|
||||
syslog(LOG_ERR, "register_all: unable to initialize plugin %s, error %d", cfg_plugin, err);
|
||||
return -6;
|
||||
|
@ -25,11 +25,14 @@
|
||||
|
||||
#define _SMMAPD_
|
||||
#include "containers_public.h"
|
||||
#include "htbuffer.h"
|
||||
|
||||
struct classes_s {
|
||||
class_descriptor_t *descr;
|
||||
char *alias;
|
||||
int id;
|
||||
void *handle;
|
||||
void *dl_handle;
|
||||
struct classes_s *next;
|
||||
};
|
||||
|
||||
@ -51,7 +54,7 @@ typedef struct container_handle_s container_handle_t;
|
||||
|
||||
int containers_setup(container_handle_t **ch);
|
||||
int containers_destroy(container_handle_t *ch);
|
||||
int containers_dispatcher(container_handle_t *ch, char *input, char *output);
|
||||
int containers_dispatcher(container_handle_t *ch, char *input, htbuffer_t *output);
|
||||
|
||||
int register_all();
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
@ -63,6 +64,7 @@
|
||||
#include "cfg.h"
|
||||
#include "safe_write.h"
|
||||
#include "htmalloc.h"
|
||||
#include "htbuffer.h"
|
||||
|
||||
#define _SMMAPD_C_
|
||||
#include "smmapd.h"
|
||||
@ -72,6 +74,7 @@
|
||||
|
||||
#include "sunos_comp.h"
|
||||
|
||||
#include "dvl.h"
|
||||
|
||||
#define CFG_SECTION_GLOBAL "global"
|
||||
#define CFG_NAME_ADDRESS "address"
|
||||
@ -84,6 +87,36 @@
|
||||
#define RELEASE_ID "0.9"
|
||||
|
||||
|
||||
|
||||
counterDef_t *server_counterDefs;
|
||||
void server_setupCounterList() {
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: accepted");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: failed");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_GAUGE, "Server: running networker threads");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: networker threads");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: failed to start, networker threads");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: returned OK");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: returned TEMP_NOK");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: returned PERM_NOK");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: returned NOT_FOUND_NOK");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: returned illegal input");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: returned unknown class");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: returned TIMEOUT_NOK");
|
||||
server_counterDefs = addOneCounterDef(server_counterDefs, SMM_TYPE_COUNTER, "Server: returned netstring unparsable");
|
||||
};
|
||||
|
||||
#define STAT_CNT_ACCEPTED 0
|
||||
#define STAT_CNT_FAILED 1
|
||||
#define STAT_CNT_NETWORKER_R_THREADS 2
|
||||
#define STAT_CNT_NETWORKER_THREADS 3
|
||||
#define STAT_CNT_NETWORKER_THREADS_FAILED 4
|
||||
#define STAT_CNT_OFFSET 5 - 1
|
||||
|
||||
statCounter_t *globalStatCounter;
|
||||
|
||||
|
||||
|
||||
|
||||
struct networkerThread_s {
|
||||
int result;
|
||||
struct sockaddr_in clientAddr;
|
||||
@ -94,24 +127,25 @@ struct networkerThread_s {
|
||||
|
||||
typedef struct networkerThread_s networkerThread_t;
|
||||
|
||||
int terminating = 0;
|
||||
|
||||
ht_queue_t terminated_networker_queue;
|
||||
pthread_t cleanerThread;
|
||||
|
||||
#if ENABLE_STATS==1
|
||||
pthread_t statsThread;
|
||||
#endif
|
||||
|
||||
#if ENABLE_NETSNMP==1
|
||||
pthread_t snmpThread;
|
||||
#endif
|
||||
|
||||
count_t thread_counter;
|
||||
|
||||
cfg_t *cfg;
|
||||
|
||||
int netstring_disabled = 0;
|
||||
int force_netstring_disabled = 0;
|
||||
|
||||
|
||||
#if ENABLE_STATS==1
|
||||
void * statser(void * arg) {
|
||||
int stdout_nice = atoi(findcfgx(cfg, "stats", "stdout_nice", "0"));
|
||||
int syslog_nice = atoi(findcfgx(cfg, "stats", "syslog_nice", "0"));
|
||||
@ -122,7 +156,6 @@ void * statser(void * arg) {
|
||||
sleep(period);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLE_NETSNMP==1
|
||||
void * snmper(void * arg) {
|
||||
@ -134,14 +167,21 @@ void * cleaner(void * arg) {
|
||||
networkerThread_t *t;
|
||||
int joinRes;
|
||||
|
||||
pthread_detach(pthread_self());
|
||||
|
||||
while (1) {
|
||||
syslog(LOG_DEBUG, "cleaner: Waiting for terminated networker, running threads: %d",
|
||||
count_get(&thread_counter));
|
||||
t = (networkerThread_t*) queue_get_wait(&terminated_networker_queue);
|
||||
/* syslog(LOG_DEBUG, "cleaner: Waiting for terminated networker, running threads: %d", */
|
||||
/* count_get(&thread_counter)); */
|
||||
|
||||
if ((terminating == 1) && (count_get(&thread_counter) == 0)) {
|
||||
/* syslog(LOG_DEBUG, "cleaner: termination requested"); */
|
||||
break;
|
||||
}
|
||||
|
||||
t = (networkerThread_t*) queue_get_wait_w_timeout(&terminated_networker_queue, 5);
|
||||
if (t == NULL)
|
||||
continue;
|
||||
|
||||
count_dec(&thread_counter);
|
||||
decStatCounter(STAT_CNT_NETWORKER_R_THREADS);
|
||||
decStatCounter(globalStatCounter, STAT_CNT_NETWORKER_R_THREADS);
|
||||
|
||||
syslog(LOG_DEBUG, "cleaner: Networker serving %d (address: %s, port: %d), result %d",
|
||||
t->clientSock, inet_ntoa(t->clientAddr.sin_addr),
|
||||
@ -153,6 +193,8 @@ void * cleaner(void * arg) {
|
||||
free(t);
|
||||
t = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -160,10 +202,15 @@ void * cleaner(void * arg) {
|
||||
|
||||
#define OUTPUT_BUFSIZE ANSWER_BUFSIZE+25 /* a bit more than answer for the result text */
|
||||
void * networker(void * arg) {
|
||||
if (arg == NULL) {
|
||||
syslog(LOG_CRIT, "networker thread started with argument NULL, thread dies");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char buffer[BUFSIZE+1];
|
||||
char *input;
|
||||
char answer[ANSWER_BUFSIZE+1];
|
||||
// char answer[ANSWER_BUFSIZE+1];
|
||||
htbuffer_t *answer;
|
||||
char output[OUTPUT_BUFSIZE+1];
|
||||
const char *answer_ptr;
|
||||
const char *result_text;
|
||||
@ -174,14 +221,17 @@ void * networker(void * arg) {
|
||||
|
||||
|
||||
networkerThread_t * thread = (networkerThread_t *) arg;
|
||||
|
||||
thread->pthread = pthread_self();
|
||||
|
||||
incStatCounter(STAT_CNT_NETWORKER_THREADS);
|
||||
incStatCounter(globalStatCounter, STAT_CNT_NETWORKER_THREADS);
|
||||
|
||||
syslog(LOG_DEBUG, "networker: serving %d (address: %s, port: %d) started",
|
||||
thread->clientSock, inet_ntoa(thread->clientAddr.sin_addr),
|
||||
ntohs(thread->clientAddr.sin_port));
|
||||
|
||||
answer = htbuffer_init(ANSWER_BUFSIZE);
|
||||
|
||||
containers_setup(&container_handle);
|
||||
syslog(LOG_DEBUG, "networker: got a container handle");
|
||||
|
||||
@ -198,17 +248,23 @@ void * networker(void * arg) {
|
||||
input = buffer;
|
||||
} else {
|
||||
len = strtol(buffer, &input, 10);
|
||||
if ((0 == len) && (buffer == input)) {
|
||||
syslog(LOG_DEBUG, "networker: netstring unparsable, no length found: %s", buffer);
|
||||
if (input == NULL) {
|
||||
syslog(LOG_ERR, "networker:netstring unparsable, nothing remains after length");
|
||||
dispatcher_result = SMM_NETSTRING_UNPARSABLE;
|
||||
} else if ((0 == len) && (buffer == input)) {
|
||||
syslog(LOG_ERR, "networker: netstring unparsable, no length found: %s", dvls(buffer));
|
||||
dispatcher_result = SMM_NETSTRING_UNPARSABLE;
|
||||
} else if (*input++ != ':') {
|
||||
syslog(LOG_DEBUG, "networker: netstring unparsable, no colon found: %s", buffer);
|
||||
syslog(LOG_ERR, "networker: netstring unparsable, no colon found: %s", dvls(buffer));
|
||||
dispatcher_result = SMM_NETSTRING_UNPARSABLE;
|
||||
} else if (input == NULL) {
|
||||
syslog(LOG_ERR, "networker:netstring unparsable, nothing remains after colon");
|
||||
dispatcher_result = SMM_NETSTRING_UNPARSABLE;
|
||||
} else if (strlen(input)-1 != len) {
|
||||
syslog(LOG_DEBUG, "networker: netstring unparsable, length does not match: %s", buffer);
|
||||
syslog(LOG_ERR, "networker: netstring unparsable, length does not match: %s", dvls(buffer));
|
||||
dispatcher_result = SMM_NETSTRING_UNPARSABLE;
|
||||
} else if (input[strlen(input)-1] != ',') {
|
||||
syslog(LOG_DEBUG, "networker: netstring unparsable, no terminating comma: %s", buffer);
|
||||
syslog(LOG_ERR, "networker: netstring unparsable, no terminating comma: %s", dvls(buffer));
|
||||
dispatcher_result = SMM_NETSTRING_UNPARSABLE;
|
||||
} else {
|
||||
input[strlen(input)-1] = '\0'; /* strip off the comma */
|
||||
@ -216,12 +272,12 @@ void * networker(void * arg) {
|
||||
}
|
||||
|
||||
if (!dispatcher_result) {
|
||||
answer[0] = '\0';
|
||||
htbuffer_clear(answer);
|
||||
dispatcher_result = containers_dispatcher(container_handle, input, answer);
|
||||
syslog(LOG_DEBUG, "networker: dispatcher result: %d, answer: %s", dispatcher_result, answer);
|
||||
syslog(LOG_DEBUG, "networker: dispatcher result: %d, answer: %s", dispatcher_result, dvls(answer->buf));
|
||||
}
|
||||
|
||||
incStatCounter(dispatcher_result + STAT_CNT_OFFSET);
|
||||
incStatCounter(globalStatCounter, dispatcher_result + STAT_CNT_OFFSET);
|
||||
|
||||
result_text = (dispatcher_result > SMM_MAX_NUM) ?
|
||||
T_SMM_RESULTS[0] :
|
||||
@ -232,7 +288,7 @@ void * networker(void * arg) {
|
||||
T_SMM_RESULT_INFOS[dispatcher_result];
|
||||
|
||||
if (NULL == answer_ptr)
|
||||
answer_ptr = answer;
|
||||
answer_ptr = answer->buf;
|
||||
|
||||
if (netstring_disabled) {
|
||||
snprintf(output, OUTPUT_BUFSIZE, "%s\n", answer_ptr);
|
||||
@ -252,6 +308,7 @@ void * networker(void * arg) {
|
||||
containers_destroy(container_handle);
|
||||
syslog(LOG_DEBUG, "networker: destroyed the container handle");
|
||||
|
||||
htbuffer_free(answer);
|
||||
|
||||
thread->result = 1;
|
||||
queue_put(&terminated_networker_queue, thread);
|
||||
@ -273,7 +330,8 @@ int server() {
|
||||
|
||||
char *cfg_address, *cfg_port;
|
||||
|
||||
netstring_disabled = atoi(findcfgx(cfg, CFG_SECTION_GLOBAL, CFG_NETSTRING_DISABLED, "0"));
|
||||
|
||||
netstring_disabled = atoi(findcfgx(cfg, CFG_SECTION_GLOBAL, CFG_NETSTRING_DISABLED, "0")) || force_netstring_disabled;
|
||||
|
||||
|
||||
serverSock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
@ -315,24 +373,38 @@ int server() {
|
||||
|
||||
count_init(&thread_counter);
|
||||
queue_init(&terminated_networker_queue);
|
||||
pthread_create(&cleanerThread, NULL, &cleaner, NULL);
|
||||
int cleanerStartRc = pthread_create(&cleanerThread, NULL, &cleaner, NULL);
|
||||
if (0 != cleanerStartRc) {
|
||||
syslog(LOG_ERR, "server: failure when starting cleaner thread: %d",
|
||||
cleanerStartRc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if ENABLE_STATS==1
|
||||
enableStats = atoi(findcfgx(cfg, "global", "enable_stats", "0"));
|
||||
if (enableStats) {
|
||||
syslog(LOG_INFO, "server: starting stats thread");
|
||||
pthread_create(&statsThread, NULL, &statser, NULL);
|
||||
int staterStartRc = pthread_create(&statsThread, NULL, &statser, NULL);
|
||||
if (0 != cleanerStartRc) {
|
||||
syslog(LOG_ERR, "server: failure when starting stater thread: %d",
|
||||
staterStartRc);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#endif /* ENABLE_STATS */
|
||||
|
||||
#if ENABLE_NETSNMP==1
|
||||
enableSnmp = atoi(findcfgx(cfg, "global", "enable_snmp", "0"));
|
||||
if (enableSnmp) {
|
||||
syslog(LOG_INFO, "server: starting snmp subagent thread");
|
||||
pthread_create(&snmpThread, NULL, &snmper, NULL);
|
||||
int snmperStartRc = pthread_create(&snmpThread, NULL, &snmper, NULL);
|
||||
if (0 != snmperStartRc) {
|
||||
syslog(LOG_ERR, "server: failure when starting snmper thread: %d",
|
||||
snmperStartRc);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#endif /* ENABLE_NETSNMP */
|
||||
|
||||
// while (getStatCounter(globalStatCounter, STAT_CNT_ACCEPTED) < 100) {
|
||||
while (1) {
|
||||
syslog(LOG_DEBUG, "server: Waiting for connection");
|
||||
|
||||
@ -340,13 +412,13 @@ int server() {
|
||||
syslog(LOG_DEBUG, "server: Got a connection %d", clientSock);
|
||||
|
||||
if (-1 == clientSock) {
|
||||
incStatCounter(STAT_CNT_FAILED);
|
||||
incStatCounter(globalStatCounter, STAT_CNT_FAILED);
|
||||
syslog(LOG_ERR, "server: failure when accepting connection: %d, %s",
|
||||
errno, strerror(errno));
|
||||
continue;
|
||||
}
|
||||
|
||||
incStatCounter(STAT_CNT_ACCEPTED);
|
||||
incStatCounter(globalStatCounter, STAT_CNT_ACCEPTED);
|
||||
|
||||
thread = (networkerThread_t *) htmalloc(sizeof(networkerThread_t)+10);
|
||||
if (NULL == thread) {
|
||||
@ -361,24 +433,28 @@ int server() {
|
||||
thread->clientAddrLen = clientAddrLen;
|
||||
|
||||
count_inc(&thread_counter);
|
||||
incStatCounter(STAT_CNT_NETWORKER_R_THREADS);
|
||||
incStatCounter(globalStatCounter, STAT_CNT_NETWORKER_R_THREADS);
|
||||
res = pthread_create(&tid, NULL, &networker, thread);
|
||||
if (0 != res) {
|
||||
syslog(LOG_ERR, "server: unable to start networker thread");
|
||||
free(thread);
|
||||
decStatCounter(STAT_CNT_NETWORKER_R_THREADS);
|
||||
incStatCounter(STAT_CNT_NETWORKER_THREADS_FAILED);
|
||||
decStatCounter(globalStatCounter, STAT_CNT_NETWORKER_R_THREADS);
|
||||
incStatCounter(globalStatCounter, STAT_CNT_NETWORKER_THREADS_FAILED);
|
||||
count_dec(&thread_counter);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
close(serverSock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void usage() {
|
||||
printf("smmapd [-F] [-p pidfile] [-f cfgfile] [-h]\n");
|
||||
printf(" -F run in foreground, overwrite smmapd.ini setting\n");
|
||||
printf(" -n force netstring disable, overwrite smmapd.ini setting\n");
|
||||
printf(" -p pidfile, overwrite smmapd.ini setting\n");
|
||||
printf(" -f cfgfile\n");
|
||||
printf(" -v version and release info\n");
|
||||
@ -391,7 +467,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
FILE *f;
|
||||
|
||||
while ((c = getopt(argc, argv,"Fp:f:hv")) != -1)
|
||||
while ((c = getopt(argc, argv,"Fp:f:hvn")) != -1)
|
||||
switch (c) {
|
||||
case 'F':
|
||||
foreground = 1;
|
||||
@ -402,6 +478,9 @@ int main(int argc, char **argv) {
|
||||
case 'p':
|
||||
pid_file = htstrdup(optarg);
|
||||
break;
|
||||
case 'n':
|
||||
force_netstring_disabled = 1;
|
||||
break;
|
||||
case 'v':
|
||||
printf("\nsmmapd - Wolfgang Hottgenroth <woho@hottis.de>\n");
|
||||
printf(" cvs_id: %s\n", CVS_ID);
|
||||
@ -415,6 +494,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
openlog("smmapd", LOG_PID, LOG_LOCAL2);
|
||||
syslog(LOG_INFO, "main: started");
|
||||
cfg = readcfg((cfg_file == NULL) ? DEFAULT_SMMAPD_INI : cfg_file);
|
||||
@ -423,6 +504,7 @@ int main(int argc, char **argv) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
do_fork = atoi(findcfgx(cfg, "global", "do_fork", "1"));
|
||||
pid = ((1 == do_fork) && (0 == foreground)) ? fork() : 0;
|
||||
|
||||
@ -442,11 +524,31 @@ int main(int argc, char **argv) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
server_setupCounterList();
|
||||
globalStatCounter = initStatCounter("global", server_counterDefs);
|
||||
|
||||
|
||||
if (0 != (err = server())) {
|
||||
syslog(LOG_ERR, "main: server fails: %d", err);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
syslog(LOG_INFO, "main: terminating");
|
||||
|
||||
terminating = 1;
|
||||
int cleanerJoinRes = pthread_join(cleanerThread, NULL);
|
||||
syslog(LOG_DEBUG, "cleaner joined: cleanerJoinRes %d", cleanerJoinRes);
|
||||
|
||||
unregister_all();
|
||||
destroyStatCounters();
|
||||
|
||||
if (cfg_file)
|
||||
free(cfg_file);
|
||||
if (pid_file)
|
||||
free(pid_file);
|
||||
|
||||
freecfg(cfg);
|
||||
|
||||
syslog(LOG_INFO, "main: finished");
|
||||
closelog();
|
||||
}
|
||||
|
@ -4,20 +4,20 @@ pid_file = smmapd.pid
|
||||
address = 127.0.0.1
|
||||
port = 8887
|
||||
; plugin_dir = /home/who/Sources/sf/smmapdfw
|
||||
; plugins = test_worker1 test_worker2 verifier cyruscheck lua_worker
|
||||
; plugins = test_worker1 test_worker2 verifier cyruscheck recpvericheck lua_worker
|
||||
plugins = verifier
|
||||
enable_stats = 0
|
||||
enable_snmp = 1
|
||||
enable_snmp = 0
|
||||
|
||||
; disables the netstring codec, only for debugging in the development
|
||||
; phase, sendmail is unable to talk to smmapd if the codec is disabled
|
||||
; netstring_disabled = 1
|
||||
|
||||
[snmp]
|
||||
agentx_socket = /var/agentx/master
|
||||
agentx_socket = 127.0.0.1:9161
|
||||
|
||||
[stats]
|
||||
stdout_nice = 2
|
||||
stdout_nice = 0
|
||||
syslog_nice = 1
|
||||
period = 1
|
||||
|
||||
@ -47,6 +47,13 @@ sender_address = <testsender>
|
||||
lhlo_arg = local
|
||||
lmtp_port = 24
|
||||
|
||||
[recpvericheck]
|
||||
obj = librecpveri_worker.so
|
||||
timeout = 10
|
||||
sender_address = <testsender>
|
||||
ehlo_arg = local
|
||||
smtp_port = 24
|
||||
|
||||
[lua_worker]
|
||||
obj = liblua_worker.so
|
||||
; load = base string table math loadlib io
|
||||
@ -54,3 +61,9 @@ load = base string io
|
||||
lua_path = .
|
||||
file = worker.l
|
||||
entrypoint = f
|
||||
|
||||
[rateconn_check]
|
||||
obj = librateconn_worker.so
|
||||
expiry_period = 300
|
||||
num_of_buckets = 12
|
||||
threshold = 3
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
Copyright (C) 2004, Wolfgang Hottgenroth
|
||||
|
||||
@ -28,179 +27,145 @@
|
||||
#include <net-snmp/agent/net-snmp-agent-includes.h>
|
||||
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "snmp_subagent.h"
|
||||
#include "stats.h"
|
||||
#include "smmapd.h"
|
||||
#include "cfg.h"
|
||||
#include "htmalloc.h"
|
||||
|
||||
extern cfg_t *cfg;
|
||||
|
||||
typedef struct var_cnt_map_s {
|
||||
char* var;
|
||||
int cnt;
|
||||
} var_cnt_map_t;
|
||||
|
||||
int number1 = 42;
|
||||
int counter32 = 1;
|
||||
int integer32 = 1;
|
||||
|
||||
var_cnt_map_t *var_cnt_map = NULL;
|
||||
int num_var_cnt_map = 0;
|
||||
|
||||
char *agentx_socket = NULL;
|
||||
|
||||
extern statCounterEntry_t *statCounterList;
|
||||
extern unsigned int statCounterListLen;
|
||||
registrationEntry_t *registrationList = NULL;
|
||||
unsigned int registrationListLen = 0;
|
||||
|
||||
int
|
||||
handle_number1(netsnmp_mib_handler *handler,
|
||||
netsnmp_handler_registration *reginfo,
|
||||
netsnmp_agent_request_info *reqinfo,
|
||||
netsnmp_request_info *requests)
|
||||
{
|
||||
switch(reqinfo->mode) {
|
||||
int handler(netsnmp_mib_handler *handler,
|
||||
netsnmp_handler_registration *registrationInfo,
|
||||
netsnmp_agent_request_info *requestInfo,
|
||||
netsnmp_request_info *requests) {
|
||||
|
||||
case MODE_GET:
|
||||
snmp_set_var_typed_value(requests->requestvb, ASN_COUNTER,
|
||||
(u_char *) &number1,
|
||||
sizeof(number1));
|
||||
break;
|
||||
char *sep = strchr(registrationInfo->handlerName, '_');
|
||||
if (sep == NULL) {
|
||||
return SNMP_ERR_GENERR;
|
||||
}
|
||||
int num = atoi(sep+1);
|
||||
|
||||
default:
|
||||
|
||||
u_char *valuePtr = NULL;
|
||||
size_t valueLen = 0;
|
||||
u_char type = ASN_NULL;
|
||||
|
||||
if (strncmp(registrationInfo->handlerName, "value", sep - registrationInfo->handlerName) == 0) {
|
||||
int tmpVal = count_get((registrationList + num)->counter);
|
||||
valuePtr = (u_char*) &tmpVal;
|
||||
valueLen = sizeof(tmpVal);
|
||||
switch ((registrationList + num)->type) {
|
||||
case SMM_TYPE_GAUGE:
|
||||
type = ASN_GAUGE;
|
||||
break;
|
||||
case SMM_TYPE_COUNTER:
|
||||
type = ASN_COUNTER;
|
||||
break;
|
||||
default:
|
||||
return SNMP_ERR_GENERR;
|
||||
}
|
||||
} else if (strncmp(registrationInfo->handlerName, "name", sep - registrationInfo->handlerName) == 0) {
|
||||
valuePtr = (u_char*) (registrationList + num)->name;
|
||||
valueLen = strlen((registrationList + num)->name);
|
||||
type = ASN_OCTET_STR;
|
||||
} else {
|
||||
return SNMP_ERR_GENERR;
|
||||
}
|
||||
|
||||
return SNMP_ERR_NOERROR;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
handle_it(netsnmp_mib_handler *handler,
|
||||
netsnmp_handler_registration *reginfo,
|
||||
netsnmp_agent_request_info *reqinfo,
|
||||
netsnmp_request_info *requests,
|
||||
u_char type)
|
||||
{
|
||||
int i, cnt, value, res;
|
||||
for (i=0; i<num_var_cnt_map; i++)
|
||||
if (0 == strcmp(reginfo->handlerName, var_cnt_map[i].var)) {
|
||||
cnt = var_cnt_map[i].cnt;
|
||||
break;
|
||||
}
|
||||
|
||||
if (MODE_GET == reqinfo->mode) {
|
||||
value = getStatCounter(cnt);
|
||||
if (MODE_GET == requestInfo->mode) {
|
||||
snmp_set_var_typed_value(requests->requestvb, type,
|
||||
(u_char *) &value,
|
||||
sizeof(value));
|
||||
res = SNMP_ERR_NOERROR;
|
||||
valuePtr, valueLen);
|
||||
return SNMP_ERR_NOERROR;
|
||||
} else {
|
||||
res = SNMP_ERR_GENERR;
|
||||
return SNMP_ERR_GENERR;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
int
|
||||
handle_counter32(netsnmp_mib_handler *handler,
|
||||
netsnmp_handler_registration *reginfo,
|
||||
netsnmp_agent_request_info *reqinfo,
|
||||
netsnmp_request_info *requests)
|
||||
{
|
||||
return handle_it(handler, reginfo, reqinfo, requests, ASN_COUNTER);
|
||||
|
||||
strToOid(const char *baseOid, int oidIdx1, int oidIdx2, int oidIdx3, oid **argOid, int *argOidLen) {
|
||||
oid *myOid = (oid*) htmalloc(sizeof(oid) * 128);
|
||||
char *tmpBaseOidPtr = htstrdup(baseOid);
|
||||
char *rememberTmpBaseOidPtr = tmpBaseOidPtr;
|
||||
char *token;
|
||||
int i = 0;
|
||||
|
||||
while ((token = strtok(tmpBaseOidPtr, ".")) != NULL) {
|
||||
tmpBaseOidPtr = NULL;
|
||||
myOid[i++] = atoi(token);
|
||||
}
|
||||
myOid[i++] = oidIdx1;
|
||||
myOid[i++] = oidIdx2;
|
||||
myOid[i++] = oidIdx3;
|
||||
|
||||
free(rememberTmpBaseOidPtr);
|
||||
*argOid = myOid;
|
||||
*argOidLen = i;
|
||||
}
|
||||
|
||||
int
|
||||
handle_integer32(netsnmp_mib_handler *handler,
|
||||
netsnmp_handler_registration *reginfo,
|
||||
netsnmp_agent_request_info *reqinfo,
|
||||
netsnmp_request_info *requests)
|
||||
{
|
||||
return handle_it(handler, reginfo, reqinfo, requests, ASN_INTEGER);
|
||||
|
||||
|
||||
#define NAME_BUF_SIZE 128
|
||||
void init_dhsMIBObjects(cfg_t *cfg) {
|
||||
/* setup the registration list */
|
||||
const char *baseOid= findcfgx(cfg, "snmp", "base_oid", "1.3.6.1.4.1.9676.1.2");
|
||||
char nameBuf[NAME_BUF_SIZE];
|
||||
statCounterEntry_t *curStatCounterEntry;
|
||||
unsigned int i;
|
||||
for (curStatCounterEntry = statCounterList, i = 0; i < statCounterListLen; curStatCounterEntry++, i++) {
|
||||
statCounter_t *curStatCounter;
|
||||
counterDef_t *curCounterDef;
|
||||
for (curStatCounter = curStatCounterEntry->statCounters, curCounterDef = curStatCounterEntry->counterDefs;
|
||||
curStatCounter->counter != NULL;
|
||||
curStatCounter++, curCounterDef++) {
|
||||
registrationList = (registrationEntry_t*) htrealloc(registrationList, sizeof(registrationEntry_t) * (registrationListLen + 1));
|
||||
strToOid(baseOid, i+1, 1, registrationListLen+1,
|
||||
&(registrationList + registrationListLen)->nameOid, &(registrationList + registrationListLen)->nameOidLen);
|
||||
snprintf(nameBuf, NAME_BUF_SIZE, "name_%d", registrationListLen);
|
||||
(registrationList + registrationListLen)->nameRegistrationName = htstrdup(nameBuf);
|
||||
strToOid(baseOid, i+1, 2, registrationListLen+1,
|
||||
&(registrationList + registrationListLen)->valueOid, &(registrationList + registrationListLen)->valueOidLen);
|
||||
snprintf(nameBuf, NAME_BUF_SIZE, "value_%d", registrationListLen);
|
||||
(registrationList + registrationListLen)->valueRegistrationName = htstrdup(nameBuf);
|
||||
(registrationList + registrationListLen)->type = curCounterDef->type;
|
||||
(registrationList + registrationListLen)->counter = curStatCounter->counter;
|
||||
(registrationList + registrationListLen)->moduleName = curStatCounterEntry->moduleName;
|
||||
(registrationList + registrationListLen)->name = curCounterDef->name;
|
||||
|
||||
netsnmp_handler_registration *rinfo =
|
||||
netsnmp_create_handler_registration((registrationList + registrationListLen)->nameRegistrationName,
|
||||
handler,
|
||||
(registrationList + registrationListLen)->nameOid ,
|
||||
(registrationList + registrationListLen)->nameOidLen,
|
||||
HANDLER_CAN_RONLY);
|
||||
netsnmp_register_instance(rinfo);
|
||||
|
||||
rinfo =
|
||||
netsnmp_create_handler_registration((registrationList + registrationListLen)->valueRegistrationName,
|
||||
handler,
|
||||
(registrationList + registrationListLen)->valueOid ,
|
||||
(registrationList + registrationListLen)->valueOidLen,
|
||||
HANDLER_CAN_RONLY);
|
||||
netsnmp_register_instance(rinfo);
|
||||
|
||||
registrationListLen++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void map_var_cnt(int cnt, char* var) {
|
||||
var_cnt_map = (var_cnt_map_t*) realloc(var_cnt_map, sizeof(var_cnt_map_t) * (num_var_cnt_map + 1));
|
||||
var_cnt_map[num_var_cnt_map].var = var;
|
||||
var_cnt_map[num_var_cnt_map].cnt = cnt;
|
||||
num_var_cnt_map++;
|
||||
}
|
||||
|
||||
#define NETSNMP_REGISTER_SCALAR(A, B, C) netsnmp_register_scalar(netsnmp_create_handler_registration(#A, B, A##_oid, OID_LENGTH(A##_oid), HANDLER_CAN_RONLY)); map_var_cnt(C, #A)
|
||||
|
||||
void
|
||||
init_dhsMIBObjects(void)
|
||||
{
|
||||
static oid dhsNumber1_oid[] = { 1,3,6,1,4,1,9676,2,1,1 };
|
||||
static oid dhsAccepted_oid[] = { 1,3,6,1,4,1,9676,2,1,2,1 };
|
||||
static oid dhsFailed_oid[] = { 1,3,6,1,4,1,9676,2,1,2,2 };
|
||||
static oid dhsRunningNwThreads_oid[] = { 1,3,6,1,4,1,9676,2,1,2,3 };
|
||||
static oid dhsNwThreads_oid[] = { 1,3,6,1,4,1,9676,2,1,2,4 };
|
||||
static oid dhsFailedNwThreads_oid[] = { 1,3,6,1,4,1,9676,2,1,2,5 };
|
||||
static oid dhsOKReturned_oid[] = { 1,3,6,1,4,1,9676,2,1,2,6 };
|
||||
static oid dhsTEMPReturned_oid[] = { 1,3,6,1,4,1,9676,2,1,2,7 };
|
||||
static oid dhsPERMReturned_oid[] = { 1,3,6,1,4,1,9676,2,1,2,8 };
|
||||
static oid dhsNOTFOUNDReturned_oid[] = { 1,3,6,1,4,1,9676,2,1,2,9 };
|
||||
static oid dhsIllegalInputFailure_oid[] = { 1,3,6,1,4,1,9676,2,1,2,10 };
|
||||
static oid dhsUnknownClassFailure_oid[] = { 1,3,6,1,4,1,9676,2,1,2,11 };
|
||||
static oid dhsTimeoutFailure_oid[] = { 1,3,6,1,4,1,9676,2,1,2,12 };
|
||||
static oid dhsNetStringFailure_oid[] = { 1,3,6,1,4,1,9676,2,1,2,13 };
|
||||
|
||||
static oid dhsVCacheEntries_oid[] = { 1,3,6,1,4,1,9676,2,1,3,1 };
|
||||
static oid dhsVRunningWorkerThreads_oid[] = { 1,3,6,1,4,1,9676,2,1,3,2 };
|
||||
static oid dhsVWorkerThreads_oid[] = { 1,3,6,1,4,1,9676,2,1,3,3 };
|
||||
static oid dhsVFailedWorkerThreads_oid[] = { 1,3,6,1,4,1,9676,2,1,3,4 };
|
||||
static oid dhsVTimedOutWorkerThreads_oid[] = { 1,3,6,1,4,1,9676,2,1,3,5 };
|
||||
static oid dhsVRunningCheckerThreads_oid[] = { 1,3,6,1,4,1,9676,2,1,3,6 };
|
||||
static oid dhsVCheckerThreads_oid[] = { 1,3,6,1,4,1,9676,2,1,3,7 };
|
||||
static oid dhsVFailedCheckerThreads_oid[] = { 1,3,6,1,4,1,9676,2,1,3,8 };
|
||||
static oid dhsVAnsweredFromCache_oid[] = { 1,3,6,1,4,1,9676,2,1,3,9 };
|
||||
static oid dhsVReturnedOK_oid[] = { 1,3,6,1,4,1,9676,2,1,3,10 };
|
||||
static oid dhsVReturnedNOK_oid[] = { 1,3,6,1,4,1,9676,2,1,3,11 };
|
||||
static oid dhsVReturnedTNOK_oid[] = { 1,3,6,1,4,1,9676,2,1,3,12 };
|
||||
|
||||
static oid dhsCWorker_oid[] = { 1,3,6,1,4,1,9676,2,1,4,1 };
|
||||
static oid dhsCIllegalInput_oid[] = { 1,3,6,1,4,1,9676,2,1,4,2 };
|
||||
static oid dhsCDepotDNSFailure_oid[] = { 1,3,6,1,4,1,9676,2,1,4,3 };
|
||||
static oid dhsCReturnedOK_oid[] = { 1,3,6,1,4,1,9676,2,1,4,4 };
|
||||
static oid dhsCReturnedNOK_oid[] = { 1,3,6,1,4,1,9676,2,1,4,5 };
|
||||
static oid dhsCReturnedTNOK_oid[] = { 1,3,6,1,4,1,9676,2,1,4,6 };
|
||||
|
||||
|
||||
DEBUGMSGTL(("dhsMIBObjects", "Initializing\n"));
|
||||
|
||||
NETSNMP_REGISTER_SCALAR(dhsNumber1, handle_number1, 0);
|
||||
NETSNMP_REGISTER_SCALAR(dhsAccepted, handle_counter32, STAT_CNT_ACCEPTED);
|
||||
NETSNMP_REGISTER_SCALAR(dhsFailed, handle_counter32, STAT_CNT_FAILED);
|
||||
NETSNMP_REGISTER_SCALAR(dhsRunningNwThreads, handle_integer32, STAT_CNT_NETWORKER_R_THREADS);
|
||||
NETSNMP_REGISTER_SCALAR(dhsNwThreads, handle_counter32, STAT_CNT_NETWORKER_THREADS);
|
||||
NETSNMP_REGISTER_SCALAR(dhsFailedNwThreads, handle_counter32, STAT_CNT_NETWORKER_THREADS_FAILED);
|
||||
NETSNMP_REGISTER_SCALAR(dhsOKReturned, handle_counter32, SMM_OK+STAT_CNT_OFFSET);
|
||||
NETSNMP_REGISTER_SCALAR(dhsTEMPReturned, handle_counter32, SMM_TEMP_NOK+STAT_CNT_OFFSET);
|
||||
NETSNMP_REGISTER_SCALAR(dhsPERMReturned, handle_counter32, SMM_PERM_NOK+STAT_CNT_OFFSET);
|
||||
NETSNMP_REGISTER_SCALAR(dhsNOTFOUNDReturned, handle_counter32, SMM_NOT_FOUND_NOK+STAT_CNT_OFFSET);
|
||||
NETSNMP_REGISTER_SCALAR(dhsIllegalInputFailure, handle_counter32, SMM_ILLEGAL_INPUT+STAT_CNT_OFFSET);
|
||||
NETSNMP_REGISTER_SCALAR(dhsUnknownClassFailure, handle_counter32, SMM_UNKNOWN_CLASS+STAT_CNT_OFFSET);
|
||||
NETSNMP_REGISTER_SCALAR(dhsTimeoutFailure, handle_counter32, SMM_TIMEOUT_NOK+STAT_CNT_OFFSET);
|
||||
NETSNMP_REGISTER_SCALAR(dhsNetStringFailure, handle_counter32, SMM_NETSTRING_UNPARSABLE+STAT_CNT_OFFSET);
|
||||
|
||||
NETSNMP_REGISTER_SCALAR(dhsVCacheEntries, handle_integer32, STAT_CNT_VERIFIER_CACHE);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVRunningWorkerThreads, handle_integer32, STAT_CNT_VERIFIER_WORKER_R_THREADS);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVWorkerThreads, handle_counter32, STAT_CNT_VERIFIER_WORKER_THREADS);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVFailedWorkerThreads, handle_counter32, STAT_CNT_VERIFIER_WORKER_THREADS_FAILED);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVTimedOutWorkerThreads, handle_counter32, STAT_CNT_VERIFIER_WORKER_THREADS_TIMEOUT);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVRunningCheckerThreads, handle_integer32, STAT_CNT_VERIFIER_CHECKER_R_THREADS);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVCheckerThreads, handle_counter32, STAT_CNT_VERIFIER_CHECKER_THREADS);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVFailedCheckerThreads, handle_counter32, STAT_CNT_VERIFIER_CHECKER_THREADS_FAILED);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVAnsweredFromCache, handle_counter32, STAT_CNT_VERIFIER_ANSWERED_FROM_CACHE);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVReturnedOK, handle_counter32, STAT_CNT_VERIFIER_RETURNED_OK);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVReturnedNOK, handle_counter32, STAT_CNT_VERIFIER_RETURNED_NOK);
|
||||
NETSNMP_REGISTER_SCALAR(dhsVReturnedTNOK, handle_counter32, STAT_CNT_VERIFIER_RETURNED_TNOK);
|
||||
|
||||
NETSNMP_REGISTER_SCALAR(dhsCWorker, handle_counter32, STAT_CNT_CYRUS_WORKER);
|
||||
NETSNMP_REGISTER_SCALAR(dhsCIllegalInput, handle_counter32, STAT_CNT_CYRUS_ILLEGAL_INPUT);
|
||||
NETSNMP_REGISTER_SCALAR(dhsCDepotDNSFailure, handle_counter32, STAT_CNT_CYRUS_DEPOT_DNS_FAILURE);
|
||||
NETSNMP_REGISTER_SCALAR(dhsCReturnedOK, handle_counter32, STAT_CNT_CYRUS_RETURNED_OK);
|
||||
NETSNMP_REGISTER_SCALAR(dhsCReturnedNOK, handle_counter32, STAT_CNT_CYRUS_RETURNED_NOK);
|
||||
NETSNMP_REGISTER_SCALAR(dhsCReturnedTNOK, handle_counter32, STAT_CNT_CYRUS_RETURNED_TNOK);
|
||||
|
||||
}
|
||||
|
||||
void snmp_subagent_main(cfg_t *cfg) {
|
||||
snmp_enable_syslog_ident("smmapd", LOG_LOCAL2);
|
||||
@ -210,7 +175,7 @@ void snmp_subagent_main(cfg_t *cfg) {
|
||||
|
||||
netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1);
|
||||
init_agent("smmapd_subagent");
|
||||
init_dhsMIBObjects();
|
||||
init_dhsMIBObjects(cfg);
|
||||
init_snmp("smmapd_subagent");
|
||||
|
||||
while(1) {
|
||||
@ -220,3 +185,5 @@ void snmp_subagent_main(cfg_t *cfg) {
|
||||
snmp_shutdown("mysubagent");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,9 +24,29 @@
|
||||
#define _SNMP_SUBAGENT_H_
|
||||
|
||||
#include "config.h"
|
||||
#include "count.h"
|
||||
#include "cfg.h"
|
||||
|
||||
|
||||
#if ENABLE_NETSNMP==1
|
||||
#include <net-snmp/net-snmp-config.h>
|
||||
#include <net-snmp/net-snmp-includes.h>
|
||||
#include <net-snmp/agent/net-snmp-agent-includes.h>
|
||||
|
||||
|
||||
typedef struct registrationEntry_s {
|
||||
oid *nameOid;
|
||||
int nameOidLen;
|
||||
char *nameRegistrationName;
|
||||
oid *valueOid;
|
||||
int valueOidLen;
|
||||
char *valueRegistrationName;
|
||||
int type;
|
||||
count_t *counter;
|
||||
const char *moduleName;
|
||||
const char *name;
|
||||
} registrationEntry_t;
|
||||
|
||||
void snmp_subagent_main(cfg_t *cfg);
|
||||
#endif
|
||||
|
||||
|
129
smmapdfw/smmapd/workertest.c
Normal file
129
smmapdfw/smmapd/workertest.c
Normal file
@ -0,0 +1,129 @@
|
||||
/*
|
||||
Copyright (C) 2005, Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
|
||||
smmapdfw is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
smmapdfw is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with smmapdfw. If not, write to the Free Software Foundation, 59
|
||||
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#define CVS_ID "$Id$"
|
||||
#define RELEASE_ID "0.1"
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <syslog.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "htbuffer.h"
|
||||
#include "containers.h"
|
||||
#include "cfg.h"
|
||||
|
||||
#define _SMMAPD_C_
|
||||
#include "smmapd.h"
|
||||
|
||||
|
||||
cfg_t *cfg;
|
||||
|
||||
|
||||
void usage() {
|
||||
printf("workertest -f cfgfile [-h] -w worker -q query\n");
|
||||
printf(" -f cfgfile\n");
|
||||
printf(" -h print this help\n");
|
||||
printf(" -w worker to use\n");
|
||||
printf(" -q query parameters\n\n");
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int c, res, dispatcher_result;
|
||||
char *cfg_file=NULL, *worker=NULL, *query=NULL;
|
||||
void *handle;
|
||||
container_handle_t *container_handle;
|
||||
htbuffer_t *answer, *input;
|
||||
|
||||
|
||||
|
||||
while ((c = getopt(argc, argv,"w:q:f:hv")) != -1)
|
||||
switch (c) {
|
||||
case 'f':
|
||||
cfg_file = htstrdup(optarg);
|
||||
break;
|
||||
case 'w':
|
||||
worker = htstrdup(optarg);
|
||||
break;
|
||||
case 'q':
|
||||
query = htstrdup(optarg);
|
||||
break;
|
||||
case 'v':
|
||||
printf("\nworkertest - Wolfgang Hottgenroth <woho@hottis.de>\n");
|
||||
printf(" cvs_id: %s\n", CVS_ID);
|
||||
printf(" release_id: %s\n\n", RELEASE_ID);
|
||||
exit(1);
|
||||
case 'h':
|
||||
default:
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (NULL == cfg_file) {
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
openlog("workertest", LOG_PID, LOG_LOCAL2);
|
||||
syslog(LOG_INFO, "main: started");
|
||||
|
||||
cfg = readcfg((cfg_file == NULL) ? DEFAULT_SMMAPD_INI : cfg_file);
|
||||
|
||||
syslog(LOG_INFO, "main: load worker");
|
||||
res = register_worker(worker);
|
||||
if (0 != res) {
|
||||
syslog(LOG_INFO, "main: unable to load worker");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
syslog(LOG_INFO, "main: setup containers");
|
||||
res = containers_setup(&container_handle);
|
||||
if (0 != res) {
|
||||
syslog(LOG_INFO, "main: unable to setup containers");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
answer = htbuffer_init(512);
|
||||
input = htbuffer_init(512);
|
||||
|
||||
htbuffer_strcpy(input, worker);
|
||||
htbuffer_strcat(input, " ");
|
||||
htbuffer_strcat(input, query);
|
||||
|
||||
syslog(LOG_INFO, "main: querying worker {%s} with {%s}", worker, query);
|
||||
dispatcher_result = containers_dispatcher(container_handle, input->buf, answer);
|
||||
syslog(LOG_INFO, "main: result {%d}, answer {%s}", dispatcher_result, answer->buf);
|
||||
printf("result {%d}, answer {%s}\n", dispatcher_result, answer->buf);
|
||||
|
||||
htbuffer_free(input);
|
||||
htbuffer_free(answer);
|
||||
syslog(LOG_INFO, "main: buffers freed");
|
||||
|
||||
containers_destroy(container_handle);
|
||||
syslog(LOG_INFO, "main: containers destroyed");
|
||||
|
||||
syslog(LOG_INFO, "main: finished");
|
||||
closelog();
|
||||
}
|
@ -4,10 +4,10 @@ import ConfigParser
|
||||
|
||||
import Connector
|
||||
import verifier
|
||||
import test_worker1
|
||||
import test_worker
|
||||
|
||||
config = ConfigParser.ConfigParser()
|
||||
config.read("test.ini");
|
||||
|
||||
|
||||
Connector.threadedExecute(config, verifier.verifier, int(config.get('Global', 'Threads')), {})
|
||||
#Connector.threadedExecute(config, verifier.verifier, int(config.get('Global', 'Threads')), {})
|
||||
Connector.threadedExecute(config, test_worker.test_worker1, int(config.get('Global', 'Threads')), {})
|
||||
|
@ -1,10 +1,13 @@
|
||||
[Global]
|
||||
Host: ddev8.eng.emea.uu.net
|
||||
Port: 389
|
||||
Host: 127.0.0.1
|
||||
Port: 8887
|
||||
Threads: 20
|
||||
|
||||
[Verifier]
|
||||
AddressFile: addresses.lst
|
||||
QueriesPerSession: 2
|
||||
|
||||
[TestWorker]
|
||||
QueriesPerSession: 20
|
||||
|
||||
|
||||
|
21
smmapdfw/test/test_worker.py
Normal file
21
smmapdfw/test/test_worker.py
Normal file
@ -0,0 +1,21 @@
|
||||
import random
|
||||
from Connector import Connector
|
||||
|
||||
class test_worker1 (Connector):
|
||||
|
||||
def __init__(self, config, details):
|
||||
Connector.__init__(self, config, details)
|
||||
self.letters = ('a','b','c','d','e','f','g','h','i','j',
|
||||
'k','l','m','n','o','p','q','r','s','t',
|
||||
'u','v','w','x','y','z')
|
||||
random.seed()
|
||||
|
||||
def execute(self):
|
||||
queriesPerSession = int(self.config.get('TestWorker', 'QueriesPerSession'))
|
||||
self.connect()
|
||||
for i in range(queriesPerSession):
|
||||
a = ''.join(random.sample(self.letters, 10))
|
||||
self.query(a)
|
||||
self.close()
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
from Connector import Connector
|
||||
|
||||
class test_worker1 (Connector):
|
||||
def __init__(self, config):
|
||||
Connector.__init__(self, config)
|
||||
|
@ -1,6 +1,8 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -10,180 +12,268 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = test_worker
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libtest_workers_la_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
am_libtest_workers_la_OBJECTS = test_workers.lo
|
||||
libtest_workers_la_OBJECTS = $(am_libtest_workers_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libtest_workers_la_SOURCES)
|
||||
DIST_SOURCES = $(libtest_workers_la_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
LIB = @LIB@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
lib_LTLIBRARIES = libtest_workers.la
|
||||
libtest_workers_la_SOURCES = test_workers.c
|
||||
libtest_workers_la_LIBADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
|
||||
INCLUDES = -I../libsmmapdfw
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
all: all-am
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
libtest_workers_la_LDFLAGS =
|
||||
libtest_workers_la_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
libtest_workers_la_OBJECTS = test_workers.lo
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/test_workers.P
|
||||
SOURCES = $(libtest_workers_la_SOURCES)
|
||||
OBJECTS = $(libtest_workers_la_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .obj .s
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu test_worker/Makefile
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test_worker/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu test_worker/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-libLTLIBRARIES:
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
|
||||
distclean-libLTLIBRARIES:
|
||||
|
||||
maintainer-clean-libLTLIBRARIES:
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
# FIXME: We should only use cygpath when building on Windows,
|
||||
# and only if it is available.
|
||||
.c.obj:
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libtest_workers.la: $(libtest_workers_la_OBJECTS) $(libtest_workers_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libtest_workers_la_LDFLAGS) $(libtest_workers_la_OBJECTS) $(libtest_workers_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_workers.Plo@am__quote@
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@ -192,170 +282,178 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
libtest_workers.la: $(libtest_workers_la_OBJECTS) $(libtest_workers_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libtest_workers_la_LDFLAGS) $(libtest_workers_la_OBJECTS) $(libtest_workers_la_LIBADD) $(LIBS)
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = test_worker
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu test_worker/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-libLTLIBRARIES
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
clean: clean-am
|
||||
pdf: pdf-am
|
||||
|
||||
distclean-am: distclean-libLTLIBRARIES distclean-compile \
|
||||
distclean-libtool distclean-tags distclean-depend \
|
||||
distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
pdf-am:
|
||||
|
||||
distclean: distclean-am
|
||||
ps: ps-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
ps-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
|
||||
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
|
||||
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
|
||||
distclean-compile clean-compile maintainer-clean-compile \
|
||||
mostlyclean-libtool distclean-libtool clean-libtool \
|
||||
maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
|
||||
distclean-depend clean-depend maintainer-clean-depend info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -22,13 +22,15 @@
|
||||
#include <syslog.h>
|
||||
#include "containers_public.h"
|
||||
#include "htmalloc.h"
|
||||
#include "htbuffer.h"
|
||||
#include "smmapd.h"
|
||||
|
||||
|
||||
int test_worker1_init(cfgl_t *cfg, void **handle);
|
||||
int test_worker1_setup(void *handle, void **work_handle);
|
||||
int test_worker1_destroy(void *handle, void *work_handle);
|
||||
int test_worker1_work(void *handle, void *work_handle, char *input, char *output);
|
||||
int test_worker2_work(void *handle, void *work_handle, char *input, char *output);
|
||||
int test_worker1_work(void *handle, void *work_handle, char *input, htbuffer_t *output);
|
||||
int test_worker2_work(void *handle, void *work_handle, char *input, htbuffer_t *output);
|
||||
|
||||
class_descriptor_t test_worker1 = {
|
||||
"test_worker1",
|
||||
@ -76,15 +78,19 @@ int test_worker1_destroy(void *handle, void *work_handle) {
|
||||
free(work_handle);
|
||||
}
|
||||
|
||||
int test_worker1_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
sprintf(output, "Test-Worker 1 receives %s (handle %s) (called %d)\n",
|
||||
int test_worker1_work(void *handle, void *work_handle, char *input, htbuffer_t *output) {
|
||||
char o[1024];
|
||||
sprintf(o, "Test-Worker 1 receives %s (handle %s) (called %d)\n",
|
||||
input, (char*)handle, (((test_worker1_handle_t*)work_handle)->counter)++);
|
||||
return 0;
|
||||
htbuffer_strcpy(output, o);
|
||||
return SMM_OK;
|
||||
}
|
||||
|
||||
int test_worker2_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
sprintf(output, "Test-Worker 2 receives %s\n", input);
|
||||
return 0;
|
||||
int test_worker2_work(void *handle, void *work_handle, char *input, htbuffer_t *output) {
|
||||
htbuffer_strcpy(output, "Test-Worker 2 receives");
|
||||
htbuffer_strcat(output, input);
|
||||
htbuffer_strcat(output, "\n");
|
||||
return SMM_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
lib_LTLIBRARIES = libverify_worker.la
|
||||
libverify_worker_la_SOURCES = verify_worker.c
|
||||
libverify_worker_la_LIBADD = ../libsmmapdfw/libsmmapdfw.la @BDB_LIBS@
|
||||
libverify_worker_la_LIBADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
|
||||
INCLUDES = -I../libsmmapdfw
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -10,180 +12,268 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = verify_worker
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libverify_worker_la_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
am_libverify_worker_la_OBJECTS = verify_worker.lo
|
||||
libverify_worker_la_OBJECTS = $(am_libverify_worker_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libverify_worker_la_SOURCES)
|
||||
DIST_SOURCES = $(libverify_worker_la_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BDB_LIBS = @BDB_LIBS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
LIB = @LIB@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
lib_LTLIBRARIES = libverify_worker.la
|
||||
libverify_worker_la_SOURCES = verify_worker.c
|
||||
libverify_worker_la_LIBADD = ../libsmmapdfw/libsmmapdfw.la @BDB_LIBS@
|
||||
|
||||
libverify_worker_la_LIBADD = ../libsmmapdfw/libsmmapdfw.la
|
||||
INCLUDES = -I../libsmmapdfw
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
all: all-am
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
libverify_worker_la_LDFLAGS =
|
||||
libverify_worker_la_DEPENDENCIES = ../libsmmapdfw/libsmmapdfw.la
|
||||
libverify_worker_la_OBJECTS = verify_worker.lo
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/verify_worker.P
|
||||
SOURCES = $(libverify_worker_la_SOURCES)
|
||||
OBJECTS = $(libverify_worker_la_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .obj .s
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu verify_worker/Makefile
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu verify_worker/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu verify_worker/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-libLTLIBRARIES:
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
|
||||
distclean-libLTLIBRARIES:
|
||||
|
||||
maintainer-clean-libLTLIBRARIES:
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
# FIXME: We should only use cygpath when building on Windows,
|
||||
# and only if it is available.
|
||||
.c.obj:
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libverify_worker.la: $(libverify_worker_la_OBJECTS) $(libverify_worker_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libverify_worker_la_LDFLAGS) $(libverify_worker_la_OBJECTS) $(libverify_worker_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify_worker.Plo@am__quote@
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@ -192,170 +282,178 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
libverify_worker.la: $(libverify_worker_la_OBJECTS) $(libverify_worker_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libverify_worker_la_LDFLAGS) $(libverify_worker_la_OBJECTS) $(libverify_worker_la_LIBADD) $(LIBS)
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = verify_worker
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu verify_worker/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-libLTLIBRARIES
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
clean: clean-am
|
||||
pdf: pdf-am
|
||||
|
||||
distclean-am: distclean-libLTLIBRARIES distclean-compile \
|
||||
distclean-libtool distclean-tags distclean-depend \
|
||||
distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
pdf-am:
|
||||
|
||||
distclean: distclean-am
|
||||
ps: ps-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
ps-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
|
||||
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
|
||||
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
|
||||
distclean-compile clean-compile maintainer-clean-compile \
|
||||
mostlyclean-libtool distclean-libtool clean-libtool \
|
||||
maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
|
||||
distclean-depend clean-depend maintainer-clean-depend info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2004, Wolfgang Hottgenroth
|
||||
Copyright (C) 2004,2005 Wolfgang Hottgenroth
|
||||
|
||||
This file is part of smmapdfw.
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
@ -35,10 +36,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if ENABLE_CACHE == 1
|
||||
#define DB_DBM_HSEARCH 1
|
||||
#include <db.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
|
||||
#include "htcache.h"
|
||||
|
||||
#include "containers_public.h"
|
||||
#include "smmapd.h"
|
||||
@ -47,22 +47,61 @@
|
||||
#include "queue.h"
|
||||
#include "smtp.h"
|
||||
#include "htmalloc.h"
|
||||
#include "htbuffer.h"
|
||||
|
||||
#include "stats.h"
|
||||
#include "dvl.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#define SMM_LOCAL_PERM_NOK 101
|
||||
#define SMM_LOCAL_TEMP_NOK 102
|
||||
#define SMM_LOCAL_OK 103
|
||||
|
||||
|
||||
/* --- statistics counter --- */
|
||||
|
||||
#define STAT_CNT_VERIFIER_CACHE 0
|
||||
#define STAT_CNT_VERIFIER_WORKER_R_THREADS 1
|
||||
#define STAT_CNT_VERIFIER_WORKER_THREADS 2
|
||||
#define STAT_CNT_VERIFIER_WORKER_THREADS_FAILED 3
|
||||
#define STAT_CNT_VERIFIER_WORKER_THREADS_TIMEOUT 4
|
||||
#define STAT_CNT_VERIFIER_CHECKER_R_THREADS 5
|
||||
#define STAT_CNT_VERIFIER_CHECKER_THREADS 6
|
||||
#define STAT_CNT_VERIFIER_CHECKER_THREADS_FAILED 7
|
||||
#define STAT_CNT_VERIFIER_ANSWERED_FROM_CACHE 8
|
||||
#define STAT_CNT_VERIFIER_RETURNED_OK 9
|
||||
#define STAT_CNT_VERIFIER_RETURNED_NOK 10
|
||||
#define STAT_CNT_VERIFIER_RETURNED_TNOK 11
|
||||
|
||||
counterDef_t *verify_counterDefs = NULL;
|
||||
void verify_setupCounterList() {
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_GAUGE, "Verifier: entries in cache");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_GAUGE, "Verifier: running worker threads");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_COUNTER, "Verifier: worker threads");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_COUNTER, "Verifier: failed to start, worker threads");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_COUNTER, "Verifier: timed out worker threads");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_GAUGE, "Verifier: running checker threads");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_COUNTER, "Verifier: checker threads");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_COUNTER, "Verifier: failed to start, checker threads");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_COUNTER, "Verifier: answered from cache");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_COUNTER, "Verifier: returned OK");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_COUNTER, "Verifier: returned NOK");
|
||||
verify_counterDefs = addOneCounterDef(verify_counterDefs, SMM_TYPE_COUNTER, "Verifier: returned TNOK");
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
struct verify_container_handle_s {
|
||||
cfgl_t *cfg;
|
||||
statCounter_t *statCounter;
|
||||
int timeout_result;
|
||||
int timeout_dialog;
|
||||
int cache_enabled;
|
||||
int cache_expiry;
|
||||
pthread_mutex_t *cache_mutex;
|
||||
char *cache_file;
|
||||
|
||||
htcache_t *cache;
|
||||
|
||||
char *sender_address;
|
||||
char *helo_arg;
|
||||
int smtp_port;
|
||||
@ -88,12 +127,15 @@ struct verify_work_handle_s {
|
||||
verify_result_t *result;
|
||||
ht_queue_t *terminator_queue;
|
||||
verify_container_handle_t *vch;
|
||||
|
||||
int worker_cnt;
|
||||
};
|
||||
|
||||
typedef struct verify_work_handle_s verify_work_handle_t;
|
||||
|
||||
|
||||
|
||||
|
||||
struct checker_thread_s {
|
||||
pthread_t thread;
|
||||
int id;
|
||||
@ -120,13 +162,14 @@ struct worker_thread_s {
|
||||
int checker_cnt;
|
||||
ht_queue_t *terminator_queue;
|
||||
verify_work_handle_t *vwh;
|
||||
char* rememberPropagatedOutput;
|
||||
};
|
||||
|
||||
typedef struct worker_thread_s worker_thread_t;
|
||||
|
||||
|
||||
struct mydata_s {
|
||||
int result;
|
||||
time_t timestamp;
|
||||
char output[1];
|
||||
};
|
||||
|
||||
@ -137,7 +180,7 @@ typedef struct mydata_s mydata_t;
|
||||
int verify_init(cfgl_t *cfg, void **handle);
|
||||
int verify_destroy(void *handle);
|
||||
int verify_work_setup(void *handle, void **work_handle);
|
||||
int verify_work(void *handle, void *work_handle, char *input, char *output);
|
||||
int verify_work(void *handle, void *work_handle, char *input, htbuffer_t *output);
|
||||
int verify_work_destroy(void *handle, void *work_handle);
|
||||
|
||||
static void *worker_thread(void *arg);
|
||||
@ -160,6 +203,8 @@ class_descriptor_t verifier = {
|
||||
/* container handle for each class in the application. */
|
||||
int verify_init(cfgl_t *cfg, void **handle) {
|
||||
verify_container_handle_t *vch;
|
||||
int cache_enabled, cache_expiry;
|
||||
char *cache_file;
|
||||
|
||||
vch = (verify_container_handle_t*) htmalloc(sizeof(verify_container_handle_t));
|
||||
vch->cfg = cfg;
|
||||
@ -170,20 +215,24 @@ int verify_init(cfgl_t *cfg, void **handle) {
|
||||
vch->helo_arg = findcfglx(vch->cfg, "helo_arg", "local");
|
||||
vch->smtp_port = atoi(findcfglx(vch->cfg, "smtp_port", "25"));
|
||||
vch->max_checker_threads = atoi(findcfglx(vch->cfg, "max_checker_threads", "25"));
|
||||
vch->cache_enabled = atoi(findcfglx(vch->cfg, "cache_enabled", "1"));
|
||||
vch->cache_expiry = atoi(findcfglx(vch->cfg, "cache_expiry", "86400"));
|
||||
vch->cache_file = findcfglx(vch->cfg, "cache_file", "verifier_cache");
|
||||
|
||||
if (1 == vch->cache_enabled) {
|
||||
vch->cache_mutex = (pthread_mutex_t*) htmalloc(sizeof(pthread_mutex_t));
|
||||
pthread_mutex_init(vch->cache_mutex, NULL);
|
||||
pthread_mutex_unlock(vch->cache_mutex);
|
||||
} else {
|
||||
vch->cache_mutex = NULL;
|
||||
}
|
||||
|
||||
cache_enabled = atoi(findcfglx(vch->cfg, "cache_enabled", "1"));
|
||||
cache_expiry = atoi(findcfglx(vch->cfg, "cache_expiry", "86400"));
|
||||
cache_file = findcfglx(vch->cfg, "cache_file", "verifier_cache");
|
||||
|
||||
if (1 == cache_enabled) {
|
||||
vch->cache = htcache_init(cache_file, cache_expiry);
|
||||
} else {
|
||||
vch->cache = NULL;
|
||||
}
|
||||
|
||||
verify_setupCounterList();
|
||||
vch->statCounter = initStatCounter("verifier", verify_counterDefs);
|
||||
|
||||
*handle = vch;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -192,11 +241,12 @@ int verify_init(cfgl_t *cfg, void **handle) {
|
||||
int verify_destroy(void *handle) {
|
||||
verify_container_handle_t *vch = (verify_container_handle_t*)handle;
|
||||
|
||||
if (1 == vch->cache_enabled) {
|
||||
pthread_mutex_destroy(vch->cache_mutex);
|
||||
free(vch->cache_mutex);
|
||||
if (NULL != vch->cache) {
|
||||
htcache_destroy(vch->cache);
|
||||
}
|
||||
|
||||
/* FIXME The statCounter structure should be freed too, however, as this won't ever be called ... */
|
||||
|
||||
free(vch);
|
||||
return 0;
|
||||
}
|
||||
@ -215,45 +265,47 @@ int verify_work_setup(void *handle, void **work_handle) {
|
||||
pthread_cond_init(vwh->result_cond, NULL);
|
||||
vwh->terminator_queue = (ht_queue_t*) htmalloc(sizeof(ht_queue_t));
|
||||
queue_init(vwh->terminator_queue);
|
||||
vwh->worker_cnt = 0;
|
||||
vwh->vch = (verify_container_handle_t*)handle;
|
||||
|
||||
*work_handle = vwh;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int verify_work_destroy(void *handle, void *work_handle) {
|
||||
verify_container_handle_t *vch = (verify_container_handle_t*)handle;
|
||||
verify_work_handle_t *vwh = (verify_work_handle_t*)work_handle;
|
||||
worker_thread_t *wt;
|
||||
checker_thread_t *ct;
|
||||
int cnt, cnt2, err;
|
||||
int err;
|
||||
|
||||
syslog(LOG_DEBUG, "verify (%p) verify_work_destroy: was %d times used", work_handle, vwh->id);
|
||||
|
||||
/* The terminator_queue must be drained until id_counter is zero again */
|
||||
cnt = vwh->id;
|
||||
while (cnt != 0) {
|
||||
syslog(LOG_DEBUG, "verify (%p) verify_work_destroy, %d thread in queue, waiting for it",
|
||||
work_handle, cnt);
|
||||
while (vwh->worker_cnt != 0) {
|
||||
syslog(LOG_DEBUG, "verify (%p) verify_work_destroy, %d worker thread in queue, waiting for it",
|
||||
work_handle, vwh->worker_cnt);
|
||||
wt = (worker_thread_t*) queue_get_wait(vwh->terminator_queue);
|
||||
|
||||
cnt2 = wt->checker_cnt;
|
||||
while (cnt2 != 0) {
|
||||
while (wt->checker_cnt != 0) {
|
||||
syslog(LOG_DEBUG, "verify (%p) verify_work_destroy, %d checker thread in queue, waiting for it",
|
||||
work_handle, wt->checker_cnt);
|
||||
ct = (checker_thread_t*) queue_get_wait(wt->checker_terminator_queue);
|
||||
/* clean up the checker stuff */
|
||||
|
||||
pthread_join(ct->thread, NULL);
|
||||
decStatCounter(STAT_CNT_VERIFIER_CHECKER_R_THREADS);
|
||||
decStatCounter(vwh->vch->statCounter, STAT_CNT_VERIFIER_CHECKER_R_THREADS);
|
||||
syslog(LOG_DEBUG, "verify (%p) verify_work_destroy, checker_thread (id=%d) joined",
|
||||
work_handle, ct->id);
|
||||
|
||||
free(ct->output);
|
||||
free(ct);
|
||||
|
||||
cnt2--;
|
||||
wt->checker_cnt--;
|
||||
}
|
||||
|
||||
err = pthread_join(wt->thread, NULL);
|
||||
decStatCounter(STAT_CNT_VERIFIER_WORKER_R_THREADS);
|
||||
decStatCounter(vwh->vch->statCounter, STAT_CNT_VERIFIER_WORKER_R_THREADS);
|
||||
syslog(LOG_DEBUG, "verify (%p) verify_work_destroy, worker_thread (id=%d) joined",
|
||||
work_handle, wt->id);
|
||||
free(wt->input);
|
||||
@ -264,10 +316,13 @@ int verify_work_destroy(void *handle, void *work_handle) {
|
||||
|
||||
queue_destroy(wt->checker_terminator_queue);
|
||||
free(wt->checker_terminator_queue);
|
||||
|
||||
if (NULL != wt->rememberPropagatedOutput)
|
||||
free(wt->rememberPropagatedOutput);
|
||||
|
||||
free(wt);
|
||||
|
||||
cnt--;
|
||||
vwh->worker_cnt--;
|
||||
}
|
||||
|
||||
/* Free the members of the work_handle */
|
||||
@ -286,102 +341,64 @@ int verify_work_destroy(void *handle, void *work_handle) {
|
||||
|
||||
|
||||
|
||||
void cache_insert(verify_container_handle_t *vch, const char *address, int result, const char *output) {
|
||||
#if ENABLE_CACHE == 1
|
||||
DBM *cache;
|
||||
datum data, key;
|
||||
int ret;
|
||||
void cache_insert(verify_work_handle_t *vwh, const char *address, int result, const char *output) {
|
||||
int mydata_size;
|
||||
mydata_t *mydata;
|
||||
|
||||
if (1 == vch->cache_enabled) {
|
||||
syslog(LOG_DEBUG, "cache_insert: inserting %s -> %d, %s", address, result, output);
|
||||
key.dsize = strlen(address) + 1; /* one more for the terminating \0 */
|
||||
key.dptr = (char*) address;
|
||||
data.dsize = (sizeof(mydata_t) + (sizeof(char) * (strlen(output) + 1)));
|
||||
mydata = (mydata_t *) htmalloc(data.dsize);
|
||||
mydata->result = result;
|
||||
mydata->timestamp = time(NULL);
|
||||
strcpy(mydata->output, output);
|
||||
data.dptr = (char*) mydata;
|
||||
if (vwh == NULL) {
|
||||
syslog(LOG_CRIT, "cache_insert: vwh is NULL");
|
||||
return;
|
||||
}
|
||||
if (address == NULL) {
|
||||
syslog(LOG_CRIT, "cache_insert: address is NULL");
|
||||
return;
|
||||
}
|
||||
if (output == NULL) {
|
||||
syslog(LOG_CRIT, "cache_insert: output is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(vch->cache_mutex);
|
||||
if (NULL != (cache = dbm_open(vch->cache_file, O_RDWR | O_CREAT, 0644))) {
|
||||
ret = dbm_store(cache, key, data, DBM_INSERT);
|
||||
if (ret != 0) {
|
||||
syslog(LOG_DEBUG, "cache_insert: couldn't insert record");
|
||||
} else {
|
||||
incStatCounter(STAT_CNT_VERIFIER_CACHE);
|
||||
syslog(LOG_DEBUG, "cache_insert: record inserted");
|
||||
}
|
||||
dbm_close(cache);
|
||||
}
|
||||
pthread_mutex_unlock(vch->cache_mutex);
|
||||
if (NULL != vwh->vch->cache) {
|
||||
syslog(LOG_DEBUG, "verify (%p) cache_insert: inserting %s -> %d, %s", vwh, address, result, output);
|
||||
mydata_size = (sizeof(mydata_t) + (sizeof(char) * (strlen(output) + 1)));
|
||||
mydata = (mydata_t *) htmalloc(mydata_size);
|
||||
mydata->result = result;
|
||||
strcpy(mydata->output, output);
|
||||
|
||||
htcache_insert(vwh->vch->cache, address, (const char*) mydata, mydata_size);
|
||||
|
||||
free(mydata);
|
||||
}
|
||||
#else
|
||||
syslog(LOG_DEBUG, "cache_insert: cache disabled");
|
||||
#endif /* ENABLE_CACHE */
|
||||
}
|
||||
|
||||
int cache_lookup(verify_container_handle_t *vch, const char* address, int *result, char **output) {
|
||||
#if ENABLE_CACHE == 1
|
||||
DBM *cache;
|
||||
datum data, key;
|
||||
int cache_lookup(verify_work_handle_t *vwh, const char* address, int *result, char **output) {
|
||||
mydata_t *mydata;
|
||||
int ret, res = -1;
|
||||
int mydata_size;
|
||||
|
||||
if (1 == vch->cache_enabled) {
|
||||
syslog(LOG_DEBUG, "cache_lookup: looking up %s, expiry %d",
|
||||
address, vch->cache_expiry);
|
||||
if (vwh == NULL) {
|
||||
syslog(LOG_CRIT, "cache_lookup: vwh is NULL");
|
||||
return res;
|
||||
}
|
||||
if (address == NULL) {
|
||||
syslog(LOG_CRIT, "cache_lookup: address is NULL");
|
||||
return res;
|
||||
}
|
||||
|
||||
if (NULL != (cache = dbm_open(vch->cache_file, O_RDONLY, 0644))) {
|
||||
key.dsize = strlen(address) + 1; /* one more for the terminating \0 */
|
||||
key.dptr = (char*) address;
|
||||
data = dbm_fetch(cache, key);
|
||||
if (NULL == data.dptr) {
|
||||
syslog(LOG_DEBUG, "cache_lookup: nothing found");
|
||||
dbm_close(cache);
|
||||
} else {
|
||||
mydata = (mydata_t *) data.dptr;
|
||||
syslog(LOG_DEBUG, "cache_lookup: found: %s -> %d, %d, %s",
|
||||
address, mydata->result, mydata->timestamp, mydata->output);
|
||||
if ((mydata->timestamp + vch->cache_expiry) > time(NULL)) {
|
||||
syslog(LOG_DEBUG, "cache_lookup: not yet expired");
|
||||
*result = mydata->result;
|
||||
*output = (char*) htmalloc(sizeof(char) * (strlen(mydata->output) + 1));
|
||||
strcpy(*output, mydata->output);
|
||||
|
||||
/* Berkeley DB frees on its own! */
|
||||
/* free(data.dptr); */
|
||||
dbm_close(cache);
|
||||
res = 0;
|
||||
} else {
|
||||
syslog(LOG_DEBUG, "cache_lookup: expired, will be deleted from cache");
|
||||
/* free(data.dptr); --- Berkeley DB frees on its own */
|
||||
dbm_close(cache);
|
||||
|
||||
pthread_mutex_lock(vch->cache_mutex);
|
||||
if (NULL != (cache = dbm_open(vch->cache_file, O_RDWR, 0644))) {
|
||||
ret = dbm_delete(cache, key);
|
||||
if (ret != 0) {
|
||||
syslog(LOG_DEBUG, "cache_insert: couldn't delete record");
|
||||
} else {
|
||||
decStatCounter(STAT_CNT_VERIFIER_CACHE);
|
||||
syslog(LOG_DEBUG, "cache_insert: record deleted");
|
||||
}
|
||||
dbm_close(cache);
|
||||
}
|
||||
pthread_mutex_unlock(vch->cache_mutex);
|
||||
}
|
||||
}
|
||||
if (NULL != vwh->vch->cache) {
|
||||
syslog(LOG_DEBUG, "verify (%p) cache_lookup: Looking up %s", vwh, address);
|
||||
ret = htcache_lookup(vwh->vch->cache, address, (char**) &mydata, &mydata_size);
|
||||
if (0 == ret) {
|
||||
*result = mydata->result;
|
||||
*output = (char*) htmalloc(sizeof(char) * (strlen(mydata->output) + 1));
|
||||
strcpy(*output, mydata->output);
|
||||
res = 0;
|
||||
free(mydata);
|
||||
syslog(LOG_DEBUG, "verify (%p) cache_lookup: found %d %s", vwh, *result, *output);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
#else
|
||||
return -1;
|
||||
#endif /* ENABLE_CACHE */
|
||||
}
|
||||
|
||||
|
||||
@ -411,15 +428,17 @@ int cache_lookup(verify_container_handle_t *vch, const char* address, int *resul
|
||||
*/
|
||||
|
||||
#define PERM_NOK_RETURN(msg) \
|
||||
syslog(LOG_ERR, "verify (%p) verify_work: %s", vwh, msg); \
|
||||
snprintf(output, ANSWER_BUFSIZE, "verify_work: %s", msg); \
|
||||
syslog(LOG_ERR, "verify (%p) verify_work: %s", vwh, msg); \
|
||||
htbuffer_strcat(output, "verify_work: "); \
|
||||
htbuffer_strcat(output, msg); \
|
||||
return SMM_PERM_NOK;
|
||||
#define TEMP_NOK_RETURN(msg) \
|
||||
syslog(LOG_ERR, "verify (%p) verify_work: %s", vwh, msg); \
|
||||
snprintf(output, ANSWER_BUFSIZE, "verify_work: %s", msg); \
|
||||
syslog(LOG_ERR, "verify (%p) verify_work: %s", vwh, msg); \
|
||||
htbuffer_strcat(output, "verify_work: "); \
|
||||
htbuffer_strcat(output, msg); \
|
||||
return SMM_TEMP_NOK;
|
||||
|
||||
int verify_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
int verify_work(void *handle, void *work_handle, char *input, htbuffer_t *output) {
|
||||
int err;
|
||||
pthread_t tid;
|
||||
worker_thread_t *wt;
|
||||
@ -427,6 +446,18 @@ int verify_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
verify_work_handle_t *vwh = (verify_work_handle_t*) work_handle;
|
||||
struct timespec ts;
|
||||
|
||||
if (handle == NULL) {
|
||||
TEMP_NOK_RETURN("handle is NULL");
|
||||
}
|
||||
if (work_handle == NULL) {
|
||||
TEMP_NOK_RETURN("work_handle is NULL");
|
||||
}
|
||||
if (input == NULL) {
|
||||
TEMP_NOK_RETURN("input is NULL");
|
||||
}
|
||||
if (output == NULL) {
|
||||
TEMP_NOK_RETURN("output is NULL");
|
||||
}
|
||||
|
||||
syslog(LOG_DEBUG, "verify (%p) verify_work: going to verify %s\n", vwh, input);
|
||||
|
||||
@ -443,6 +474,7 @@ int verify_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
wt->mutex = vwh->result_mutex;
|
||||
wt->cond = vwh->result_cond;
|
||||
wt->result = vwh->result;
|
||||
wt->rememberPropagatedOutput = NULL;
|
||||
wt->checker_terminator_queue = (ht_queue_t*) htmalloc(sizeof(ht_queue_t));
|
||||
queue_init(wt->checker_terminator_queue);
|
||||
wt->checker_cnt = 0;
|
||||
@ -450,69 +482,129 @@ int verify_work(void *handle, void *work_handle, char *input, char *output) {
|
||||
|
||||
syslog(LOG_DEBUG, "verify (%p) verify_work: going to start worker thread, id=%d",
|
||||
vwh, vwh->id);
|
||||
|
||||
pthread_mutex_lock(vwh->result_mutex);
|
||||
err = pthread_create(&tid, NULL, &worker_thread, wt);
|
||||
if (-1 == err) {
|
||||
incStatCounter(STAT_CNT_VERIFIER_WORKER_THREADS_FAILED);
|
||||
if (0 != err) {
|
||||
incStatCounter(vch->statCounter, STAT_CNT_VERIFIER_WORKER_THREADS_FAILED);
|
||||
free(wt->input);
|
||||
free(wt);
|
||||
wt = NULL;
|
||||
pthread_mutex_unlock(vwh->result_mutex);
|
||||
PERM_NOK_RETURN("unable to create worker thread");
|
||||
} else {
|
||||
vwh->worker_cnt++;
|
||||
}
|
||||
|
||||
syslog(LOG_DEBUG, "verify (%p) verify_work: waiting for result", vwh);
|
||||
ts.tv_sec = time(0) + vch->timeout_result;
|
||||
ts.tv_nsec = 0;
|
||||
|
||||
err = pthread_cond_timedwait(vwh->result_cond, vwh->result_mutex, &ts);
|
||||
pthread_mutex_unlock(vwh->result_mutex);
|
||||
if (ETIMEDOUT == err) {
|
||||
incStatCounter(STAT_CNT_VERIFIER_WORKER_THREADS_TIMEOUT);
|
||||
incStatCounter(vwh->vch->statCounter, STAT_CNT_VERIFIER_WORKER_THREADS_TIMEOUT);
|
||||
TEMP_NOK_RETURN("worker thread timed out");
|
||||
}
|
||||
|
||||
snprintf(output, ANSWER_BUFSIZE, vwh->result->output);
|
||||
free(vwh->result->output);
|
||||
// snprintf(output, ANSWER_BUFSIZE, vwh->result->output);
|
||||
htbuffer_strcpy(output, vwh->result->output);
|
||||
|
||||
/* this belongs to the worker thread, it will be freed when the worker thread is cleaned up */
|
||||
/* free(vwh->result->output); */
|
||||
/* vwh->result->output = NULL; */
|
||||
|
||||
return vwh->result->result;
|
||||
}
|
||||
|
||||
|
||||
static unsigned int *get_mx_ip_addresses(char *domain) {
|
||||
mx_rdata_t **mx_rdata, **mx_rdata2;
|
||||
a_rdata_t **a_rdata, **a_rdata2;
|
||||
int i = 0;
|
||||
unsigned int *addresses = NULL;
|
||||
|
||||
mx_rdata = get_best_mx_rrs(domain);
|
||||
if (NULL == mx_rdata) {
|
||||
syslog(LOG_DEBUG, "get_mx_ip_address: no mx at all");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (mx_rdata2 = mx_rdata; *mx_rdata2 != NULL; mx_rdata2++) {
|
||||
syslog(LOG_DEBUG, "get_mx_ip_address: %s", (*mx_rdata2)->exchange);
|
||||
|
||||
a_rdata = get_a_rrs((*mx_rdata2)->exchange);
|
||||
static void inner_resolve(char *domain, unsigned int **addresses, int *num_of_addresses) {
|
||||
if (domain != NULL) {
|
||||
syslog(LOG_DEBUG, "inner_resolve: %s", domain);
|
||||
|
||||
a_rdata_t **a_rdata = get_a_rrs(domain);
|
||||
a_rdata_t **a_rdata2;
|
||||
if (NULL != a_rdata) {
|
||||
for (a_rdata2 = a_rdata; *a_rdata2 != NULL; a_rdata2++) {
|
||||
addresses = (unsigned int*)htrealloc(addresses, sizeof(unsigned int)*(i+2)); /* 2 since first i==0 and
|
||||
we always need one more
|
||||
for the termination */
|
||||
*(addresses+i) = (*a_rdata2)->address;
|
||||
i++;
|
||||
syslog(LOG_DEBUG, "inner_resolve: arranging result");
|
||||
*addresses = (unsigned int*)htrealloc(*addresses, sizeof(unsigned int)*(*num_of_addresses + 2)); /* 2 since first i==0 and
|
||||
we always need one more
|
||||
for the termination */
|
||||
*(*addresses + *num_of_addresses) = (*a_rdata2)->address;
|
||||
*num_of_addresses += 1;
|
||||
}
|
||||
free_rrs((void**)a_rdata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned int *get_mx_ip_addresses(char *domain) {
|
||||
mx_rdata_t **mx_rdata, **mx_rdata2;
|
||||
// a_rdata_t **a_rdata, **a_rdata2;
|
||||
int i = 0;
|
||||
unsigned int *addresses = NULL;
|
||||
|
||||
if (NULL == domain) {
|
||||
syslog(LOG_CRIT, "get_mx_ip_addresses: domain is NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
mx_rdata = get_best_mx_rrs(domain);
|
||||
if (NULL != mx_rdata) {
|
||||
for (mx_rdata2 = mx_rdata; *mx_rdata2 != NULL; mx_rdata2++) {
|
||||
inner_resolve((*mx_rdata2)->exchange, &addresses, &i);
|
||||
}
|
||||
free_rrs((void**)mx_rdata);
|
||||
} else {
|
||||
syslog(LOG_DEBUG, "get_mx_ip_address: no mx at all, trying a-rr");
|
||||
inner_resolve(domain, &addresses, &i);
|
||||
}
|
||||
|
||||
if (NULL != addresses)
|
||||
*(addresses+i) = 0; /* termination */
|
||||
|
||||
free_rrs((void**)mx_rdata);
|
||||
syslog(LOG_DEBUG, "get_mx_ip_addresses: Found %d addresses", i);
|
||||
int j;
|
||||
for (j = 0; j < i; j++)
|
||||
syslog(LOG_DEBUG, "get_mx_ip_addresses: %d.%d.%d.%d",
|
||||
(htonl(*(addresses+j))&0xff000000)>>24, (htonl(*(addresses+j))&0x00ff0000)>>16,
|
||||
(htonl(*(addresses+j))&0x0000ff00)>>8, (htonl(*(addresses+j))&0x000000ff));
|
||||
|
||||
|
||||
|
||||
|
||||
return addresses;
|
||||
}
|
||||
|
||||
static unsigned int *get_hostname_ip_addresses(char *hostname) {
|
||||
if (NULL == hostname) {
|
||||
syslog(LOG_CRIT, "get_hostname_ip_addresses: hostname is NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned int *addresses = NULL;
|
||||
int i = 0;
|
||||
inner_resolve(hostname, &addresses, &i);
|
||||
|
||||
if (NULL != addresses)
|
||||
*(addresses+i) = 0; /* termination */
|
||||
|
||||
syslog(LOG_DEBUG, "get_hostname_ip_addresses: Found %d addresses", i);
|
||||
int j;
|
||||
for (j = 0; j < i; j++)
|
||||
syslog(LOG_DEBUG, "get_hostname_ip_addresses: %d.%d.%d.%d",
|
||||
(htonl(*(addresses+j))&0xff000000)>>24, (htonl(*(addresses+j))&0x00ff0000)>>16,
|
||||
(htonl(*(addresses+j))&0x0000ff00)>>8, (htonl(*(addresses+j))&0x000000ff));
|
||||
|
||||
return addresses;
|
||||
}
|
||||
|
||||
|
||||
static void *checker_thread(void *arg) {
|
||||
if (arg == NULL) {
|
||||
syslog(LOG_CRIT, "checker_thread: arg is NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const char *UNEXPECTED_ERROR = "unexpected error in smtp dialog";
|
||||
static const char *TIMEOUT_ERROR = "timeout on smtp dialog";
|
||||
static const char *ADDRESS_VALID = "address is valid";
|
||||
@ -540,8 +632,8 @@ static void *checker_thread(void *arg) {
|
||||
|
||||
ct->thread = pthread_self();
|
||||
|
||||
incStatCounter(STAT_CNT_VERIFIER_CHECKER_THREADS);
|
||||
incStatCounter(STAT_CNT_VERIFIER_CHECKER_R_THREADS);
|
||||
incStatCounter(ct->vwh->vch->statCounter, STAT_CNT_VERIFIER_CHECKER_THREADS);
|
||||
incStatCounter(ct->vwh->vch->statCounter, STAT_CNT_VERIFIER_CHECKER_R_THREADS);
|
||||
|
||||
/*
|
||||
Connect to ct->ip_address using ct->email_address,
|
||||
@ -647,8 +739,13 @@ static void *checker_thread(void *arg) {
|
||||
|
||||
|
||||
static void *worker_thread(void *arg) {
|
||||
if (arg == NULL) {
|
||||
syslog(LOG_CRIT, "worker_thread: arg is NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
worker_thread_t *wt = (worker_thread_t*) arg;
|
||||
char *domain_part;
|
||||
char *domain_part, *hostname_part;
|
||||
unsigned int *mx_ip_addresses;
|
||||
int result = SMM_TEMP_NOK;
|
||||
int i, err;
|
||||
@ -659,15 +756,17 @@ static void *worker_thread(void *arg) {
|
||||
static const char *NOT_AN_ADDRESS = "not an email-address, no @ in it";
|
||||
static const char *DEFAULT_ANSWER = "default answer";
|
||||
static const char *NO_MX_AVAILABLE = "no MX available";
|
||||
static const char *ILLEGAL_MX_ADDRESS = "0.0.0.0 can not be used at all";
|
||||
static const char *NO_PERM_RESULT = "no checker returned permanent result";
|
||||
static const char *INTERNAL_ERROR = "verifier internal error";
|
||||
|
||||
syslog(LOG_DEBUG, "verify (%p) worker_thread %d started, %s",
|
||||
wt->vwh, wt->id, wt->input);
|
||||
|
||||
wt->thread = pthread_self();
|
||||
|
||||
incStatCounter(STAT_CNT_VERIFIER_WORKER_R_THREADS);
|
||||
incStatCounter(STAT_CNT_VERIFIER_WORKER_THREADS);
|
||||
incStatCounter(wt->vwh->vch->statCounter, STAT_CNT_VERIFIER_WORKER_R_THREADS);
|
||||
incStatCounter(wt->vwh->vch->statCounter, STAT_CNT_VERIFIER_WORKER_THREADS);
|
||||
|
||||
|
||||
|
||||
@ -677,30 +776,36 @@ static void *worker_thread(void *arg) {
|
||||
wt->output = (char*) NOT_AN_ADDRESS;
|
||||
result = SMM_LOCAL_PERM_NOK;
|
||||
} else {
|
||||
if (0 == cache_lookup(wt->vwh->vch, wt->input, &result, &cached_output)) {
|
||||
if (0 == cache_lookup(wt->vwh, wt->input, &result, &cached_output)) {
|
||||
syslog(LOG_DEBUG, "verify (%p) worker_thread: got a cached result for %s -> %d, %s",
|
||||
wt->vwh, wt->input, result, cached_output);
|
||||
incStatCounter(STAT_CNT_VERIFIER_ANSWERED_FROM_CACHE);
|
||||
incStatCounter(wt->vwh->vch->statCounter, STAT_CNT_VERIFIER_ANSWERED_FROM_CACHE);
|
||||
wt->output = cached_output;
|
||||
} else {
|
||||
domain_part += 1;
|
||||
|
||||
syslog(LOG_DEBUG, "verify (%p) worker_thread: looking up %s",
|
||||
wt->vwh, domain_part);
|
||||
|
||||
mx_ip_addresses = get_mx_ip_addresses(domain_part);
|
||||
hostname_part = strchr(domain_part, ' ');
|
||||
if (hostname_part) {
|
||||
*hostname_part = '\0';
|
||||
hostname_part += 1;
|
||||
|
||||
mx_ip_addresses = get_hostname_ip_addresses(hostname_part);
|
||||
} else {
|
||||
syslog(LOG_DEBUG, "verify (%p) worker_thread: looking up %s by MX",
|
||||
wt->vwh, domain_part);
|
||||
|
||||
mx_ip_addresses = get_mx_ip_addresses(domain_part);
|
||||
}
|
||||
|
||||
if (NULL == mx_ip_addresses) {
|
||||
wt->output = (char*) NO_MX_AVAILABLE;
|
||||
result = SMM_LOCAL_PERM_NOK;
|
||||
} else if (0 == *mx_ip_addresses) { /* 0.0.0.0 is strange enough for a special case */
|
||||
wt->output = (char*) ILLEGAL_MX_ADDRESS;
|
||||
result = SMM_LOCAL_PERM_NOK;
|
||||
} else {
|
||||
for (i = 0; (*(mx_ip_addresses+i) != 0) && (i < wt->vwh->vch->max_checker_threads); i++) {
|
||||
unsigned int address = *(mx_ip_addresses+i);
|
||||
syslog(LOG_DEBUG, "verify (%p) worker_thread: starting checker thread to %d.%d.%d.%d, for email-address %s",
|
||||
wt->vwh,
|
||||
(address&0xff000000)>>24, (address&0x00ff0000)>>16,
|
||||
(address&0x0000ff00)>>8, (address&0x000000ff),
|
||||
wt->input);
|
||||
|
||||
ct = (checker_thread_t*) htmalloc(sizeof(checker_thread_t));
|
||||
ct->id = i+1; /* id of ct should start with 1, same as id of wt */
|
||||
ct->ip_address = address;
|
||||
@ -709,12 +814,23 @@ static void *worker_thread(void *arg) {
|
||||
ct->result = SMM_TEMP_NOK;
|
||||
ct->checker_terminator_queue = wt->checker_terminator_queue;
|
||||
ct->vwh = wt->vwh;
|
||||
|
||||
syslog(LOG_DEBUG, "verify (%p) worker_thread: starting checker thread (%p) to %d.%d.%d.%d, for email-address %s",
|
||||
wt->vwh,
|
||||
ct,
|
||||
(htonl(address)&0xff000000)>>24, (htonl(address)&0x00ff0000)>>16,
|
||||
(htonl(address)&0x0000ff00)>>8, (htonl(address)&0x000000ff),
|
||||
wt->input);
|
||||
|
||||
|
||||
err = pthread_create(&tid, NULL, &checker_thread, ct);
|
||||
if (-1 == err) {
|
||||
incStatCounter(STAT_CNT_VERIFIER_CHECKER_THREADS_FAILED);
|
||||
syslog(LOG_ERR, "verify (%p) worker_thread: unable to create checker thread", wt->vwh);
|
||||
if (0 != err) {
|
||||
incStatCounter(ct->vwh->vch->statCounter, STAT_CNT_VERIFIER_CHECKER_THREADS_FAILED);
|
||||
syslog(LOG_ERR, "verify (%p) worker_thread: unable to create checker thread: %d", wt->vwh, err);
|
||||
free(ct);
|
||||
ct = NULL;
|
||||
wt->output = (char*) INTERNAL_ERROR;
|
||||
result = SMM_LOCAL_TEMP_NOK;
|
||||
} else {
|
||||
wt->checker_cnt += 1;
|
||||
}
|
||||
@ -727,12 +843,12 @@ static void *worker_thread(void *arg) {
|
||||
wt->checker_cnt -= 1;
|
||||
syslog(LOG_DEBUG, "verify (%p) worker_thread: got checker result for %d.%d.%d.%d: %s -> %d, %s",
|
||||
wt->vwh,
|
||||
((ct->ip_address)&0xff000000)>>24, ((ct->ip_address)&0x00ff0000)>>16,
|
||||
((ct->ip_address)&0x0000ff00)>>8, ((ct->ip_address)&0x000000ff),
|
||||
(htonl(ct->ip_address)&0xff000000)>>24, (htonl(ct->ip_address)&0x00ff0000)>>16,
|
||||
(htonl(ct->ip_address)&0x0000ff00)>>8, (htonl(ct->ip_address)&0x000000ff),
|
||||
wt->input, ct->result, ct->output);
|
||||
|
||||
pthread_join(ct->thread, NULL);
|
||||
decStatCounter(STAT_CNT_VERIFIER_CHECKER_R_THREADS);
|
||||
decStatCounter(ct->vwh->vch->statCounter, STAT_CNT_VERIFIER_CHECKER_R_THREADS);
|
||||
syslog(LOG_DEBUG, "verify (%p) worker_thread: checker thread joined", wt->vwh);
|
||||
|
||||
if ((SMM_LOCAL_TEMP_NOK != ct->result) &&
|
||||
@ -740,7 +856,14 @@ static void *worker_thread(void *arg) {
|
||||
syslog(LOG_DEBUG, "verify (%p) worker_thread: this is a permanent result, returning", wt->vwh);
|
||||
wt->output = ct->output;
|
||||
result = ct->result;
|
||||
cache_insert(wt->vwh->vch, wt->input, ct->result, ct->output);
|
||||
|
||||
/* re-concatenate hostname_part */
|
||||
if (hostname_part) {
|
||||
hostname_part--;
|
||||
*hostname_part = ' ';
|
||||
}
|
||||
|
||||
cache_insert(wt->vwh, wt->input, ct->result, ct->output);
|
||||
/* ct will be freed later, since its output is needed below */
|
||||
break; /* exit from the ct-collecting while loop, leave the rest of the ct's
|
||||
for the cleanup */
|
||||
@ -769,20 +892,21 @@ static void *worker_thread(void *arg) {
|
||||
/* we can write the result */
|
||||
wt->result->output = (char*) htmalloc(sizeof(char) * (strlen(wt->output)+15)); /* enough for the output
|
||||
plus <><> and prefix */
|
||||
wt->rememberPropagatedOutput = wt->result->output;
|
||||
switch (result) {
|
||||
case SMM_LOCAL_TEMP_NOK:
|
||||
sprintf(wt->result->output, "<TNOK><%s>", wt->output);
|
||||
incStatCounter(STAT_CNT_VERIFIER_RETURNED_TNOK);
|
||||
incStatCounter(wt->vwh->vch->statCounter, STAT_CNT_VERIFIER_RETURNED_TNOK);
|
||||
result = SMM_OK;
|
||||
break;
|
||||
case SMM_LOCAL_PERM_NOK:
|
||||
sprintf(wt->result->output, "<NOK><%s>", wt->output);
|
||||
incStatCounter(STAT_CNT_VERIFIER_RETURNED_NOK);
|
||||
incStatCounter(wt->vwh->vch->statCounter, STAT_CNT_VERIFIER_RETURNED_NOK);
|
||||
result = SMM_OK;
|
||||
break;
|
||||
case SMM_LOCAL_OK:
|
||||
sprintf(wt->result->output, "<OK><%s>", wt->output);
|
||||
incStatCounter(STAT_CNT_VERIFIER_RETURNED_OK);
|
||||
incStatCounter(wt->vwh->vch->statCounter, STAT_CNT_VERIFIER_RETURNED_OK);
|
||||
result = SMM_OK;
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user