forked from Imagelibrary/rtems
Move feature macro before "config.h" include
This allows to use header includes in "config.h" to reduce the build configuration checks. Update #3818.
This commit is contained in:
@@ -13,12 +13,12 @@
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <rtems.h>
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <rtems/test.h>
|
||||
#include <tmacros.h>
|
||||
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#define _POSIX_26_C_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _POSIX_26_C_SOURCE
|
||||
#include "tmacros.h"
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <tmacros.h>
|
||||
#include <errno.h>
|
||||
#include <sched.h>
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#define _POSIX_26_C_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _POSIX_26_C_SOURCE
|
||||
|
||||
#include <devctl.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
#include <ftw.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
#include <ftw.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <math.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
#include <math.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <math.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
@@ -29,11 +29,13 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <stdio.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <stdio.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <stdio.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
#include <stdlib.h>
|
||||
|
||||
int test( void );
|
||||
@@ -47,4 +48,4 @@ int test( void )
|
||||
char *valuep;
|
||||
return_value = getsubopt(&optionp, tokens, &valuep);
|
||||
return return_value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
#include <stdlib.h>
|
||||
|
||||
int test( void );
|
||||
@@ -46,4 +47,4 @@ int test( void )
|
||||
|
||||
return_value = grantpt(fildes);
|
||||
return return_value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 600
|
||||
#include <stdlib.h>
|
||||
|
||||
int test( void );
|
||||
@@ -45,4 +46,4 @@ int test( void )
|
||||
|
||||
return_value = posix_openpt(1);
|
||||
return (return_value != -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
#include <stdlib.h>
|
||||
|
||||
int test( void );
|
||||
@@ -45,4 +46,4 @@ int test( void )
|
||||
|
||||
return_value = (char *)ptsname(1);
|
||||
return (return_value != NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
#include <stdlib.h>
|
||||
|
||||
int test( void );
|
||||
@@ -45,4 +46,4 @@ int main( void )
|
||||
|
||||
setkey(array);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
#include <stdlib.h>
|
||||
|
||||
int test( void );
|
||||
@@ -46,4 +47,4 @@ int test( void )
|
||||
|
||||
return_value = unlockpt(fd);
|
||||
return (return_value != -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include <strings.h>
|
||||
#include <locale.h>
|
||||
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
#include <sys/msg.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
@@ -30,12 +30,13 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
#include <sys/msg.h>
|
||||
#include <sys/msg.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
|
||||
@@ -30,16 +30,17 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define STACK_SIZE (1<<15) // 32KiB
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#include <ucontext.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define STACK_SIZE (1<<15) // 32KiB
|
||||
|
||||
int test( void );
|
||||
void func( void );
|
||||
|
||||
@@ -63,4 +64,4 @@ int test( void )
|
||||
void func( void )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#include <ucontext.h>
|
||||
|
||||
int return_value = 0;
|
||||
@@ -54,4 +55,4 @@ void func( void )
|
||||
{
|
||||
setcontext(ucp);
|
||||
return_value = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
#include <wchar.h>
|
||||
|
||||
int test(void);
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
#include <wchar.h>
|
||||
|
||||
int test(void);
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/libcsupport.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user