Q:

Preferred order of declarations and #defines in a header file

I am programing in C language in Linux platform . I want to know should be the order of declarations and #defines in a header file. 
For example if my header file includes following thing can anyone please suggest me what should the perfect order to arrange all these declarations, function like macros , exteren declarations, etc.
This can be really beneficial for arranging all these things in a header file properly in terms of readability and coding standards. 
Below is the sample header file (I want to arrange the following in a proper order)  :
 #include <pthread.h>                   //  Including Header files 
 #include <signal.h>

 #define IMAGE_DIRECTORY                 "Abcdefgh..."   //  Providing #defines 
 #define FAILED_TO_RECOGNIZE             "Xykbkksk..."
 #define PROGRESS_FRAME_COLOR            "#8e8ea1"
 #define FRAME_BG_COLOR                  "#7c90ac"      

 #define PRINT_FUNCTION_NAME fprintf(stderr, 
                   "CTRL IN FUNCTION : %s\n",__func__);   // Macro like functions 
typedef struct {                                           
        int userId;                                      // Structure
         char name[32], rollNo[32];
         char class[16], section[16];
         unsigned long Id;
 }data_type;

int noOfUsersList=0, usersListCount=0;                   // Global variables 

A:

I haven't done this for years but when I was heavily developing for Unix, MS.DOS, OS/2, NetWare, and Windows simultaneously I developed this practice:

Language #includes
Operating system #includes
#includes from other subsystems, e.g. X11.
My own application #includes.
My own local #defines for this source file.
My own forward declarations for this file.

Maybe you can reverse (1) and (2) but I found this order to work the best across quite  a number of compilers and operating systems.

