More compilaton optimisation
Do not compile most of service_table.c and client_table.c if --disable-gena is used. Do not compile urlconfig.c if --disable-webserver is used. Adding new UPNP_HAVE_xxx variables in upnpconfig.h and upnpconfig.h.in.
This commit is contained in:
parent
7aef73d7eb
commit
bb140000c0
@ -2,6 +2,15 @@
|
||||
Version 1.6.16
|
||||
*******************************************************************************
|
||||
|
||||
2012-03-09 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||
|
||||
More compilaton optimisation
|
||||
|
||||
Do not compile most of service_table.c and client_table.c if
|
||||
--disable-gena is used.
|
||||
Do not compile urlconfig.c if --disable-webserver is used.
|
||||
Adding new UPNP_HAVE_xxx variables in upnpconfig.h and upnpconfig.h.in.
|
||||
|
||||
2012-03-09 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||
|
||||
Optimisation of --disable-webserver
|
||||
|
@ -100,6 +100,21 @@
|
||||
#define UPNP_HAVE_WEBSERVER 1
|
||||
|
||||
|
||||
/** Defined to 1 if the library has been compiled with the SSDP part enabled
|
||||
* (i.e. configure --enable-ssdp) */
|
||||
#define UPNP_HAVE_SSDP 1
|
||||
|
||||
|
||||
/** Defined to 1 if the library has been compiled with the SOAP part enabled
|
||||
* (i.e. configure --enable-soap) */
|
||||
#define UPNP_HAVE_SOAP 1
|
||||
|
||||
|
||||
/** Defined to 1 if the library has been compiled with the GENA part enabled
|
||||
* (i.e. configure --enable-gena) */
|
||||
#define UPNP_HAVE_GENA 1
|
||||
|
||||
|
||||
/** Defined to 1 if the library has been compiled with helper API
|
||||
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
|
||||
#define UPNP_HAVE_TOOLS 1
|
||||
|
@ -99,6 +99,21 @@
|
||||
#undef UPNP_HAVE_WEBSERVER
|
||||
|
||||
|
||||
/** Defined to 1 if the library has been compiled with the SSDP part enabled
|
||||
* (i.e. configure --enable-ssdp) */
|
||||
#undef UPNP_HAVE_SSDP
|
||||
|
||||
|
||||
/** Defined to 1 if the library has been compiled with the SOAP part enabled
|
||||
* (i.e. configure --enable-soap) */
|
||||
#undef UPNP_HAVE_SOAP
|
||||
|
||||
|
||||
/** Defined to 1 if the library has been compiled with the GENA part enabled
|
||||
* (i.e. configure --enable-gena) */
|
||||
#undef UPNP_HAVE_GENA
|
||||
|
||||
|
||||
/** Defined to 1 if the library has been compiled with helper API
|
||||
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
|
||||
#undef UPNP_HAVE_TOOLS
|
||||
|
@ -850,6 +850,7 @@ int UpnpRegisterRootDevice(
|
||||
"UpnpRegisterRootDevice: No services found for RootDevice\n");
|
||||
}
|
||||
|
||||
#if EXCLUDE_GENA == 0
|
||||
/*
|
||||
* GENA SET UP
|
||||
*/
|
||||
@ -869,6 +870,7 @@ int UpnpRegisterRootDevice(
|
||||
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
||||
"\nUpnpRegisterRootDevice: Empty service table\n");
|
||||
}
|
||||
#endif /* EXCLUDE_GENA */
|
||||
|
||||
UpnpSdkDeviceRegisteredV4 = 1;
|
||||
|
||||
@ -1009,6 +1011,7 @@ int UpnpRegisterRootDevice2(
|
||||
"UpnpRegisterRootDevice2: No services found for RootDevice\n");
|
||||
}
|
||||
|
||||
#if EXCLUDE_GENA == 0
|
||||
/*
|
||||
* GENA SET UP
|
||||
*/
|
||||
@ -1028,6 +1031,7 @@ int UpnpRegisterRootDevice2(
|
||||
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
||||
"\nUpnpRegisterRootDevice2: Empty service table\n");
|
||||
}
|
||||
#endif /* EXCLUDE_GENA */
|
||||
|
||||
UpnpSdkDeviceRegisteredV4 = 1;
|
||||
|
||||
@ -1178,6 +1182,7 @@ int UpnpRegisterRootDevice4(
|
||||
"UpnpRegisterRootDevice4: No services found for RootDevice\n");
|
||||
}
|
||||
|
||||
#if EXCLUDE_GENA == 0
|
||||
/*
|
||||
* GENA SET UP
|
||||
*/
|
||||
@ -1197,6 +1202,7 @@ int UpnpRegisterRootDevice4(
|
||||
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
||||
"\nUpnpRegisterRootDevice4: Empty service table\n");
|
||||
}
|
||||
#endif /* EXCLUDE_GENA */
|
||||
|
||||
if (AddressFamily == AF_INET) {
|
||||
UpnpSdkDeviceRegisteredV4 = 1;
|
||||
|
@ -2,6 +2,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2003 Intel Corporation
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@ -44,7 +45,7 @@
|
||||
|
||||
|
||||
#ifdef INCLUDE_CLIENT_APIS
|
||||
|
||||
#if EXCLUDE_GENA == 0
|
||||
|
||||
#include <stdlib.h> /* for calloc(), free() */
|
||||
|
||||
@ -324,6 +325,6 @@ ClientSubscription *GetClientSubActualSID(ClientSubscription *head, token *sid)
|
||||
return next;
|
||||
}
|
||||
|
||||
|
||||
#endif /* INCLUDE_CLIENT_APIS */
|
||||
#endif /* EXCLUDE_GENA */
|
||||
#endif /* INCLUDE_CLIENT_APIS */
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
|
||||
#ifdef INCLUDE_DEVICE_APIS
|
||||
|
||||
#if EXCLUDE_GENA == 0
|
||||
/************************************************************************
|
||||
* Function : copy_subscription
|
||||
*
|
||||
@ -322,6 +323,7 @@ FindServiceEventURLPath( service_table * table,
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif /* EXCLUDE_GENA */
|
||||
|
||||
/************************************************************************
|
||||
* Function : FindServiceControlURLPath
|
||||
@ -339,6 +341,7 @@ FindServiceEventURLPath( service_table * table,
|
||||
*
|
||||
* Note :
|
||||
************************************************************************/
|
||||
#if EXCLUDE_SOAP == 0
|
||||
service_info *
|
||||
FindServiceControlURLPath( service_table * table,
|
||||
const char *controlURLPath )
|
||||
@ -370,6 +373,7 @@ FindServiceControlURLPath( service_table * table,
|
||||
return NULL;
|
||||
|
||||
}
|
||||
#endif /* EXCLUDE_SOAP */
|
||||
|
||||
/************************************************************************
|
||||
* Function : printService
|
||||
@ -515,6 +519,7 @@ void printServiceTable(
|
||||
printServiceList( table->serviceList, level, module );}
|
||||
#endif
|
||||
|
||||
#if EXCLUDE_GENA == 0
|
||||
/************************************************************************
|
||||
* Function : freeService
|
||||
*
|
||||
@ -1062,6 +1067,7 @@ getServiceTable( IXML_Node * node,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* EXCLUDE_GENA */
|
||||
|
||||
#endif /* INCLUDE_DEVICE_APIS */
|
||||
|
||||
|
@ -54,6 +54,9 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_DEVICE_APIS
|
||||
#ifdef INTERNAL_WEB_SERVER
|
||||
|
||||
/************************************************************************
|
||||
* Function : addrToString
|
||||
*
|
||||
@ -417,3 +420,5 @@ error_handler:
|
||||
}
|
||||
return err_code;
|
||||
}
|
||||
#endif /* INCLUDE_DEVICE_APIS */
|
||||
#endif /* INTERNAL_WEB_SERVER */
|
||||
|
Loading…
x
Reference in New Issue
Block a user