The postulates of thermodynamics were originally formulated for macroscopic systems. They lead to the definition of the entropy, which, for a homogeneous system, is a homogeneous function of order one in the extensive variables and is maximized at equilibrium. We say that the macroscopic systems are extensive and so it is also the entropy. For a mesoscopic system, by definition, the size and the contacts with other systems influence its thermodynamic properties and therefore, if we define an entropy, this cannot be a homogeneous of order one function in the extensive variables.So, mesoscopic systems and their entropies are non-extensive. While for macroscopic systems and homogeneous entropies the equilibrium conditions are clearly defined, it is not so clear how the nonextensive entropies should be applied for the calculation of equilibrium properties of mesoscopic systems-for example it is not clear what is the role played by the boundaries and the contacts between the subsystems. We propose here a general definition of the entropy in the equilibrium state, which is applicable to both, macroscopic and mesoscopic systems. This definition still leaves an apparent ambiguity in the definition of the entropy of a mesoscopic system, but this we recognize as the signature of the anthropomorphic character of the entropy (see Jaynes, Am. J. Phys. 33, 391, 1965).To exemplify our approach, we analyze four formulas for the entropy (two for extensive and two for non-extensive entropies) and calculate the equilibrium (canonical) distribution of probabilities by two methods for each. We show that these methods, although widely used, are not equivalent and one of them is a consequence of our definition of the entropy of a compound system. PACS numbers: 05.; 05.90.+m; 02.50.-r