Small Poker program in C
A key problem is that this code only returns the kind of poker hand.  Given that subsequent code will need to compare hands, like which straight is better, it makes sense that this code not only rate the kind of hand, but also provide info like top card in a straight, or rank of the cards that make up 2-pairs.
Inconsistent use of magic numbers and macros.  Why MAXTYPES and then 12.

//int type[MAXTYPES] = { [0 ... 12] = 0 }, *types ;
int type[MAXTYPES] = { 0 };

Recommend to avoid declaring variables of different types on the same line.  Instead consider initializing as part of the declaration

// int type[MAXTYPES] = { [0 ... 12] = 0 }, *types ;
// types = count_types( sorted, type );
int type[MAXTYPES] = { [0 ... 12] = 0 };
int *types = count_types( sorted, type );

Odd to use a enum for the suits and then magic numbers for return codes

    switch (hand[i].nSuit) {
        case spades:    suits[0]++; break;
        ...
        else return 9;

Flush code can be simplified.  Only need to check if the cards all have the same suit as the first.  Similar code can be used to determine a straight with sorted cards

bool flushsuit = true;
for (int i = 1; i &lt; MAXHAND; ++i) {
  if (hand[0].nSuit != hand[i].nSuit) {
    flushsuit = false;
    break;
  }
}

The redundant code for check of pairs, 3-of-a-kind, etc. can also be simplified.  Given their similarities, consider combining code

#define RANK 13

group[MAXHAND+1] = { 0 };
rankcount[RANK] = { 0 };
for (int i = 0; i &lt; MAXHAND; ++i) {
  int rank = hand[i].nType;
  rankcount[rank]++;
  group[rankcount[rank]]++;
}

if (group[5]) return five_of_a_kind;
if (group[4]) return four_of_a_kind;
if (group[3] &amp;&amp; group[2] &gt; 1) return full_house;
if (group[3]) return three_of_a_kind;
if (group[2] &gt; 1) return two_pair;
if (group[2]) return pair

Functions that do not change pointed-to objects, use const

 // int checkhand (struct Card_s * hand);
 int checkhand (const struct Card_s * hand);

To determine if the hand is a straight, without sorting, consider a bit array:

unsigned ranks = 0;
for (int i = 0; i &lt; MAXHAND; ++i) {
  int rank = hand[i].nType;
  ranks |= 1u &lt;&lt; rank;
}

// Replicate lo_ace as hi_ace 
ranks |= (ranks &amp; ACE) &lt;&lt; RANK;

#define FIVE_IN_A_ROW 0x1F
bool IsStraight = false;
while (ranks) {
  if (ranks &amp; FIVE_IN_A_ROW == FIVE_IN_A_ROW) {
    IsStraight = true;
    break;
  }         
  ranks &gt;&gt;= 1;
}